Repository navigation
Conversation
…across worktrees ONE repo should not eat 40 GB. Today a single `cargo build` of continuum-core with metal+accelerate features produced ~42 GB of target/ artifacts, and N continuum worktrees each compiled their own copy of identical deps (llama.cpp, whisper.cpp, candle, bevy). 14 worktrees × duplicate deps = 99% disk on Joel's 466 GB machine, twice. Operator-time delete loops that he should never have had to run. Two structural changes, both measured: 1. `profile.dev` now has `debug = "line-tables-only"` + `split-debuginfo = "unpacked"`. Default `debug = 2` emits full DWARF (variable names, function args, line numbers) for EVERY dependency. We never actually rustc-debug llama.cpp via lldb; we debug via probes / RUST_LOG. Panics still resolve to the right file:line — only lldb variable inspection is lost. `unpacked` keeps .dSYM directories separate so they're easy to nuke. Empirical effect on continuum-core debug + metal + accelerate: 42 GiB → 6.9 GiB (83% reduction). 2. `start-server.sh` exports `CARGO_TARGET_DIR=$HOME/.continuum/ cache/cargo-target` before invoking cargo. Every continuum build across every worktree drains into ONE cache instead of N copies. The existing `.cargo/config.toml` documents the shared-target pattern with `force = false` semantics; this commit moves it from documented-but-commented to live-by- default via the wrapper script, where shell `$HOME` expansion runs (cargo's [env] doesn't expand ~). Operators can override per-shell for one-shot isolated builds. Validation: `cargo check -p continuum-core --features metal, accelerate` from a clean shared-target succeeds in 9m 25s, ends at 6.9 GiB. Co-Authored-By: Claude Opus 4.7 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Jun 8, 2026
…bomb Per Joel 2026-06-08: "When we have repeated things, like incrementally improving it, we need to make sure we auto clean like this thing does now and we reduced the extra gb. It was nearly full." JsonlProbeFileSink was the next disk bomb waiting. `OpenOptions::append` on a single file, no rotation, no cap — turn it on for a measurement session, forget to turn it off, recreate the 3 GB blob problem that PR #1547 fixed for the fmt-layer. This applies the same doctrine to the probe sink: - New constructor `JsonlProbeFileSink::new_rolling(dir, classes, max_log_files)` builds a `tracing_appender::rolling::Builder` with daily rotation + `max_log_files(N)`. Files land at `<dir>/continuum-probes.YYYY-MM-DD`. Disk usage bounded by design, not by operator discipline. - New env var `CONTINUUM_PROBE_DIR` → rolling mode. Production default. - Legacy `CONTINUUM_PROBE_FILE` still works but logs a one-line `tracing::warn!` pointing operators at the new var. Kept because some forensic captures genuinely want one continuous file across days. - `from_env()` prefers `CONTINUUM_PROBE_DIR` (rolling) and falls back to `CONTINUUM_PROBE_FILE` (single-file + deprecation warn). - `DEFAULT_MAX_LOG_FILES = 7` — same retention as the fmt-layer rolling so operators learn one number. - `path()` deprecated in favor of `target()` — same field, clearer name since "target" can be a file or directory depending on mode. - Storage swapped to `Mutex<Box<dyn Write + Send>>` so the hot-path write code is identical regardless of mode. One focused integration test (`new_rolling_writes_to_dated_file_in_target_dir`) walks the full lifecycle in a single test per Joel's "less tests with more coverage" principle — construct, install as tracing layer, fire probe, observe `continuum-probes.*` file on disk with the right content. Regression here = the auto-clean doctrine silently falls back to unbounded growth. Doctrine memory: [[auto-clean-is-structural-not-operational]]. Structural fix pattern, not opt-in operational discipline. Same shape the fmt-layer rolling and cargo target shrink (PR #1556) follow. Same pattern next applies to: ~/.continuum/genome/ (4.2 GB unbounded), persona recorder fixture output, sentinel checkpoint dirs. Each one is a follow-up slice. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Contributor
Author
|
Closing: stale against the src/workers/ → core/continuum-core/ restructure — this is rework, not rebase, in migrated code. Branch preserved (not deleted); re-file/rework when picked up. Graveyard cleanup 2026-06-15 per Joel + M5 triage. |
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.
Summary
42 GiB → 6.9 GiB for a single continuum-core debug build with metal+accelerate. One repo should not eat 40 GB.
Root cause
profile.devdefaultdebug = 2emits full DWARF for every dependency (llama.cpp, whisper.cpp, candle, bevy). We don't lldb-debug these; we debug via probes / RUST_LOG.target/with identical compiled deps. 14 worktrees × duplicate deps = 99% disk on Joel's 466 GB machine.What changed
profile.devnow has:debug = "line-tables-only"— panics still resolve to file:line, lldb variable inspection lost (we don't use it).split-debuginfo = "unpacked"— .dSYM out of .o files so cleanup is one rm.start-server.shexportsCARGO_TARGET_DIR=$HOME/.continuum/cache/cargo-targetbefore invoking cargo. Every continuum build across every worktree shares one cache. Cargo's [env] config doesn't expand~(issue #14149), so the script handles $HOME expansion. Operators can override per-shell for one-shot isolated builds.Validation
cargo check -p continuum-core --features metal,acceleratefrom a clean shared-target succeeds in 9m 25s, ends at 6.9 GiB.Test plan
npm startto confirm the runtime still boots.