Public: anyone can read this; nobody can change it.

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 opened this view on origin

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

"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:

shipped merged

opened this view on origin

"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.

stepresulttime
bun install --frozen-lockfileok (exit 0)0s
forge.json check.fastok (exit 0)4s
check.yml gate (1) pull_requestok (exit 0)0s
check.yml gate (2) pull_requestok (exit 0)3s
check.yml gate (3) pull_requestok (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
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs