Skip to content

feat(apply): requeue exact re-reviews for drift-blocked close proposals - #1231

Merged
steipete merged 1 commit into
mainfrom
steipete/close-mode-throttle-yield
Aug 24, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/close-mode-throttle-yield

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Close-mode cursor sweeps close almost nothing from the standing backlog: successful apply runs on 2026-08-24 (e.g. runs 32690338216 and 32684664263) report closed=0/40 on every checkpoint. The skip histogram from those runs shows two dominant vetoes: ~50% skipped_changed_since_review ("updated_at changed" — any third-party activity since the last review blocks the close until a fresh review confirms it) and ~35% kept_open with "review lacks verified local checkout access" (records whose stored review can never authorize a close). Old records accumulate drift faster than the weekly review cadence revisits them, so the same records are re-skipped by every sweep and the backlog only drains through the event-driven fresh-review path.

Why This Change Was Made

Both vetoes have the same cure: a fresh exact review re-verifies the close proposal at the current snapshot and (since every modern review writes local_checkout_access: verified) produces a close-capable record. After each successful default close-mode cursor run for openclaw/openclaw, the apply job now dispatches up to five clawsweeper_target_sweep exact re-reviews for the blocked items — source-drift skips first, unverified-checkout keeps as filler — using the same repository-dispatch shape as the existing source-revision-drift requeue job.

Bounds and safety:

  • At most 5 dispatches per run, only for successful, auto-selected (default cursor) close-mode runs — never comment-sync, explicit-item, or no-op runs.
  • The exact-item planner's run-scoped concurrency group and the durable queue's supersession semantics absorb repeat dispatches for the same item.
  • Review → proposal → apply gates are completely unchanged; this only refreshes the inputs the existing gates require.
  • Selection logic lives in a tested workflow CLI subcommand (apply-requeue-review-item-numbers), consistent with the other apply-report helpers.

Evidence

  • New unit test: selection prefers drift skips, dedupes, respects the cap, returns empty at limit 0.
  • New workflow-shape test: the step is gated to default cursor runs and dispatches clawsweeper_target_sweep with shard_count: "1".
  • 162/162 tests across sweep-workflow, apply-live-state, and reconcile suites; pnpm run lint and pnpm run check:static (docs check included) clean.
  • Codex-backed autoreview on the rebased branch diff: clean, no accepted/actionable findings (patch is correct, 0.98).

Close-mode cursor sweeps were closing ~0/40 records per checkpoint: ~50%
skipped as changed-since-review (any third-party activity since the last
review vetoes the close until a fresh review) and ~35% kept open because
their stored review lacks verified local checkout access (legacy records
that can never authorize a close). Both blocks have the same cure — a fresh
exact review re-verifies the proposal at the current snapshot and writes a
close-capable record. After each default close-mode cursor run, the apply
job now dispatches up to five clawsweeper_target_sweep exact reviews for
those items, drift skips first, so blocked backlog records converge to
closeable instead of being re-skipped by every sweep.
@steipete
steipete requested a review from a team as a code owner August 24, 2026 07:09
@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: feat(apply): requeue exact re-reviews for drift-blocked close proposals This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit ce25070 into main Aug 24, 2026
9 of 10 checks passed
@steipete
steipete deleted the steipete/close-mode-throttle-yield branch August 24, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant