Repository navigation
Conversation
…t, skill step Entire-Checkpoint: a1c329380392
Entire-Checkpoint: ff2b4292c7ed
Entire-Checkpoint: 100d0f54e3eb
… commands; GUARD_RELEVANT anchors per line; corpus re-harvested (39 real blocks)
…ule-mismatched first lines; redact session links, foreign projects and repos; corpus rewritten
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
__tests__/fixtures/hook-corpus.jsonl(339 commands, verdict snapshot forpre-tool.sh) replayed through all three hook copies by__tests__/hook-corpus.integration.test.ts.scripts/hook-corpus.ts: shared replay core,--diff <ref>(wholehooks/dir extracted at the ref, verdict changes only) and--harvest(parallel replay, replay-twice flake exclusion, redaction).--diff origin/mainon anypre-tool.shchange and list changes underHook verdicts changed:.Acceptance criteria
#1064, 13hook-log— every hook-log case a reproduced block (exit: 2), zero allow-pinned. The original≥ 50floor was unreachable (42 eligible commands on this host, 13 reproducible under the replay harness); see the runner verification section and test(hooks): the hook-corpus replay cannot reproduce background-task, orchestrator-env or state-dependent blocks — 29 of 42 logged blocks have no corpus coverage #1129.--diff origin/mainprints0 verdict changes, exit 0.npx vitest run scripts/hook-corpus.test.ts -t redactsgreen (4 tests).grep -c "hook-corpus.ts --diff"gives 1 in each of the three execSKILL.md;lint:skill-sync0 diverged, norelay.npm run buildandnpm run lintpass locally.#from agit commit -F -heredoc subject, blocking everytype(#N):message sent via stdin #1064 mutation inhooks/pre-tool.sh,--diff HEADprints2 verdict changes(the-F -case plus one transcript case) and exits 1.Sources and redaction
Read: the 157 commands driven through
runHookbypre-tool-hook.integration.test.ts(source#763/#981/#1064/manual, tagged by describe block),~/.sequant/logs/claude-hook.log(hook-log), and Bashtool_useinputs from~/.claude/projects/-Users-tony-Projects-sequant/*.jsonl(transcript, filtered to guard-relevant commands plus all blocked ones, exit-0 sample capped at 150). Redaction pass (redactCommand): Authorization/X-*-Token headers, gh/xox/sk/AKIA/AIza/npm/JWT token shapes,*TOKEN=/*SECRET=/--tokenvalues, emails, and/Users/<name>→/Users/user. Commands over 2,000 chars are dropped, and any command whose verdict differed between two replays is excluded.Corpus states: replays run in a pinned repo,
staged(default),cleanordirty(optionalstatefield on a line), because commit and reset guards depend on git state.Hook verdicts changed: none
Mutation-verified: AC-2 — re-applied the #1064 mutation in hooks/pre-tool.sh; the
#1064 #62-F -case failed; restored.Closes #1094
🤖 Generated with Claude Code
Runner verification (guard-2026-09 wave 3, 2026-09-20)
86ee3e8b). Round 1: AC-1'shook-log ≥ 50was unreachable (42 eligible blocks on the maintainer host) and the log keeps only a multi-line command's first line, so fragments harvested as commands. Round 2: 26 of the 39 re-harvested hook-log cases were pinned asallowalthough the hook had blocked them — the replay harness cannot reproduce background-task, orchestrator-env or state-dependent guards — and three session links plus an unrelated project name had leaked into the fixture.58b15410,86ee3e8b):extractHookLogCommandsskips heredoc/operator/unbalanced first lines and rule-mismatched lines (gate-tested with verbatim log shapes, mutation-verified both ways); the harvester keeps hook-log candidates only when the replay reproduces the block;GUARD_RELEVANTanchors per line; redaction coversclaude.ai/code/session_…, non-sequant/Users/*/Projects/*paths (both slash and scratchpad forms) and foreign--reponames, gate-tested; the corpus was rewritten throughparseCorpus/serializeCase(339 cases, 13 hook-log, allexit: 2, zero leaks by grep).--diff origin/main→0 verdict changes), AC-4 (redaction cases), AC-5 (grep 1 per copy),lint:skill-sync44/44, no SKILL.md mentions relay.npm testfrom a clean shell on86ee3e8b: 335 files, 8320 passed, 1 expected fail, 3 skipped — 579 s. Note for the owner: the corpus snapshot (~1000 replays × 3 copies) adds roughly three minutes to the suite; if that is too much for the requiredtestjob, the snapshot could move to the canary project.