Repository navigation
fix: preserve and classify Coverage census failures - #2169
Conversation
Report closed census phases and bounded progress without exposing request data. Preserve the original read error when failure recording also rejects, and isolate diagnostic observer errors from collection behavior. Co-authored-by: brokemac79 <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
Worked on by: - @brokemac79 Co-authored-by: brokemac79 <[email protected]> OpenClaw-Publication: f34de2d9-a63d-42bc-b58c-be0717638bad
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR adds bounded, privacy-safe census diagnostics and preserves the primary query failure when recording that failure also rejects. Example: The census gh subprocess returns malformed JSON, then the fail checkpoint encounters a SQL exception.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR provides useful census failure diagnostics that current main lacks; no concrete introduced defect or unresolved contributor blocker was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherScheduled target fanout collects GitHub census pages and sends signed checkpoints to the Worker and existing queue storage; this change adds private response metadata and sanitized operational warnings. flowchart LR
A[Scheduled target fanout] --> B[GitHub census query]
B --> C[Census producer]
C --> D[Signed Worker route]
D --> E[Queue census storage]
E --> C
C --> F[Closed operational diagnostics]
Technical reviewBest possible solution: Keep the focused diagnostics change and use its classified output to investigate the separate production census failure. Do we have a high-confidence way to reproduce the issue? The original source directly shows a query exception being discarded and replaced if fail rejects; supplied controlled runtime observations exercise that sequence, but this review ran no target code. Is this the best way to solve the issue? The patch uses the existing producer and storage owners, shares only the closed diagnostic vocabulary, and preserves retry and exception contracts without adding persisted state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d2194cade55f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 6, 2026, 11:55 AM ET / 16:55 UTC (Revision 2). |
Preserve caller-owned control failures and baseline protocol exceptions while associating closed diagnostics privately. Render safe diagnostics at every nonblocking fanout warning. Cover the 16 original CI regressions plus transport, body, abort, cancellation, accessor, and privacy contracts without weakening existing recovery assertions. Co-authored-by: brokemac79 <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
Worked on by: - @brokemac79 Co-authored-by: brokemac79 <[email protected]> OpenClaw-Publication: 8c5f08c8-a7b7-4f3f-95ce-198255e19994
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Coverage can report census_read_failed while a green scheduled fanout hides the failing checkpoint behind coverage_checkpoint_rejected. A second failure while recording a read error can also replace the original error.
This is a diagnostic-stage correction, not a claimed fix for the underlying production census failure. It makes a natural collection failure actionable without changing credentials, permissions, budgets, schedules or census acceptance rules.
User Impact
Operators receive closed phase/category and bounded progress counters. Coverage remains Unknown when evidence is incomplete; no zero or percentage is fabricated. Scheduled fanout remains nonblocking. Caller-owned control/transport errors retain their original identity, constructor and message; only operational output is sanitized.
Why This Change Was Made
A successful producer logged a checkpoint rejection: https://github.com/openclaw/clawsweeper/actions/runs/42187041617 . Later observations showed partial recovery, not uniform permanent failure. Both credential roles succeeded in the earlier diagnostic: https://github.com/openclaw/clawsweeper/actions/runs/42130178102 . No authentication cause is assumed.
Changes
Documentation Impact
Updated the existing live-dashboard guide and one changelog fragment; no release-owned CHANGELOG.md change. OpenClaw Bay is not affected: private diagnostics/stderr change, not public dashboard actions or contracts.
Real Behavior Proof
Claim: the actual producer and signed Worker control path retain the primary query failure, preserve control-error compatibility and emit only closed operational diagnostics.
Executed source: aa40059; tree 506700889663ae454d7f7b13be569ead05bff0ae; pinned base b5cb826. Published head 76f1356 adds empty publisher bookkeeping: all 2,057 tracked entries exactly match the executed source. The bookkeeping commit was not falsely presented as the container-executed commit.
Controlled chain: runTargetFanout -> runGh -> runCommand -> actual controlled gh subprocess -> JSON.parse -> real signed loopback HTTP -> actual Worker router -> existing SQLite adapter. Malformed CLI JSON followed by a controlled SQL checkpoint exception produces query/json then fail/unclassified, retains the original SyntaxError cause, and reports Unknown. Canonical records and all non-census SQLite/KV/queue/alarm state match before/after; fixture R2 writes are prohibited.
Fresh isolated proof passed for this corrected source. Official Crabbox local-container/Podman; pinned Node image sha256:6449e19d8184d84062525b6a7524def03146c2cb04a7f08b076680d0e8e4240a; 4 CPU / 10 GiB; Node v24.22.1; strict pnpm12.15.0. Lease cbx_e44039e84ec3; run run_348f8840ae23c1f988c7a44a9aac0d79; wrapper exit 0. Independent actual-container identity/image/resource inspections preceded validation. Main/repair/dashboard builds, the real CLI/control path and 190 tests across 12 whole affected families passed, 0 failed/cancelled/skipped. Real native HTTP disconnect, body-read failure and the unchanged 20-second deadline preserved the exact original thrown error; protocol-generated errors retained baseline constructor/message. All 2,057 source files matched before/final/after. All 89 indexed artifact hashes were independently verified; archive SHA256 2777f421ded81d6f0217fbead913881d6422003e1ac84d68f3a1412368344d4b. Download preceded exact-owned cleanup; actual container absence verified. Dependency installation used network; controlled probes did not contact production. The readonly bootstrap/source transport is not a zero-mount claim.
Commands: pnpm run build; pnpm run build:repair; pnpm run build:dashboard; actual runtime-proof.mjs green; node --test --test-concurrency=1 over the complete census diagnostics/count/modes/scheduled-summary/authority/store/cleanup/sticky-drift/byte-pressure/capacity/schema families. Focused lint, formatting, docs/limits/changelog and diff checks passed. Fresh full local and entire committed-branch Codex reviews covered P0-P3 and supplied unchanged owners: scoped-clean, reports produced, exits 0.
Limits: gh and SQL faults are controlled; SQLite is not deployed Cloudflare/workerd. A host direct-fault attempt was translated by its egress proxy to HTTP 502 and was not counted as native-transport proof; the isolated guest exercised real native failures instead. Retained offline/pre-allocation setup failures are not counted as passes. Old 740f/60-test proof is superseded, not reused. No guards, thresholds or permissions were relaxed. No live census refresh, production state write, real credential test, deployment or merge occurred. Production cause/recovery remains unverified.
Finding Disposition and CI
Current full normal CI passed: https://github.com/openclaw/clawsweeper/actions/runs/42253949500 on published head 76f1356. Actual Node v24.22.1; four test shards: 7,130 total, 7,108 passed, 22 skipped, 0 failed/cancelled. Fast gates, required pnpm check, coverage enforcement and Windows launcher passed. CI checked the synthetic merge bb68741 of this head into main d2194ca; the separate isolated proof binds the unchanged executed source/tree above. The CI gate is satisfied. A fresh current-head/body ClawSweeper review remains required before maintainer look; no review acceptance, merge approval or proof override is claimed.
Credits
Requested by @brokemac79. Existing adapted-source credit to @vincentkoc is retained in the commits. The publisher bot is not the human requester.
Worked on by