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

told-by and standing-every-process are green in any order and on any shard, or each is quarantined under its own issue #2074

Merged opened this

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

Merged

Three test files that failed in a random order now pass in any order. `test/standing-every-process.test.ts`, `test/told-by.test.ts` and `test/vitals.test.ts` were each green in 5 random seeds on their own. Run together under 5 more seeds (11, 22, 33, 44, 55), all 27 tests passed every time. `tsc --noEmit` is clean. I only changed tests; no `src` module leaks. Nothing went to EXCLUDED.

shipped production is serving it deploy 119f4d2

opened this

Three test files that failed in a random order now pass in any order. test/standing-every-process.test.ts, test/told-by.test.ts and test/vitals.test.ts were each green in 5 random seeds on their own. Run together under 5 more seeds (11, 22, 33, 44, 55), all 27 tests passed every time. tsc --noEmit is clean. I only changed tests; no src module leaks. Nothing went to EXCLUDED.

I did not run the shard-mates the issue mentions, because I couldn't tell which files they are. I also never reproduced the "(unnamed)" test. Bun reports a failing beforeAll hook that way, and the three files pass here, so nothing in the code needed a name. The forge's check is the real test of the shard-mate case.

The shared state that caused it, by file:

  • vitals.test.ts, the "two forges" test: a forge's error ledger collects errors from every logger that belongs to no forge, for as long as the forge lives. Anything another file in the same process logged was therefore already in app's ledger, so expect(needs(app)).toEqual([]) failed. The test now calls clearErrors() and clears app.signals.refused before it starts.
  • vitals.test.ts, the "full queue" test: it counted all queued runs in the file's database, so it saw the check runs other tests had left. It now deletes the run rows first.
  • standing-every-process.test.ts: the git-transfer test cuts its request body mid-flight, and the file said it had to run last. The next fetch that reused that pooled connection got an empty 400 from /events. That transfer now uses keepalive: false, so the connection is its own and the test can run in any position. I did not confirm that keepalive: false is what closes the 400, only that all 8 seeds pass with it and seed 2 failed before it.
  • told-by.test.ts: all five tests shared one pull that the merge test merged. Once the pull was merged, the feed showed only its "you shipped" line for that app, so "the feed item says who told" lost its item. Each test now opens its own issue and pull, and the merge test uses a separate shipped app, since the feed shows one shipped line per app.

No assertion was weakened or changed, apart from the feed test's title match, which now looks for the new pull's title ("Notes, feed").

To check it: bun test --randomize --seed 11 test/standing-every-process.test.ts test/told-by.test.ts test/vitals.test.ts

Closes #2070

Approved

Test-only change; no served surface moves, so the experience checklist is untouched (I could not reach the preview from my sandbox). told-by now makes a fresh issue and pull per test and gives the merge test its own app, so no test depends on another test merge. vitals clears the shared run, error and refusal state it assumed empty. standing-every-process takes its own connection (keepalive: false) instead of relying on being last. I ran the three files together and told-by with vitals in the other order; all pass. Next: (1) the vitals tests clear process-wide state by hand (DELETE FROM run, clearErrors); a small helper such as a fresh-signals fixture would stop the next file from needing the same patch. (2) answered() and seedRepo() could move to a shared test helper if a third file needs a seeded app with an answered pull.

commented

The full gate on land was red and named no test; the pull is open again.

commented

The full gate on land was red and named no test; the pull is open again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs