Repository navigation
fix(pr-pipeline): list lost pr-verify runs by status in the reconciler - #8696
Conversation
pr-verify runs more than 500 times a day, so listing the day's runs hit the lane page cap and failed the reconciler. List only the lost conclusions and the not-yet-completed statuses, one query each, and dedupe by run id. The page cap per query and the fail-closed rule stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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: cecb2555f3
ℹ️ 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".
|
claude-security-review reviewed No security findings. The incremental change since cecb255 touches two files.
Neither change adds input handling, authorization logic, token or secret handling, injection surface, or any widening of workflow permissions. No instruction-surface deletions are involved, so the protected-class register lens does not apply. The change has no new security-relevant surface. |
|
claude-review reviewed Incremental review of Change: Checked by reading the code (
Not verified: the PR's claim of 34 passing tests is the author's and unverified by me. |
A re-run that started between the in-progress and queued queries was missed by both, so the in-flight count could undercount and the reconciler could exceed its cap. Statuses are now read in lifecycle order, with a transition test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ws5jqYugGSseBMZ9BuP9h
No related issue: follow-up to #8685; pr-verify exceeds 500 runs a day
Summary
The lost-run reconciler still fails: pr-verify has more than 500 runs
in the 24h window, so its paginated lane listing hits
LANE_RUN_PAGES = 5("has more than 5 pages", [failingrun](https://github.com/melodic-software/claude-code-plugins/actions/run
s/39465225948)).
Fix
Stop listing the whole day. Read the lane's runs once per status in
LANE_LIST_STATUSES: the threeLOSTconclusions (cancelled,timed_out, startup_failure) and the non-completed statuses
(in_progress, queued, waiting, requested, pending), each query
paginated with the same per-query cap, then dedupe by run id. The
in-flight count (non-completed,
run_attempt > 1) is computed from themerged set exactly as before, and a listing that exceeds the cap still
fails closed.
The
statusparameter of [list workflow runs for aworkflow](https://docs.github.com/en/rest/actions/workflow-runs#list-wor
kflow-runs-for-a-workflow) is documented as: "Returns workflow runs
with the check run status or conclusion that you specify." Its listed
values include cancelled, timed_out, in_progress, queued, waiting,
requested and pending. startup_failure is missing from that list, but
the live API accepts it (a repo-wide
status=startup_failurequeryreturned a run whose conclusion is startup_failure), and combining
created=withstatus=returns matching runs.Verification
node --testin.github/scripts/maintenance-reconcile-lost-runs:34 pass, 0 fail.
scripts/check-affected.sh --base origin/main --tests: 10 passed, 4skipped.
status=. New tests: 700 succeeded plus2 cancelled runs plan the 2 lost runs without hitting the cap; queued
and in-progress attempt-2 runs still take re-run places with 700
succeeded runs listed; 150 lost runs span 2 pages.
reconcile.mjsfrom origin/main, the new tests fail (3 fail, 31pass) with "has more than 5 pages".
Related
Follow-up to #8685.
🤖 Generated with Claude Code