Repository navigation
fix: hooks audit (receipts, gate, APEX, lessons, release gate) — 0.1.114 - #125
Merged
Merged
Conversation
- Match `test` only in xcodebuild's action position, so `build`, `-showBuildSettings` and `build-for-testing` are never taken as a test run. - Read counts from `Executed N tests, with M failures`. - `** TEST FAILED **` floors the result to a failure even without counts. - Add a ReDoS regression test for the action-position regex.
- Sort lessons by their [timestamp], newest first; the oldest are the ones compressed. - Fit the injection per whole bullet inside the lessons path only (new fit-lessons.ts); capFragment is untouched. - lesson-compact.test.ts: inputs re-dated to the new order, expectations unchanged.
…aware - verifiedAt derived from the run's duration_ms: a code file edited after the newest green run started is unverified; absent duration_ms keeps the 85fa53a TTL rule. - Per-file edit stamps (editedAt) in session changes; session scratchpad files are excluded only from the receipt gate, version-bump modules never stamped. - One project-dir resolver (CLAUDE_PROJECT_DIR wins over cwd) for every state-dir site via projectStateDir.
…or absent tools - CLAUDE.md project type detected from the project root; a TypeScript project maps to the typescript type and typescript-expert, with dependency-key parsing of package.json. - splitTarget for APEX target steps. - No more instructions for absent tools: no TaskUpdate, no auto-commit, no fake Task #1, no "create task.json yourself". - Task completion now reminds of a WIP commit via the commit agent.
…llenger reports - Detect release commands (merge, tag, release) outside data heredocs. - Record sniper/challenger SubagentStop reports per project; a release command asks for confirmation when either report is missing or older than the last code edit.
Real Claude Code PostToolUse Bash payloads carry no exit_code, so no receipt was ever captured live (85fa53a too) and the receipt gate could never be satisfied. Exit 0 is now implied ONLY for host claude-code + PostToolUse + interrupted===false + not background (no backgroundTaskId, run_in_background absent/false) + a single simple command (no pipe/list/subshell/redirect except bounded fd-dup) + a DIRECT runner (no npm/pnpm/yarn script launcher; pnpm only via `exec` with unambiguous options). Counts parsed from stdout still decide pass/fail. Everything else keeps the 85fa53a behaviour (no receipt). Known cost: `bun test | tail -5`, `pnpm -w|-F x|--parallel exec ...` stay receipt-less as before.
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
Hooks audit fixes, released as 0.1.114 (version bump + CHANGELOG in a separate commit).
PostToolUsepayloads, which carry noexit_code(exit 0 implied only for a single simple, direct, foreground runner command; stdout counts still decide pass/fail).CLAUDE_PROJECT_DIRwins over cwd), edit-time aware (verifiedAtfromduration_ms, per-file edit stamps, scratchpad excluded from the receipt gate only).xcodebuild testrecognised as a verification receipt (action-position match,Executed N tests, with M failures,** TEST FAILED **floors to failure).typescript-expert); no instructions for absent tools (noTaskUpdate, auto-commit, fake Task feat(tracking): session-state layer + freshnessGate #1, "create task.json yourself"); task completion reminds of a WIP commit via the commit agent.Test plan
bunx tsc --noEmitcleanIntentionally changed tests
apex-instruction-preamble: 2 assertionsinject-contexttest/fixtures/inform-matrix.golden.json: 4 cellslesson-compact: inputs re-dated to the new newest-first order, expectations unchangedKnown
tool_use_iddedupe parked, out of scope.Not verified in real conditions
"Task"for the Agent tool.Breaking changes
None