fix: rotate proof nudge scans#377
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 27, 2026, 5:51 PM ET / 21:51 UTC. Summary Reproducibility: yes. source-based rather than live: current main sorts proof-lane candidates deterministically and stops at processedLimit without cursor state, so repeated untargeted runs can re-inspect the same skip-heavy prefix. The PR body adds live CLI proof for the proposed rotated behavior. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the cursor rotation once maintainers accept the scheduled automation rollout, then inspect the first executed scheduled proof-lane state commit for only the expected exact per-target cursor JSON update. Do we have a high-confidence way to reproduce the issue? Yes, source-based rather than live: current main sorts proof-lane candidates deterministically and stops at processedLimit without cursor state, so repeated untargeted runs can re-inspect the same skip-heavy prefix. The PR body adds live CLI proof for the proposed rotated behavior. Is this the best way to solve the issue? Yes. Durable cursor rotation that ignores targeted runs and publishes exact per-target cursor files is a narrow maintainable fix; the remaining question is rollout monitoring, not a code defect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ae63b16d6c74. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
What Problem This Solves
The scheduled proof-nudge lane can spend its whole processed-record budget on the same skip-heavy prefix of report records. When the first candidate window is mostly protected, recently reviewed, already nudged, or otherwise skipped, later stale PRs that still need real behavior proof can wait even though the workflow is running successfully every day.
Why This Change Was Made
This adds durable cursor rotation to the untargeted
proof-nudgesandbot-proofscans. Each executing untargeted run starts after the previous cursor, processes a bounded candidate window, and advances the cursor to the last processed candidate. Targeted--item-numbersruns stay deterministic and do not read or update cursor state.The workflow now passes proof-specific cursor paths, publishes state back to
clawsweeper-state, and exposesprocessed_limit/CLAWSWEEPER_PROOF_NUDGES_PROCESSED_LIMITso scan depth can be tuned separately from the max comments/actions per run. Cursor publishing is gated on the corresponding lane running in execute mode and producing the exact target cursor file, so dry-runs do not publish missing cursor paths and one target repo run does not replace another target repo's cursor file.User Impact
Scheduled proof handling should move through the proof backlog more predictably instead of repeatedly inspecting the same skipped records. The change does not increase the default comment batch size, does not alter proof eligibility rules, and does not make targeted manual runs rotate unexpectedly.
Evidence
Head proofed:
eb444762164a928c45d4635d5861e0a0a3e83ce1.proof nudge cursorandCLAWSWEEPER_PROOF_NUDGES_PROCESSED_LIMIT, and no other open PR forproof nudge rotation.GH_BINmocked only for safe GitHub read responses. Both lanes ran with--executeand wrote cursor files under the sameresults/...paths used by the workflow:results/proof-nudge-cursors/${target_slug}.jsonandresults/bot-proof-cursors/${target_slug}.json, each only when the corresponding lane executed and wrote that file.bot-proofcursor writes and for targeted proof-lane runs ignoring--cursor-pathand leaving cursor files absent.cursor_publish_args, and that proof-nudge and bot-proof cursor publish paths are exact target files added only behind execute-mode plus file-exists gates.pnpm install --frozen-lockfilecompleted and installed the pinned dev toolchain in the fresh worktree.pnpm exec oxfmt --write .github/workflows/proof-nudges.yml test/sweep-workflow.test.ts docs/proof-nudges.md test/proof-nudge-policy.test.ts src/clawsweeper.tspassed.pnpm exec oxfmt --check .github/workflows/proof-nudges.yml test/sweep-workflow.test.ts docs/proof-nudges.md test/proof-nudge-policy.test.ts src/clawsweeper.tspassed on current head.pnpm run build:allpassed on current head.pnpm run lint:srcpassed on current head.pnpm run lint:scriptspassed on current head.node --test test/proof-nudge-policy.test.tspassed on current head: 17 tests, 17 pass.node --test --test-name-pattern "proof nudge workflow" test/sweep-workflow.test.tspassed on current head: 2 tests, 2 pass.pnpm run checkwas run locally after the exact-file publish repair; it failed on unrelated Windows-checkout issues in existing tests, including CRLF-sensitive workflow assertions, Windows file-mode expectations, and existing command/Codex tests.pnpm checkpassed on current head: job83852938494completed at 2026-06-27T21:41:06Z.pnpm check, CodeQL, Windows launcher, Socket checks, and latergithub activity to openclaw/notifyruns passed. One earliernotifyrun was skipped before later notify successes.