Skip to content

fix(dashboard): remove dead per-item review telemetry - #1090

Merged
steipete merged 6 commits into
mainfrom
steipete/remove-dead-review-telemetry
Aug 10, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/remove-dead-review-telemetry

Conversation

@steipete

@steipete steipete commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Remove the producer-free per-item review telemetry pipeline while preserving its documented public read contract. GET /api/exact-review-queue/reviews remains available with the original query validation and returns the stable empty envelope { ok: true, repo, item_number, reviews: [] }, matching production's observable behavior today.

Retired:

  • the exact_review_review_telemetry table, its three indexes, retention and reconciliation machinery, and the schema-upgrade drop remains in place;
  • the unproduced signed ingest route POST /internal/exact-review/review-telemetry and the private Durable Object telemetry routes;
  • the inert review_telemetry_health status field and dashboard-health input;
  • the stale PR 674 runbook and record-derived fields and health rules from /api/review-observability.

Retained:

  • the documented public read endpoint GET /api/exact-review-queue/reviews as a stable empty-envelope compatibility contract;
  • dashboard/review-run-telemetry.ts, exact_review_run_telemetry, the signed review-run-telemetry route, scripts/review-run-observer.mjs, and .github/workflows/exact-review-reconcile.yml;
  • run-level retention and REVIEW_OBSERVABILITY_REQUIRED gating semantics.

/api/review-observability now returns metadata plus exactly four run-derived lane freshness rows. Each row retains lane, label, status, last_run_at, last_success_at, item_count, run_count, and attribution.

Verification before deletion

  • Fresh origin/main search found internal/exact-review/review-telemetry only in its Worker route registration and docs/pr-674-observation-runbook.md; no producer posts to it.
  • The live observer posts to the distinct internal/exact-review/review-run-telemetry endpoint and remains wired into exact-review-reconcile.yml.
  • GitHub reports Review each selected PR in its own item shard #674 closed, with no merge commit, at 2026-07-21T01:26:09Z.

pr-behavior-proof

Claim: an existing Durable Object upgrades cleanly after removal of the per-item table; the documented public per-item read endpoint preserves its validation and stable empty envelope; status and health expose the intended contract; signed run telemetry still feeds lane freshness; and the producer-free internal write route remains retired.

Exercised surface: the built dashboard Worker and real ExactReviewQueue Durable Object under Wrangler 4.107.0 local persistence, driven over real HTTP.

Scenario/fixture: initialize the real local DO, stop Wrangler, seed the persisted SQLite database with exact_review_review_telemetry, its three indexes, and a row, then restart the current Worker against that persisted state. Post one signed normal_backfill run record and query the public APIs.

Command/environment: Node 24.19.0 on macOS; DEAD_REVIEW_TELEMETRY_PROOF_OUTPUT=<temporary-directory> bash docs/proof/dead-review-telemetry/run-proof.sh.

Crabbox container replay: the proof ran unchanged on pushed head bc8086157ad850dfa6b3a40cd2ab44a8736f54ee inside a Docker-backed Crabbox local-container using Crabbox CLI 0.39.0, image node:24-bookworm, Docker 29.4.0 via OrbStack, lease cbx_3681075c5156, and a clean --fresh-pr checkout. Corepack was enabled into the unprivileged lease user's ~/.local/bin. The run exited 0 with PROOF_RC=0; Crabbox reported leaseStopped=true.

Durable Object instantiation assertion: after the full Wrangler process tree stops and /api/health stops answering, the proof restarts the Worker and requires the unique posted run_id to exist in the inspected queue database before it accepts the retired-schema assertion.

Observable result, verbatim:

legacy schema before upgrade: table plus three indexes present
upgrade queue request: HTTP 200; schema errors: none
legacy schema after upgrade: exact_review_review_telemetry table and indexes absent
/api/status: HTTP 200; exact_review_queue.review_telemetry_health absent
/api/health: HTTP 200; ok true
POST /internal/exact-review/review-run-telemetry: HTTP 200
/api/review-observability: HTTP 200; lanes exact_event,hot_intake,normal_backfill,recovery; normal_backfill run_count 1; item_count 3; last_run_at 2026-08-10T06:09:40.397Z
POST /internal/exact-review/review-telemetry: HTTP 404
GET /api/exact-review-queue/reviews: HTTP 200; envelope { ok: true, repo: openclaw/openclaw, item_number: 674, reviews: [] }
run-level storage after upgrade: exact_review_run_telemetry present; posted run_id 1786342170399599135 present in inspected queue database
PROOF_RC=0

Artifact/trace: docs/proof/dead-review-telemetry/run-proof.sh is the reproducible proof harness. The local and clean-container runs above exercised the same script. The focused Worker tests cover the valid empty envelope and the exact 400 validation error while retaining 404 coverage for the removed internal and Durable Object routes. The pre-commit Codex autoreview was clean with no accepted/actionable findings.

Limits: this proves the local Wrangler Worker/DO upgrade and HTTP contract. It does not deploy to production or establish production traffic volume.

Gates

  • pnpm run build:all — pass
  • pnpm run test:no-build — pass (3,224 tests; 3,215 passed, 9 skipped, 0 failed)
  • pnpm run lint — pass
  • pnpm run format:check — pass
  • pnpm run check:dashboard-queue-boundary — pass

OpenClaw Bay impact

No Bay change is needed. Bay does not consume the retired per-item telemetry storage, ingest route, health field, or preserved empty-envelope endpoint, and this change neither adds nor alters any Bay observer or control surface.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 2:14 AM ET / 06:14 UTC.

ClawSweeper review

What this changes

This PR removes unused per-item review telemetry storage, write routes, health signals, and observability fields while preserving the public per-item read API as a validated empty response and retaining run-level freshness telemetry.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The prior public-contract blocker is resolved on the current head: the documented read endpoint now returns its validated empty envelope while the unproduced telemetry write/storage path is removed. No actionable correctness defect was found; this remains an ordinary maintainer merge decision rather than a cleanup close.

Priority: P2
Reviewed head: bc8086157ad850dfa6b3a40cd2ab44a8736f54ee

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The current head has strong real-behavior proof and focused compatibility coverage, with no actionable patch finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body records a current-head Docker-backed Crabbox run that exercised a real local Worker and Durable Object through persisted-schema upgrade and HTTP contract checks with successful after-fix output.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body records a current-head Docker-backed Crabbox run that exercised a real local Worker and Durable Object through persisted-schema upgrade and HTTP contract checks with successful after-fix output.
Evidence reviewed 6 items Public compatibility contract: The Worker keeps the documented GET route and returns the original validated empty envelope instead of forwarding to the removed Durable Object route.
Persisted-schema upgrade: Queue schema initialization drops the retired table during Durable Object upgrade, while the run-telemetry table remains independently managed.
Focused regression coverage: The current head tests the legacy table/index removal, removed private routes returning 404, and the preserved public 200 envelope plus invalid-query handling.
Findings None None.
Security None None.

How this fits together

The dashboard Worker exposes review-queue and observability APIs backed by the Exact Review Queue Durable Object. Signed workflow-run telemetry feeds durable run storage and lane freshness for dashboard operators, while the retained public read route provides a stable compatibility response.

flowchart LR
  A[Review workflows] --> B[Signed run telemetry]
  B --> C[Exact Review Queue]
  C --> D[Run telemetry storage]
  C --> E[Review observability API]
  F[Public review query] --> G[Validated empty response]
  E --> H[Dashboard operators]
  G --> H
Loading

Before merge

  • Resolve merge risk (P1) - The real-behavior proof exercises local Wrangler persistence and HTTP paths, not production traffic volume.
  • Complete next step (P2) - No repair lane is needed because the current head resolves the prior compatibility blocker; only normal maintainer merge review remains.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Telemetry cleanup scope 16 files affected; 611 added, 1,949 removed The patch substantially removes retired telemetry while adding focused upgrade and compatibility proof.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow retirement of the producer-free telemetry path while retaining the public empty-envelope API and run-level observability contract.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the narrow retirement of the producer-free telemetry path while retaining the public empty-envelope API and run-level observability contract.

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

Not applicable: this is cleanup work; the relevant verification is the after-change Durable Object upgrade and public API contract, both covered by the submitted proof and focused tests.

Is this the best way to solve the issue?

Yes. Removing only the unproduced private pipeline while retaining the documented read envelope is the narrowest compatibility-preserving solution.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 13709144f5bd.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body records a current-head Docker-backed Crabbox run that exercised a real local Worker and Durable Object through persisted-schema upgrade and HTTP contract checks with successful after-fix output.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: This is a bounded dashboard and Durable Object cleanup with limited operator-facing compatibility scope.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body records a current-head Docker-backed Crabbox run that exercised a real local Worker and Durable Object through persisted-schema upgrade and HTTP contract checks with successful after-fix output.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body records a current-head Docker-backed Crabbox run that exercised a real local Worker and Durable Object through persisted-schema upgrade and HTTP contract checks with successful after-fix output.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-head compatibility restoration and prior current-main run-telemetry work connect this contributor to the Worker and queue surface. (role: recent area contributor; confidence: high; commits: bc8086157ad8, 353948c0849c; files: dashboard/worker.ts, dashboard/review-run-telemetry.ts, dashboard/exact-review-queue.ts)
  • Martin Cleary: Recent current-main history includes a queue change on the central Durable Object implementation. (role: recent queue contributor; confidence: medium; commits: 13f8ffdea32a; files: dashboard/exact-review-queue.ts, dashboard/worker.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-10T02:57:23.097Z sha 5187912 :: found issues before merge. :: [P1] Preserve the documented per-item read contract
  • reviewed 2026-08-10T03:03:42.168Z sha 85e8ec2 :: needs changes before merge. :: [P1] Preserve the documented per-item read contract
  • reviewed 2026-08-10T05:49:00.258Z sha 087100c :: needs changes before merge. :: [P1] Preserve the documented per-item read contract
  • reviewed 2026-08-10T05:58:37.674Z sha 8569752 :: found issues before merge. :: [P1] Preserve the documented per-item read contract

@clawsweeper clawsweeper Bot added 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 status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 10, 2026
@steipete
steipete merged commit 621b297 into main Aug 10, 2026
20 checks passed
@steipete
steipete deleted the steipete/remove-dead-review-telemetry branch August 10, 2026 06:18
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