Repository navigation
fix(lifecycle): config.env reaches the core on EVERY launch path — the glass box was off by default on installed nodes - #2288
Merged
joelteply merged 2 commits intoAug 14, 2026
Conversation
…e glass box was off by default on installed nodes
`launch_core` has two plans and they were configuring two different systems:
LaunchPlan::Script bash start-server.sh, which `source`s ~/.continuum/config.env
under `set -a` -> the core inherits every key.
LaunchPlan::Installed Command::new(server_bin) -> config.env is never read. The child
inherits ONLY whatever environment the calling CLI happened to have.
Both `start()` and `ensure_core_running()` (the auto-start every dispatched command goes
through) pass LaunchSource::Installed. So on an installed node — the fresh-clone target of
#291 — the core came up without config.env and nothing said so.
Measured 2026-08-14. config.env line 24 sets CONTINUUM_PROBE_DIR. The running core, started
by that path, had no CONTINUUM_PROBE_* at all; `ps -Eww` showed it holding the environment
of the agent session whose command auto-started it (CLAUDECODE=1, CLAUDE_CODE_SESSION_ID=…).
The probe ledger sat byte-identical for five minutes while serving was fully up — Devstral
ready, window 26112, two lanes — and `serving.plan` alone re-emits at 1Hz (#399), so roughly
300 lines were missing. ping, serving/status and deploy-verify all read healthy throughout.
The only surface that told the truth was `debug/probes/query`:
"the probe ledger is not being written: CONTINUUM_PROBE_DIR is unset, so the glass box is
OFF and there is no history to search. This is a configuration state, NOT an empty result."
That message is why this was findable, and it is the fail-loud doctrine working. But it fires
on one debug verb, so a node can be blind for as long as nobody thinks to ask.
Fix: apply config.env to the child on both paths, through the existing Rust reader rather
than a second parser. `config_env::read_all` is added as THE parser for the format and
`read_from` becomes a projection of it, so a fix to comment or quote handling can never land
on one reader and miss the other. Order is preserved and duplicates kept, so applying them
left-to-right reproduces shell last-wins from the application rather than this function
picking a winner that might disagree with a single-key read.
Applied BEFORE the explicit per-launch `.env()` calls, so the socket this invocation is
binding and the self-build guard still win over the file. On the Script path the script
re-sources the same file afterwards with the same values, so this is idempotent there rather
than a competing source of truth.
Two tests in the existing config_env mod (never a second mod): one pins source semantics for
a child process — file order, kept duplicates, dropped comments, stripped quotes, and
agreement between read_all and read_from — and one pins that a missing config.env reads as
no keys instead of panicking, since a fresh clone has no such file and still has to launch.
NOT in this commit, left on #421 for a decision: the core should arguably not inherit ambient
caller environment at ALL (a core auto-started from an agent session carrying CLAUDE_CODE_*
is its own hazard), and readiness surfaces should carry a `glass_box: on|off` fact so the
blindness is visible where people already look.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Aug 14, 2026
… NOWHERE for days (#407) (#2289) The memory API moved from `&str` to `&PersonaRef` — `load_corpus`, `multi_layer_recall` and `consciousness_context` all take the typed ref now (an identity is a type, not loose text). This test file kept handing them the bare `PERSONA_ID` literal, so the test binary stopped compiling: 12 × E0308 across 12 call sites. WHY IT LOOKED LIKE A WINDOWS PROBLEM AND WASN'T. The macOS job runs `cargo test -p continuum-core --lib` — lib only. The Windows job runs `cargo check -p continuum-core --lib --tests`. Only the second one builds test binaries, so only Windows went red, for days, on every canary push, and the card that tracked it (#407) reads "Continuum Windows CI has been RED". It was never Windows-specific and it was never a failing test: the binary did not compile on any platform, and `cargo check --tests` reproduces all 12 errors on macOS in one command. Meanwhile all 16 of these tests — semantic recall, associative recall by tags, cross-context, decay-resurface, multi-layer convergence, corpus replacement — had not executed anywhere. A red Windows column read as a platform quirk; what it actually meant was that a whole recall-accuracy suite was dark. Fix: one `persona()` constructor beside `PERSONA_ID`, and the 12 sites pass `&persona()`. The id string still lives in exactly one place, and the struct fields that legitimately want a `String` still use `PERSONA_ID.into()` — six of those, untouched. The one call that deliberately passes an unknown persona to assert an error keeps doing exactly that, now typed. Verified: `cargo check -p continuum-core --tests` clean (was 12 errors), and `cargo test -p continuum-core --test memory_recall_accuracy` → 16 passed, 0 failed. Compiling was not the bar; they pass. This unblocks the Windows column for every open PR — it is the only failure on #2286, #2287 and #2288, none of which touch this file. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
joelteply
deleted the
fix/config-env-reaches-the-core-on-every-launch-path
branch
August 14, 2026 07:43
joelteply
added a commit
that referenced
this pull request
Aug 14, 2026
…finally CI-covered (#422) (#2292) Two defects, one root: deploy-verify only ever looked at the CORE, and the pure logic that decides its verdict was tested where CI does not look. ## It was half-blind `reboot` sets CONTINUUM_SKIP_SELF_BUILD and so never rebuilds the `continuum` CLI. That is deliberate — a running image cannot be replaced on Windows, and letting the start script build it failed the whole cargo invocation and skipped the CORE build (772s to that failure on BIGMAMA). The consequence was never written down: a fix that lives in the CLI cannot reach an operator through the documented deploy path, and deploy-verify printed its green checkmark anyway. Measured 2026-08-14, same machine, minutes apart: the installed CLI's `stop` reaped only the pidfile core and left pid 6453 alive and silent; the freshly-built CLI's `stop` then printed SPLIT BRAIN and reaped it. #2287 had merged and had NOT reached the installed CLI — while deploy-verify reported "✅ core is running build 1de9ceb". Every lifecycle fix shipped this week (#2287 stop-reaps-all, #2288 config.env, #2291 start reclaim-or-refuse) lives in the CLI; none was provably running. That is #194 one tier up. `cli_staleness_note` now rides alongside the core verdict on BOTH outcomes. It WARNS rather than failing: the core verdict is about whether the swap took, CLI staleness is a separate fact, and making it fatal would break deploy-verify for every operator whose CLI predates their core — today, all of them. Silence when it matches, so the note means something when it fires. Unjudgeable provenance (built outside a git tree) is stated, not swallowed, and never claims staleness it cannot prove. ## And its tests were unreachable `deploy_verdict` and `sha_matches` were pure and unit-tested — inside `bin/continuum.rs`. CI runs `cargo test -p continuum-core --lib`, which does not compile bin test mods, so the #194 guard was protected by tests nothing ran. Exactly the trap #2291 documented for the bind guard, sitting one function away the whole time. Moved to `runtime/deploy_provenance.rs` with their tests, plus new coverage for the CLI note and for sha_matches rejecting junk in both directions. The bin keeps everything impure (ping, git rev-parse, artifact resolution, process description) and delegates the verdicts. 4 tests, all under the --lib gate. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
The split
launch_corehas two plans, and they were configuring two different systems:LaunchPlan::Scriptbash start-server.shset -a— core inherits every keyLaunchPlan::InstalledCommand::new(server_bin)Both
start()andensure_core_running()— the auto-start every dispatched command passes through — useInstalled. So on an installed node (the fresh-clone target of #291) the core comes up without config.env, and nothing says so.Measured
~/.continuum/config.env:24setsCONTINUUM_PROBE_DIR. The running core, started by that path, had noCONTINUUM_PROBE_*at all.ps -Ewwshowed it holding the environment of the agent session whose command auto-started it:(Instrument positive-controlled first —
ps -Ewwreturns 39KEY=VALtokens for that pid, so the absence is real, not a blind reader.)The probe ledger sat byte-identical for five minutes while serving was fully up — Devstral ready, window 26112, two lanes,
degraded_reason: null.serving.planalone re-emits at 1Hz (#399), so ~300 lines were missing.ping,serving/statusanddeploy-verifyall read healthy the whole time. The only surface that told the truth:That message is why this was findable at all, and it's the fail-loud doctrine working (contrast #348:
ok (6 checks clean)while delivery was 100% down). But it fires on one debug verb, so a node can be blind for as long as nobody thinks to ask.The fix
Apply config.env to the child on both paths, through the existing Rust reader rather than a second parser.
config_env::read_allbecomes THE parser for the format andread_froma projection of it — so a fix to comment or quote handling can't land on one reader and miss the other. Order preserved, duplicates kept, so applying left-to-right reproduces shell last-wins from the application rather than this function picking a winner that might disagree with a single-key read.Applied before the explicit per-launch
.env()calls, so the socket this invocation is binding and the self-build guard still win over the file. On the Script path the script re-sources the same file afterwards with the same values — idempotent there, not a competing source of truth.Tests
Two, in the existing
config_envmod (never a second mod):read_allandread_fromcargo test -p continuum-core --lib config_env→ 9 passed.Deliberately not here (on #421 for a decision)
CLAUDE_CODE_*is its own hazard. That's a design call, not a mechanical fix.glass_box: on|offfact so blindness is visible where people already look, instead of only ondebug/probes/query.Related: #291, #34 (config.env single-owner), #235, #420 (same file, same launch path, found in the same sweep).
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo