Skip to content

fix(dashboard): explain GitHub status warnings - #2148

Merged
vincentkoc merged 2 commits into
mainfrom
fix/status-github-failure-causes-20261104
Nov 4, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/status-github-failure-causes-20261104

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Dashboard warnings identify a failed section but discard the request failure that would explain it.

User Impact

Operators can distinguish HTTP rejection, rate limiting, request timeout, transport failure, invalid JSON and incomplete census. Existing section strings may gain a bounded :cause suffix; warning counts and the 20-entry cap remain unchanged.

The production collection stall is still unconfirmed. This change does not resolve it or publish partial causes when the global collection deadline returns a fallback.

Why This Change Was Made

The request and status producers own the failure metadata. Preserve their typed facts as closed codes through projection and caching, using the existing GitHub error and rate-limit contracts. Remove raw-message construction from the affected producer paths. HTTP 403 alone remains ambiguous.

Production delta: +76 lines; tests: +28 lines. The added production code implements the bounded public diagnostic contract, including response-body failures after headers. No permissions, queue policy, schema, retries, concurrency or production timing changes.

Documentation Impact

Updated the active status contract in docs/live-dashboard.md, the existing proof recipe and one changelog fragment. Dashboard maintainers own these references; the source is dashboard/worker.ts. Verified changed scope at 0d0b7c2c21ec92bbb82faa2e68ba54d04a37aec2; update when cause codes, projection, caching or the proof runtime change.

Evidence

  • Final committed branch reviewed against 1265122ec07d137740c688d90d5bf9538aa03a78 with the complete worker and dependency context: clean Codex P0–P3 review.
  • 89 focused status, privacy and GitHub API tests pass on the final source.
  • Full pnpm run check completed static checks, build and lint, then failed four existing proof fixtures that call git rev-parse HEAD in the source-only remote workspace. Normal Git-checkout CI is required to close that environment gap.
  • git diff --check and public-data scan pass.

Real Behavior Proof

Claim/surface: real /api/status collection and SQLite-backed StatusStore preserve safe cause codes across cache reuse and restart, then clear them after healthy replacement.

Environment: secretless AWS Crabbox; Node 24.19.0, Wrangler 4.131.1 / Workerd, real loopback HTTP. The runner verified 368 baseline files and 380 candidate files from source capsules bound to the clean final head.

Observed: all 24 runs pass: 11 paired GitHub scenarios plus one paired worker-health regression. Cases cover HTTP 403/429/503, explicit rate-limit headers, stalled headers and bodies, connections dropped before and after headers, invalid JSON, incomplete successful census and App-token rejection with an ephemeral synthetic key. Baseline emits bare section codes; candidate emits their bounded cause. Warning counts match in all pairs (one normally; seven for the App-auth case). Non-App warm reads do not requery; SQLite restart preserves the diagnostic; healthy replacement clears it. Worker-health cache reuse and restart retain worker_health_unavailable:http_503. Synthetic upstream text and tokens remain absent.

Commands and receipt identity
node docs/proof/status-publication-outcomes/run-proof.mjs 1265122ec07d137740c688d90d5bf9538aa03a78 --github-failures
node docs/proof/status-publication-outcomes/run-proof.mjs 91fb0b1e719356ead3a763026e3519cdd18e7acc --telemetry-failures

Remote execution used the documented --capsule mode rather than fabricating Git metadata.

{
  "candidate_head": "0d0b7c2c21ec92bbb82faa2e68ba54d04a37aec2",
  "candidate_dirty": false,
  "source_tree_sha256": "8cc02b298aa7ab9fd4141df8f5db8c291ff983f27bc16d9563918795b38d474e",
  "github_runs": 22,
  "worker_health_runs": 2,
  "production_mutations": 0
}

Generated receipts under .artifacts/status-publication-outcomes/:

  • github-failures-summary.json SHA-256: 07de5d123c07fdc0ff18e675f617ef96071868ee04bd79fcbb07cb146aced236
  • telemetry-failures-summary.json SHA-256: 48a2f8f5fa182be340c5710359ea1f98b30c795b7f99857816e9b3fcd820c3af

Limits: synthetic GitHub responses and queue binding; real Worker route, HTTP and SQLite. No production credential, state, deployment or timing changes were exercised. This proves attribution and retention, not the production incident cause.

@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 23:55
@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 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR preserves bounded GitHub failure causes in dashboard status warnings through projection and caching.

Example: GitHub returns HTTP 503 while collecting completed workflow runs.

  • Before: The warning is completed_workflow_runs_unavailable.
  • After: The warning is completed_workflow_runs_unavailable:http_503, without exposing the upstream response text.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused diagnostic expansion with supplied runtime evidence, successful exact-head CI, and no actionable findings; existing bare cached codes remain accepted without a storage migration.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The current-head body records successful real /api/status runs in AWS Crabbox with Workerd, loopback HTTP, and SQLite: injected HTTP, timeout, transport, JSON, census, and App-auth failures produce bounded causes, survive cache reuse and restart, and clear after recovery; production incident attribution remains outside the claim.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Operators cannot distinguish HTTP rejection, throttling, timeout, transport failure, or malformed responses from a section-only warning.
Reason: This is a narrow observability improvement with maintainer-authored direction, bounded public output, and no additional configuration or operational controls.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR adds useful diagnostics beyond current main, with no actionable correctness or security findings.

Priority: P2
Reviewed head: 0d0b7c2c21ec92bbb82faa2e68ba54d04a37aec2

Before merge

None.

Findings

None.

Agent review details

How this fits together

The dashboard Worker collects GitHub and worker-health telemetry, projects it into bounded public status, and serves or caches that status through /api/status.

flowchart LR
  GitHub[GitHub HTTP responses] --> Requests[Existing request clients]
  Requests --> Collection[Status collection]
  Collection --> Projection[Bounded public projection]
  Collection --> HealthCache[Worker health cache]
  HealthCache --> Collection
  Projection --> StatusStore[Status snapshot cache]
  StatusStore --> API[Public status API]
Loading

Technical review

Best possible solution:

Preserve typed failure causes through the existing diagnostic and cache owners while retaining bounded public output.

Do we have a high-confidence way to reproduce the issue?

Current-main source demonstrably reduces failures to section codes; the supplied paired runtime observations show the candidate retaining bounded causes, but no target code was executed during this review.

Is this the best way to solve the issue?

The approach uses the existing typed GitHub client and projection owners, preserves ambiguous HTTP 403 classification, and avoids parsing upstream messages or introducing another diagnostic path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1265122ec07d.

Provenance checked

  • Section-code retention and worker-health caching keeps the original intent (40cc426: Retain incomplete telemetry warnings through repeated projection and cached worker-health reuse without exposing upstream text.)
  • Worker GitHub App error adapter changes intended behavior with a stated reason (5a964da: Consolidate authentication while preserving the Worker's former plain-error surface; this PR explicitly selects typed errors for status token acquisition so diagnostics can retain their facts.)
  • GitHub response handling and collection lifetime keeps the original intent (f8ec10f: Bound status collection and response consumption while preserving cancellation and recovery; this PR records the existing request signal without changing deadlines.)
  • Public status privacy keeps the original intent (43799a1: Prevent unbounded workflow and upstream metadata from entering public status and reusable caches.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit dc67620 adds dashboard/worker.ts:7286 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: dc6762092a50; files: dashboard/worker.ts)
  • Martin Cleary: Raw commit 43799a1 adds dashboard/worker.ts:2103 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 43799a11fc26; files: dashboard/worker.ts)

Review metrics

Metric Value Why it matters
Production and test delta Production +125/-49 lines; tests +29/-1 lines The production growth propagates bounded causes through existing request, collection, projection, and cache owners; the tests protect retention and privacy.

Labels

Label changes:

  • add P2: This improves operator diagnosis of partial telemetry without changing collection availability or queue behavior.
  • 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: This improves operator diagnosis of partial telemetry without changing collection availability or queue behavior.
  • 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, 7:10 PM ET / November 4, 2026, 00:10 UTC.

@vincentkoc
vincentkoc merged commit 0d73170 into main Nov 4, 2026
41 of 42 checks passed
@vincentkoc
vincentkoc deleted the fix/status-github-failure-causes-20261104 branch November 4, 2026 03:55
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