Repository navigation
fix(observability): retain durable queue failure flags - #1317
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review Current-head workerd proof, privacy controls, full check results, and the diagnostic-only scope are recorded in the PR body. Please review the current head and body. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 2:21 AM ET / 06:21 UTC. ClawSweeper reviewWhat this changesThe PR records three strict Cloudflare Durable Object failure flags in exact-review queue logs while preserving the bounded public error response. Merge readiness✅ Ready for maintainer review The current head makes a narrow, privacy-preserving observability change with sufficient production-shaped boundary proof and no introduced correctness finding. It remains appropriate for ordinary maintainer review once the in-progress required check completes. Priority: P2 Review scores
Verification
How this fits togetherThe dashboard Worker forwards signed internal exact-review requests to a Durable Object queue. Queue transport failures return a fixed JSON error to callers and produce bounded server-side diagnostics for operators. flowchart LR
A[Signed internal request] --> B[Dashboard Worker]
B --> C[Exact-review queue]
C --> D{Transport failure}
D --> E[Bounded JSON error]
D --> F[Filtered server flags]
C --> G[Queue response]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the fixed public error boundary and land the bounded diagnostic flags after normal maintainer approval and the current required check. Do we have a high-confidence way to reproduce the issue? Yes. The supplied current-head proof exercises the signed Worker-to-Durable-Object failure path in workerd, showing the preserved response and the added filtered diagnostic output; it does not claim to reproduce a production outage. Is this the best way to solve the issue? Yes. Strictly projecting the documented boolean flags preserves the existing public privacy boundary while adding the smallest useful diagnostic distinction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c377cfc04209. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Landed as ddc7560. The merged tree matches the reviewed candidate exactly. CI passed at https://github.com/openclaw/clawsweeper/actions/runs/33363416657, and the current-head hosted review passed with sufficient proof and no actionable findings at https://github.com/openclaw/clawsweeper/actions/runs/33363425833. The Worker deployment and live smoke test passed at https://github.com/openclaw/clawsweeper/actions/runs/33364036024. The public health endpoint reports the merged deployment SHA. The real workerd exception replay also passed on merged This lands the diagnostic prerequisite. The intermittent backend availability failure remains under investigation; this PR does not change retry, publication, or queue policy. |
Intermittent canonical-record, publication-batch, and completion requests return HTTP 500
exact_review_queue_unavailable, but the Worker currently discards every property of the caught Durable Object exception. A filtered live trace captured two failed completion requests with only the genericexact_review_queue_request_failedlog. That makes it impossible to distinguish platform overload, retryable infrastructure failure, and a remote exception from the application log.The existing catch now logs only Cloudflare's documented
remote,retryable, andoverloadedboolean flags. Strict=== truechecks prevent arbitrary thrown values from becoming log content. The public status/body and queue retry behavior stay unchanged. No exception message, stack, request payload, target identity, or credential is logged.This is diagnostic instrumentation for the ongoing availability investigation; it does not claim to fix the underlying 500s. The public-error boundary introduced by #1263 is preserved. Cloudflare documents these flags and cautions against retrying overloaded objects: https://developers.cloudflare.com/durable-objects/best-practices/error-handling/.
Real behavior proof
Candidate:
fe32ede4edba7a8f77465a3d422e4dad32008b2a; baseline:c377cfc04209464760ed5a1537fa693c71e77cf5.AWS Crabbox, lease
cbx_a1bfe9a2fb09, imageami-0461d919be7deb53c, Nodev24.18.1, pnpm11.10.0. The isolated checkout has no production credentials, instance role, or Tailscale. The production Worker code on the baseline is byte-identical to the current deployed Worker code from9f343df8bfd7e852a7e10601a6a9ea7345af6f60.The production
dashboard/worker.tsis bundled with the repository-pinned Wrangler 4.107.0 toolchain and executed in real workerd through Miniflare. A fixture Durable Object deliberately throws a private marker; the actual signed/internal/exact-review/publications/listrequest crosses the Durable Object boundary, and Cloudflare supplies theremoteexception property. A fixture-only response header captures the Worker's console call without changing its response body or status.Baseline output: HTTP 500, body
{ "error": "exact_review_queue_unavailable" }, log["exact_review_queue_request_failed"].Candidate output: the same HTTP status/body, log
["exact_review_queue_request_failed", { "remote": true, "retryable": false, "overloaded": false }].Both runs assert that the planted private marker is absent from the response and captured application log. The faulting Durable Object is controlled; workerd, the binding transport, signature validation, production Worker routing, and error catch are real. This proves diagnostic preservation and the privacy boundary, not a production outage reproduction. Retryable/overloaded variants are covered by the focused unit controls below.
The focused regression covers primitive errors, a remote exception, a retryable exception, overload with a retryable flag, and nonboolean properties. It checks the exact fixed response and exact allowed log fields, including exclusion of a planted private error marker.
Full
pnpm run checkpassed: 4,145 passing tests, 8 skipped, plus the 13 static test cases. The initial full check identified an existing record-export log-shape assertion, which was aligned and then passed with the full suite. The privacy behavior itself remains unchanged.The proof ran before commit; tree
669ef7ddfc2ee7b59b5f6d66ea0ef28d5ec6f0cais unchanged in the candidate commit. Runtime proof:run_813448cd63cd; final focused/full check:run_706c563bed55. Toolchain: Wrangler 4.107.0, Miniflare 4.20260701.0, workerd 1.20260701.1, esbuild 0.28.1.Fresh pre-commit and committed-branch Codex Autoreview against the stated base both completed with no accepted/actionable P0 findings, the configured review scope.
OpenClaw Bay is unaffected: this changes only server-side diagnostic logging. No public schema, route, display, or browser action changes.
Standalone workerd reproduction driver
Install the repository-pinned proof toolchain with
npm install --prefix /tmp/clawsweeper-queue-proof-tools --no-audit --no-fund [email protected]. Save the following as.artifacts/queue-failure-proof.mjsand run the commands above from the baseline and candidate checkout respectively. The driver is included here so the runtime proof remains reproducible without adding one-off harness code to the product.