Skip to content

fix(precommit): probe continuum-core IPC, not just jtag-client surface#1319

Merged
joelteply merged 1 commit into
canaryfrom
fix/precommit-gate-probes-core-not-jtag
May 16, 2026
Merged

fix(precommit): probe continuum-core IPC, not just jtag-client surface#1319
joelteply merged 1 commit into
canaryfrom
fix/precommit-gate-probes-core-not-jtag

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

Summary

Unblocks the dual-blocker airc-8a5e + claude-tab-1 both flagged today (17:02Z and 19:18Z): the precommit browser-test gate's PING_OK guard only probed jtag-client surface, treating success as "core healthy → run chat-roundtrip." PingServerCommand never touches Rust IPC — succeeds even with core down. Then chat-roundtrip ran, hit a dead socket, failed, and blocked the commit. Bootstrap deadlock: anyone trying to commit a fix had the same gate fail.

Change

Add a second probe specifically for continuum-core. Two-stage — socket file must exist (-S test) AND nc must accept a 1-second connection. Stale-socket-from-crashed-core leaves the file but won't accept, so file-exists alone isn't enough.

If either probe fails, ENABLE_BROWSER_TEST=false (skip, don't block). Error message names which probe failed so operators can fix the right thing.

Self-healing

This PR's commit ran through the patched gate itself. Core was down in my worktree → CORE_OK=false → browser tests skipped → commit succeeded. The fix unblocks ITS OWN ship. Same path codex's CBAR-SUBSTRATE doc refinement was stuck on (joel/docs-cbar-substrate-refine, blocked since 17:02Z).

Behavior on healthy worktree

Unchanged. PING_OK=true + CORE_OK=true → ENABLE_BROWSER_TEST=true → chat-roundtrip runs as before. No regression for the case the gate was designed for.

Test plan

  • bash -n syntax clean
  • Self-heal verified: commit on this branch passed precommit with core down
  • Socket probe verified: [ -S ~/.continuum/sockets/continuum-core.sock ] returns FAIL when core down; nc -U returns FAIL on stale socket
  • CI green
  • Healthy-worktree verification: a commit with core UP should still run chat-roundtrip end-to-end

CI's verify-architectures + GitHub Actions remain the authoritative pre-merge check, unchanged.

🤖 Generated with Claude Code

The browser-test gate in src/scripts/git-precommit.sh probed with
`./jtag ping` and treated success as "core healthy → run chat-roundtrip."
PingServerCommand never touches the Rust IPC socket (collects server
info + optional browser ping only), so it returned OK even when
continuum-core was down — then chat-roundtrip ran, hit a dead socket,
failed, and blocked the commit. Bootstrap deadlock: anyone trying to
commit a fix had the same gate fail.

Fix: add a second probe specifically for continuum-core. Two-stage —
the socket file must exist (-S test) AND nc must accept a 1-second
connection. Stale-socket-from-crashed-core leaves the file but won't
accept, so file-exists alone isn't enough.

If either probe fails, ENABLE_BROWSER_TEST=false (skip, don't block).
Error message names which probe failed so operators can fix the right
thing. CI's verify-architectures + GitHub Actions remain the
authoritative pre-merge check, unchanged.

Self-healing: this commit itself runs through the patched gate. Core
is down in my worktree → CORE_OK=false → browser tests skipped → commit
succeeds. Same path codex's CBAR-SUBSTRATE doc refinement was stuck on
(joel/docs-cbar-substrate-refine, surfaced on airc 17:02Z and 19:04Z).
@joelteply joelteply merged commit 25f60dd into canary May 16, 2026
3 checks passed
@joelteply joelteply deleted the fix/precommit-gate-probes-core-not-jtag branch May 16, 2026 19:20
joelteply added a commit that referenced this pull request May 16, 2026
…types (PR-1) (#1321)

Pure-types slice of CBAR-SUBSTRATE missing piece 2 (claimed 15:38Z,
unblocked by #1319). Adds the typed wire shape `ServiceModule` will
adopt in PR-2 (Optional fields on ModuleConfig + default
`on_artifact_available` method) and the runtime will dispatch on in
PR-3 (artifact event delivery on cadence).

Same cadence as rate_proposals / generate_recipe PR-1: pure data layer
lands independently mergeable, with full test coverage, before any
runtime wiring. PR-2 stacks the trait extension on this; PR-3 wires
the dispatcher.

Types

- `ArtifactKey(String)` — newtype, transparent serde, no closed enum.
  Modules register their own kinds at boot per CLAUDE.md anti-pattern
  rules + Joel's "we do not hardcode" directive. Same shape as
  `inference_capability::InferenceKind` (codex's #1315 PR-1).
- `ArtifactSelector::{Exact, Prefix}` — what a subscriber wants. Exact
  string match + string-prefix only. Glob/regex deliberately omitted
  — the matcher is the runtime's hot path (walked every publish);
  string-prefix is cheap + covers the cases we have.
- `Cadence::{Periodic, EventDriven, OnArtifact, Mixed}` — supervised
  wake policy. interval_ms over the wire so TS doesn't deal with bigint
  Duration. No `Default` impl, no `OnDemand` variant — broker/supervisor
  decides cadence per the dynamic-hardware-detect rule, every
  registered module has an explicit policy.

What this PR is NOT

- No `ServiceModule` trait changes yet (PR-2)
- No `ModuleConfig` field additions yet (PR-2 — Optional so existing
  modules don't break; opt-in)
- No runtime dispatch wiring (PR-3)

12/12 unit tests (cargo test --features metal,accelerate
runtime::artifact_handle). ts-rs exports verified to
shared/generated/runtime/{ArtifactKey,ArtifactSelector,Cadence}.ts.
Test focus: serde wire shape (transparent / internally-tagged),
selector hot-path semantics (Exact doesn't prefix-match,
Prefix handles empty + degenerate cases), Cadence projection
(tick_interval returns None for non-periodic, wants_artifact_wakes
covers the right variants), full roundtrip every variant.

Stacked under codex's Lane D claim (PersonaTurnFrame proof, 19:23Z)
and airc-8a5e's CBAR-PIECE-5 signal. All three slices independent —
PR-2 picks up these types when Phase 0 trunk doc lands; Lane D and
PIECE-5 don't physically depend on PR-2.

Co-authored-by: Test <test@test.com>
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