ci: build main into an idle owned root's kept state; keep seeds down to 150 GiB free

Merged
TE
19d ago
+243-6

Two pieces for the owned mini fleet (cmuxterm-hq#661 WS6/WS7).

Idle catch-up build. scripts/ci/owned_catch_up.sh ROOT STATE runs the owned path of a main dispatch's compile admission outside Actions: check, prefer (kept seeds only, no GitHub compare), seed or owned adopt, record, canonical-build, keep with MERGED_ONTO = HEAD, save. glaeda-idle-warm (teamleaderleo/glaeda, companion PR) runs it on an idle mini whose kept build is far from main, holding that root's capacity tokens, and kills it the moment a job is admitted. Every step is safe to kill: the kept state changes only in keep, after a good compile, and a kill inside keep leaves the old build or an unstamped one, never a partial build marked warm.

Why: at 04:00Z on 2026-09-26, 19 of 22 roots on 12 owned minis were rebuild-tier from main's head (warm_distance.tier on each root's best start), while each mini sat fully idle 17 to 33% of the previous six hours (glaeda job telemetry). A near start compiles in about 140 s against about 400 s for rebuild (warm-distance-model.json).

More kept seeds. LOCAL_KEEP_MIN_FREE_BYTES 170 -> 150 GiB. Floor = glaeda's 100 GiB job admission floor + the most one mini's disk shrank within an hour, 50 GiB with seed downloads (the prune runs only when a seed lands, so that figure applies), from glaeda-disk's 15-minute free-space log on 12 minis. At 170, most roots kept only their newest two seeds while no mini fell below 127 GiB free.

check and keep also sweep .derived-data.discard-* that a killed clear leaves (12 to 40 GB each), since the catch-up is killed whenever a job starts.

Tests: tests/test_ci_owned_catch_up.py (argument checks, result line, nothing written on a failed step), wired into ci-guards; tests/test_seed_derived_data.py passes. No app build: the script only drives existing CI helpers; its first real run is a canary mini through glaeda-idle-warm.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds scripts/ci/owned_catch_up.sh, which builds main's head into an idle owned root's kept state so the next pull request admitted to that root starts near instead of rebuild-tier — 19 of 22 owned roots were rebuild-tier while their minis sat idle. Also lowers the seed-keeping floor from 170 to 150 GiB so roots keep more seeds.

  • Runs a main dispatch's owned compile-admission path outside Actions; every step is safe to kill because the kept state changes only in keep, after a successful compile.
  • check and keep now sweep .derived-data.discard-* that a killed clear leaves behind (12–40 GB each).
  • 150 GiB is glaeda's 100 GiB job admission floor plus the most a mini's disk shrank within an hour (50 GiB with seed downloads); at 170 most roots kept only their newest two seeds.
  • Adds tests/test_ci_owned_catch_up.py for argument checks and the result line, wired into ci-guards.

Summary by CodeRabbit

  • CI
    • Added an owned-build catch-up step that validates build setup and reports clear results when a step fails.
    • CI now checks catch-up validation and failure reporting.
    • Stale, abandoned build data is cleaned up during build-state checks and saves.
  • Chores
    • Raised the local seed’s minimum free-space threshold from 140 GiB to 150 GiB.