Repository navigation
Conversation
The gate only parsed STARLIGHT-INDEPENDENT-REVIEW-V1. Codex posts codex-review-state:v1 plus codex-review-receipt:v1 as its own bot account, so chatgpt-codex-connector could never satisfy a check it is allowlisted for. Adds codex_receipt(): requires the app+bot pair, created==updated, code_review and security_review both completed at the exact head with no unresolved findings. A quota failure is not a pass. Five tests cover pass, security-quota failure, wrong head, raw token, and unresolved findings.
|
Claude review at I ran the new
P1 findings
P2: a stale or wrong-head Codex comment returns Why the 42 tests passed: the fixtures were written from an assumed format, not captured from GitHub. The fix below tests against the captured payloads. Proposed fix (patch below,
Scope stays the same: the gate only. Still needed besides this patch: Codex code-review quota (reviews on #636 hit the usage limit), and a CTO PASS on this PR itself, since it touches Patch (gate + tests). Includes
|
Summary
Testing
|
Problem
independent-review-policycan never pass on this repo. The gate parses onlySTARLIGHT-INDEPENDENT-REVIEW-V1, while Codex postscodex-review-state:v1+codex-review-receipt:v1as thechatgpt-codex-connectorbot. The app is inTRUSTED_APPSand is still rejected, because the attestor rule requires the author to befrankxai.Evidence: merged PRs #625, #567, #566, #565 all show this check as FAILURE. The check is red across merges, so it is teaching bypasses rather than gating anything.
Change
codex_receipt(comment, head)reads the Codex payload and requires:chatgpt-codex-connectorcreated_at == updated_at)code_reviewandsecurity_reviewbothcompletedat the exact headevaluate()tries this before the attestor rule; a matching-but-invalid receipt fails closed.Deliberately strict: a security review that failed on quota is not a pass. #638 stays blocked until Codex quota resets or a real receipt exists.
Verification
python -m pytest tools/merge-review/tests/test_merge_review_gate.py -q→ 42 passed, 104 subtests passed.Five new tests: clean pass, security-quota failure, wrong head, raw token without app, unresolved findings.
Scope
Gate only. No PR is merged by this change.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.