Repository navigation
feat(telemetry): trace exact publication handoffs - #858
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 26, 2026, 8:37 AM ET / 12:37 UTC. ClawSweeper reviewWhat this changesAdds redacted telemetry for legacy exact-review publication batches, tracing dispatcher reservation, workflow handoff, preparation, state-writer, and final GitHub-apply timing while marking direct Cloudflare publication as outside those batch-only timings. Merge readinessKeep this PR open for maintainer review. The available evidence supports a distinct, telemetry-only addition for the retained legacy publication fallback rather than a duplicate of direct publication, but accepting persisted Durable Object fields and a public queue-statistics contract is a rollout and product-boundary decision. Priority: P3 Review scores
Verification
How this fits togetherExact-review publication normally uses the Cloudflare-canonical direct path, with a bounded legacy state-repository batch path retained as fallback. This PR instruments that fallback path and returns redacted handoff health through the queue statistics endpoint for operators. flowchart LR
Producer[Exact-review producer] --> Direct[Direct Cloudflare publication]
Producer --> Fallback[Legacy batch fallback]
Fallback --> Reserve[Dispatcher reservation]
Reserve --> Workflow[GitHub batch workflow]
Workflow --> Queue[Durable queue telemetry]
Queue --> Stats[Redacted queue statistics]
Decision needed
Why: The branch is additive and has credible local runtime proof, but the long-term value and compatibility commitment of durable telemetry plus a public operator response for a fallback path require maintainer intent rather than an automated correctness judgment. 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: Retain the telemetry only if maintainers want a durable, public observability contract for the bounded legacy fallback, then either review one controlled redacted deployed dispatcher-to-stats capture or explicitly waive that requirement before merge. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds observability rather than repairing an existing reported failure. The PR body provides a local HTTP-to-worker-to-Durable-Object trace of the new behavior, but no production dispatch was initiated. Is this the best way to solve the issue? Unclear: the implementation appears deliberately scoped to the retained legacy fallback rather than duplicating direct publication, but maintainers must decide whether a durable and public telemetry contract for that fallback is the best product direction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3ecc41e30f9d. 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 (9 earlier review cycles; latest 8 shown)
|
d15870f to
4ce8d64
Compare
4ce8d64 to
e8e526a
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* feat(telemetry): trace exact publication handoffs * feat(telemetry): label direct publication timing
Summary
Adds
reservation_claim_observabilityto exact-review queue stats, tracing a legacy publication batch from durable dispatcher reservation through claim, preparation, state-writer work, and final GitHub apply. The response now explicitly distinguishes that legacy state-repository batch timing from the Cloudflare-canonical direct-publication path introduced by #859/#866/#867.Problem
Operators could not determine whether a legacy publication delay occurred before capacity, during dispatcher-to-runner handoff, on a runner, at the state writer, or at GitHub. The original surface also made it too easy to read those batch-only timings as applying to direct canonical publication.
Implementation
legacy_state_repo_batch;publication_paths.cloudflare_canonical_directis explicitlynot_applicablefor reservation-to-claim and state-writer timing, while a direct-publication fallback enters the legacy batch path.Compatibility
The current direct Cloudflare-canonical producer completes before a legacy publication batch is created. This PR does not change that producer, its bounded fallback, capacity, admission, retries, state-writer behavior, or GitHub writes. It only makes the two paths unambiguous to operators:
cloudflare_canonical_directnot_applicable; canonical Durable Object publication bypasses the legacy batch.legacy_state_repo_batchtracked; this is the existing batch/fallback path.The extra response fields are additive. Existing metadata-free legacy workflow claims remain accepted; claims that opt into dispatch telemetry must supply both dispatch ID and UTC dispatch time.
Validation
pnpm run build:allnode --test test/exact-review-publication-batches.test.ts test/repair/exact-review-batch-coordinator.test.ts— 61 passingnode --test test/repair/exact-review-batch-workflow.test.tswith Git Bash on Windows — 10 passing, including workflow Bash syntax and the direct-publication/fallback source contractgit diff --checkpnpm run lint:dashboardandpnpm run lint:repairThe repository-wide formatter baseline still reports unrelated formatting differences; no formatter rewrite was made.
actionlintis not installed on this runner.Runtime and migration proof
The focused
ExactReviewQueueDurable Object runtime test creates and completes one redacted batch trace with a fixed UTC clock. It proves the public stats response contains:legacy_state_repo_batchfor the batch, plus the explicit direct-versus-legacy path contract above.It also verifies that the public response excludes
worker-secret-not-publicand a persistedfailure-body-secret-not-publicfixture. The same suite covers migration of a pre-deployment direct-publication plan to the canonical store and preservation of legacy queue receipts while adding batch tables.This is local Durable Object/SQLite runtime proof, not a production dispatch. No live exact-review run, Action dispatch, or E2E activity was initiated because this task prohibits those operations. A redacted deployed dispatcher-to-stats capture remains the only unfulfilled ClawSweeper rank-up artifact.
Local Crabbox proof (not deployed)
On 2026-07-26, the PR head
e8e526a1336057c6bff8217135ce9773917edf47passed an isolated Docker-backed Crabbox run (provider=local-container, leasecbx_ae7f17d0f5c9, Playwright v1.60.0-noble). Wrangler/Miniflare hosted the worker and its Durable Object locally; the harness then signed an enqueue, claimed the resulting legacy batch, recorded each handoff stage, completed it, and fetched the public stats endpoint.The captured, public-safe trace was:
This verifies the local HTTP-to-worker-to-Durable-Object observability contract, including direct-versus-legacy classification and public redaction. The two final stage timestamps are local telemetry markers only: this run performed no Cloudflare deployment, GitHub Actions dispatch, or GitHub write. The latest ClawSweeper review accepts this as sufficient contributor runtime proof; a deployed dispatcher-to-stats capture is now a maintainer-controlled rollout decision and optional rank-up artifact, not a contributor-facing proof defect.
Supersession assessment
Current ClawSweeper disposition
The durable ClawSweeper review at
2026-07-26T12:28:51.002Zsupersedes the prior 12:18 revision. It marksproof: sufficientandstatus: 👀 ready for maintainer look, while retaining P3 /gold shrimp: no code or security finding was identified; the local Crabbox trace is accepted as sufficient contributor runtime evidence; and this PR should remain open for maintainer review because it instruments a distinct retained fallback path rather than duplicating #859.The remaining decisions are maintainer-owned rollout decisions, not a contributor-facing proof failure: whether to retain the persisted/public legacy-fallback observability contract; whether to require or waive one controlled, redacted deployed dispatcher-to-stats capture before merge; and acceptance of the additive Durable Object migration/public queue-stat compatibility contract. Any deployed evidence must redact endpoints, IP addresses, credentials, lease owners, and failure bodies.
#859 is a prerequisite, not a technical replacement for this PR. It merged the Cloudflare-canonical direct-publication path and deliberately retained the bounded legacy state-repository batch fallback. This PR observes that remaining fallback without changing its behavior; the direct path is explicitly marked
not_applicablefor batch-only timing.Current
origin/mainat4f1d7d6caa42c7c559301b970116b02cb98aa8c4still has none of this PR'sreservation_claim_observability, durable dispatcher reservation correlation, workflow stage timestamps, public delay buckets, or stall alerts. The seven-file / 1,016-line PR diff therefore remains additive and unmerged rather than duplicated by #859.Maintainer decision required:
Until that decision, preserve this PR open. No deployed capture, queue replay, workflow dispatch, or behavioral change has been made from this branch.
Codex review
codex review --uncommitted— final clean result: no accepted/actionable findings.codex review --base origin/main— final clean result: no actionable correctness issues.dispatch_idor onlydispatched_atcould bypass the correlation fence. The queue now rejects either partial form, with two-sided focused coverage.Risks / rollout
Related
mainafter merged fix(automation): restore apply and repair workflows #855, feat: Codex-only runtime, OpenClaw fallback runner, direct Cloudflare publication #859, fix(router): preserve paused approvals until repair intent is durable #863, feat(state): Cloudflare-canonical exact-review records (state-repo retirement, phase 1) #866, and fix(state): record-tuple section-move projection and cycle isolation #867.agent/add-apply-observability-lagandagent/record-batching-rollout-status; this PR stays on the disjoint exact-review queue observability surface.