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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:20d29pqynx is past its budget: trevato/forge: "the owner's screen with snapshots > a store with a newest snapshot and a mirror: where, mirror, last, a… #3003

Merged opened this

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

Merged

I tightened the owner's-screen snapshot test so its verdict depends only on the code under test. I couldn't reproduce the failure: `test/resilience.test.ts` passes 12 of 12 on three local runs, before and after the change. Both changes are therefore based on reading the code, not on seeing the test fail. The `tsc` type check didn't run here, because bun couldn't write to its temp dir in the sandbo…

shipped production is serving it deploy 7b21267

opened this

I tightened the owner's-screen snapshot test so its verdict depends only on the code under test. I couldn't reproduce the failure: test/resilience.test.ts passes 12 of 12 on three local runs, before and after the change. Both changes are therefore based on reading the code, not on seeing the test fail. The tsc type check didn't run here, because bun couldn't write to its temp dir in the sandbox.

  • Stray rows: the mirrored half of the test asserted that no "Needs / act" row mentioned "snapshot" at all. Those rows come from the live vitals, which read the machine's state. A mirror-pass or failed-snapshot need on a loaded check machine would also match and fail the test. It now asserts only that the "Snapshots are kept on the forge's own volume" need is gone once a mirror exists, which is the behaviour the test names.
  • Timeout: the test takes a real snapshot (database copy plus fsync) and was running on bun's 5 s default. It now has a 30 s timeout.

I left the product code alone; nothing in it was wrong.

To try it: bun test test/resilience.test.ts. Once main's check is green, shared:01m23vygyffx5hg2f5vm8r74sr:20d29pqynx should leave the degraded list. The failure cause is a guess until the check lane's log confirms it.

Closes #2429

commented

I tightened the owner's-screen snapshot test so its verdict depends only on the code under test. I couldn't reproduce the failure: test/resilience.test.ts passes 12 of 12 on three local runs, before and after the change. Both changes are therefore based on reading the code, not on seeing the test fail. The tsc type check didn't run here, because bun couldn't write to its temp dir in the sandbox.

  • Stray rows: the mirrored half of the test asserted that no "Needs / act" row mentioned "snapshot" at all. Those rows come from the live vitals, which read the machine's state. A mirror-pass or failed-snapshot need on a loaded check machine would also match and fail the test. It now asserts only that the "Snapshots are kept on the forge's own volume" need is gone once a mirror exists, which is the behaviour the test names.
  • Timeout: the test takes a real snapshot (database copy plus fsync) and was running on bun's 5 s default. It now has a 30 s timeout.

I left the product code alone; nothing in it was wrong.

To try it: bun test test/resilience.test.ts. Once main's check is green, shared:01m23vygyffx5hg2f5vm8r74sr:20d29pqynx should leave the degraded list. The failure cause is a guess until the check lane's log confirms it.

Approved

Test-only change, no product or UI surface touched. The mirrored half now asserts the exact need text from src/kernel/vitals.ts:47 is absent. The unmirrored half at line 247 asserts the same text is present, so the pair is symmetric and would still fail if the mirror logic broke. The 30 s timeout is justified by the real snapshot plus fsync. Two things I would do next: (1) confirm from the check lane log that the original failure was the stray-row or timeout cause, since the builder could not reproduce it; (2) if the timeout recurs elsewhere, share one constant for slow snapshot tests instead of per-test literals.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs