You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
claw-refresh: survive HTML error pages from the GraphQL listing and stop flooding the Actions queue #10545
Follow-up to #10397 (lane 4 of epic #10393; PR #10482 merged). The claw-refresh job has failed on every push to master since it landed, and it floods the Actions queue when it does work.
Boundary
Files this issue may touch, and nothing else:
.github/workflows/gate-topology.yml -- the claw-refresh job only
specs/claw/refresh.t27 -- the decision rule and its checks
gen/c/claw/refresh.c and .trinity/seals/claw_ClawRefresh.json -- regenerated, never hand-edited
tools/census/*.txt -- re-blessed if the job's step count moves
docs/reports/t27b_expectations.json -- only if the spec's row needs a new number
Not in scope: the merger (auto-merge-ready-prs.yml), the update-branch row of github_surface.t27, any other job.
User Scenarios
A push lands on master. GitHub answers the GraphQL listing with an HTML error page (too heavy: 100 PRs with 50 labels each). Today gh api --paginate prints invalid character '<' looking for beginning of value and the job exits 1 (Gate Topology runs 39146314331, 39145102967, 39144352772, 39143956433). Wanted: retry, then a warning and a step-summary line, exit 0.
Many PRs are behind after a merge. Today up to 30 get update-branch, each starting about 26 workflows; the queue held 396 queued runs against 13 running (2026-10-18 16:50Z). Wanted: refresh only PRs the merger lands next (auto-merge armed, or the bee-reviewed label), at most 5 per run.
The Actions queue is already long (more than 150 queued runs) or its size cannot be read. Wanted: the run refreshes nothing and says so in the step summary.
Requirements
FR-001: list() pages with first:30 PRs and labels(first:10), validates every page as JSON, retries up to 3 times, and on a persistent failure writes ::warning:: plus a step-summary line and exits 0.
FR-002: specs/claw/refresh.t27 caps a run at 5 refreshes (was 30).
FR-003: a behind, conflict-free PR is refreshed only when auto-merge is armed on it or it carries bee-reviewed; others are counted as "not next to land".
FR-004: when more than 150 runs are queued, or the count is unread, the module answers one M line and no R line.
FR-005: all of the rules above live in the .t27 module with test blocks (including negative controls at the boundaries 150/151 and 5/6); the job only copies facts.
FR-006: English only, no new hand-written non-t27 logic; the compiler run and the mutation run happen on the Railway lab only.
Success Criteria
SC-001: the claw-refresh job is green on the next push to master after merge, even when the listing returns HTML once.
SC-002: the test blocks of specs/claw/refresh.t27 pass; mutation survivors are recorded as equivalent or killed.
SC-003: one run never calls update-branch on more than 5 PRs, and never when more than 150 runs are queued.
SC-004: gen/c/claw/refresh.c and the seal match the spec (spec-guards green).
Activity
claw-refresh: survive HTML error pages, refresh only what the merger …
claw-refresh: survive HTML error pages, refresh only what the merger …