Skip to content

🤖 ci: Codex Comments waits for a missing security receipt, and the wait script requests one per head - #7732

Merged
ThomasK33 merged 5 commits into
mainfrom
fix/codex-null-security-pending
Oct 30, 2026
Merged

ThomasK33 merged 5 commits into
mainfrom
fix/codex-null-security-pending

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

After a push, Codex Comments no 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 so wait_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

  1. codex_summary_status returns "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.
  2. check_codex_comments.sh decides 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 (new codex_security_receipt_missing and codex_security_review_requested_for defs).
  3. wait_pr_codex.sh runs 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

  • Pending is never a pass. Once the wait budget runs out, a pending board blocks as before.
  • Pending applies only when the pending board is the sole blocker (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.
  • The pass condition is unchanged: a clean, unminimized Codex receipt for the head, with no open Codex thread.
  • No workflow permissions change. Only the agent scripts post, as the user running them.

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.sh counts 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

  • New and updated cases in 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).
  • New test 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 records gh pr comment.
  • Codex round 4 finding (a usage-limit notice made the wait pending forever) is fixed by failing, with two test cases (a notice after the head's request fails, a notice before it still waits).
  • Codex round 3 finding (an outsider's comment naming the head suppressed the request) is fixed: requests count only from repository members, with a test case that fails on the round-2 head.
  • Codex round 1 findings (an approval returned before the request, a request keyed to the commit time, and the 100-comment window) are fixed. Three of the cases fail on the round-1 head.
  • Seven of those cases fail on main.
  • make test-codex-comments and make static-check pass.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $261.79

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T00:03:05.184156Z 94f28b9 Manual request
🔒 Security Review ✅ Completed 2026-10-30T00:09:08.421853Z 94f28b9 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 46.4k tokens (24% cached)
Spend: $0.09 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 1 step · 1 call 5.6s
🟢 a chat survives a restart of the server 1 step · 1 call 5.6s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 4.3s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 4.3s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 9.9s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 9.9s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 8.9s
🟢 a chat survives trips through Settings 2 steps · 1 call 8.9s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 4.6s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 4.6s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 3.9s
🟢 the agent opens the playground workspace 2 steps · 1 call 3.9s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 6.7s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 6.7s
🟢 todoNudge.e2e.ts · 1 passed 1 step · 1 call 3.9s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 3.9s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 26.2s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 3.6s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.4s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 9.0s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.4s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 3.2s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 2.6s

e2e 0.20.0 · 1m 18s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 7.9k tokens (22% cached)
Spend: $0.02 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 9.1s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 9.1s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 6.0s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 6.0s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 6.1s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 6.1s

e2e 0.20.0 · 23.7s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 6.4s · 2 targets (web, phone) · run artifacts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/wait_pr_codex.sh Resolved
Comment thread scripts/wait_pr_codex.sh Resolved
Comment thread scripts/wait_pr_codex.sh Resolved
… 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.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Head: 95b1178

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/lib/codex_comments.jq Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 95b11789d8

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/wait_pr_codex.sh Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/wait_pr_codex.sh Resolved
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Head: 3e089c9

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 3e089c999d

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/lib/codex_comments.jq Resolved
Comment thread scripts/lib/codex_comments.jq Resolved
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Head: 94f28b9

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 94f28b9187

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 6b0aa51 Oct 30, 2026
63 of 66 checks passed
@ThomasK33
ThomasK33 deleted the fix/codex-null-security-pending branch October 30, 2026 00:39
yermakoffivan pushed a commit to yermakoffivan/mux that referenced this pull request Oct 30, 2026
…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 -->
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.

🤖 ci: Codex Comments blocks a push-only head: push-triggered Codex runs post no security receipt

1 participant