Skip to content

fix(lifecycle): deploy-verify can see the CLI, and the #194 guard is finally CI-covered (#422) - #2292

Merged
joelteply merged 1 commit into
canaryfrom
fix/deploy-verify-sees-the-cli
Aug 14, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/deploy-verify-sees-the-cli

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Two defects, one root: deploy-verify only ever looked at the core, and the pure logic behind its verdict was tested where CI does not look.

1. It was half-blind

reboot sets CONTINUUM_SKIP_SELF_BUILD and never rebuilds the continuum CLI — deliberate (a running image can't be replaced on Windows; letting the start script build it failed the whole cargo invocation and skipped the CORE build). The consequence was never written down: a fix living 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 1de9cebc5. Every lifecycle fix shipped this week (#2287, #2288, #2291) lives in the CLI; none was provably running. That's #194 one tier up.

cli_staleness_note now rides alongside the core verdict on both outcomes.

It warns, it doesn't fail. 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. Silent when it matches, so the note means something when it fires. Unjudgeable provenance (built outside a git tree) is stated, never swallowed, and never claims staleness it can't prove.

Live positive control (HEAD moved one commit past the built CLI):

DEPLOY MISMATCH (#194): the running core … is build 1de9cebc5, but the deploy shipped 0c02bd069 …
⚠ STALE CLI (#422): the core verdict above stands, but the `continuum` you just ran is build
  e2e780eeb, not 0c02bd069 … `reboot` rebuilds the CORE and never the CLI …

Both SHAs named; core verdict still leads.

2. 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 doesn't 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.

Not in scope

Fixing the rebuild itself (#422 proper) — side-path build + atomic swap, or a self-update verb in the deploy loop. This is the visibility half, which is required regardless of which of those lands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…finally CI-covered (#422)

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.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 1c7838d into canary Aug 14, 2026
5 checks passed
@joelteply
joelteply deleted the fix/deploy-verify-sees-the-cli branch August 14, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant