Repository navigation
refactor(ci): run pr-dispatch-feedback's ci-status re-run from a tested script - #18438
Conversation
The "Find the ci-status to re-run" step's inline bash moves to .github/scripts/pr-dispatch-feedback/rerun-ci-status.sh, which sets -e as the step's default shell did. The step keeps its id, env and outputs and runs the default branch's copy from .base, added to the job's sparse checkout. scripts/ci-rerun-ci-status.test.sh runs the script in place of the awk-extracted body, keeps every assertion, and adds two: the step runs .base's script, and the checkout carries its folder. A failed default-branch checkout now fails the find step, so nothing is re-run; before, ci-status was re-run unrecorded. The script joins the hold floor as a gate row, like the workflow that runs it; the generated copies and the floor pins follow. Reasons kept from deleted comments: - A rate-limit wait fits only inside RATE_WAIT_SECONDS, counted with the poll's waits: twelve minutes fit the job's timeout, and the brake holds the pool a median 12 minutes (7 days to 2026-11-19). A wait past it fails the job naming the reset, since no other run re-runs a ci-status this job leaves stale; an extra attempt from two racing re-runs has no record, so pr-verify refuses it and the head is stranded for a person, never let through. - Polls are conditional GETs on the last 200's ETag; a 304 stands for that body, as request-budget.mjs does, and keeps its reading. - The run judged is ci-status's own choice: the newest pull_request run of the file on the head, never a fork's run at the same SHA. One head listing answers every file only when whole (the reconcile.mjs sharedRuns rule); otherwise each file's runs are read. - Only the lane that finished last re-runs ci-status (ties: higher run id). - The gate job is CI Status, else a pre-rename ci-status, never the alias: re-running the alias alone replays its old needs result. - ci-status's review-lanes step waits for a running review (REVIEW_WAIT_SECONDS), so a polled run's jobs are read again. - A lanes App PR's attempt-1 ci-status is left while the kill switch is on or unread: its re-run would fail and spend attempt 2, the reconciler's only re-run. An unread author counts as the App's, as ci-status reads it. - A re-run is recorded only for a first review attempt, a listed human's re-run, or the reconciler's (attempt 2, github-actions[bot] 41898282, accepted by reconciler-record.mjs): anyone with write access can re-run a review run, and the record vouches for the ci-status attempt it causes. - Only a listed person's approval, at relay attempt 1, re-runs ci-status: a relay re-run's triggering actor is the re-runner, not the reviewer. - The job's checkout is the default branch's, never the PR head: the find script, the trusted-actors list, the reconciler-record check, the api-budget library, the kill-switch check and the upload scanner. - A failed Node setup leaves the reconciler's review re-runs unrecorded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dback-rerun-script
…dback-rerun-script Generated hold-floor files take main's version, regenerated by scripts/sync-hold-floor.py with this branch's rerun-ci-status.sh gate row. Floor pins are main's counts plus that one gate row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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. |
|
claude-review reviewed Code review (incremental, blocking only): no findingsThis lane already reviewed an earlier head ( What changed since the last review The rate-limit error message used to print the reset time with GNU-only What I checked
Spend: none. No runs, turns or schedules change. Loosened checks: none found. The prompt had no Loosened checks would be marked: fail (bundled default); patterns: 0 Closing issue: none. The PR says it has no related issue. The PR context file has no instructions aimed at the review lane. I ran nothing myself. The test counts in the PR body are the author's claim and unverified. Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #18438 (incremental since 408d1e8)I found no security issues. This lane already reviewed an earlier head, so this review was blocking only: it would have reported CRITICAL and IMPORTANT findings and dropped SUGGESTIONs. Scope. I read the whole change since 408d1e8. It is one hunk in one file, What changed. The rate-limit error message used to print the reset time with GNU Injection.
So a response header cannot get anything but digits into jq. Control flow. The swap leaves control flow alone. The command substitution only builds the message text, and Trust controls. Nothing is widened. The diff touches no PR context. It contains no text aimed at the review lane. Spend. None: the change starts no billed resource. critical-findings: 0 |
As a script run as its own process, it now sources api-budget.bash beside it and calls api_budget_wrap_gh, which the api-budget coverage test counts and which records each reading itself, so the hand-rolled budget() and the step's API_BUDGET_SH input go. The test's clock advances with each stubbed sleep, so the wrapper's rate stop lifts once the script waits out a reset, as it does on a real clock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: candidate 17 (part 1) of an
/architecture:improvedeepening pass over the CI lanes, run in a local session.Summary
pr-dispatch-feedback.yml's "Find the ci-status to re-run" step carried 316 lines of stateful inline bash (polling, rate-limit waits, approval and reconciler checks). Its only test reached it by awk-extracting the step body out of the YAML.Fix
.github/scripts/pr-dispatch-feedback/rerun-ci-status.sh. The step keeps its id, env and outputs and now runsbash .base/.github/scripts/pr-dispatch-feedback/rerun-ci-status.sh(the script sets-e);/.github/scripts/pr-dispatch-feedback/joins the job's.basesparse checkout. The script runs only from the default branch's tip, the same base code the inline step was.ghcalls withapi_budget_wrap_gh, loadingapi-budget.bashfrom beside itself asreport-escalation.shdoes (api-budget-coverage.test.mjsrequires it of a script). Its ownbudget()recorder and the step'sAPI_BUDGET_SHenv go, since the wrapper records each reading. The wrapper's rate guard also refuses a call before a recorded reset and annotates a 403 or 429; the script already sleeps until reset+1 before retrying, so its retries are unchanged on a real clock.jq strftimein place of GNU-onlydate -d @; same value.scripts/ci-rerun-ci-status.test.shruns the script instead of the awk-extracted body and keeps every assertion.gaterow;sync-hold-floor.pyregenerated its copies and the floor pins moved.record-Nandscan-upload-Nstep idsworkflow-gates.test.mjs:1516,1668pins, so the result is not clearly smaller.pr-unblock-dispatch.ymlrepeats the same triple.Reasons kept from deleted comments
Verification
scripts/ci-rerun-ci-status.test.sh: 325 pass, 0 fail. The step-envAPI_BUDGET_SHcheck goes with that env; thedatestub now advances by the stubbed sleeps, as a real clock does, and the missing-library case runs a copy of the script with no library beside it. Breaking the script fails 52.api-budget-coverage.test.mjs5 pass with its expected list unchanged;scripts/check-shell-portability.sh origin/mainclean.Related
Part of the
.githubdeepening series; later parts move the other large inline steps.🤖 Generated with Claude Code