I2713 — A build never lets idle incremental sessions fill the disk
Make the repository's own build entry points keep a build directory's incremental cache bounded, so that concurrent sessions building on one machine cannot run the disk out.
DONE wave 0 · p0 · implementation profile · parallel safe
Part of development-runtime — The runtime has a development surface.
Objective
Make the repository's own build entry points keep a build directory's incremental cache bounded, so that concurrent sessions building on one machine cannot run the disk out.
Why
2026-10-14 16:20-17:57Z: free disk on the shared Mac fell from 71 GiB to 4 GiB; derive refused (\"4935MB free, floor 5120MB\") and every session's chain stopped. One private build directory had grown from 21 to 47 GiB, 24 GiB of it debug/incremental: 574 session directories of which one was live. Deleting the idle ones by hand gave back 16 GiB with a compile still running. The owner: \"tohle se nesmi stavat\".
Current state
lib/rust_bin.sh's bounded build refuses below a free-space floor but never reclaims; cargo keeps every finished incremental session until a clean.
Desired state
Before a build starts (mj_cargo_bounded and every script that builds through it), idle incremental session directories of its build directory older than a declared age are removed (never one ending in -working, never another tree's build directory), what was reclaimed is said on stderr, and when free space is still under the declared floor the build refuses with the largest build directories named.
Scope
- lib/rust_bin.sh
- scripts/derive
- docs/DEVELOPMENT_RUNTIME.md
- .ai/repo/policy.yaml
- test/cases
Out of scope
- Deleting another worktree's build output or any target directory
Dependencies
None. This issue is a root of the graph.
What waits on this
Acceptance criteria
- A build prunes idle incremental sessions of its own build directory and says how much it reclaimed
- A live (-working) session and other build directories are never touched
- Under the floor after pruning, the refusal names the largest build directories
Validation
- bin/majordomus plan validate
Evidence required
- idle_sessions_are_pruned_case
Evidence
| covers | type | command | result | at commit |
|---|---|---|---|---|
| idle_sessions_are_pruned_case | test | bash test/run.sh 3080_idle_incremental_sessions_are_pruned 3196_stale_crate_artifacts_are_pruned_under_cargos_lock | ok 3080, ok 3196 (2 passed); 3196 fails with the lock or the process check removed | ed7a000 |
Timeline
- started
- 2026-10-17T09:23:02Z
- verified
- 2026-10-17T09:23:19Z
- completed
- 2026-10-19T15:30:44Z
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I2713.yaml. Read it back with majordomus plan show I2713.