Repository navigation
merge queue: checking #1358 + #1359 + #1336 together on main (76f7a53) - #1366
Closed
mergify[bot] wants to merge 14 commits into
Closed
mergify[bot] wants to merge 14 commits into
mergify[bot] wants to merge 14 commits into
Conversation
The fleet self-saturates: one SubagentStop burst spawned 15-30 processes that each re-parsed the same transcript, measured at 15.1s p50 wall idle against 1.55s for a single process, with per-hook durations escalating in launch order. dispatch.py now runs opted-in detectors in-process, sequentially, parsing the event once and passing the same parsed payload to every detector. A hook opts in with subagent_stop.dispatch in its manifest, naming a MODULE:FUNCTION entry point (default detect:detect). A detector with no resolvable entry point still runs as a subprocess and its metrics row is marked subprocess_fallback. Each detector keeps its own verdict, its own runs.jsonl row under its own hook name, and its own rule_ids; a detector that raises, exits, or overruns its 4s soft budget is caught and recorded without stopping its siblings. The event budget defaults to 9s for SubagentStop. mirror_stop_hooks_to_subagent_stop.py emits one dispatcher entry for the opted-in hooks and leaves every other hook's direct entry alone. (cherry picked from commit 531f5c8 on plan/hook-fleet-dispatcher-measure-the-herd-then-dispatch-it)
…op hooks dispatch through one process that parses the event once and shares one transcript parse across all opted-in detectors, emitting the same per-detector metrics rows and verdicts as the subprocess fleet. Review lane: behavior Safety invariant: Hook stdout and exit codes stay the same. This slice does not change the other four claims. Files: engine/hooks/_runner/dispatch.py Change types: bugfix Acceptance criteria: The branch contains only this claim, and the review step publishes one pull request. Exit code: 0 Invoker-Finalize-Id: aaa80940-f2d5-4d79-bb40-79c68fe333ad
…e5bede34 — Review claim: SubagentStop hooks dispatch through one process that parses the event once and shares one transcript parse across all opted-in detectors, emitting the same per-detector metrics rows and verdicts as the subprocess fleet. Review lane: behavior Safety invariant: Hook stdout and exit codes stay the same. This slice does not change the other four claims. Files: engine/hooks/_runner/dispatch.py Change types: bugfix Acceptance criteria: The branch contains only this claim, and the review step publishes one pull request.
Subprocess isolation was the hook fleet's free safety property, so the dispatcher has to prove it reproduced that property rather than assume it. _run_sdk_one caught a raising detector but left exit_code at 0, so outcome.classify saw a zero exit with a catstack-hook-error stderr line and recorded caught_error instead of crashed; the except branch now sets exit code 1. Four chaos fixtures under engine/hooks/_runner/tests/chaos (raise, sleep past the soft budget, exit 3, and a sibling that speaks) drive a dispatcher test asserting each failure gets its own row with the right outcome and exit code while both sibling detectors still emit their verdicts and rows. The fixtures are test-only: they live under tests/ and are registered in a scratch manifest, so the mirror script's name allowlist can never install them into a live settings.json. (cherry picked from commit b57f27c on plan/hook-fleet-dispatcher-measure-the-herd-then-dispatch-it)
…tectors that raise, hang past the soft budget, and exit non-zero each produce their own failure row while every sibling detector's verdict and row is still emitted. Review lane: behavior Safety invariant: Hook stdout and exit codes stay the same. This slice does not change the other four claims. Files: engine/hooks/_runner/tests/chaos Change types: bugfix Acceptance criteria: The branch contains only this claim, and the review step publishes one pull request. Exit code: 0 Invoker-Finalize-Id: 7ca2543e-d062-46fa-bbce-58264f6ae48f
…02624463 — Review claim: Fixture detectors that raise, hang past the soft budget, and exit non-zero each produce their own failure row while every sibling detector's verdict and row is still emitted. Review lane: behavior Safety invariant: Hook stdout and exit codes stay the same. This slice does not change the other four claims. Files: engine/hooks/_runner/tests/chaos Change types: bugfix Acceptance criteria: The branch contains only this claim, and the review step publishes one pull request.
The SubagentStop dispatcher records an in-process exception as exit 0. This pull request records that same exception as a crashed row, so a sibling can still speak while the failure stays visible. Co-authored-by: Cursor <cursoragent@cursor.com> Change-Id: If063e8ba2ce12336b8a515be81a05bb1885d2ba9
…r readable output Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Change-Id: I3e4aace7fa476750c7f5c3f9e64f4ba39b39c8b4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Change-Id: Ib18c9dab334aef5e6428f0eb4367d07c2c869b64
This was referenced Oct 12, 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.
🎉 This combination of pull requests has been checked successfully and will be merged soon. 🎉
#1358 + #1359 + #1336 are queued together for merge on branch main (76f7a53).
This pull request has been created by Mergify to check the mergeability of [#1358 + #1359 + #1336].
You don't need to do anything. Mergify will close this pull request automatically when it is complete.
Required conditions of queue rule
admin-bypassfor merge:check-success = lintcheck-success = testcheck-success = validateRequired conditions to stay in the queue:
-draftbase=mainlabel=admin-bypass