fix(dashboard): make telemetry coverage explicit - #1301
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 8:08 AM ET / 12:08 UTC. ClawSweeper reviewWhat this changesThe PR adds explicit coverage and freshness contracts to dashboard telemetry, an authenticated aggregate-only reconciliation endpoint, and clearer Bay/Overview degraded-state presentation. Merge readinessThe telemetry safeguards are unique to this open branch, with a current-head behavior trace and focused coverage; no blocking correctness or security defect was identified. It should remain open for ordinary maintainer review. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw Bay and Overview display public projections emitted by the dashboard Worker and its Exact Review Durable Object. This PR changes how lifecycle and health-history data is validated, reconciled, and rendered for operators. flowchart LR
A[Lifecycle events] --> B[Exact Review Durable Object]
B --> C[Dashboard Worker]
C --> D[Public status and history APIs]
C --> E[Signed reconciliation API]
D --> F[Bay and Overview]
E --> G[Operator verification]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Land the current branch only after a maintainer confirms that the authenticated reconciliation surface and public telemetry-contract expansion match the intended operational scope. Do we have a high-confidence way to reproduce the issue? Not applicable: the PR addresses telemetry correctness through a supplied current-head local-container behavior trace rather than a separately reported runtime bug. Is this the best way to solve the issue? Yes. The branch keeps public surfaces observer-only while adding bounded authenticated reconciliation and explicit unavailable-state semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 206fe726bbad. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
faa8af5 to
ca58ac2
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ca58ac2 to
ea33fe7
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
n/a, not a misleading0%Problem
The public Bay and Overview surfaces could make incomplete or unavailable telemetry look authoritative. An empty denominator could render as a successful zero-percent rate, health-history gaps were implicit, and Bay could visually conflate an unavailable durable lifecycle projection with independent queue/live activity.
Operators also lacked a narrow way to validate the published aggregate against canonical lifecycle projections without exporting identity-bearing lifecycle rows.
Implementation
over_capresult.Deliberate scope exclusions
This does not move or rebuild the primary duration UI, introduce the proposed 6h/24h/7d hierarchy, collapse diagnostics, claim causality from #1280, publish per-lane timing, add lifecycle-transition persistence, deploy anything, or broaden into a dashboard redesign.
Validation
311e64abb39af2c101835912070abb7824d981b9206fe726bbadaae32dcb9822a2511a351a5c9317ca58ac2507aa065d447188d9e55cc672ad35f7aa;git range-diff fa535d54a032862b022147a7cba4eaa3bdeb4a7b..ca58ac2507aa065d447188d9e55cc672ad35f7aa origin/main..HEADreports the patch as equivalent (=)node --test test/dashboard-worker-bay-records-routes.test.ts test/dashboard-worker-observability.test.ts test/dashboard-worker-dashboard-status.test.ts test/dashboard-worker-status-privacy.test.ts— 218 passed, 0 failed on the exact head both natively and inside Docker-backed proofpnpm run build:all— passed on the exact head, including inside Docker-backed proofpnpm run lint:dashboard— passedpnpm run check:dashboard-strict— passedpnpm run check:dashboard-queue-boundary— passedgit diff --check origin/main...HEAD— passedThe broader native-Windows unit sweep reaches unrelated platform/fixture failures (WSL/bash unavailable, symlink
EPERM, CRLF/path assumptions, action-ledger partitions, scanner fixtures, and local-review/live-proof fixtures). A bounded current-main baseline check reproduced the representative action-ledger failures at the exact base; the scoped 218-test CSW-143 suite passed on both the branch and the exact-head Docker proof. No broad-suite pass is claimed.Review closeout
Codex review
The mandatory review loop completed after every accepted finding and proof-affecting change.
Accepted findings and fixes:
Final results:
codex review --commit HEAD): no findings; affected tests, dashboard build, strict check, and lint passedcodex review --base origin/main): no findings; no actionable correctness issues in the full range, with dashboard build and unit suite passingLocal ClawSweeper committed-range review
Command:
The native-Windows gate completed after #1303 repaired the hardened-Git null-device prerequisite. The first subprocess did not inherit the existing host-owned scanner cache on
PATHand failed closed withscanner_unavailable; the completed run prepended only the verified external TruffleHog 3.97.1 directory after checking SHA-2560C0E99305FF86574F18E0CA27736758F5EC307C005FFC1FD14B6702297EB9088and the exact version. Scanning was not disabled or bypassed.311e64abb39af2c101835912070abb7824d981b9206fe726bbadaae32dcb9822a2511a351a5c9317.git/clawsweeper/reviews/local-range-1788177479556-28612/0.mdReal Behavior Proof
Claim
An authenticated read-only path can reconcile the public exact-review aggregate with canonical lifecycle projections without exposing lifecycle identities. Public Bay and Overview responses explicitly report freshness, coverage, gaps, and unavailable states; zero denominators do not become false zero-percent success; durable lifecycle availability remains separate from independent queue/live activity.
Exercised surface
GET /api/statusandGET /api/health-history?range=6hScenario / fixture
The proof used loopback endpoints, synthetic credentials, an empty synthetic Durable Object, and synthetic lifecycle/history inputs. It exercised unsigned and signed reconciliation, a fresh public status snapshot, explicit unavailable history coverage, zero-attempt Overview rendering, and a Bay rendering where an empty durable lifecycle projection remains visibly separate from independent queue/live activity. Focused tests additionally perturb canonical-versus-aggregate inputs and require mismatches to be reported.
Command / environment
311e64abb39af2c101835912070abb7824d981b9206fe726bbadaae32dcb9822a2511a351a5c9317local-containerd39f7a13642fmcr.microsoft.com/playwright:v1.60.0-noblesha256:9bd26ad900bb5e0f4dee75839e957a89ae89c2b7ab1e76050e559790e946b948run_45def6a55959cbx_2ab29a36a0a1tidal-prawn-50a5leaseStopped=true--provider local-container --local-container-image mcr.microsoft.com/playwright:v1.60.0-noble --no-hydrate --artifact-glob ... --require-artifact ...; Crabbox verified all required proof files before stopping the leaseReadable redacted transcript
Artifact inventory
The retained 2,054,583-byte artifact is
.crabbox/runs/run_45def6a55959/run_45def6a55959-artifacts.tgz. It contains the readable transcript/summary, sanitized signed and unsigned reconciliation JSON, public status/history JSON, Overview/Bay HTML, focused-test TAP, Wrangler log, andoverview.png/bay.png. Crabbox required the summary and both screenshots before declaring success. The archive was checked before extraction for safe paths, and the screenshots were visually inspected against the transcript. The tracked proof contract isdocs/proof/csw-143-telemetry-accuracy-foundation/behavior-contract.md.Limits
This synthetic controlled proof establishes route authentication, response privacy shape, calculation/coverage contracts, and rendering behavior. It does not deploy, inspect or mutate production Durable Objects, validate every historical lifecycle row, establish #1280 causality, persist lane-transition timestamps, or prove per-lane timing.
Risks / rollout
Related work