A fork's second proposal waits for the fork to follow its parent before landing more work, so it no longer races the follow on a slow machine #56

Merged
grokbot merged 1 commit from grokbot/forge:fix/following-waits-for-follow into main 2026-10-17 23:27:13 +00:00
Owner

"a proposal names only what is actually ahead" lands a pull in bob/lamp
right after alice merged bob's first proposal into alice/lamp. That merge
moves the untouched fork on the bus (following.ts), and the test's next
mergePull reads the fork's main before the move and CASes it after:
update-ref fails and the merge returns base_moved. On one core, 3 of 6
runs on main failed that way:

error: {"kind":"base_moved"}
at test/following.test.ts:852:33

The test now waits, as this file's settle() does, until the fork is synced
with the parent's tip before landing the next pull. What it asserts is
unchanged. 12 of 12 runs pass on one core.

Evidence

On one core (taskset -c 0, pinned bun 1.3.14), bun test ./test/following.test.ts -t "names only what is actually ahead", 10 runs each:

  • main 18917b93: 8 pass, 2 fail with error: {"kind":"base_moved"}
  • this branch: 10 pass, 0 fail

This is the race that made validate report #47 flaky on gate 2 (a fork that follows its parent > a proposal names only what is actually ahead). Test-only change; what the test asserts is unchanged.

Validation

pipeline/validate on 06be2090: pass in 10s — bun 1.3.14, CI-shaped env (scrubbed vars, runner PATH), exact check.yml shard + forge.json commands.

step result time
bun install --frozen-lockfile ok (exit 0) 0s
forge.json check.fast ok (exit 0) 4s
check.yml gate (1) pull_request ok (exit 0) 0s
check.yml gate (2) pull_request ok (exit 0) 3s
check.yml gate (3) pull_request ok (exit 0) 3s
  • ⚠️ node v20.19.2 here, v22 on CI (tsc runs under node)
test output (failures, totals)
▶ bun install --frozen-lockfile
  ok  exit 0  0s
▶ forge.json check.fast
Ran 114 tests across 8 files in 1.9s (8 shards).
  ok  exit 0  4s
▶ check.yml gate (1) pull_request
Ran 12 tests across 2 files in 0.1s (2 shards).
  ok  exit 0  0s
▶ check.yml gate (2) pull_request
Ran 34 tests across 3 files in 2.6s (3 shards).
  ok  exit 0  3s
▶ check.yml gate (3) pull_request
Ran 68 tests across 3 files in 2.4s (3 shards).
  ok  exit 0  3s
"a proposal names only what is actually ahead" lands a pull in bob/lamp right after alice merged bob's first proposal into alice/lamp. That merge moves the untouched fork on the bus (following.ts), and the test's next mergePull reads the fork's main before the move and CASes it after: update-ref fails and the merge returns base_moved. On one core, 3 of 6 runs on main failed that way: error: {"kind":"base_moved"} at test/following.test.ts:852:33 The test now waits, as this file's settle() does, until the fork is synced with the parent's tip before landing the next pull. What it asserts is unchanged. 12 of 12 runs pass on one core. ## Evidence On one core (`taskset -c 0`, pinned bun 1.3.14), `bun test ./test/following.test.ts -t "names only what is actually ahead"`, 10 runs each: - main 18917b93: 8 pass, 2 fail with `error: {"kind":"base_moved"}` - this branch: 10 pass, 0 fail This is the race that made `validate` report #47 flaky on gate 2 (`a fork that follows its parent > a proposal names only what is actually ahead`). Test-only change; what the test asserts is unchanged. <!-- pipeline:validation --> ### Validation `pipeline/validate` on `06be2090`: **pass** in 10s — bun 1.3.14, CI-shaped env (scrubbed vars, runner PATH), exact check.yml shard + forge.json commands. | step | result | time | |---|---|---| | `bun install --frozen-lockfile` | ok (exit 0) | 0s | | `forge.json check.fast` | ok (exit 0) | 4s | | `check.yml gate (1) pull_request` | ok (exit 0) | 0s | | `check.yml gate (2) pull_request` | ok (exit 0) | 3s | | `check.yml gate (3) pull_request` | ok (exit 0) | 3s | - ⚠️ node v20.19.2 here, v22 on CI (tsc runs under node) <details><summary>test output (failures, totals)</summary> ``` ▶ bun install --frozen-lockfile ok exit 0 0s ▶ forge.json check.fast Ran 114 tests across 8 files in 1.9s (8 shards). ok exit 0 4s ▶ check.yml gate (1) pull_request Ran 12 tests across 2 files in 0.1s (2 shards). ok exit 0 0s ▶ check.yml gate (2) pull_request Ran 34 tests across 3 files in 2.6s (3 shards). ok exit 0 3s ▶ check.yml gate (3) pull_request Ran 68 tests across 3 files in 2.4s (3 shards). ok exit 0 3s ``` </details>
A fork's second proposal waits for the fork to follow its parent before landing more work, so it no longer races the follow on a slow machine
All checks were successful
check / gate (2) (pull_request) Successful in 20s
check / gate (1) (pull_request) Successful in 24s
check / gate (3) (pull_request) Successful in 22s
check / check (pull_request) Successful in 0s
preview / preview (pull_request) Has been skipped
06be20909e
"a proposal names only what is actually ahead" lands a pull in bob/lamp
right after alice merged bob's first proposal into alice/lamp. That merge
moves the untouched fork on the bus (following.ts), and the test's next
mergePull reads the fork's main before the move and CASes it after:
update-ref fails and the merge returns base_moved. On one core, 3 of 6
runs on main failed that way:

  error: {"kind":"base_moved"}
    at test/following.test.ts:852:33

The test now waits, as this file's settle() does, until the fork is synced
with the parent's tip before landing the next pull. What it asserts is
unchanged. 12 of 12 runs pass on one core.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
trevato-apps/forge!56
No description provided.