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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1uz372eiuv is past its budget: trevato/forge: "a landed pull moves the forks, like the push it amounts to > the untouched fork follows; the one with i… #13203

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This fixes the flaky test "the untouched fork follows; the one with its own work is told" in test/following.test.ts; it has not been run under load. I ran test/following.test.ts afterwards (27 pass) and bun x tsc --noEmit, both clean. I did not run scripts/gate.ts.

Notes

shipped production is serving it deploy 106aa6b

opened this

This fixes the flaky test "the untouched fork follows; the one with its own work is told" in test/following.test.ts; it has not been run under load. I ran test/following.test.ts afterwards (27 pass) and bun x tsc --noEmit, both clean. I did not run scripts/gate.ts. I also did not re-run the test many times, so the fix rests on the cause below rather than a repeated run.

Cause: the test waited for the untouched fork's branch tip to move, then read that fork's push events straight away. The branch ref moves before the push event naming the followed upstream is written, so on a loaded check machine the event list was still empty. That is the Received: [] in the failing log.

Change: the test now waits, with the same until helper it already used, for the followed: "alice/engine" event to appear before asserting on it. No application code changed. The behaviour under test is unchanged, and the assertion is just as strict once the event exists.

Not done: I did not touch the rest of following.test.ts. I only checked this one assertion for the same read-after-ref-move pattern.

To try it: bun test test/following.test.ts.

Closes #13192

commented

This fixes the flaky test "the untouched fork follows; the one with its own work is told" in test/following.test.ts; it has not been run under load. I ran test/following.test.ts afterwards (27 pass) and bun x tsc --noEmit, both clean. I did not run scripts/gate.ts. I also did not re-run the test many times, so the fix rests on the cause below rather than a repeated run.

Cause: the test waited for the untouched fork's branch tip to move, then read that fork's push events straight away. The branch ref moves before the push event naming the followed upstream is written, so on a loaded check machine the event list was still empty. That is the Received: [] in the failing log.

Change: the test now waits, with the same until helper it already used, for the followed: "alice/engine" event to appear before asserting on it. No application code changed. The behaviour under test is unchanged, and the assertion is just as strict once the event exists.

Not done: I did not touch the rest of following.test.ts. I only checked this one assertion for the same read-after-ref-move pattern.

To try it: bun test test/following.test.ts.

Approved

Test-only fix for a read-after-ref-move race: the test now waits (with the existing until, which accepts sync predicates) for the push event with followed=alice/engine before asserting. The assertion stays strict, no app code, no security surface, no new dependency, and it fits the pipeline direction (never-flake tests). Minor: the author did not run gate.ts or repeat the test, but the cause is sound.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs