Repository navigation
perf(pr-unblock): count feedback rounds from one GraphQL query - #18025
Conversation
roundsSoFar listed the PR's commits, then made one check-runs call per commit to count earlier "pr-unblock / address-feedback" rounds. On 2026-11-21 that was 334 of Address Feedback Select's 896 core calls across 44 runs, and #17880 (59 commits) cost 60 calls a run for it. listModelRounds reads every commit's GitHub Actions check runs of that name, all attempts (checkType ALL), in one GraphQL query (4 points), filtered to the github-actions app (id 15368) and mapped to the listCheckRuns shape, so countCheckRounds and lastRoundAt are unchanged. A commit whose suites or runs run past a page, or a PR past 100 commits, is read over REST as before, one commit at a time, so a round is never undercounted. Probed live on #17939 and #17880: the query's runs match REST run for run. Revert signal: Select core calls per run not falling, or any round count that differs from REST. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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): test(pr-unblock): tie planLanes to the planner's output linesNo blocking findings in this push. This lane already reviewed an earlier head, so this review covers blocking findings only. I read every hunk of the one file in scope, What changed. The push adds one test. It reads
Do the patterns match the script? Yes. I checked each one against the script at this head:
This matters because the earlier Earlier finding. The Verification. I did not run the tests. I checked the patterns by reading the script. Criteria checked. There is no closing issue, so no acceptance criteria applied. I found no embedded instructions in the settled-threads or prior-findings files. Loosened checks. Loosened checks would be marked: fail. The prompt gave no Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #18025, incremental (ee817cd → 91797a1)No security issues found. This lane already reviewed an earlier head, so this round reports only CRITICAL and IMPORTANT findings. One file is in scope, and I read every hunk of it. What changed
What I checked
critical-findings: 0 |
claude-review was right: GitHub Actions makes one check suite per workflow run, so `first: 3` suites filtered only by app paged over on most commits and sent them back to REST, saving almost nothing. Live on 2026-11-21 the app-only filter truncated 10 of #17880's 59 commits, both of #17939's and all 5 of #17926's. The suites now also filter by checkName, so only suites holding the model run come back (at most 3 per commit on those PRs), at first: 5. GraphQL returns one suite once per attempt, so runs are deduped by databaseId. Verified on #17880, #17939 and #17926 (66 commits): 0 truncated, the run ids match REST check-runs per commit exactly, 6 GraphQL points a query. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Test Selection trace failed this suite on 658 undeclared reads of the whole tree. The planLanes test and the main select calls ran the real scripts/plan-test-lanes.sh over the live tree, and the staged-layout test copied every file of pr-unblock and lib. main takes the planner as a dependency and the tests pass a stub; planLanes runs against a fake planner in a temporary root; the staged layout copies only the import closure of address-feedback.mjs; the one read left, resolve-config's package.json, is declared. Local trace: 6,514 tree reads to 43, 0 gaps; the suite runs in under a second instead of 83 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RAoAtVQsKbWdcHeEJeiY2U
The planLanes test now runs a fake planner, so nothing checked that scripts/plan-test-lanes.sh still prints the lines planLanes parses. The new test reads the planner and matches its <lane>=true/false, <lane>_legs and windows_jobs lines, without running it over the tree; a change to the planner selects this suite. Changing `%s_legs=[%s]` to `%s_legs=%s` fails it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RAoAtVQsKbWdcHeEJeiY2U
No related issue: GitHub Optimization burn cut; the hub cleared it under D411.
Summary
pr-unblock's Address Feedback Select counts a PR's earlier model rounds in
roundsSoFar(address-feedback.mjs). It listed the PR's commits, then made onecommits/{sha}/check-runscall per commit. That read grows with the PR's commit count:gh-job-calls.jsonlroutes).Fix
listModelRounds(pr, check), one GraphQL query:pullRequest.commits(first: 100), thencheckSuites(first: 5, filterBy: { appId: 15368, checkName })(github-actions, only suites holding the model run), thencheckRuns(first: 10, filterBy: { checkName, checkType: ALL }). Runs are deduped by id (GraphQL returns one suite once per attempt) and mapped tolistCheckRuns' shape, socountCheckRoundsandlastRoundAtare unchanged.roundsSoFarcalls onlylistModelRounds.listCheckRunsnow reuses the same local reader..changes/pr-pipeline/perf-feedback-rounds-graphql-3a9e5c21.md(patch).Verification
.work/gh-optimization/refire2/rounds-verify.sh), the shipped query against RESTcheck-runs?check_name&filter=allper commit, on feat(themes): let the bedroom's sound, daylight and weather follow nature, with a cheaper shader #17880 (59 commits; 60 REST calls), fix(source-control): state that ExitWorktree remove spares another running session's worktree #17939 and feat(toolchain)!: delete the bundled ecosystem defaults and per-language check pages #17926, 66 commits in all: 0 commits truncated, run ids identical per commit, 6 GraphQL points a query.checkNameto the suite filter fixes it (9477809).address-feedback.test.mjs: 209 pass, 0 fail. 3 new tests:Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01RAoAtVQsKbWdcHeEJeiY2U