Repository navigation
ci: Propose automated approval for reviewed high-risk paths - #44
Conversation
|
@codex review |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8ee76d1fb
ℹ️ 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".
| if (!checks.length && !statuses.length) return false; | ||
| return (!checks.length || (checks[0].head_sha === sha && checks[0].status === 'completed' | ||
| && checks[0].conclusion === 'success')) | ||
| && (!statuses.length || (statuses[0].sha === sha && statuses[0].state === 'success')); |
There was a problem hiding this comment.
Bind legacy statuses using the queried ref, not a missing field
When a required context uses a legacy commit status without an App binding, this condition always rejects it: listCommitStatusesForRef returns status objects with no sha property, as shown in GitHub's documented response. The request already binds those results to the exact head through ref: sha. Consequently, ordinary high-risk PRs with such a required context cannot pass automatic approval even when their review and checks are clean. The regression fixture masks this by inventing sha: H; removing that field makes “Required status contexts also need an exact-head success” fail. Use the request's immutable ref binding and make the fixture match the actual API response.
AGENTS.md reference: AGENTS.md:L93-L93
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
AI assistance
OpenAI Codex (GPT-6) prepared this change and ran the local checks.
What changed
Allow ordinary high-risk paths to satisfy
risk-gatewithout an owner labelonly when the latest trusted Codex marker is completed for the exact head,
has_unresolved_findingsis false, and every discovered required check is green.Keep secrets, IAM, deployment, trading/execution, broker credentials, Kelly,
stop-loss and gate trust configuration under the existing owner-only rule.
Check old and new paths for renames, preserve native protection and the shadow
observer, and serialize comment/PR/check events by PR.
PROPOSAL.mdcontains theexact owner-only globs, rationale, limits and rollback. AGENTS wording and README
indexes describe the proposal. The docs checker permits the specifically
requested root proposal filename while retaining nested filename checks.
How verified
named cases pass after. Root proposal naming and per-PR concurrency contract
also have recorded fail-before/pass-after evidence.
scripts/scan-secrets.py dir .: zero file/rule findings; staged diff check passes.Hosted CI is separate from these local results. Future token permissions, event
delivery and adoption are not established by unit tests.
Hosted CI readback
At the published head, Documentation check, Gitleaks, Governance shadow tests,
Commit message convention, Secret scan / Gitleaks and pr-template succeeded.
The current base workflow's risk-gate and Evaluate PR governance failed under
the existing owner-label rule; this Draft does not bypass that rule.
Secret scanner regression failed before tests while the unchanged installer
was downloading Gitleaks: HTTP 504, curl exit 22. Local scanner regression
9/9 and both directory/commit-range scans passed. Hosted CI is not all green;
no check was bypassed or rerun by this worker.
Why
Ordinary reviewed high-risk code should not require a repeated manual label.
Unknown, stale or changing evidence cannot authorize automatic approval.
Risk
High-risk governance change; Draft proposal only. The current base-branch gate
still governs this PR. The gate and trust policy remain owner-only, so this PR
cannot authorize its own adoption. No labels, repo/org settings, branch-protection
requirements, merge, deployment or trading switches are changed. Other repositories
require separate adoption. Legacy App-bound statuses with no source-App evidence
fail closed. Native workflow-name triggers need maintenance when workflows change.
A final status is a snapshot, not an atomic transaction with all GitHub evidence.
The established review/merge process and native protections remain required.
Rollback restores the previous workflow and AGENTS approval wording through a
separately authorized reviewed change and reevaluates affected open PRs.
Central publication check
Checker:
publication-check/2.0-advisory; build:83d9d1130377; mode: advisory.Total matches: 35; matching lines: 35. These are inherited content,
with zero new matching content lines versus base (ignoring indentation-only moves).
The repository's native Gitleaks scanner passed with zero file/rule findings.
First 20 masked diagnostics (file:line plus masked text):