Repository navigation
fix: stop repeated review start comments after supersession - #1635
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 12:49 PM ET / 16:49 UTC. ClawSweeper reviewWhat this changesThe PR checks queue ownership before posting review-start comments, reuses the same worker’s lease during transient failures, and stops retrying superseded reservations. Merge readiness✅ Ready for maintainer review The fix remains useful on current main. No actionable correctness or security defect was found, and the supplied production-path proof supports the reservation and retry behavior. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper’s exact-review workflow reserves a temporary GitHub comment before starting a review. Queue ownership and the current item revision determine whether the worker proceeds, defers, retries, or stops. flowchart TD
A[Queued review worker] --> B[Check queue ownership]
B -->|Superseded| C[Stop without posting]
B -->|Unavailable| D[Bounded retry]
B -->|Authorized| E[Acquire or reuse comment lease]
E --> F[Recheck ownership and revision]
F -->|Valid| G[Run review]
F -->|Unavailable| D
F -->|Superseded| H[Release owned lease and stop]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Preserve the existing temporary-lease protocol while making supersession terminal and transient ownership checks reuse the authorized worker’s comment. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main posts and deletes a lease after rejected queue checks, then the workflow retries that acquisition up to five times. This review did not execute a failing main run. Is this the best way to solve the issue? Yes. The patch repairs the existing reservation boundary without replacing the lease protocol, and its controlled production-path proof exercises both terminal rejection and transient recovery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cc0a49acc8d7. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Fixes repeated “review started” comments when an exact-review worker loses queue ownership before reserving its GitHub lease. Investigated from openclaw/openclaw#154935; the earlier workflow retried reservation five times and then completed as superseded without reviewing.
User Impact
Superseded workers stop before posting. A temporary queue outage retries the ownership check while reusing the same worker's active comment, avoiding a new notification on every attempt. Existing competing-worker and current-head guards remain in force.
Why This Change Was Made
Reservation previously posted a public comment before checking queue authority, then deleted and retried after rejection. The CLI now distinguishes terminal ownership rejection from unavailable queue checks. Exhausted service failures remain failures for queue recovery. The post-acquisition check still handles ownership changing during the GitHub write.
The temporary lease protocol remains intact because other review/apply lanes and publication provenance depend on its server-assigned comment identity. This change prevents the observed retry burst; it does not claim an atomic transaction between GitHub and the queue or eliminate legitimate new reviews' temporary comments.
OpenClaw Bay Impact
No Bay change is needed. This fixes reservation and retry behavior without adding lifecycle states, public fields, routes, or mutation controls. Existing superseded/failure reporting is retained.
Documentation Impact
Updated the active README and PR-review-comment contract to describe separate temporary lease comments, terminal supersession, and transient retry reuse. Corrected the placeholder's promise to edit itself into the final review. Added the maintainer changelog entry.
Evidence
Real Behavior Proof
Claim and exercised surface: the production reservation shell from
.github/workflows/sweep.yml, actual builtreserve-review-leaseCLI, real curl requests, and controlled loopback HTTP services exercise terminal and transient ownership decisions and observable comment writes.Environment: AWS Crabbox, lease
cbx_2898bf479ea0, imageami-0461d919be7deb53c, Linux, Node 24.18.1, repository-pinned pnpm 12.4.1. Runtime proof head:548bf854428a052fcacd197eb1f9a62129b6a0d1. Current PR head:f0ae3edde2d6d02c2c126d9daead9191852fddec; the only subsequent change relocates an unchanged changelog bullet to resolve a concurrent insertion conflict. The production, workflow, and harness source hashes are unchanged.Command:
Observed result: all nine scenarios passed.
Artifacts and trace:
scripts/e2e/review-reservation.mjsreproduces the fixture and writessummary.jsonwith exact source hashes plus per-scenario HTTP traces. The normalized outcomes above are included here for inspection. The regression test runs the same production workflow path.Limits: queue and GitHub responses are controlled synthetic services. This is real workflow/CLI/HTTP execution, not a live production GitHub mutation or model review. A race after the preflight can still create one temporary owned lease, which the terminal path removes; it does not repeat the rejected acquisition.