test(#1132): canary smoke for jtag CLI + screenshot path#1139
Merged
Conversation
Continuation of the canary smoke matrix (continuum#1132). Sibling tab #1 shipped the AIRC+queue slice (#1135), ts-rs ratchet (#1137), and Rust feature smoke (#1138). This PR adds the JTAG ping + screenshot slice — covers the user-facing CLI surface that Carl interacts with. What this catches ----------------- scripts/ci/canary-smoke-jtag.sh — three checks against the running Continuum stack: 1. Stack presence: pgrep for continuum-core/widget-server. Skips gracefully when stack is down (operator runs npm start to enable); hard-fails when STACK_REQUIRED=1 for CI gates that mandate stack. 2. jtag ping reaches stack: round-trip CLI → WebSocket → core → back. Catches: dangling-shim regression (#91-#93) where the global ~/.local/bin/jtag symlinks into a deleted temp dir and fails ERR_MODULE_NOT_FOUND on every invocation; UnixSocket missing despite running process; widget-server crashed. Includes specific recovery hints for the dangling-shim and ENOENT-socket patterns. 3. Screenshot writes valid PNG: jtag interface/screenshot --filename TMP.png produces a >1KB file with PNG magic bytes (89 50 4E 47). Catches the silent-blank-screenshot pattern where screenshot returns 200 but body is empty/HTML-error/non-PNG. Design notes ------------ - File-system check only for CLI presence — JTAG CLI requires the running stack for ANY command (including --help), so an invocation-based liveness probe is indistinguishable from a stack- down skip. Discovered while validating: ./src/jtag --help fails with `connect ENOENT continuum-core.sock` when stack is down. - Per-step pass/skip/fail with the failure detail inlined so operators don't grep through the full jtag output. - PNG magic-bytes detection validated against papers/example-of-collaboration.png locally (529KB, magic 89504e47 OK). Validated locally ----------------- - bash -n clean - Stack-down (default): 0 passed, 2 skipped, 0 failed → exit 0 - Stack-down (STACK_REQUIRED=1): 0 passed, 0 skipped, 3 failed → exit 2 - Magic-bytes detection works on a real PNG fixture Stack-UP path is NOT validated locally — local Mac stack happens to be down, and `npm start` (90+ sec) wasn't justified for this scope. The logic is straightforward (run command, check exit + magic bytes) and will surface any defect when sibling or Joel runs it against a live stack. Soft skip + clear recovery hints means a wrong-path failure is diagnostic, not silent. Remaining #1132 lanes --------------------- After this lands: only persona/chat path proof + Docker/Carl gates (blocked on amd64 image cards) remain. Card stays open with status log noting which slices are landed.
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
Continuation of continuum#1132 canary smoke matrix. After my AIRC+queue slice (#1135), sibling tab #1's ts-rs ratchet (#1137) and Rust feature smoke (#1138), this is the JTAG ping + screenshot slice — covers the user-facing CLI surface Carl interacts with.
What lands
`scripts/ci/canary-smoke-jtag.sh` — three checks (~210 LOC):
Local validation
The logic is straightforward (run command, check exit + magic bytes); any defect will surface clearly the first time sibling or Joel runs it with a live stack — soft skip + recovery hints make it diagnostic, not silent.
Design choice worth flagging
JTAG CLI requires the running stack for ANY command, including `--help` — verified during script development that `./src/jtag --help` fails with `connect ENOENT .../continuum-core.sock` when stack is down. So the script does file-system presence check for the binary, but defers all invocation tests behind the stack-presence gate.
Sample output
Stack down (default):
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
canary-smoke-jtag (continuum#1132)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
canary-smoke-jtag: 0 passed, 2 skipped, 0 failed
```
Remaining #1132 lanes
After this: persona/chat path proof + Docker/Carl gates (blocked on amd64 image cards). Card stays open until those land.
🤖 Generated with Claude Code