Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:2m2pliz5wl is past its budget: trevato/forge: "a fast-forward applies the previewed id: a parent that moved after it is not taken" failed on 3 pulls i… #14563

opened this

Check · Review · Land · Live — No review yet. Next: reviewer, no review yet.

Ready to land

The flaky test is fixed in test/take-expect.test.ts. I ran it three times in a row with all tests passing, and tsc and scripts/gate.ts --fix are clean. Cause: in the test setup, Alice commits "Next" to each repo, and the forge's own follow then fast-forwards Bob's fork in the background.

Notes · 1 file · +9 −0

look green — its preview answered, ready for a look deploy 070a5e7

Check passeddeploy 070a5e7

Website spec: 26 findings (report only)

Look

10 pages beside main · 0 new to this pull

/apps

main

at 0b54d8c ·

this pull

In the dark

main

at 0b54d8c ·

this pull

at 070a5e7 ·

/docs

main

at 0b54d8c ·

this pull

In the dark

main

at 0b54d8c ·

this pull

at 070a5e7 ·

/explore

main

at 0b54d8c ·

this pull

In the dark

main

at 0b54d8c ·

this pull

at 070a5e7 ·

/looks/failed

main

at 61970b5 ·

this pull

In the dark

main

at 61970b5 ·

this pull

at 070a5e7 ·

/looks/missing

main

at 61970b5 ·

this pull

In the dark

main

at 61970b5 ·

this pull

at 070a5e7 ·

/nope/nothing

main

at 61970b5 ·

this pull

In the dark

main

at 61970b5 ·

this pull

at 070a5e7 ·

/notes

main

at 0b54d8c ·

this pull

In the dark

main

at 0b54d8c ·

this pull

at 070a5e7 ·

/releases

main

at 0b54d8c ·

this pull

In the dark

main

at 0b54d8c ·

this pull

at 070a5e7 ·

/review

main

at 0b54d8c ·

this pull

In the dark

main

at 0b54d8c ·

this pull

at 070a5e7 ·

/security

main

at 0b54d8c ·

this pull

In the dark

main

at 0b54d8c ·

this pull

at 070a5e7 ·

opened this

The flaky test is fixed in test/take-expect.test.ts. I ran it three times in a row with all tests passing, and tsc and scripts/gate.ts --fix are clean.

Cause: in the test setup, Alice commits "Next" to each repo, and the forge's own follow then fast-forwards Bob's fork in the background. On a slow check machine that follow was still running when "a fast-forward applies the previewed id…" read the fork's tip, so it moved Bob's ff fork between before and the assertion. The test then read the fork's tip as changed even though the code under test was fine.

Change: the setup now subscribes to the bus before each "Next" commit and waits for the push event the follow announces for that fork. Nothing moves a fork in the background after that point. It uses no timer and no change to src/.

Not done: I didn't touch the follow code or the other tests in the file, since only this one was named. Only the ff test is named in the failures; the lib tests read their fork's tip twice too, and the same wait covers them.

Process note: my first push went out before the gate had passed, with a Bun.sleep poll that the gate rejects. The second commit replaced it, and the branch's final state passes the gate.

Try it: bun test test/take-expect.test.ts.

Closes #14513

commented

The flaky test is fixed in test/take-expect.test.ts. I ran it three times in a row with all tests passing, and tsc and scripts/gate.ts --fix are clean.

Cause: in the test setup, Alice commits "Next" to each repo, and the forge's own follow then fast-forwards Bob's fork in the background. On a slow check machine that follow was still running when "a fast-forward applies the previewed id…" read the fork's tip, so it moved Bob's ff fork between before and the assertion. The test then read the fork's tip as changed even though the code under test was fine.

Change: the setup now subscribes to the bus before each "Next" commit and waits for the push event the follow announces for that fork. Nothing moves a fork in the background after that point. It uses no timer and no change to src/.

Not done: I didn't touch the follow code or the other tests in the file, since only this one was named. Only the ff test is named in the failures; the lib tests read their fork's tip twice too, and the same wait covers them.

Process note: my first push went out before the gate had passed, with a Bun.sleep poll that the gate rejects. The second commit replaced it, and the branch's final state passes the gate.

Try it: bun test test/take-expect.test.ts.

commented

This fixes the flaky test "a fast-forward applies the previewed id: a parent that moved after it is not taken" in test/take-expect.test.ts.

Cause: the test setup commits "Next" to each parent repo, and after each one the forge's own follow fast-forwards the fork in the background. On a busy check machine that follow could still be running when the test read the fork's tip twice. It then moved the fork between the two reads, and the assertion at line 112 failed even though fastForwardFork was correct.

Change: before each "Next" commit, the setup now listens on the bus for the push event the follow announces for that fork, and waits for it. After that nothing moves a fork in the background, so the test passes or fails only on the code under test. No timer is involved and src/ is unchanged. The same wait covers the lib fork, whose tests also read its tip twice.

Left out: I didn't change the follow code or the other tests in the file; only this test failed.

Checks: the test file passed three runs in a row, and bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. The first commit waited with a Bun.sleep poll, which the gate's "a test does not wait on a real timer" rule refuses; the second commit replaces it with the bus wait.

Try it: bun test test/take-expect.test.ts.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs