Repository navigation
🤖 ci: Codex Comments waits for a missing security receipt, and the wait script requests one per head - #7732
Conversation
…t requests one per head Fixes #7731.
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. |
🟢 e2e stories (Haiku): 14 passed22 agent steps · 7 replayed from cache · 15 model calls · 46.4k tokens (24% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 18s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 7.9k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 23.7s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 6.4s · 2 targets (web, phone) · run artifacts |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34ff9ad9c7
ℹ️ 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".
… name the head - check_codex_comments.sh reads every comment and prints whether the head's security receipt is missing, and whether a request already names the head. - wait_pr_codex.sh runs the gate before any approval returns, so an approved head without a receipt keeps waiting, and posts one request per head that names the head.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95b11789d8
ℹ️ 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 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. |
…rity review request
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f04bcb03c
ℹ️ 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".
…e wait, never passes it
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e089c999d
ℹ️ 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 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. |
|
Issue desk waiver record: this PR used all 6 review rounds. Round 6 at 3e089c9 posted no finding, the security receipt for that head is clean (6509222532), and the round-5 P2 is deferred to #7733. Codex Comments still fails because the Codex board records the code review with null unresolved-findings, a new state that the gate does not accept. A separate gate PR fixes that state. After it merges, this PR gets one merge-only push from main. The desk allows reviews of that merge-only head past the cap for verification only: a P1 stops the merge, and a P2 goes to #7733. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94f28b9187
ℹ️ 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: Didn't find any major issues. Already looking forward to the next diff. 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. |
…or the head (coder#7735) ## Summary `Codex Comments` no longer fails on a head whose code review finished with null findings flags and posted no finding. The gate accepts that one state only for the current head, and only because the code review's findings, Codex review threads and finding comments, block the gate on their own. Every other state stays the same. Fixes coder#7734. Refs coder#7727, coder#7732. ## Background On coder#7732 at head `3e089c999d`, Codex's board (6505686483) recorded the code review as `{"has_any_findings": true, "has_unresolved_findings": null, "status": "completed"}`. That code review posted no review, no thread and no finding comment, and the security receipt was clean. `codex_summary_status` accepted null flags for a finished code review in no case, so the board counted as an unresolved Codex comment (run 40959601344). ## Implementation One clause in `codex_summary_status` (`scripts/lib/codex_comments.jq`): a `code_review` entry with `status: completed` and `has_unresolved_findings: null` is informational when its `commit_sha` is the current head. ## Why the gate stays safe - The board's flags never were the only signal for code findings. Codex posts code findings as review threads and as finding comments, and the gate blocks on each of them separately: an unresolved Codex thread, or any unminimized Codex comment that is not a known informational shape. - Null for another head still fails (1), as today. Null while the review runs is still pending (10), as today. - The security half is unchanged. ## Validation - New test `test_null_code_review_flags_pass_only_for_this_head` (with and without the cached payload): clean passes (0), an open Codex thread fails (1), a Codex finding comment fails (1), an older commit fails (1), and running stays pending (10). On main, the clean case fails (1 instead of 0). - One existing case changes on purpose: `test_review_state_line_is_fail_closed` "completed, null findings" sets null on the current head's code review, which is the state this PR accepts, so it now expects 0. Null security flags and null for other heads still block. - `make test-codex-comments` and `make static-check` pass. - A live run of `./scripts/check_codex_comments.sh 7732` with this change: "No unresolved Codex comments found". --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high` • Cost: `$274.62`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high costs=274.62 -->
Summary
After a push,
Codex Commentsno longer fails at once when Codex finished its security review with null flags but posted no receipt for the new head. The gate now reports that state as pending (exit 10), so CI's existing wait budget covers it.wait_pr_codex.sh(and sowait_pr_ready.sh) requests one Codex security review per head in that state.Fixes #7731. Refs #7727, #7729.
Background
Codex posts a security receipt only for runs that a review-request comment triggers. Runs triggered by "PR opened" or "New commits" post none (#7731 lists the comment IDs). Since about 2026-10-29 the board records finished security reviews with null flags, and #7729 accepts null flags only beside a clean receipt for the head. So every push-only head failed until someone asked for a Codex security review and reran the job.
Implementation
codex_summary_statusreturns "running" (pending) when the security review of the current head finished with null flags and no clean receipt for that head exists. With a receipt, the board is "completed" exactly as after 🤖 ci: Codex Comments accepts null security flags only beside a clean receipt for the head #7729.check_codex_comments.shdecides from its fully paginated comments, and prints two marker lines: the head's security receipt is missing, and no Codex security review request names the head yet (newcodex_security_receipt_missingandcodex_security_review_requested_fordefs).wait_pr_codex.shruns the gate before any approval check. While the receipt is missing, it keeps waiting (exit 10), so an approval cannot end the wait for an approved head that still lacks its receipt. When no request from a repository member (OWNER, MEMBER or COLLABORATOR) names the head, it posts one Codex security review request that names the head (Head: <sha>). So the request is once per head even after a force push, and an outsider's comment cannot suppress it. A Codex usage-limit notice newer than the head's request fails the wait (exit 1, naming the head): no receipt will come, and the security half never gets the quota pass.Why the gate stays safe
codex_only_in_progress_blocks). An open Codex thread, an advisory section, the merge gate on, or any other unknown state still fails at once.Known limit
Codex runs a code review as well as the security review for each security review request. So each push costs one extra review round under the 6-round review cap.
The usage-limit check in
wait_pr_codex.shcounts a request comment from any author, while the request suppression counts only repository members. An outsider's comment plus a later usage-limit notice therefore ends the local wait early with exit 1. It never passes a head without a receipt. #7733 tracks the fix (Codex round 5), plus two more wait cases from the merge-only head's review: a board that starts with a receipt marker, and a receipt minimized after a request.Validation
scripts/check_codex_comments_test.py. They cover: null flags with no receipt (10), a receipt for an older head (10), and a minimized receipt (10). The CI wait passes once the receipt lands (0 after 2 rounds). A finding still fails during the wait (1). A receipt for the head passes (0, unchanged).test_missing_security_receipt_is_requested_once_per_head. It covers: no request names the head (posts one), a request for an older head (posts one), a request that names the head (posts none), an approval that does not end the wait (posts one, exit 10), and a receipt present (posts none, exit 0). The test double recordsgh pr comment.make test-codex-commentsandmake static-checkpass.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$261.79