test(breakout): negative-input tests for the check-spec trust boundary#104
Open
dsmcewan wants to merge 1 commit into
Open
test(breakout): negative-input tests for the check-spec trust boundary#104dsmcewan wants to merge 1 commit into
dsmcewan wants to merge 1 commit into
Conversation
The gate re-verifies breakout records by rebuilding checks from declarative JSON specs (safeCheckFromSpec / reverifyRecord). That parser is a trust boundary but its rejection behavior was only thinly covered. Add a suite that feeds it malformed and hostile specs and asserts it holds: - non-object / typeless / array specs are skipped (nothing built) - unknown/hostile types (incl. command, eval, http_get) are skipped, so the gate path never builds an executable check from a packet-declared command - non-string paths, ../ traversal, and absolute paths outside base are rejected before any filesystem I/O (confinement) - null/malformed records don't crash and expose nothing reverifiable - a mixed batch locks the three fates (fail / skip / pass) and that one bad check sinks the record Keyless and deterministic. Wired into the package check + test scripts. Verified by mutation: disabling the confinement guard fails the suite. Co-Authored-By: Claude <noreply@anthropic.com>
dsmcewan
force-pushed
the
worktree-spec-boundary-tests
branch
from
July 16, 2026 11:51
94fecf0 to
eaf9a6d
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This was referenced Jul 16, 2026
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.
What
Adds
breakout/scripts/test-spec-boundary.mjs— a negative-input suite for the gate's declarative check-spec parser (safeCheckFromSpec/reverifyRecordinbreakout/verifier.mjs), plus the two-line manifest wiring inbreakout/package.json.Why
The gate re-verifies a breakout record by rebuilding read-only checks from JSON specs instead of trusting the record's self-reported
converged. That parser is a trust boundary, but its rejection behavior was only thinly covered. This suite feeds it malformed and hostile specs and asserts the boundary holds.Coverage
typevalues (incl.command,eval,http_get) → skipped, so the gate path never builds an executable check from a packet-declared command../traversal, and absolute paths outside base → rejected before any filesystem I/O (confinement)Verification
breakoutsuite green;build-gatesuite (which also runs breakout's) green — no regressions.resolveUnderfails the suite (test Test: verify branch protection required checks (do not merge) #6); reverting restores green. The tests bite.Keyless and deterministic — no LLM, no network. Zero runtime dependencies. No changes to gate/signing/provenance logic.
🤖 Generated with Claude Code