Public: anyone can read this; the crew can change it.
Find what fills the check machine disk (follow-up to #6945) #6948
Parked 39d 2h ago
This pull doesn't find what filled the disk: my sandbox can't read production's data directory. What it does is make /settings/capacity show what is filling the disk. It also caps the only data-directory caches I found that the code never prunes, and fixes a sweep that was deleting the checks' kept files.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew
-
History
- A check's cell is built by checkCell, and a test holds its /tmp under its home 7f86ff8
- The crew empties its shared install cache under the install lock, and renames it aside first 437de1e
- A check's /tmp is on disk under its home, not the cell's 256 MiB tmpfs 70297c2
- A repository's install cache has a 4 GiB ceiling; the sweep keeps strangers' removal 7dad8ca
- /settings/capacity names what fills the disk: the biggest entries under FORGE_DATA, and the biggest inside each f66e377
- The checkout sweep removes checkouts only: gate logs, learned files, impact maps and a live check's home stay 6f5c892
- A repository's label routes leave api.ts for src/http/api/labels.ts (#6931) 7da6393
- A test pins the terminal's where-strip: every repository screen says where it reads from in plain words, and an origin's host prints inert (#6930) 0399f05
- A test pins the fork button and the upstream link: no fork of your own repository, and the link stays inside the forge (#6929) fa08e51
- A test pins the storage cap's words and figures: no limit asks nothing, a stale figure is re-measured, and the refusal names the figure (#6928) df476e4
- A test pins the run-cap park: it is noted and asked once per window, and a quoted reason is cut at a sentence (#6927) 47b1a02
- A test pins the origin connect flows: a state claims once, a short code reveals nothing, and only the starter sees the flow (#6926) 269cec7
- A test pins review threads: resolving and unresolving round-trip, and a comment on a changed line reads as outdated (#6925) 52ac25b
- A test pins SSH signature checks: another key, a changed message, an algorithm downgrade and a malformed blob are each refused (#6924) 134ed53
- The release smoke loads /boards and the heaviest public pages, then watches /healthz for 60 s before it calls a release live (#6901) 8a9fb44
- MCP `quotas` stops telling agents quotas are unenforced: each key says what it bounds (#6899) 623105f
- MCP `backups_test`: check that the snapshot destination is reachable, as the Backups page's Test button does, for a forge admin (#6891) f0a6dbc
- Clog note: measure time to detect (#6778) 8a73b98
- Secret routes leave api.ts for src/http/api/secrets.ts (#6895) ce17b83
- A test pins /system's sizes, spans and sparkline, and a reading outside 0–100 or not a number still draws one block (#6889) 8763e5d
This pull doesn't find what filled the disk: my sandbox can't read production's data directory. What it does is make /settings/capacity show what is filling the disk. It also caps the only data-directory caches I found that the code never prunes, and fixes a sweep that was deleting the checks' kept files. Whether disk-red stays off the degraded list for a day can only be judged in production once this lands, so the issue should stay open until then.
What changed
- The Disk card (
src/kernel/disk_use.ts):/settings/capacitynow opens with a Disk card. It shows free space out of the total, then the biggest entries underFORGE_DATA, biggest first, with the three biggest things inside each (for examplecrew/.cache).- It counts like
du: blocks on disk, a hard-linked file once, no symlinks, no other mounted filesystems. - The walk runs in the background and its result is kept for 30 minutes, so the page never waits for it.
listCapacitycarries the reading, soGET /api/v1/admin/capacity(disk) and the MCPcapacitytool name the same consumers. The how-to is indocs/features/disk-use.md.
- It counts like
- Install-cache ceiling (
src/kernel/cache_bound.ts): bun's cache keeps every package version it has ever fetched, and nothing prunedcrew/.cache/<repo>/bunorcheck-install/<repo>/bun. Before an install, the cache is now measured at most once an hour and emptied completely if it is over 4 GiB. For checks this happens under the existing install lock. For the crew it is written in the run log. - Checkout sweep fix:
sweepCheckoutstreated every name underchecks/as a run id. So on every boot it deletedchecks/gates,learned,impactandgate-last.json. It also deleted<run>.homefor checks still running, which matters more once #6946 runs the sweep before each check. It now skips those four names and ties a.hometo its run. Any other leftover underchecks/is still removed, so the existing test intest/checks.test.tspasses unchanged.
Left out on purpose
- I didn't prune run logs, looks, backups or snapshots. Run logs are never pruned in the code, but deleting run history is a product decision, so read the Disk card on production first, then bound whatever it shows at the top in a follow-up.
- The 4 GiB ceiling is a guess. A workdir's
node_moduleshere is only 80 MB, so the install caches may well not be the main grower. - Emptying
crew/.cachewhile another run on the same repository is installing can fail that one install. The run starts anyway, as it already does after a failed install.
Tests: new tests in test/disk-use.test.ts, test/cache-bound.test.ts and test/checks-sweep-kept.test.ts; the sweep test fails on main. The type check, these, test/checks.test.ts, the capacity and MCP-doc tests, and the five cross files pass. I didn't run the full gate; the forge runs it on the push.
To try it: open /settings/capacity on the preview as an admin. The first load says "Measuring"; reload after a minute to see the list. Or run bun test test/disk-use.test.ts test/cache-bound.test.ts test/checks-sweep-kept.test.ts.
🤖 Generated with Claude Code
This pull doesn't find what filled the disk: my sandbox can't read production's data directory. What it does is make
/settings/capacityshow what is filling the disk. It also caps the only data-directory caches I found that the code never prunes, and fixes a sweep that was deleting the checks' kept files. Whetherdisk-redstays off the degraded list for a day can only be judged in production once this lands, so the issue should stay open until then.What changed
src/kernel/disk_use.ts):/settings/capacitynow opens with a Disk card. It shows free space out of the total, then the biggest entries underFORGE_DATA, biggest first, with the three biggest things inside each (for examplecrew/.cache).du: blocks on disk, a hard-linked file once, no symlinks, no other mounted filesystems.listCapacitycarries the reading, soGET /api/v1/admin/capacity(disk) and the MCPcapacitytool name the same consumers. The how-to is indocs/features/disk-use.md.src/kernel/cache_bound.ts): bun's cache keeps every package version it has ever fetched, and nothing prunedcrew/.cache/<repo>/bunorcheck-install/<repo>/bun. Before an install, the cache is now measured at most once an hour and emptied completely if it is over 4 GiB. For checks this happens under the existing install lock. For the crew it is written in the run log.sweepCheckoutstreated every name underchecks/as a run id. So on every boot it deletedchecks/gates,learned,impactandgate-last.json. It also deleted<run>.homefor checks still running, which matters more once #6946 runs the sweep before each check. It now skips those four names and ties a.hometo its run. Any other leftover underchecks/is still removed, so the existing test intest/checks.test.tspasses unchanged.Left out on purpose
node_moduleshere is only 80 MB, so the install caches may well not be the main grower.crew/.cachewhile another run on the same repository is installing can fail that one install. The run starts anyway, as it already does after a failed install.Tests: new tests in
test/disk-use.test.ts,test/cache-bound.test.tsandtest/checks-sweep-kept.test.ts; the sweep test fails on main. The type check, these,test/checks.test.ts, the capacity and MCP-doc tests, and the five cross files pass. I didn't run the full gate; the forge runs it on the push.To try it: open
/settings/capacityon the preview as an admin. The first load says "Measuring"; reload after a minute to see the list. Or runbun test test/disk-use.test.ts test/cache-bound.test.ts test/checks-sweep-kept.test.ts.🤖 Generated with Claude Code
Closes #6947