Repository navigation
perf(testing): run the task-end test judge with asyncRewake - #6662
Conversation
The Stop hook now runs in the background, so a turn no longer waits up to 240 s for the judge. An attended FLAG (or an UNKNOWN that started as a FLAG) exits 2 with the relay on stderr, which wakes Claude; every other path exits 0 with a systemMessage that reaches Claude on its next turn. The SubagentStop hook and judge-lib's JUDGE_AGENT_ONLY filter are removed: a subagent's tests are judged at the parent's Stop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 3m 2s —— View job Security review (
|
|
Claude finished @kyle-sexton's task in 5m 10s —— View job Code review complete
No blocking or high-confidence findings. What I checked, statically (diff-only, scoped to the 8 changed files):
Not independently verified: I could not execute the test suite, ShellCheck, or any of the other check scripts myself — this sandbox denies all non-trivial Bash execution (only inspection commands like |
|
claude-security-review has reviewed this pull request through 9c60f12; a later push is reviewed from there. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f60178588
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-review has reviewed this pull request through 9c60f12; a later push is reviewed from there. |
claude -p and Agent SDK sessions end before the async Stop judge finishes, so they get no task-end verdict; CI is their gate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
|
Claude finished @kyle-sexton's task in 1m 10s —— View job Security review (
|
|
Claude finished @kyle-sexton's task in 1m 8s —— View job Code review complete
Scope reviewed (incremental): only what changed since Finding posted inline: plugins/testing/README.md:102-104 — the new paragraph about The changelog fragment ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
|
Claude finished @kyle-sexton's task in 36s —— View job Code review complete
Scope reviewed (incremental): only what changed since No issues found. This commit is exactly the one-line fix for the dangling-
|
No related issue: perf-audit item B4 (non-blocking test judge), from the user-approved change set.
Summary
The task-end test judge's Stop hook held every turn end for up to 240 s. It now runs with
asyncRewake, so the turn ends at once. Only an attended FLAG (or an UNKNOWN that started as a FLAG) wakes Claude; pass and count summaries reach Claude on its next turn.Fix
hooks.json/gen-hook-filters.sh: the Stop row carries"asyncRewake": trueand keeps its 240 s timeout, which Claude Code still enforces on anasyncRewakehook. The SubagentStop row is removed.test-judge.sh: a relay that needs a decision exits 2 with the fixed template (then any count lines) on stderr; every other path exits 0 with a systemMessage-only JSON. The SubagentStop branch is removed: a subagent's writes are judged at the parent's Stop, and a still-running subagent's writes wait for a later Stop.judge-lib.sh: drops theJUDGE_AGENT_ONLYfilter that only SubagentStop used.README.md: describes the background Stop hook and cites the hooks reference with an as-of date and recheck trigger.bump: patch.Docs basis: hooks reference, run hooks in the background (as of 2026-10-09):
asyncRewakewakes Claude on exit 2 and shows it stderr;timeoutis still enforced; an async hook'ssystemMessageis delivered to Claude on the next turn.Verification
scripts/affected-tests.sh --run --jobs 4: 5 suites selected (test-judge, test-judge-bg, test-judge-start, gen-hook-filters, judge-calibration metrics), all passed. test-judge.test.sh: 228 passed, 0 failed, including the killed-subagent relay at the parent Stop (once that subagent has finished, its unrelayed FLAG is relayed at the parent, now asserting exit 2 and the stderr reason).gen-hook-filters.sh --check: in sync..shfiles: clean. shfmt drift unchanged from main.check-hooks-description.sh,check-hook-wiring-liveness.sh,check-hook-slow-shapes.sh,check-purged-em-dashes.sh,check-changelog-fragments.sh --checkand--check-required origin/main,validate-plugins.sh: pass.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp