Repository navigation
fix(deploy): rebuild a swept core binary before exec — cache eviction is a supported event (#296) - #2104
Merged
Conversation
… is a supported event (#296) 2026-08-01 incident, glass-boxed: disk eviction swept the shared cargo cache's debug/ dir (build/ + deps/ survived). `continuum reboot` ran an incremental cargo build that printed "Finished" WITHOUT restoring debug/continuum-core-server, then start-server.sh's `exec "$CORE_BIN"` died with "No such file or directory" and serving stayed down. Fail-loud worked; self-heal didn't. Cache eviction is a SUPPORTED event (CLAUDE.md disk doctrine) — every deploy path must tolerate a swept artifact. The self-heal: one shared guard, `ensure_unswept_bin` — if the expected artifact file is missing, print a loud "missing from cargo cache (swept?) — rebuilding" line and re-run the SAME cargo build invocation the script already uses for that bin (a missing output forces cargo to re-link); if the artifact STILL doesn't exist, return non-zero so the caller decides fatality. No new build shape, no fallback. Applied to every artifact this script builds and later exec's/copies: - continuum-core-server (FATAL): guarded between its build and the #194 freshness check, so #194 asserts against a real file and a missing binary aborts the deploy loudly instead of at exec — leaving any running core untouched. - continuum CLI (non-fatal, matches its build's own warn): restored before the ~/.local/bin copy so the install gets real bytes. - forge-custodian (non-fatal): restored at build time instead of failing loud at first gene conversion. - livekit-bridge (non-fatal): the rail already rebuilt on missing; now it verifies the rebuild actually produced the binary before nohup'ing a nonexistent path. Validation: `bash -n` clean; the guard function was exercised in isolation (sed-extracted from the script, stubbed `cargo`) across present / restored / still-missing / build-failed cases — all behave as designed under `set -e`. The live shared cargo cache was deliberately NOT touched to simulate the sweep (the running core depends on it). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Incident (2026-08-01, glass-boxed)
Disk eviction swept the shared cargo cache's
debug/dir (build/+deps/survived).continuum rebootran an incremental cargo build that printed "Finished dev profile" without restoringdebug/continuum-core-server, thentools/scripts/start-server.sh'sexec "$CORE_BIN"died with "No such file or directory" and serving stayed down. Fail-loud worked; self-heal didn't. Cache eviction is a SUPPORTED event (CLAUDE.md disk doctrine) — every deploy path must tolerate a swept artifact.Fix
One shared guard function,
ensure_unswept_bin(matches the script's existing function style —stop_existing_core,core_bin_is_stale,start_livekit_rail):▶ <bin> missing from cargo cache (swept?) — rebuilding --bin <bin>and re-run the same cargo build invocation the script already uses for that bin (same manifest /$PROFILE_FLAG/$CONTINUUM_FEATURES; a missing output forces cargo to re-link) — no new build shape;Applied to every artifact the script builds and later exec's/copies:
continuum-core-server($CORE_BIN)✗ FATAL #296 … refusing to exec a nonexistent binary, exits before touching the running corecontinuumCLI ($CONTINUUM_CLI_BIN)~/.local/bincopy⚠ … core still launches)forge-custodianlivekit-bridgenohup "$BRIDGE_BIN"continuum-mcpis untouched: it's neither exec'd nor copied by this script.Validation (honest scope)
bash -n tools/scripts/start-server.sh— clean.cargo, covering present / missing-then-restored / missing-still-missing / cargo-nonzero cases. All four behave as designed underset -e, and the stub confirmed the forwarded invocation shape (build --manifest-path … --bin … --release --features x).Fixes #296.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo