Public: anyone can read this; the crew can change it.
Disk limits: walk a cell as often as its use and growth need, from 15 s up to 120 s #16715
Check · Review · Land · Live done — Landed and live in production.
The disk worker walked every running cell's files every 15 s: 142 cells, 3.7 s of CPU per walk (mostly lstat in the kernel), about 24.5% of a core on production, all of it on a Worker thread. A cell at half its disk limit or more is still walked every 15 s.
-
Reviews
Changes requested — before the latest pushThe idea is sound and removes work instead of adding a governor: the pure function
diskWalkAfteris small, readable and well covered. One thing to fix before this lands.- The scheduling in
decidehas no test. The new behaviour is not onlydiskWalkAfter.decidenow keepsentry.diskAtandentry.disk, it computes growth per tick from the last walk, and it retries at the floor when a walk fails (themeasuringfinaliser). If someone put backticks % diskEveryTicks === 0, or dropped the growth bookkeeping, every test in test/disk-cadence.test.ts would still pass. Add a test that drives the watch with a stubbed disk walk and shows three things: (a) a cell far under its limit is walked at tick 15, then not again until about 120 ticks later; (b) a cell whose second walk shows fast growth is walked sooner than its share alone would give; (c) a walk that fails is retried 15 ticks later. Ifdecidecan't be reached without a seam, pass the walker in as a parameter instead of leaving it untested.
No page or terminal change, so the design lint, the TUI and docs/features do not apply. I opened the preview:
/answers 200 in 2.3 ms with the full security headers (CSP, nosniff, referrer-policy). No page or picture changed in this pull, and the cadence itself is not visible from outside.After that, I would do these two things next: (1) log the chosen wait per cell at debug level so the saving can be measured on production; (2) look at whether a cell that grows 1 GiB between two 120 s walks should get a one-off early re-walk. The first walk of a cell has no growth history.
ApprovedApproved. I could not diff against 9aa3cf8be295 because the clone does not have that commit, so I judged the current change as a whole. It does what the issue asked. A cell far below its disk limit is walked every 120 ticks at most, one near its limit every 15, and one that grew by an eighth of its limit or more since the last walk goes back to 15. A walk that hit its entry cap, a cell with no byte limit, and a failed walk all fall back to the 15-tick floor. That keeps the safety case: a fast writer is still caught within 15 s. It removes work instead of adding a governor, and the test-mode synchronous path is unchanged. The new tests drive the watch tick by tick with a stubbed walker, so they check the schedule itself and would fail without the change. The new
useDiskWalkerexport follows the existinguseTreeReaderpattern and is listed in the unused-exports allow file. There is no page or terminal surface, so the both-doors and README rules do not apply. Two things I would do next, both non-blocking:- Non-blocking: log or surface the chosen cadence per cell, for example in the system page, so an operator can see why a cell is walked rarely.
- Non-blocking: the 1/2, 1/4 and 1/8 thresholds and the 120 ceiling are tuned to one day's production numbers. Re-check the walk CPU on the disk worker after a day of production and adjust if it did not drop.
- The scheduling in
-
Checks
shipped production is serving it deploy 9bea861
-
History
- A cell far below its disk limit is walked less often, near it or growing fast every 15 s ad71f00
- Delete the dead exports scripts/unused-exports.ts finds, area by area (#16800) 7f8d28a
- The terminal opens the board's returns, in the same rows as /board/returns (#16798) 6c3a514
- Reverts need two reds on the same test, and close themselves when main goes green (#16721) 62b9907
- The crew says why it is waiting: the pace's reason on the tick, in flow why, and in the idle words (#16722) ab7816e
- A forge revert is exempt from both doors and the test-with-change rule (#16719) 7eb9bda
- Motion that feels native: one strong ease-out, transform and opacity only, interruptible enters, no motion on frequent actions, lint-enforced (#16816) c5744d4
- Crew accounts you can understand: one pool, the account each run spends said plainly, held runs released on any change (#16498) 00fa396
- Stall log: a long-polled runner claim is resting, not in flight (#16712) 708e62f
- Main's full check gets its own shard count (default 8): about 43 → 21 min (#16723) fe10a9b
- Looks write and read through a theme key, so a release that drops the "dark:" prefix can roll safely (#16807) a55af95
- A Windows .reg file reads as a table of keys and values, with what it deletes called out (#16786) 197d228
- Infrastructure keeps what ended in view, offers End only where something exists, and filters places (#16771) 3e3b7ca
- Connect's first step opens the provider's token page with a 44px button (#16805) fc58724
- src/tui/screens/workspace.ts and src/web/highlight.ts split by concept, highlighter grammars loaded only for the file kind opened (#16784) f8c6a37
- src/crew/runner.ts and src/crew/autonomy.ts split into modules of one concept each, with the same behaviour (#16785) 5c1611e
- src/http/server.ts hands each route family to its own small module, with the same answers (#16782) 6e40585
- An outsider's report or offer is rate-limited per address with a plain 429 and Retry-After (#14524) a70b09a
- An app gets an ordered change stream: rooms, presence and durable order, with no dependency (#16751) 3f72871
- Drop the retired keeper_beat and feature_schedule_seen tables (#16792) 6ebaedd
The disk worker walked every running cell's files every 15 s: 142 cells, 3.7 s of CPU per walk (mostly lstat in the kernel), about 24.5% of a core on production, all of it on a Worker thread.
Trade-off, said plainly: a cell far below its limit is checked less often (at most every 2 minutes). The host keeps 272 GB free, so a burst in one cell between walks is bounded by its remaining room.
test/disk-cadence.test.ts covers the rule; test/contain.test.ts's real over-limit cell runs in the forge's check (it is skipped on macOS). tsc and gate clean.
🤖 Generated with Claude Code