Skip to content

fix(dashboard): retain warnings when partial telemetry is cached - #2142

Merged
vincentkoc merged 2 commits into
mainfrom
fix/status-collection-freshness-20261103
Nov 3, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/status-collection-freshness-20261103

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

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.md and the existing active proof recipe in docs/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

  • All 84 focused status/privacy tests passed on Node 24.19.0 after all three builds.
  • Static checks, documentation checks, formatting, builds, and lint passed.
  • Remote pnpm run check: 6,626 passed, 22 platform skips, four failures. All four fail on git rev-parse HEAD because 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.
  • Final committed whole-branch Codex review against 91fb0b1e719356ead3a763026e3519cdd18e7acc: scoped clean through P3 at 5aedf4f3f24d5807aafb28c9e5073c97c587784b.

Real Behavior Proof

Claim and surface: real /api/status collection 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.

node docs/proof/status-publication-outcomes/run-proof.mjs 91fb0b1e719356ead3a763026e3519cdd18e7acc --telemetry-failures --capsule /temporary/capsule.json

Prepare the capsule using the documented --prepare-capsule recipe. 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 5aedf4f3f24d5807aafb28c9e5073c97c587784b on November 3, 2026, 09:40 UTC.

Read Baseline errors Candidate errors
Cold collection telemetry_unavailable worker_health_unavailable
Warm snapshot telemetry_unavailable worker_health_unavailable
Cached health sample none worker_health_unavailable
SQLite restart/reuse none worker_health_unavailable
Fresh healthy sample none none

Both 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, schema status-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.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review November 3, 2026 09:42
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Retain 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.

  • Before: The first response reports telemetry_unavailable, but the cached sample reports no error.
  • After: worker_health_unavailable survives cache reuse and restart, then clears after a healthy replacement sample.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, useful cache repair with controlled runtime evidence, current-head CI and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The current-head body supplies paired AWS Crabbox Workerd /api/status results using real loopback HTTP and SQLite StatusStore: warnings survive snapshot reuse, aggregate reuse and restart, then clear after recovery; upstream text stays excluded, with no hosted-stall resolution claim.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A partial worker-health sample can appear warning-free when reused without a healthy replacement.
Reason: This maintainer-authored repair restores truthful diagnostics while preserving the established privacy boundary.

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
Reviewed head: 5aedf4f3f24d5807aafb28c9e5073c97c587784b

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Worker-health persistence and public error projection keeps the original intent (43799a1: Contain unbounded workflow metadata at public and reusable-cache boundaries while retaining closed operational categories.)
  • Polling failure attribution keeps the original intent (d803cac: Use one polling-only workflow-health source while preserving bounded collection, caches and errors.)
  • Optional-section failure handling keeps the original intent (dd9cb64: Expose worker reliability from workflow sources even when workers cannot publish status artifacts.)
  • Existing native proof runner keeps the original intent (892e2aa: Exercise bounded publication telemetry through the real Worker and SQLite owner; the added mode preserves existing proof modes.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Review metrics

Metric Value Why it matters
Production and regression coverage Production +38/-20 lines; tests +84 lines The small runtime change repairs existing cache ownership and privacy projection; tests exercise warning retention and repeated sanitation.

Labels

Label changes:

  • add P2: Cached partial telemetry can misleadingly lose its warning, with impact limited to dashboard observability.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Cached partial telemetry can misleadingly lose its warning, with impact limited to dashboard observability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 3, 2026, 4:59 AM ET / 09:59 UTC.

@vincentkoc
vincentkoc merged commit 40cc426 into main Nov 3, 2026
41 checks passed
@vincentkoc
vincentkoc deleted the fix/status-collection-freshness-20261103 branch November 3, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant