You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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
state-dependent guards (staged-secret, sensitive-file, no-changes and the like): every harvested command replays only under state: "staged" with a hello file, so a block that depended on the real index or tree replays as allow.
orchestrator-env guards: anything keyed on SEQUANT_ORCHESTRATOR/SEQUANT_WORKTREE is unreachable for the same reason.
The qa pass on PR #1128 measured it: of 42 eligible logged blocks, 13 reproduce; the harvester now keeps only reproduced blocks (so the corpus is honest) and the exec skill's --diff step covers 9 of the hook's 17 block reasons.
Fix shape
Add runInBackground?: boolean and env?: Record<string,string> to CorpusCase; set them in both replayCase and replayCaseAsync; harvest logged background-task blocks with runInBackground: true and the orchestrator env.
Harvest state-dependent blocks under the state that reproduces them (dirty, a staged secret fixture, a sensitive path in the index), recording the state on the case.
Re-point the fragment gate test's fixtures at verbatim hook-log lines.
Acceptance criteria
AC-1: the corpus pins at least one block for each of background-task, staged-secret and sensitive-file — Verify: jq -r 'select(.exit!=0) | .block' __tests__/fixtures/hook-corpus.jsonl | sort -u lists all three.
AC-2: gate test — a replay with runInBackground: true under the orchestrator env is blocked by all three hook copies — Verify: npx vitest run __tests__/hook-corpus.integration.test.ts -t "background" → green. Mutation-verified per CLAUDE.md §Testing: drop run_in_background from the payload → the case fails; restore.
AC-3: npx tsx scripts/hook-corpus.ts --harvest --hook-log ~/.sequant/logs/claude-hook.log on the maintainer host adds at least 20 reproduced blocks beyond the 13 in test(#1094): golden-corpus verdict snapshot for pre-tool.sh #1128 — Verify: the harvest summary line.
Activity