fix(hooks): repair execution, decisions and lifecycle - #567
Merged
Conversation
This was referenced Sep 7, 2026
LeXwDeX
marked this pull request as ready for review
September 7, 2026 04:10
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.
Closes #557
Closes #558
Closes #559
Closes #560
Closes #561
Closes #562
Closes #563
Closes #564
Closes #565
Closes #566
Why
Hooks could bypass their read-only tool contract, lose blocking decisions, stop processing valid siblings after malformed input, and leave timed-out work running. Full session tests also exposed missing hook services across the session worker boundary: native file tools modified files without firing FileChanged, and asynchronous results could not wake the session.
What changed
Evidence
Validated with Bun 1.3.14:
b56d931b28dfa0d2a97ff3f151d1ece2bac61d59: 4,551 passed, 23 skipped, 1 todo, 0 failed across 379 files. The focused hooks/session/permission/API/Effect suite passed 492 tests with 5 existing skips and 0 failures.Final repair head
b56d931b28dfa0d2a97ff3f151d1ece2bac61d59passes Typecheck and DAG coverage and Linux unit tests, generated client/SDK freshness, HttpAPI contracts, and Linux/Windows E2E. Localspecgit finish --jsonexits 0 with every gate passing; GitHub SpecGit Acceptance also passes. The approved main policy and all required checks remain unchanged.Live external model/MCP services, OpenAI OAuth hook execution and Windows runtime behavior are not claimed as validated. Reserved output fields remain explicitly diagnosed rather than presented as implemented.
Checklist