Recover exact-review quota handoffs - #1150
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 12, 2026, 8:16 PM ET / August 13, 2026, 00:16 UTC. ClawSweeper reviewWhat this changesThis PR converts eligible signed GitHub egress reset observations into bounded exact-review recovery circuits, adds reset-plus-jitter scheduling, and reports recovery causes through status and Bay. Merge readinessKeep open for maintainer direction. Current main keeps egress telemetry observational, while this well-proven draft makes it bounded queue-admission state; that production-policy change needs explicit sponsorship before landing. Priority: P2 Review scores
Verification
How this fits togetherExact-review work flows through a durable queue before publication and review workflows run. This change feeds sanitized quota observations into that queue’s recovery timing and exposes bounded health state to operator-facing status surfaces. flowchart LR
A[Signed GitHub egress telemetry] --> B[Receipt validation]
B --> C[Circuit eligibility]
C --> D[Durable exact-review queue]
D --> E[Jittered recovery alarm]
D --> F[Public status API]
F --> G[OpenClaw Bay]
Decision needed
Why: The safeguards establish a technically bounded implementation, but only maintainers can decide whether automatically deferring queue work from telemetry is the desired production policy. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Explicitly sponsor the bounded Phase 0.5 recovery policy, then land with post-deploy monitoring of capped circuits and staggered recovery while keeping Phase 1 enforcement inactive. Do we have a high-confidence way to reproduce the issue? Yes — the linked local-container proof runs the real Worker and Durable Object through signed ingest, queue recovery, status projection, and Bay rendering; the final head retains the exercised product code. Is this the best way to solve the issue? Unclear — the implementation is narrow and guarded, but whether telemetry should automatically alter queue admission is a maintainer policy decision rather than a purely mechanical fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ae36d608d017. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
This is the Phase 0.5 follow-up selected from CSW-127 post-merge observation. Phase 1 remains separately held and inactive.
Problem
Phase 0 records sanitized GitHub publication egress telemetry, but the queue did not consume credible reset evidence as durable admission state. A quota-affected cohort could therefore retry without a shared, attributable recovery boundary. Review workflows that failed, cancelled, or never claimed their lease also requeued without an operator-visible bounded recovery cause.
The post-merge observation did not establish a provider-side cause for cancelled runs, so this change records objective queue/workflow facts without assigning one.
Related work:
Implementation
repository_actionsorpublic_read_fallbackobservations with a credible future retry/reset boundary, bounded to two hours.target_appobservations observational so an ambiguous installation cannot block unrelated owners.recovery_untilboundary.claim_timeout,execution_timeout,workflow_cancelled, andworkflow_failedhandoff causes without misclassifying typed throttle or coordination outcomes.No workflow, permission, credential, configuration gate, deployment, queue, DLQ, or production state is changed by this PR.
Validation
Executed on the final branch/base unless the proof source is called out below:
pnpm run build:allnode --test test/github-egress-telemetry.test.ts test/exact-review-publication-batches.test.ts test/dashboard-worker-command-intake.test.ts test/dashboard-worker-queue-policy.test.ts test/dashboard-worker-queue-runtime.test.ts test/exact-review-health.test.ts test/dashboard-worker-bay-records-routes.test.tspnpm run lint:dashboardpnpm run lint:scriptspnpm run check:docspnpm run check:limitsgit diff --checkThe controlled container proof passed 324 focused tests with zero failures. The final committed Codex review against
ae36d608d01701af7e06c313be96689068b5c890found no actionable correctness issues and independently completed the dashboard TypeScript build.The final read-only local ClawSweeper review covered base
ae36d608d01701af7e06c313be96689068b5c890through head960488d7d98c897c12cc0b581c1701f52ab6de7a: review complete, high confidence, patch correct, no review comments, security cleared, Real Behavior Proof sufficient, overall/proof rating A/A. Earlier review findings about stale operator wording were accepted, fixed across all active guides, and re-reviewed cleanly.Real Behavior Proof
Claim: Complete, attributable signed egress evidence creates one bounded durable circuit; replay conflicts cannot change it; matching publication work recovers only at its deterministic reset-plus-jitter boundary; cancelled review handoffs remain queued with a bounded visible cause; public projections remain privacy-clean and observer-only.
Exercised surface: The production Worker and Durable Object code paths, signed internal telemetry ingest, receipt storage and migration, queue admission/alarm behavior, public queue projection, and OpenClaw Bay rendering.
Scenario: A local GitHub fixture supplied complete repository Actions/public-read-fallback quota evidence, ambiguous target-App evidence, a conflicting receipt replay, pending publication work around the reset boundary, and one cancelled review handoff.
Command/environment: Docker-backed Crabbox
local-container, imagemcr.microsoft.com/playwright:v1.60.0-noble, leasecbx_1df4ca79b0b1(blue-krill-5534). The executed source was3a95d75996e654d9a97294d55a3235998fc3cd43on current baseae36d608d01701af7e06c313be96689068b5c890; subsequent commits only refresh the receipt and synchronize documentation.Observed result: 324/324 focused tests passed; signed ingest deduplicated; conflicting receipt evidence was fenced; exactly one attributable circuit was created; raw-reset claim was rejected; reset-plus-jitter claim succeeded; Bay rendered
1 recovering after workflow cancelled; public output was privacy-clean.Artifacts:
docs/proof/csw-127-phase0-5/container-receipt.jsondocs/proof/csw-127-phase0-5/README.mddocs/proof/csw-127-phase0-5/run-proof.shLimits: The loopback fixture proves ClawSweeper response handling and durable transitions, not GitHub's external scheduler or actual quota refill. It does not assign a provider-side cause to earlier cancelled runs. Phase 1 remains inactive and was not exercised. Broad Windows coverage retained unrelated baseline limitations from shell-only fixtures (
/bin/bashunavailable in WSL) and temporary-directoryEPERMcleanup; the seven affected test files were green on Windows and Linux. Repository-wide Linux format checking of the Windows checkout also encountered the existing CRLF representation across untouched files; scoped lint and all non-format gates were clean.Risks and rollout
blocked_untilis the raw credential reset;recovery_untilis the latest current member boundary, not a command or manual gate.Release-note context
Exact-review work now uses credible GitHub quota reset evidence to recover in a bounded, staggered way and reports objective handoff recovery causes to operators.