Repository navigation
fix(dashboard): stop status refresh timing out on unfiltered run listing - #2154
Conversation
The status refresh listed /actions/runs with no filter alongside the completed listing and the active-status census. On this repository's run history GitHub takes 10s+ (and sometimes 502s) for that unfiltered read, so it blew the 18s refresh deadline and left /api/status stale with workflow_runs_unavailable:timeout. The completed listing and the five status-filtered censuses already cover every run state, so drop the redundant read. Co-authored-by: obviyus <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR removes the unfiltered workflow-run listing from dashboard status collection and retires its diagnostic code. Example: A status refresh has fewer than 100 runs in each active status.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it removes an unnecessary polling request still present on main, and inspection found no definite introduced correctness defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe dashboard Worker collects GitHub Actions runs and jobs, combines queue telemetry, and publishes a sanitized, cached response through /api/status. flowchart LR
A[Dashboard client] --> B[Status endpoint]
B --> C[Status collector]
C --> D[Completed run listing]
C --> E[Active status censuses]
D --> F[Jobs and health]
E --> F
F --> G[Public projection and cache]
Technical reviewBest possible solution: Use the existing completed and active-status collectors as the sole workflow-run inputs. Do we have a high-confidence way to reproduce the issue? Source confirms the broad request delays the initial collection barrier; the reported production stall was not independently reproduced, and individual GitHub requests already have a 4.5-second timeout. Is this the best way to solve the issue? Removing the broad request is a small, coherent simplification using existing collectors, although the supplied measurements do not establish that it resolves the entire production freshness incident. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 404a96671ce8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 12:02 AM ET / 05:02 UTC. |
Proof: the real
|
| Code | Attempt | Elapsed | Diagnostics | Active runs | Health sample | Unfiltered actions/runs reads |
|---|---|---|---|---|---|---|
| main | 1 | 8.6s | workflow_runs_unavailable:timeout |
20 | 10 | 1 |
| main | 2 | 9.0s | workflow_runs_unavailable:timeout |
18 | 10 | 1 |
| main | 3 | 8.5s | active_runs_unavailable:census_incomplete |
18 | 11 | 1 |
| fix | 1 | 6.8s | none | 18 | 11 | 0 |
| fix | 2 | 7.5s | active_runs_unavailable:census_incomplete |
17 | 11 | 0 |
| fix | 3 | 7.6s | active_runs_unavailable:census_incomplete |
20 | 10 | 0 |
- Reproduced:
mainhit the production error in 2 of 3 refreshes. The unfiltered read hits the 4.5s per-requestGITHUB_TIMEOUT_MS. - Fixed: this head never produced it. Active-run and health telemetry stayed the same, and each refresh is 1–2s faster.
- Not this change:
census_incompleteshows up on both, at the same rate. It's the active-status census noticing that live runs changed mid-read, which is expected while the fleet is busy.
I didn't use wrangler dev because it fails to start on main as well. workerd rejects the named export STATUS_REFRESH_TIMEOUT_MS.
Problem
/api/statusgoes stale on production. The status refresh reportsworkflow_runs_unavailable:timeout, andfreshness.statestaysstalewell past its 60s maximum age.The refresh reads
/repos/openclaw/clawsweeper/actions/runs?per_page=100with no filter, in parallel with the completed listing and the active-status census. All of them share the 18sSTATUS_REFRESH_TIMEOUT_MSdeadline. With this repository's run history, GitHub is slow on the unfiltered listing. I measured from a maintainer token on 2026-11-05:actions/runs?per_page=100(unfiltered)actions/runs?status=completed&per_page=100actions/runs?status=queued&per_page=100Fix
Remove the unfiltered read. It added nothing the other two reads don't already return:
status=completed;activeWorkflowRunCandidates, which already covers each status inACTIVE_RUN_STATUS_FILTERS(in_progress,queued,waiting,requested,pending), the same set asACTIVE_RUN_STATUSES.The
workflow_runs_unavailablediagnostic code no longer has a producer, so it leaves the public allowlist. A cached value with that code now projects astelemetry_unavailable.Proof
node --teston every test file that exercises/api/statusorstatusSnapshot(dashboard status, status privacy, etag broker and related files): 239/239 pass.actions/runsrequests.lint:dashboard,lint:scripts,check:dashboard-strictandoxfmt --checkare clean.run-node-tests allsuite was still running locally when I opened this PR; CI is the full gate.