Public: anyone can read this; the crew can change it.
The cost ledger's chain is walked in a worker: a boot no longer holds the loop 0.5-1 s for it #17638
Merged 11h 48m ago, live in production
Production's boots, every half hour now: "ledger: verified in 979 ms" (20:12) and "in 507 ms" (20:14), 58,355 entries and 22 MB, and beside each a stall the loop watch named "running then: jobs ledger" (868 ms at 19:41:21, 723 ms at 20:14:43), with page and runner requests waiting behind it.
-
Reviews
ApprovedThe chain walk now runs in a worker, the verdict is kept on the main thread, and health reads it from there. The change is small, follows the repo's existing worker pattern, and has a test that compares the worker's verdict with
verifyDirfor a clean chain and a broken one. The unusedkeptVerdictexport is removed and nothing else referenced it. No page or terminal surface changes, so the both-doors rule does not apply. The diff gives no sign of a security regression.Two things I would do next:
walkInWorkerin src/core/ledger.ts settles only ononmessageoronerror. A worker that exits without either would leavecheckLedgerpending,keptunset and the log line missing. Resolve to a broken verdict ononmessageerroror on a generous timeout.- The test names a
walkOffseam but never exercises it. Add one test that passes a rejectingwalkOffand expects thecould not be read:verdict. This covers the error path that currently exists in two places: the worker's own catch andcheckLedger's catch.
-
Checks
shipped production is serving it deploy 01d8b2c
-
History
- The cost ledger's chain is walked in a worker: a boot no longer holds the loop 0.5-1 s for it 49bcd0c
- Merge pull request #17613 from sold/refused-joins b5d7344
- Merge pull request #17616 from sold/cloud-gaps 324663c
- Games: no page waits for Modrinth to say which mods a refused player misses (#17610) 4f86420
- Home: a stat tile's label stops before its sparkline, so "Shipped in 24 hours" is no longer drawn over on a phone (#17581) 59b8076
- An evicted check on a game box loses at most one shard, and a frozen job thaws if the player leaves soon (#17615) 2492b91
- Merge pull request #17620 from sold/game-outcome 2a44186
- The Asked column holds only what needs the owner's word; the crew's queue is one line, and an ask closes itself after seven days (#17559) 40f1d8f
- Test the cloud note on screen and ECS rows at both doors, and clean up after a failure (#17532) 8e73a4b
- Test: a refused join as Velocity 3.5.1 logged it for an unmodded client and a Fabric server with Waystones (#17610) e8ea268
- The people lists are read right after an op, ban or whitelist typed on the console (#17610) 7afe537
- The game agent never enters the waker's container (#17610) a9ee2ec
- A player command the game server refused is failed, with the closest names seen on that server (#17610) c822b18
- Say a cloud project's note as a plain line, web, terminal and tool (#17532) 6ceafed
- Count a billed account's unread kinds in the headline, apart from the sum (#17532) c059c80
- Lead the headline's unread count to the account that names the kinds (#17532) ee3350f
- Count a resource page's own statements from rest (#17532) ed18981
- Say on a cloud account which kinds were not read, where and why (#17532) 6294957
- Say when R2 is not switched on, instead of asking for a permission (#17532) 7a2295c
- Keep cloud names as their owner wrote them (#17532) da23125
Production's boots, every half hour now: "ledger: verified in 979 ms" (20:12) and "in 507 ms" (20:14), 58,355 entries and 22 MB, and beside each a stall the loop watch named "running then: jobs ledger" (868 ms at 19:41:21, 723 ms at 20:14:43), with page and runner requests waiting behind it. checkLedger read every month file and hashed every entry on the serving thread, at boot and once a day. Now
ledger_worker.tswalks it and the verdict comes back to this thread, where health reads it as before; the log line and what it says are unchanged.Runner-6, a ledger of production's size (58,355 entries, two month files), three rounds: on this thread 551-613 ms, the loop late by 545-608 ms in a worker 622-807 ms, the loop late by 8-9 ms at most
What else the boot holds, from the 19:41 and 20:14 boots (#17629): six stalls of 0.2-0.6 s while the module graph loads, before anything listens; then 0.2-2 s stalls for about two minutes as the heap climbs to 1 GiB, most with no request running. Not cold page caches: a copy of trevato/forge (9,557 commits, 455 tags) served cold and warm on runner-6, 120 commits and blob pages 8 at a time, gave p90 220 ms cold against 162 ms warm and one 426 ms stall (a family's first load), and reading all 14 nightly manifests where the newest alone was wanted (the backup watch, five seconds after boot) measured 210-229 ms against 41-43 ms with the loop late at most 20 ms: real but not this. The rest needs a profile of a boot with production's data, which a serving forge refuses.
test/ledger-health.test.ts: the worker's verdict is the chain's own (verifyDir's), clean and broken; its tests await the walk. 71 pass across the nine ledger test files, and the boot, release-boot and bundle-workers tests pass with the new worker.
Direction: the owner feels every stall of the loop, and a boot is one every half hour (#17629)
Co-Authored-By: Claude Fable 5 <[email protected]>
🤖 Generated with Claude Code