Open
Conversation
Decline approval requests when the pre-bash hook exits nonzero without emitting a structured decision so Codex app-server mode cannot bypass guard enforcement on hook execution failures. Add a regression test that reproduces the failing hook path and proves the wrapper fails closed. Constraint: Approval hooks must fail closed when runtime wrapper execution breaks Rejected: Keep default pass on missing decisions | nonzero hook exits silently disabled enforcement Confidence: high Scope-risk: narrow Reversibility: clean Directive: Runtime adapters should treat hook transport failures as declined approvals unless a structured decision overrides them Tested: bash tests/test_codex_runtime.sh; python3 -m py_compile scripts/codex/app_server_wrapper.py Not-tested: End-to-end codex app-server session against a live Codex backend Signed-off-by: majiayu000 <1835304752@qq.com>
There was a problem hiding this comment.
Hook Latency (P95)
Details
| Benchmark suite | Current: 29ca7a4 | Previous: 0bb421d | Ratio |
|---|---|---|---|
pre-edit-guard (P95) |
185 ms |
195 ms |
0.95 |
pre-write-guard (P95) |
218 ms |
219 ms |
1.00 |
pre-bash-guard (P95) |
250 ms |
274 ms |
0.91 |
post-edit-guard (100) (P95) |
294 ms |
299 ms |
0.98 |
post-write-guard (100) (P95) |
207 ms |
208 ms |
1.00 |
post-edit-guard (5000) (P95) |
308 ms |
316 ms |
0.97 |
post-write-guard (5000) (P95) |
207 ms |
217 ms |
0.95 |
stop-guard (5000) (P95) |
129 ms |
130 ms |
0.99 |
learn-evaluator (5000) (P95) |
131 ms |
136 ms |
0.96 |
This comment was automatically generated by workflow using github-action-benchmark.
Treat any non-zero pre-bash hook exit as a hook error before parsing decision text so malformed stderr or partial payloads cannot reopen command approvals. Signed-off-by: majiayu000 <1835304752@qq.com>
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.
What
pre-bash-guard.shexits without a structured decision as hook errors in the Codex app-server wrapperWhy
The wrapper previously ignored hook exit status and defaulted missing decisions to
pass, which let approval-gate enforcement fail open in Codex app-server mode when the hook process errored.How to test
bash tests/test_codex_runtime.shpython3 -m py_compile scripts/codex/app_server_wrapper.pyChecklist