Public: anyone can read this; the crew can change it.
A test of a broken ledger gives its verdict back, so no later test reads it #17788
Merged 7h 40m ago, live in production
test/ledger-health.test.ts is the only test that calls checkLedger. Its afterEach walked the test's directory again as an empty chain, but the last test leaves its broken chain there, so the process kept "hash does not match the entry".
-
Reviews
ApprovedTest-only fix, and it is the right one. The kept ledger verdict is process-wide (
keptin src/core/ledger.ts), so a broken-chain test used to leave its verdict behind for the next file in the worker. afterEach now removes the chain first and then re-checks. That re-check stores an empty chain's ok, and the new expect fails loudly if the reset does not take.rmSyncis already imported, no source changed, and there are no new dependencies. There is no page, terminal or docs change, so the both-doors rule does not apply. Two things I would do next: (1) move this reset into a shared test helper such asresetLedgerVerdict()so other files that callcheckLedgerget it too, and (2) export aforgetLedgerVerdict()from the ledger module, so a test does not need a real walk just to clear state. -
Checks
shipped production is serving it deploy c4333e8
-
History
- The ledger tests leave no broken verdict for the next file in their worker (#17629) c368545
- A preview whose build was cut off is built again, never woken on empty data (#17775) 48bec96
- Merge pull request #17777 from sold/leaf-files-1 ca3a44f
- A new repository takes one git process, not two: the reflog setting is written into its config (#17781) fb6f1c8
- Four child processes started with an empty environment also skip .env files (#17779) 789c4a8
- A snapshot's full collection is a named job, so a stall line says when it held the loop (#17780) dc59f97
- The file parts of a cloud node sit with the other shared parts (#17532) 52b64c9
- Merge remote-tracking branch 'origin/main' into sold/leaf-files-1 6cd2d57
- Merge pull request #17778 from sold/held-worlds 8d747cf
- Games: one list of what a player's game needs, with what those mods require (#17738) 89f7c82
- Merge pull request #17768 from sold/log-reader 5e9e073
- Merge remote-tracking branch 'origin/main' into sold/leaf-files-1 e7fd67f
- A test file that sets the pinned `net` gives it back, and pinned-ceiling starts clean (#17776) 1540995
- Merge pull request #17774 from sold/leaf-editor-9 eaeb462
- A held box says "held" for a world's import, restore and snapshot too (#17532) d33b316
- The hourly disk check sizes the data directory on a worker, not the serving thread (#17771) 449ec32
- unread-tables reads src/ in one pass, in its test and not at load (#17770) 705fd94
- Games: heal what is safe alone and say so: retry a stuck agent or a stuck wake, with a limit (#17621) 29bd32a
- The games page imports core/users.ts once 7f458f0
- Plugin config: Edit opens the file's own text, and a revert is planned from the history alone b1e38ef
test/ledger-health.test.tsis the only test that callscheckLedger. ItsafterEachwalked the test's directory again as an empty chain, but the last test leaves its broken chain there, so the process kept "hash does not match the entry". A later file in the same worker, test/health-voice-tui.test.ts, then failed with "The forge needs you now. hash does not match the entry." (run 01m8wxzhdqh1vbqjsmr34hbdn8).afterEachnow removes the directory first and asserts the verdict it leaves. A test file only. Not run locally: this pull's check is the first run.🤖 Generated with Claude Code