Repository navigation
fix(ci): send every released head on a sweep tick, up to a cap - #13105
Conversation
The half-hourly sweep returned on the first PR it dispatched, so each released head beyond the first waited a tick (about 30 min) per PR. The sweep now decides up to SWEEP_TICK_CAP (5) PRs across its passes, in pass order, each PR at most once, and stops deciding after SWEEP_DECIDE_BUDGET_MS (5 min) so the dispatch job's 10-minute timeout holds. dispatchFeedback and sweepStale return a send step when the sweep defers them; the sweep sends the decided rounds back to back, so each dispatched-run record uploads seconds after its POST, inside the trusted-trigger gate's 2-minute wait. main() writes the first send as run-id/upstream-run-id and later ones as run-id-<n>/upstream-run-id-<n> as each is sent, and pr-feedback-dispatch.yml records each through its own numbered record, scan and upload steps. Lost-run recovery still runs only on a tick that sent nothing, and still sends at most one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…et basis The pipeline README said the sweep sends one head per tick; it now states SWEEP_TICK_CAP. SWEEP_DECIDE_BUDGET_MS's comment now cites the binding limit, check-trusted-trigger.mjs WINDOW_MS (10 minutes from the dispatcher run's start), with setup measured at 18 s on run 41759929522: 5 min deciding plus one 2-minute verifier read in flight leaves about 2.5 minutes. Adds the pr-pipeline changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ery-released-head
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: 35f8fbcbe4
ℹ️ 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 Security review (incremental, 35f8fbc..4c9765f): no security issues foundcritical-findings: 0 I read every hunk of both files in scope: What changed. The send loop now wraps each What I checked:
Neither changed file is a merge hold, the kill switch, a token request, a plugin manifest or an instruction surface. The test file only adds a unit test. The PR description contains no instructions aimed at this lane. No settled threads apply. The prior finding was the summary comment from the last round, which reported no issues, so there is nothing to repeat. Spend (not a finding): no change beyond the earlier review's note. A failed POST no longer ends the tick early, so the remaining rounds, at most |
|
claude-review reviewed Incremental code review: 35f8fbc → 4c9765f (#13105)Scope: this push changed 2 files, No new findings. The earlier finding is fixedThat finding was "a rejected POST now stops the rest of the tick's sends and fails the job". The send loop in
Verification: everything above comes from reading the code. The author reports 223/223 passing in Settled thread: the owner's reply on the L899 thread says it was fixed in this commit, and the code matches. Nothing to raise again. Spend: no change since the last review. A tick can still start up to 5 No plugin manifest changed. The PR has no closing issue. The PR context and settled-threads files contain no embedded instructions to this lane. |
The deferred send loop had no per-PR catch, so one rejected POST (a 502, a secondary rate limit) threw out of the sweep, failed the dispatch job and left the rounds after it unsent. Each send now logs its failure and the loop goes on, as the per-PR sweep did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No related issue: arm-wait trend (poteto, .work/gh-monitor/trends/arm-wait/result.md, cause 1); a sweep tick re-sends at most one released PR, so every other released head waits a full tick.
Summary
The half-hourly pr-unblock tick's sweep (
feedback-dispatch.mjssweepReleased) returned on the first PR it dispatched (sweepPulls), so one tick re-sent one PR. On 2026-11-04 the 02:18Z tick (pr-feedback-dispatch run 41759929522) sent only #13032; #13031, whose publish the kill switch had stopped at 01:52, waited for the 02:40Z tick (round 41762504146). Each extra released head adds a tick, and ticks start 5 to 25 min late.Sending more than one needs each dispatched run's own
pr-feedback-dispatched-<up>-<run>record within the trust gate's window:check-trusted-trigger.mjsrequireRecordedstops a dispatched run whose record is missing after about 2 min of waits, and records upload only after the dispatch step. So the sweep now decides first and sends after, back to back.Fix
feedback-dispatch.mjs: on a sweep tick,dispatchFeedbackandsweepStalereturn the decided request instead of sending it. The sweep collects up toSWEEP_TICK_CAP(5) PRs across the passes in their existing order, with a set of PR numbers so none is sent twice, then sends them back to back.main()writesrun-id/upstream-run-idfor the first send andrun-id-N/upstream-run-id-Nfor the rest. A decide-time budget (SWEEP_DECIDE_BUDGET_MS, 5 min) keeps the sends inside the gate's 10-minWINDOW_MS(check-trusted-trigger.mjs:33). Single-PR paths andrecoverLost(only on a tick that sent nothing, at most one) are unchanged.pr-feedback-dispatch.yml: record, scan and upload steps for sends 2 to 5, each guarded on its ownrun-id-N. The trust gate is untouched:findRecordalready reads every artifact of the dispatcher run.docs/conventions/pr-pipeline/README.md: three "one per tick" statements corrected; a.changes/pr-pipeline/fragment.Risk
pr-feedback-dispatched-*records, if it reads them, was not checked (UNVERIFIED); the gate in this repository is the only reader found.Verification
feedback-dispatch.test.mjs: 222/222. Three new or changed tests (two released heads both sent, the cap, fix-request-before-released ordering) fail on origin/main's code.scripts/check-affected.sh --base origin/main --no-fetch: exit 0.Related
🤖 Generated with Claude Code