Repository navigation
fix(dashboard): report fresh publication failures with retained Bay data - #1411
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 4:38 AM ET / 08:38 UTC. ClawSweeper reviewWhat this changesThe dashboard grades publication health from fresh queue telemetry while preserving retained public Bay activity, with a regression test for that combination. Merge readiness✅ Ready for maintainer review This remains a useful fix: current main still permits retained Bay data to mask fresh publication failures. No actionable patch defect was found, and the supplied production-path proof supports the change. Priority: P2 Review scores
Verification
How this fits togetherThe dashboard Worker combines queue telemetry and cached worker activity into operator status. It summarizes health internally and filters the result before returning public dashboard and Bay data. flowchart TD
A[Fresh queue telemetry] --> B[Dashboard attachment]
C[Prior Bay snapshot] --> B
D[Worker census completeness] --> B
B --> E[Health from fresh telemetry]
B --> F[Retained or current Bay activity]
E --> G[Public status projection]
F --> G
G --> H[Dashboard and Bay]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep health grading tied to the current queue observation while retaining generation-consistent Bay activity behind the existing public filter. Do we have a high-confidence way to reproduce the issue? Yes, from source: an incomplete worker census plus retained complete Bay activity replaces fresh queue telemetry with a public document lacking publication health. This review did not execute a failing current-main run. Is this the best way to solve the issue? Yes. Separating the summarizer's input repairs the existing attachment boundary without duplicating health policy or changing the Bay response contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e0f3def169eb. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Related: #1372
What Problem This Solves
Fixes an issue where operators viewing
/api/statuscould seepublication_health_unavailableeven though the current queue probe reported critical publication health and open dead letters. This happened when the Bay correctly retained a prior complete public activity projection during an incomplete worker census.Why This Change Was Made
Dashboard health now grades the fresh fulfilled queue sample from the current request. The existing Bay fallback and replacement logic remains unchanged, and rejected or unbound queue probes still summarize as unavailable.
The dashboard attachment path remains the architectural owner. No queue schema, public projection, dashboard health policy, docs, or Bay output changed.
User Impact
Operators now see current publication-critical and DLQ signals in dashboard health even when the public Bay activity projection must remain on its prior complete sample.
OpenClaw Bay Impact
OpenClaw Bay is unaffected. The controlled
/api/statusproof retains the prior Bay item set and activity counts exactly, while the public response continues to omit raw publication health and dead-letter internals.Documentation Impact
No documentation update is needed. The existing observer-only Bay and status contracts are unchanged; this repair only corrects which already-collected queue sample feeds the existing health summary.
Evidence
0bf6bf603a1237017e269387109ee0156201b89f83d7053f0c8978ecb61a0cc2a85c52a8a48d8f03node --test test/dashboard-health.test.ts test/dashboard-worker-observability.test.ts test/dashboard-worker-status-privacy.test.ts: 65 passednode scripts/check-dashboard-queue-boundary.ts: passednode scripts/check-dashboard-strict.mjs: passed./node_modules/.bin/tsc -p tsconfig.dashboard.json: passedgit diff --check: passeddashboard/worker.ts+4/-3test/dashboard-worker-observability.test.ts+134/-0pnpm run checkwas not run locally because this Codex worktree uses the required sharednode_modulessymlink and pnpm attempted to reconcile the shared install against the frozen head. The focused commands above used the existing binaries directly without mutating that shared dependency tree; hosted CI remains the full gate.Real Behavior Proof
Claim:
/api/statusreports current publication-critical and open-DLQ health while preserving a prior complete public Bay projection during an incomplete active-worker census.Exercised surface: a disposable archive of exact head
83d7053f0c8978ecb61a0cc2a85c52a8a48d8f03ran under realwrangler 4.107.0 dev --local, Miniflare4.20260701.0, andworkerd 2026-07-01. The run used the production signed/internal/exact-review/enqueue, public/api/exact-review-queue, and production/api/statusroutes with realStatusStoreandExactReviewQueueSQLite Durable Objects.Scenario: a signed synthetic protocol-v2 publication was accepted with HTTP 202. With the Worker stopped, the unambiguous queue SQLite database was edited transactionally to contain one pending publication aged 25,201 seconds, with its retry still scheduled in the future, and one open dead letter. The prior stored public snapshot had
bay.active_census_complete = falseand a complete prior Bay activity projection.Observed result:
health = critical,reason = oldest_pending_over_6h, anddead_letters.open = 1./api/statusretained the prior Bay activity and prior Bay item set exactly.dashboard_health.reasonsincludedpublication_criticalandpublication_dlq_open, and excludedpublication_health_unavailable.0.Scrubbed artifacts:
Source archive SHA-256:
c2cd79aecb617985b4276cc999759779ad3898e7c17a5c8d093cd758d8be9f31. Temporary harness entry SHA-256:241bb37817d623549728262eeb0266fcb6dc6082762c2743a590b8a5f746d5fd.Limits: controlled local workerd and SQLite Durable Objects with synthetic signed input and loopback-only token-gated proof hooks for status seeding and raw aggregate inspection. This does not claim deployed Cloudflare edge behavior.