Repository navigation
Approver: judge by Codex's guardian policy, deny at once, fail closed - #237
Conversation
George asked to follow Codex's auto-approval patterns where ours were odd. This takes the picks that need no sandbox: - The judge gets Codex's written policy (evidence handling, authorization scoring, risk taxonomy, exfiltration, credential probing, security weakening, destructive actions, outcome table) with this agent's trust rules folded in, and answers one assessment a call: risk_level, user_authorization, outcome, rationale. The eleven probability questions built for Jev are gone; the Decisions API gets one predicate a call. - A denial goes back to the model at once with Codex's wording. Only a call too long to show is still handed to a person. - A review is tried up to 3 times within 90 s, then denied as a labeled review failure (or a timeout). The answer carries `unreviewed`, and the daemon counts it toward no breaker. - The breaker is Codex's: 3 in a row, or 10 among the turn's last 50 decided calls. The daemon keeps that window as bits on the bot. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NSAn6KdbZwnLbDoimEJpTZ
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. |
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19c6aeadbd
ℹ️ 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".
- Schema 54 turns a stored per-turn count into that many denials as the window's newest calls, so a turn parked across the upgrade keeps its breaker count instead of starting from none. - A denial's reason clips the judge's rationale to 4 KiB on a character boundary and names only known risk and authorization levels, so it always fits the daemon's 16 KiB reason limit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NSAn6KdbZwnLbDoimEJpTZ
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40a4efffbe
ℹ️ 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".
|
@codex review Generated by Claude Code |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NSAn6KdbZwnLbDoimEJpTZ
What
The auto approver now follows Codex's guardian reviewer (openai/codex
cf2c04b, Apache-2.0). This PR covers the parts that don't depend on the task sandbox.Codex's policy and verdict. The judge's instructions are Codex's written policy: evidence handling, authorization scoring, the risk taxonomy, data exfiltration, credential probing, persistent security weakening, destructive actions, and the outcome table. Our own rules are folded in:
critical.Each call gets one assessment:
{"outcome":"allow"}, orrisk_level/user_authorization/outcome/rationale. These replace the eleven probability questions that were built for Jev. The Decisions API gets the same policy plus one predicate per call ("is the outcome deny?").Deny at once. A denial goes straight back to the model, using Codex's rejection wording: no workaround, take a materially safer route or ask. A risky call no longer waits for the person under Sonny's non-lapsing gate. Only a call too long to show the judge is still handed to a person, the same way Codex asks the user when a review's input is over budget.
Fail closed, labeled. A review gets up to 3 attempts within 90 s. If they all fail it's denied as "Automatic approval review failed: …", and a timeout gets its own message. Both are sent with the new
answerfieldunreviewed: true, and the daemon doesn't count those toward the breaker. The CLI'sautogate expiry goes from 45 s to 105 s to fit the new budget.Breaker: 3 in a row, or 10 among the turn's last 50 decided calls (was 20 per turn). The daemon keeps the window as bits on the bot's row. Listings carry
{in_row, recent}andinspectshows{in_row, window, turn}. Once a denial falls out of the window, the count is dropped, so a bot that is never denied still writes nothing.Not in this PR:
No screenshots: nothing changes on screen except the wording of denials.
Tests
cargo test --workspace: all pass except the two sonny sandfs task tests, which need fuse3 and fail here on main too.cargo clippy --workspace --all-targets: clean.AGENT_TEST_RUNTIME=1 python3 -m unittest tests.test_approvals tests.test_query_plans tests.test_cli tests.test_daemon: 108 tests OK.