Repository navigation
fix(dashboard): retain warnings when partial telemetry is cached - #2142
Conversation
|
🦞👀 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 changesRetain bounded telemetry failure codes when partial worker-health samples and status snapshots are cached. Example: GitHub returns HTTP 503 for completed run 101's jobs, then the worker-health sample is reused.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes confirmed cache warning loss that remains on main, and review found no actionable defect. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe dashboard Worker collects GitHub telemetry, caches aggregates in StatusStore, and projects bounded public data through /api/status. flowchart LR
A[GitHub telemetry] --> B[Status collection]
B --> C[Worker health aggregate]
C --> D[StatusStore cache]
D --> E[Public status projection]
B --> E
E --> F[Dashboard observers]
Technical reviewBest possible solution: Retain fixed failure codes in the existing cache and projection owners until a healthy sample replaces them. Do we have a high-confidence way to reproduce the issue? Main's storage projection deterministically clears partial worker-health errors; the supplied paired runtime results demonstrate that warning loss during cache reuse. Is this the best way to solve the issue? The patch repairs the existing storage and public-projection owners without adding a competing cache, configuration option or collection path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 91fb0b1e7193. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Review metrics
LabelsLabel changes:
Label justifications:
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 3, 2026, 4:59 AM ET / 09:59 UTC. |
What Problem This Solves
Fixes dashboard telemetry warnings disappearing when a partial worker-health sample is reused from cache.
User Impact
The public status API retains incomplete-telemetry warnings and identifies the failed section with a bounded code. Unknown historical errors remain generic. No credentials, upstream error messages, request paths, or private identifiers are exposed.
The cause of the hosted collection stall remains unverified. This change fixes warning loss and attribution; it does not claim to resolve that stall. Cloudflare rollout remains pending owner confirmation.
Why This Change Was Made
The worker-health aggregate cache discarded every error, so a later collection could report no errors without obtaining a healthy sample. Its storage projection now retains closed failure codes. The canonical public projection preserves only nine producer-owned section codes through repeated sanitation; everything else stays
telemetry_unavailable.Production delta: +38/-20 lines, net +18, for this cache ownership invariant and public diagnostic contract. Tests: +84 lines. The remaining changes extend the existing native proof fixture and documentation. Collection ordering, deadlines, TTL defaults, schema, configuration, and dashboard/Bay controls are unchanged.
Documentation Impact
Updated the active status contract in
docs/live-dashboard.mdand the existing active proof recipe indocs/proof/status-publication-outcomes/README.md. The recipe names its frozen baseline, exercised source owners, verification scope, update triggers, and receipt. Added the required changelog fragment.Evidence
pnpm run check: 6,626 passed, 22 platform skips, four failures. All four fail ongit rev-parse HEADbecause the source-only Crabbox workspace has no.git; the full-history local seed exceeded its 512 MiB bound. This raw-workspace attempt is not reported as a green full gate. The repository CI run provides fast gates, all four test shards, and package qualification with normal Git metadata; its check results are the full validation authority.91fb0b1e719356ead3a763026e3519cdd18e7acc: scoped clean through P3 at5aedf4f3f24d5807aafb28c9e5073c97c587784b.Real Behavior Proof
Claim and surface: real
/api/statuscollection retains worker-health failure attribution through warm snapshot reuse, health-aggregate reuse, and native SQLite restart, then clears it after a healthy replacement sample.Scenario/environment: AWS Crabbox, Node 24.19.0, Wrangler 4.131.1/Workerd, real loopback HTTP and SQLite-backed
StatusStore. An isolated GitHub fixture returns a failed completed-run job request, serves all sibling requests, then recovers. Queue responses are synthetic. No production bindings or credentials are supplied.Prepare the capsule using the documented
--prepare-capsulerecipe. The runner verified all 368 baseline files and 380 candidate files before execution and reverified the candidate afterward.Observed result: paired baseline/candidate proof passed at clean candidate
5aedf4f3f24d5807aafb28c9e5073c97c587784bon November 3, 2026, 09:40 UTC.telemetry_unavailableworker_health_unavailabletelemetry_unavailableworker_health_unavailableworker_health_unavailableworker_health_unavailableBoth revisions made exactly two completed-run job reads across the five stages, with zero unexpected fixture routes. Every response was HTTP 200 with a complete public projection and excluded the synthetic upstream error body.
Receipt/trace:
telemetry-failures-summary.json, schemastatus-telemetry-failures-proof/v1, emitted in the existing proof-output directory. Source-tree SHA-256:b68bfeb15be594c5f54df4c972774c644bb99e72680f58d82909b571af8908a8. Dashboard patch SHA-256:5776d50e515c51590fb897f6d41a706600d5f76301c7c0e50f5dbb6fc9185e2f.Limits: controlled upstream responses, no browser or hosted-runtime proof, no production mutation, and no attribution or resolution claim for the hosted collection stall.