Skip to content

Fix hook filtering, source isolation and template failure handling - #4429

Merged
max-sixty merged 29 commits into
mainfrom
codex/hook-execution-fixes
Oct 22, 2026
Merged

max-sixty merged 29 commits into
mainfrom
codex/hook-execution-fixes

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Hook name filters previously ran after template validation and argument routing, so an excluded command could reject the invocation or consume its arguments. Filtered background hooks also combined user and project sources, and runtime template failures bypassed foreground Warn handling.

Select raw commands before parsing or binding arguments. Live execution and frozen approval plans share preparation; the announcer owns one background pipeline per source. Runtime expansion follows the existing Warn/FailFast policy, while errors retain hook identity and alias diagnostics. Selected templates still receive syntax validation before execution. No flags or configuration keys change.

The production change removes 24 lines overall (+183/−207 across 11 files). The full diff is +911/−267 across 34 files, mostly regression tests and snapshots. It includes current main’s JSON output, stdin ownership and Ctrl-C behavior.

Validation: the required project gate passed 5,411 tests with one skipped, plus lint, lockfile, doctests and rustdoc. Independent integration and simplification review found no unresolved defects. Regression coverage includes excluded malformed templates, argument binding, independent background sources, foreground serial/concurrent failure policy, picker diagnostics and alias errors.

This was written by Codex on behalf of max-sixty

max-sixty and others added 25 commits October 2, 2026 03:30
Name reached template typos and suggest available variables through the existing parser-backed visitor. Keep MiniJinja 2.x collection rendering and preserve defined filter inputs, while rejecting undefined inputs instead of silently filtering an empty string. Accept engine globals during validation and name missing top-level inputs as undefined variables.
Foreground cancellation intentionally reaches every active scope in one process. A signal-producing run_custom unit test could therefore cancel the parallel missing-binary unit test under cargo test. Move raw custom-child SIGTERM coverage to the existing CLI PTY matrix, where each invocation owns its cancellation state, and retain the spawn-failure trace test.
Foreground cancellation intentionally reaches every active scope in one process. A signal-producing run_custom unit test could therefore cancel the parallel missing-binary unit test under cargo test. Move raw custom-child SIGTERM coverage to the existing CLI PTY matrix, where each invocation owns its cancellation state, and retain the spawn-failure trace test.
Integrate branch-addressed merge and the completed main signal-test isolation repair. Retain main's subprocess-isolated typed interruption unit test and the real CLI raw-TERM regression case; template diagnostics keep their approved behavior.
Cover blocked destinations and denied source cleanup with real filesystem regressions. Require reflink-copy 0.1.30 to keep mode preservation in its owning dependency. Share directory-write applicability probes and strengthen adjacent assertions for privileged runners.
@max-sixty
max-sixty merged commit e14c30e into main Oct 22, 2026
37 checks passed
@max-sixty
max-sixty deleted the codex/hook-execution-fixes branch October 22, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants