I3839 — A build that cannot take its build directory's lock never falls back to a cold private directory below the free-disk bound: it waits, bounded, or refuses naming the bound and the holder
Make lib/rust_bin.sh's mj_cargo_bounded, when the shared build directory's lock is held past its wait, consult the free-disk bound before it moves the build to mj_cargo_private_dir: above the bound it may go private as today; at or below it, it keeps waiting within a stated bound and then refuses with the free space, the bound and the lock's holder, never starting a cold private build.
READY wave 0 · p1 · implementation profile · parallel safe
Ready. Every dependency is done, so majordomus plan start I3839 will be accepted.
Objective
Make lib/rust_bin.sh's mj_cargo_bounded, when the shared build directory's lock is held past its wait, consult the free-disk bound before it moves the build to mj_cargo_private_dir: above the bound it may go private as today; at or below it, it keeps waiting within a stated bound and then refuses with the free space, the bound and the lock's holder, never starting a cold private build.
Why
Measured by f8 at 06:3xZ on 2026-10-21: `scripts/rust-check --quality` timed out on the shared build directory's lock, held by two other cargo runs, silently fell back to a cold build in ~/.cargo/build-private/<cksum>, and grew it to 5.3 GB while the volume held 32-35 GiB free, under the owner's 35 GiB floor of 2026-10-21. The same fallback built a cold private directory under a commit hook of dev-03's the same night. With several builds waiting, every one of them goes private at once, which multiplies the disk use exactly when the disk is lowest.
Current state
mj_cargo_bounded waits on cargo's \"Blocking waiting for file lock\" and then rebuilds in mj_cargo_private_dir (a cold one compiles every dependency once) whatever the free space; the floor (MAJORDOMUS_MIN_FREE_MB, default 5120) is checked only before the first build starts.
Desired state
No build goes private below the bound; a refused one says why and what holds the lock, and the bound is the one the floor and the owner's relaxation name.
Scope
- lib/rust_bin.sh
- bin/majordomus-cli
- docs/DEVELOPMENT_RUNTIME.md
Out of scope
- The number of concurrent builders (I3825)
- A hook's build (I3831)
Dependencies
None. This issue is a root of the graph.
Acceptance criteria
- With the shared lock held by a fixture process and free space reported below the bound, a build never creates a private build directory and ends with a refusal naming the free space, the bound and the holder's pid
- With free space above the bound the fallback to a private directory works as before
- The refusal is reached within the stated wait bound, never an unbounded wait
Validation
- bash test/run.sh 3849_a_locked_build_never_goes_private_below_the_disk_bound
- bin/majordomus plan validate
Evidence required
- a_locked_build_never_goes_private_below_the_disk_bound_test
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Timeline
- started
- —
- verified
- —
- completed
- —
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/I3839.yaml. Read it back with majordomus plan show I3839.