Repository navigation
feat(review): explain terminal automatic review failures - #1413
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 10:05 AM ET / 14:05 UTC. ClawSweeper reviewWhat this changesThis PR updates the existing trusted automatic pull-request acknowledgement with bounded progress, completion, or terminal-failure guidance while carrying its identity through the Worker, queue, and Actions workflow. Merge readiness⛔ Blocked before merge - 1 item remains The patch appears correct: it resolves the prior deferred-acknowledgement and supersession blockers with lease-fenced receipt updates, and the supplied current-head proof exercises the affected production queue and status-updater path. Keep this PR open for normal maintainer landing rather than cleanup closure. Priority: P1 Review scores
Verification
How this fits togetherIncoming pull-request events receive a trusted acknowledgement before the Worker-backed exact-review queue dispatches an Actions review. The new receipt identity lets the workflow lease-fence updates to that original comment and expose failed terminal-status delivery through bounded operator telemetry. flowchart LR
A[Pull request event] --> B[Target dispatcher]
B --> C[Trusted acknowledgement]
C --> D[Exact review queue]
D --> E[Review workflow]
E --> F[Lease-fenced status update]
F --> G[Contributor receipt]
F --> H[Operator health]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the lease-fenced single-receipt lifecycle and monitor its bounded delivery-health aggregate without adding new contributor-facing comments or weakening source-authority checks. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an automation behavior change, not a user-reported defect. The supplied current-head trace provides a controlled reproduction path for the affected queue and status lifecycle. Is this the best way to solve the issue? Yes. Reusing one trusted acknowledgement and fencing every mutation with the active queue lease is the narrowest maintainable way to give terminal failures an explanation without status-comment noise. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1ac35d2489a2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
bdaa0cc to
b557b6c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Worked on by: - @brokemac79 Co-authored-by: brokemac79 <[email protected]>
Propagate completion fence handoffs before artifact and publication work, preserve operational failures, and prove the real Bash/HTTP queue transition. Worked on by: - @brokemac79 Co-authored-by: brokemac79 <[email protected]>
Return fixed JSON instead of exception text and prove malformed input cannot expose reflected content or stack details. Worked on by: - @brokemac79 Co-authored-by: brokemac79 <[email protected]>
Share bounded trusted receipt lookup between webhook intake and source-authority recovery. Preserve sequence and concurrent receipt guards, retry safely after response loss, and prove the production Worker-to-queue recovery path. Worked on by: - @brokemac79 Co-authored-by: brokemac79 <[email protected]>
ac1100d to
55dc355
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
What Problem This Solves
Automatic PR review can stop on a deterministic input refusal while its original acknowledgement still says review is in progress. Retry fencing correctly prevents another attempt on the unchanged revision, but contributors are left without an explanation or next step.
Why This Change Was Made
Keep the automatic PR acknowledgement separate from command status and edit that existing trusted-bot comment in place. Publish bounded guidance for
findings,incomplete_source, andsource_incompatible; never include detected values, paths, scanner output, or source excerpts. A later review replaces the blocked section with progress/completion/closed status.Status writes use the full active lease tuple, defer supersession only during the write window, and record verified delivery receipts. A superseded status lease is a successful no-op rather than a false workflow failure. Delivery failure raises operator health without requeuing the unchanged review. Receipt discovery is capped and never treats a partial scan as proof that a new comment is needed.
User Impact
Contributors receive a reason and bounded next step on the existing receipt, not one comment per attempt. Real credentials and intentional fixtures receive different guidance; incomplete source requests maintainer investigation rather than contributor action. Automated status noise is excluded from reviewer context while human quotations remain visible.
OpenClaw Bay Impact
No additional Bay renderer or public API schema changes. Audited all 47 merges after PR1 (40 after PR2), then rebased onto
1ac35d2489a243b7a49ed30d887e5a384f4f9af3. In particular, preserve Peter's Bay projection/chrome work in #1385, #1388, and #1405; Vincent's lifecycle replay/claim recovery in #1375 and #1389; and the latest reconciliation-load change in #1410.Bay retains its 30-second memo, source freshness limit, scoped sanitized projections, and observer-only behavior. Operator stats keep their separate mutation-invalidation contract. Vincent's #1411 is retained and its route regression now also checks PR3 delivery failures against fresh queue health while retaining prior complete Bay activity. Receipt IDs/timestamps stay internal; only bounded delivery-health aggregates use the existing public sanitizer. No browser-side GitHub calls or mutation controls are added.
The integration audit also preserves #1414 ledger-helper deduplication, #1416 replay-safe scheduled enqueue/fingerprints, #1419 hosted tool-round canary, #1418 shared durable-storage types, #1420 bounded reconciliation samples, and #1421 shared record coercion. None transfers acknowledgement ownership to Bay or adds public mutation controls.
Documentation Impact
Updated active contracts in
docs/pr-review-comments.mdanddocs/target-dispatcher.md, plus the reproducible proof indocs/proof/terminal-review-explanations/. Owners: ClawSweeper maintainers; sources of truth: queue, Worker, status CLI, workflow, and tests in this PR. Update these documents when receipt identity, terminal reasons, discovery bounds, lease transitions, or public projection boundaries change. Bay's existing documentation remains accurate.Evidence
55dc3553cc7f949c382a1c0e01fe4407fdcc8893; clean committed tree, base1ac35d2489a243b7a49ed30d887e5a384f4f9af3.pnpm run checkin Node 24 Podman: 4885 passed, 18 skipped, zero failures (4903 total). Includes static checks, builds, lint, changed-file coverage, and full test coverage.ClawSweeper finding disposition
Both accepted P1 findings and the two CodeQL reports from #1413 (comment) are addressed on the final head:
Real Behavior Proof
Claim and exercised surface: deferred webhook acknowledgement is recovered through the production Worker and queue alarm before admission (one trusted receipt, same source sequence, no duplicate); terminal refusal edits the existing receipt exactly once, prevents an unchanged-source retry, preserves verified receipts across queue reconstruction, and distinguishes failed delivery from unavailable delivery. The proof executes production
ExactReviewQueueRequest/Response handling and the compiled production status CLI as subprocesses with a minimal credential-free environment.Environment: Crabbox 0.46.0,
provider=local-container, Docker-compatible Podman, leasecbx_4a17b22c5a11, imagedocker.io/library/node:24-bookworm(digestsha256:9137a20e25879e0b557227b57e3ee4e9af4bde29eb3db66134cd1723e84f830b), Node 24.20.0, pnpm 11.10.0. Full gate prerequisites jq/tmux and a system-readable pnpm installation were prepared inside the container, not on the host.Command:
Observed trace:
{ "proof": "terminal-review-explanations-v3", "source_head": "55dc3553cc7f949c382a1c0e01fe4407fdcc8893", "dirty": false, "runtime": { "node": "v24.20.0", "webhook": "production dashboard worker", "queue": "production ExactReviewQueue", "updater": "compiled production CLI", "persistence": "SQLite-backed Durable Storage harness" }, "scenarios": [ { "reason": "findings", "receipt": "observed", "requeued": false, "persisted_after_queue_restart": true, "stale_heartbeat_status": 409, "patch_attempts": 2, "new_comments": 0, "operator_delivery_alert": false }, { "reason": "incomplete_source", "receipt": "observed", "requeued": false, "persisted_after_queue_restart": true, "stale_heartbeat_status": 409, "patch_attempts": 2, "new_comments": 0, "operator_delivery_alert": false }, { "reason": "source_incompatible", "receipt": "observed", "requeued": false, "persisted_after_queue_restart": true, "stale_heartbeat_status": 409, "patch_attempts": 2, "new_comments": 0, "operator_delivery_alert": false }, { "reason": "delivery_failure", "receipt": "failed", "requeued": false, "persisted_after_queue_restart": true, "stale_heartbeat_status": 409, "patch_attempts": 2, "new_comments": 0, "operator_delivery_alert": true }, { "reason": "receipt_mismatch", "receipt": "failed", "requeued": false, "persisted_after_queue_restart": true, "stale_heartbeat_status": 409, "patch_attempts": 2, "new_comments": 0, "operator_delivery_alert": true } ], "completion_supersession": { "error_response_sanitized": true, "status_fence": 200, "newer_source_accepted": 202, "release_status": 409, "release_reason": "lease_superseded", "superseded": true, "blocked_steps": [ "create-exact-review-bundle", "direct-setup-state", "direct-github-egress-observer", "prepare-direct-exact-review-publication", "direct-exact-review-publication", "finalize-direct-exact-review-lifecycle", "upload-exact-review-bundle", "queue-exact-review-publication" ], "generation_outcome": "success", "requeue_latest": false, "new_revision": 2, "new_revision_state": "pending", "transport": "actual workflow Bash/curl over loopback HTTP to production ExactReviewQueue" }, "source_authority_acknowledgement_recovery": { "credential_boundary_verified": true, "scoped_token_mints": 3, "rejected_credential_controls": 4, "webhook_status": 202, "initial_outcome": "acknowledgement_deferred", "fallback": "production ExactReviewQueue alarm", "receipt_comment_id": 86000, "source_authority_seq": 1, "admitted_with_same_receipt": true, "comment_create_attempts": 1, "duplicate_comments": 0, "reservation_completed": true, "external_boundary": "controlled GitHub Request/Response fixture" }, "limits": [ "Controlled local GitHub CLI and Request/Response fixtures; no GitHub or live queue mutation.", "Runs webhook/queue Request/Response and updater subprocesses, not deployed workerd or a full GitHub Actions job." ] }The checked-in harness writes
.artifacts/terminal-review-explanations/result.json. It verifies all three refusal reasons, delivery failure, and mismatched response body; repeats the update to check idempotency; reconstructs the queue over the same SQLite storage; and rejects a stale heartbeat with HTTP 409. Executable workflow regressions additionally cover the ten-page limit, partial/error responses, and initial/release status-fence no-op classification.Limits: GitHub API and CLI responses are controlled fixtures at the external boundary; no contributor PR or live queue is mutated. Persistence uses the SQLite-backed Durable Storage harness, not deployed workerd. This is controlled queue/API/subprocess behavior proof, not a full live GitHub Actions or UI run; CI and workflow tests provide complementary coverage.
Worked on by
View the OpenClaw team session