Skip to content

test(#1132): canary smoke for jtag CLI + screenshot path#1139

Merged
joelteply merged 2 commits into
canaryfrom
test/canary-airc-px-smoke-jtag-slice
May 14, 2026
Merged

test(#1132): canary smoke for jtag CLI + screenshot path#1139
joelteply merged 2 commits into
canaryfrom
test/canary-airc-px-smoke-jtag-slice

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

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):

  1. Stack presence via pgrep. Skips when stack down (operator runs npm start to enable); STACK_REQUIRED=1 hard-fails for CI gates.
  2. `jtag ping` reaches stack — round-trip CLI → WebSocket → core → back. Catches the dangling-shim regression class (Build(deps-dev): Bump @types/node from 22.14.0 to 24.0.13 #91-Build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.29.1 to 8.37.0 #93) where `~/.local/bin/jtag` symlinks into a deleted temp dir and fails ERR_MODULE_NOT_FOUND on every invocation. Includes specific recovery hints for both dangling-shim and missing-UnixSocket 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 / not a PNG.

Local validation

  • `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
  • PNG magic-bytes detection works on `papers/example-of-collaboration.png` (529KB, magic 89504e47)
  • Stack-up path NOT validated locally — Mac stack happens to be down, didn't justify 90+s npm start for this scope

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)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  • jtag ping reaches stack — no continuum-core process running (run npm start)
  • jtag screenshot writes valid PNG — (skipped: stack down)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    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

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.
@joelteply joelteply merged commit 087185b into canary May 14, 2026
2 checks passed
@joelteply joelteply deleted the test/canary-airc-px-smoke-jtag-slice branch May 14, 2026 00:40
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