Repository navigation
feat(dashboard): add bounded durable publication trends - #995
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 4:20 AM ET / 08:20 UTC. ClawSweeper reviewWhat this changesThis PR adds a public, aggregate-only recent durable-publication telemetry endpoint with fixed time buckets, a short in-memory cache, and a matching OpenClaw Bay dashboard card. Merge readinessKeep this PR open for normal maintainer landing review. The proposed aggregate-only telemetry feature is new rather than already present on current Priority: P2 Review scores
Verification
How this fits togetherLifecycle telemetry records direct and batch durable-publication outcomes in Durable Object SQL tables. The dashboard worker reads a bounded aggregate from those tables and attaches it to the public status data consumed by the dashboard surfaces. flowchart LR
A[Direct durable outcomes] --> C[Bounded telemetry aggregation]
B[Batch durable outcomes] --> C
C --> D[Public status endpoint]
D --> E[Dashboard overview data]
D --> F[OpenClaw Bay card]
C --> G[Unknown on invalid or capped source]
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the sponsored aggregate-only telemetry contract with its fail-closed source caps and 60-second cache, while keeping any future materialized rollup or throughput work separate and driven by observed operating data. Do we have a high-confidence way to reproduce the issue? Not applicable as a new feature PR. The changed visible behavior is nevertheless demonstrated by a downloaded current-head screenshot and a controlled runtime transcript for the Worker route and Bay rendering. Is this the best way to solve the issue? Yes. The implementation reuses the existing retained lifecycle telemetry tables, keeps output aggregate-only, and isolates an unavailable aggregate from core queue status; the sponsored roadmap explicitly scopes out a persistent rollup for this slice. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 822424ecf899. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
25bd8ce to
ef3b016
Compare
* feat(dashboard): add bounded publication event trends * test(dashboard): cover durable event card in Bay proof * docs(proof): add CSW-092 runtime evidence * perf(dashboard): bound durable event aggregate reads * docs(proof): record populated CSW-092 runtime evidence * test(proof): isolate durable event aggregate failures
Summary
Implements #898 Workstream 4 as the explicitly sponsored, public,
aggregate-only durable-publication trend contract shared by Overview and
OpenClaw Bay.
Approved contract
GET /api/recent-durable-publication-events?window=6h|24h|7dreturns onetrailing window at a time with exactly 24 fixed buckets.
accepted,deduped,superseded,fallback.Batch durable outcomes:
superseded,retryable,permanent.(observed_at, event_id)rangequery with a
10,000 + 1row cap. Over-cap, malformed, unavailable, ormixed sources fail closed: affected values/buckets are Unknown (
null) andcomplete=false; no partial counts are exposed.durable/server-observed and public aggregate-only; identities, receipts,
fences, revisions, and run IDs are omitted.
window. This limits repeat scans; it is not a persistent rollup and has no
write-path callback or invalidation requirement.
Exclusions and known operational boundary
This reports durable publication attempts/outcomes only. It does not claim
lifecycle completion,
Completed, acknowledgement state, targets/revisions,waiting/current/backlog state, queue depth, inventory, causal attribution, or
workflow-derived lifecycle fact. Workflow activity is never converted to item
completion.
No lifecycle writes, callback, per-item reader/admin inventory, Bay lane/card
semantics (WS5/WS5a), workflow/gate, R2/history/backfill/replay, deployment,
merge, or automerge behavior changed.
A cold request can perform two bounded retained-table scans of up to
10,001rows. Existing source rate is not capped, so a 7-day (or shorter) source can
exceed the cap and correctly remain visibly Unknown. This WS4 slice does not
claim a production-performance guarantee or add a materialized rollup.
Current-head proof and inspectable artifacts
Current PR head:
bab218bcf8188683d31a6062525a5a1874b00ea0(draft; base822424ecf89949204e1fbc3d8cc6ed77f4d18ad8). The product code exercised by thecontrolled browser run is
ef3b016046258f4d4b98dc473cd269e1863c2028; subsequent commits only add thequeue-status isolation assertion and public proof record, not product behavior.
Claim: the built Worker/Bay surfaces expose a redacted, populated aggregate
card while unavailable/capped aggregates fail closed without making core queue
status fail.
The controlled Linux proof used Crabbox local-container lease
cbx_34f66acb8a77, imagemcr.microsoft.com/playwright:v1.60.0-noble, andthe supported
docs/proof/openclaw-bay/run-proof.sh: 48 assertions, 23 frames,zero external GitHub API calls, and zero queue/GitHub/production mutations. It
visibly renders a populated 24-hour aggregate (
accepted 3,deduped 1,retryable 2). Focused Worker/helper tests prove all 6h/24h/7d 24-bucketshapes, idle behavior, cap/malformed/mixed/unavailable to Unknown/no partial
output, redaction, workflow non-inference, 60-second repeat-cache behavior,
and that an unavailable aggregate leaves
/api/statussuccessful with itsreal queue
/statsresult intact. This is synthetic controlled evidence, notproduction traffic or performance evidence.
Validation
node --test test/dashboard-worker.test.ts— 291 passingnode --test test/recent-durable-publication-events.test.ts— 3 passingpnpm run build:repair,pnpm run build:dashboard, andpnpm run lint:dashboardpnpm exec oxfmt --check test/dashboard-worker.test.ts dashboard/exact-review-queue.ts dashboard/recent-durable-publication-events.tsgit diff --checkcodex review --uncommitted— cleangit fetch origin main --prune && codex review --base origin/main— no actionable defectsRepository-wide
pnpm run format:checkremains baseline-noisy (535 existingformat findings outside this scoped diff); the touched source/test files pass
the scoped formatter check above.
Sponsorship
The #898 owner/maintainer explicitly sponsors this narrow WS4 slice in the
recorded roadmap decision, which records merged WS1/#947, WS2/#952, and
WS3/#991 prerequisites, this exact fail-closed contract, and its bounded
source-rate risk.