Repository navigation
fix: prevent guarded dead-letter reconciliation starvation - #1013
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 1:27 PM ET / 17:27 UTC. ClawSweeper reviewWhat this changesThe branch updates dead-letter reconciliation so unchanged guarded-cleanup conflicts are aggregated into one inventory refresh, fenced by canonical target, and no longer starve unrelated eligible recovery work. Merge readinessThis PR addresses a demonstrated production reconciliation starvation path and the submitted branch adds a focused aggregate-refresh and fencing fix with strong operator-level proof. It is still necessary because commit Priority: P1 Review scores
Verification
How this fits togetherThe dead-letter reconciliation operator inventories failed review-publication rows, identifies their live GitHub targets, resolves terminal or duplicate rows, and submits safe fresh recovery work. The changed path handles an atomic cleanup race: it refreshes authoritative inventory once, fences unchanged blocked aliases, and continues recovering independent work within the original limits. flowchart TD
Inventory[Dead-letter inventory] --> Group[Canonical target groups]
Group --> Cleanup[Guarded cleanup]
Cleanup --> Refresh[One authoritative refresh]
Refresh --> Fence[Unchanged alias fencing]
Fence --> Select[Eligible recovery selection]
Select --> Validate[Live target validation]
Validate --> Queue[Fresh repair work]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the aggregate single-refresh design, preserve the existing atomic cleanup and live-target validation fences, and merge this focused fix after the current review and required checks apply to the submitted head. Do we have a high-confidence way to reproduce the issue? Yes. The PR documents a production reconciliation run that inspected unchanged blocked targets and recovered none, then provides an after-fix subprocess run against signed local HTTP endpoints that fences the blocked target and recovers an independent target. Is this the best way to solve the issue? Yes. Aggregating atomic conflicts into one authoritative refresh and fencing only unchanged blocked aliases is a narrow solution that retains the existing safety checks, caps, target validation, and recovery behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c553329e3f54. 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
|
Co-authored-by: Peter Steinberger <[email protected]>
Summary
Direct production failure
The first production run after landing the bounded-refresh fix succeeded as a workflow but recovered no work because it kept inspecting the same unchanged blocked target:
https://github.com/openclaw/clawsweeper/actions/runs/30757712437
{"action":"reconcile","dry_run":false,"inventory_complete":true,"queue_pressure":"idle","inspected_targets":3,"recovered_targets":0,"resolved_rows":0,"invalid_rows":0,"closed_rows":0,"duplicate_rows":0,"active_review_rows":0,"skipped_targets":3,"inventory_changed":true,"skipped_rows":1}Its sanitized production artifact contained 1,387 open dead letters and 1,384 fresh-recovery-eligible rows, so zero recoveries reflected starvation rather than lack of recoverable work.
After-fix real operator subprocess
This executes the actual production operator as a separate Node process against real signed local HTTP endpoints. A closed target rejects guarded cleanup without changing inventory; after one authoritative refresh, its aliases remain fenced and an independent open target is recovered:
The existing independent counter-regression reproduction still reports
resolved_rows=2,closed_rows=1,invalid_rows=1, and both original target/recovery caps remain unchanged. Non-atomic cleanup responses still fail closed, stale transferred/active aliases remain fenced, and fresh recovery is never sent before the authoritative inventory refresh.