Repository navigation
fix(recovery): rotate placeholder discovery cursors - #1077
Conversation
Co-authored-by: Peter Steinberger <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed August 8, 2026, 11:14 PM ET / August 9, 2026, 03:14 UTC. ClawSweeper reviewWhat this changesThis PR persists separate authenticated cursors for open and closed placeholder recovery so successive bounded scans reach later GitHub Search candidates. Merge readiness⛔ Blocked until stronger real behavior proof is added - 3 items remain Keep open: current main still restarts bounded placeholder discovery from the first search pages. The cursor design appears correct, but merge needs inspectable, current-head Crabbox runtime proof. Priority: P2 Review scores
Verification
How this fits togetherScheduled placeholder recovery searches for stale review-start comments, validates them against GitHub, then queues recovery or removes stale closed-item comments. Durable cursor state selects the next bounded candidate window while the ExactReviewQueue Worker stores it with revision checks. flowchart LR
A[Scheduled recovery] --> B[Read durable cursor]
B --> C[Search open and closed candidates]
C --> D[Validate live comment and age]
D --> E[Queue recovery or clean comment]
E --> F[CAS update cursor]
F --> G[Next recovery window]
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: Run the committed Worker-boundary harness on the current head in Docker-backed Crabbox and attach a redacted transcript/artifact identifying the head, provider, image, lease, observed cursor transitions, and limits. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main repeatedly begins its bounded search at page 1, while the reported large result set can leave later candidates unexamined. The committed regression scenario models that path, although it was not executed in this read-only review. Is this the best way to solve the issue? Yes. Per-state authenticated revision-CAS cursors reuse the existing fanout storage contract, retain the prior key prefix, and directly remove the repeated-first-window failure mode. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 81c23bede7a8. LabelsLabel changes:
Label 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
|
Ports the durable command-intake pipeline for the "@clawsweeper re-review" command from the abandoned Aug-8 WIP (snapshot 4cad8de on codex/fix-command-review-publication) onto current main. Commands are now durably recorded pre-acknowledgement (intake/watermark/receipt/revision tables, 16-item intake, 15s-15m bounded retries, 30-day receipts), verified against the live comment and head, fenced through verify/enqueue/effects stages, and superseded by full version identity - including equal-timestamp edits (review-caught P1). Acknowledgement and reaction effects are idempotent; router runs that throttle mid-command now recover instead of stranding the command (live instance: openclaw/openclaw#116562 was acked then lost when both router runs throttled). Superseded snapshot pieces were dropped, not ported: retry jitter (#1076/#1077), quota headroom (#1086), retry budgets (#1089), parked reconciliation (#1111), branch guard (#962); dashboard-monolith diffs were reworked around the #1116/#1124/#1132 splits. Proof: committed receipt at this exact head (docs/proof/durable-command-intake/), real Wrangler Worker + DO comparison with durable throttled recovery, GitHub confined to loopback API; full gate 7056 passed / 0 failed; strict check green. Verdict clean (Findings: None) on 9eb957e.
What Problem This Solves
Supersedes #1063 (adopted after the authoring session went quiet; original diagnosis and design preserved). Placeholder recovery restarted at GitHub Search page 1 every bounded live-validation window, so with a large match set (a run reported
checked=120 cleaned=0 matched=718) the later pages were never examined — stale placeholders beyond the first pages could persist indefinitely.The Fix
Persist independent open/closed placeholder-recovery offsets in the revision-CAS ExactReviewQueue cursor store and rotate across search pages after each bounded window, wrapping back to page 1 after a full rotation. The signed cursor client is extracted and shared between fanout and placeholder recovery. The two-hour activity guard and all destructive closed-comment rereads are preserved; cursor CAS conflicts repeat work safely instead of skipping.
Proof
pnpm test:unit1,968 pass / 0 fail;pnpm run checkgreen; coordinator autoreview clean (0.97).Rebased over the retry-jitter merge (81c23be) with jitter semantics untouched.