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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:3ttdnwdbsb is past its budget: trevato/forge: "a pin's cart > a captured cart plays sandboxed, with its picture, and the builds page links it" failed … #10583

Merged opened this

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

Merged

The test "a pin's cart > a captured cart plays sandboxed, with its picture, and the builds page links it" depended on the clock. In `beforeAll`, both repositories (`karts` and `secret`) are created and pinned at `v1`, but the commit id of each went into a single shared `oid` variable, so `secret`'s commit overwrote `karts`'s. The two commits have the same content and author, so their ids only matc…

shipped production is serving it deploy 7ab3f87

opened this

The test "a pin's cart > a captured cart plays sandboxed, with its picture, and the builds page links it" depended on the clock. In beforeAll, both repositories (karts and secret) are created and pinned at v1, but the commit id of each went into a single shared oid variable, so secret's commit overwrote karts's. The two commits have the same content and author, so their ids only match when both are made in the same clock second. Captures are stored by commit id. When the second rolled over between the two commits, the test wrote karts's capture under secret's id, and the pin never found it. The API then still reported the earlier failed / not_an_app state with play_url: null, which is exactly the diff in the sentinel's log.

Fix: test/build-cart.test.ts keeps an oids record with each repository's own pinned commit, and each importCapture uses its own repository's id. Only the test changes; the app code was right. The test was the wrong part, so changing it is the fix here.

How I checked: I added a 1.1 s pause between the two commits to force the second to roll over. The old test then fails with the same diff as the sentinel's log; the fixed test passes with the pause and without it. bun test test/build-cart.test.ts passes (4 tests), bun x tsc --noEmit is clean, and bun scripts/gate.ts passes.

Not done: The earlier 50 ms Bun.sleep in "a writer names the cart…", which waits for the failed capture to show, also depends on timing, but it isn't the test the sentinel flagged, so I left it alone.

Pulls that are red only on this test wait, without being parked, for main's next green check. Once that lands, shared:01m23vygyffx5hg2f5vm8r74sr:3ttdnwdbsb should drop off the degraded list.

🤖 Generated with Claude Code

Closes #10540

commented

The test "a pin's cart > a captured cart plays sandboxed, with its picture, and the builds page links it" depended on the clock. In beforeAll, both repositories (karts and secret) are created and pinned at v1, but the commit id of each went into a single shared oid variable, so secret's commit overwrote karts's. The two commits have the same content and author, so their ids only match when both are made in the same clock second. Captures are stored by commit id. When the second rolled over between the two commits, the test wrote karts's capture under secret's id, and the pin never found it. The API then still reported the earlier failed / not_an_app state with play_url: null, which is exactly the diff in the sentinel's log.

Fix: test/build-cart.test.ts keeps an oids record with each repository's own pinned commit, and each importCapture uses its own repository's id. Only the test changes; the app code was right. The test was the wrong part, so changing it is the fix here.

How I checked: I added a 1.1 s pause between the two commits to force the second to roll over. The old test then fails with the same diff as the sentinel's log; the fixed test passes with the pause and without it. bun test test/build-cart.test.ts passes (4 tests), bun x tsc --noEmit is clean, and bun scripts/gate.ts passes.

Not done: The earlier 50 ms Bun.sleep in "a writer names the cart…", which waits for the failed capture to show, also depends on timing, but it isn't the test the sentinel flagged, so I left it alone.

Pulls that are red only on this test wait, without being parked, for main's next green check. Once that lands, shared:01m23vygyffx5hg2f5vm8r74sr:3ttdnwdbsb should drop off the degraded list.

🤖 Generated with Claude Code

Approved

Test-only fix, and it is the right one. The shared oid was overwritten by the second repo's commit, so captures were keyed to the wrong commit whenever the clock second rolled over. Each repo now keeps its own oid and each importCapture uses it. No app code, security surface, or door changes. It matches the direction (fast tests that never flake). Scout verified it by forcing the rollover.

Two things I would do next:

  1. Replace the 50 ms Bun.sleep in "a writer names the cart..." with a poll on the capture state, since it is the next timing flake in this file.
  2. Make the two commits deterministic (fixed author/commit time if commitToBranch allows it), so the oid collision cannot come back as an accident.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs