Repository navigation
fix: recover completed CI reviews left pending - #180808
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
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: 83773d760f
ℹ️ 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".
| throw new GitHubDiffDataError( | ||
| "The completed CI run is missing or stale in the current observation.", | ||
| ); |
There was a problem hiding this comment.
Preserve pending status when completion retries exhaust
When a scheduled reconciliation continues receiving a stale or missing workflow-run listing through every retry, this new GitHubDiffDataError reaches main's generic catch, which publishes a failure status before recovery exhausts. Although the failed workflow preserves the scan window, the next scheduled pass skips the run because security-review-event.mjs ignores any non-pending status created after the CI completion, leaving the PR falsely failed until a manual replay or new CI run occurs. Keep this transient reconciliation failure pending, or otherwise ensure the next scheduled pass reselects it.
AGENTS.md reference: AGENTS.md:L9-L9
Useful? React with 👍 / 👎.
|
Codex review: blocked before merge. What this changesThis PR carries completed CI identities into Security Review and adds manual replay for a completed run. Example: CI run 123, attempt 3, has completed while the workflow listing still reports it as active.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open: the recovery is useful, but exhausted retries can leave a false failure that prevents subsequent scheduled recovery. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherGitHub event resolution selects current PR heads, and the existing Security Review owner evaluates CI and live approval authority before publishing the required commit status. flowchart LR
A[GitHub completion or replay] --> B[Run and PR resolver]
C[Scheduled reconciliation] --> B
B --> D[Security Review owner]
D --> E[CI and live approvals]
E --> F[Required commit status]
Technical reviewBest possible solution: Keep transient completion-observation failures pending while failing the scheduled pass so the existing reconciler can select them again. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the missing-observation, failure-publication, and subsequent-skip path; the added test expects that failure, but no target code was executed during this review. Is this the best way to solve the issue? Passing completion identity through the existing resolver and retry owner is focused, but recovery is incomplete until retry exhaustion preserves future selection. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3633f4d7ca58. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +163, Docs +19, Config +10, Other +43. Total +235 across 7 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 22, 2026, 1:26 PM ET / 17:26 UTC. |
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
A completed CI run can remain behind a pending
openclaw/ci-gatestatus when Security Review sees a missing or stale CI response and its successful scheduled pass advances the scan window.User Impact
Maintainers can recover the combined review for a completed CI run without rerunning CI. There is no Control UI behavior change.
Why This Change Was Made
Carry the completed run ID and attempt from the resolver to the existing review owner. Missing or older observations use the existing bounded retry path; exhaustion fails the scheduled pass, preserving its scan window. A newer active run or attempt remains pending.
A default-branch-only manual replay accepts one completed CI run ID, reloads that run, and uses the existing current-PR, repository, workflow, head, and branch checks. It runs ordinary security and CI review with no caller-supplied SHA or gate waiver. The exact transient API discrepancy affecting the observed stuck PRs was not captured; the lost-window behavior is reproduced by the focused tests.
Evidence
The existing resolver, review owner, retry budget, and authority checks remain authoritative; no new persistent state or retry machinery. Production/workflow LOC: 1,002 → 1,055 (+53). Test LOC: 3,230 → 3,393 (+163). No startup, dependency, or UI changes; no UI build or screenshots needed. Normal PR CI selection supplies broad proof.