feat: adapt apply scan window#401
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 12:15 AM ET / 04:15 UTC. Summary Reproducibility: not applicable. this is a feature PR rather than a current-main bug report. The changed behavior is supported by source inspection and PR-body live output instead of a failing reproduction. 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 bounded adaptive selector only if maintainers accept the scheduled-apply throughput tradeoff, while keeping close gates, explicit item applies, checkpoint limits, and policy checks unchanged. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a feature PR rather than a current-main bug report. The changed behavior is supported by source inspection and PR-body live output instead of a failing reproduction. Is this the best way to solve the issue? Yes, subject to maintainer acceptance; putting the selector in workflow-utils and only feeding untargeted close preselection is a narrow maintainable path that preserves existing close gates. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d20cf36edb6b. 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
|
c3218fe to
85911f2
Compare
85911f2 to
df5c22a
Compare
df5c22a to
1d10be8
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Thanks @brokemac79 — the adaptive scan idea is preserved in #406, with current-main integration, close-health persistence, regression coverage, and the workflow-size repair needed after #402 pushed the inline expression over GitHub's limit. GitHub rejected the maintainer update to this forked branch because the active OAuth token lacks |
What Problem This Solves
The apply lane can spend an entire automatic cursor window on old, skip-heavy records and close nothing. After #375, the cursor advances, but a fixed 300-record scan window can still make rotation through the open issue/PR universe slower than necessary when the previous window was entirely skipped.
Why This Change Was Made
This adds a bounded adaptive scan-window selector for automatic close-mode apply runs:
last_close_apply_healthso comment-sync/status updates do not hide the previous close-mode signal that drives the next scan-window choice;apply_health.User Impact
Maintainers get faster rotation through skip-heavy apply windows without increasing how many closes can happen in one run. The workflow status now reports the selected scan window and reason, for example:
Evidence
Focused local proof after rebasing onto current
origin/mainincluding #398:Result: passed. The focused node test run reported 130 tests, 129 passing, 1 skipped.
Adaptive utility runtime proof on the final build, with current status in a non-close state but
last_close_apply_healthpreserving the previous close signal:Full local check:
Result: passed. The full check reported 1150 tests, 1149 passing, 1 skipped, coverage gates at 100%, and format clean.
Codex review loop:
Result: no actionable correctness issues found. The review noted the adaptive scan window logic, status preservation, workflow wiring, and tests are consistent with the intended behavior.
Screenshots / Visual Proof
No UI surface changes. The operator-visible surface is workflow/status text, shown above as
Scan window: 600 records (previous_full_zero_close_skip_window).Dependency / Stack Note
This is based on current main after #391, #397, #395, and #398. It is independent from #400 and #402.
Risk
The risk is limited to automatic apply scan-window selection. The PR only changes how many candidate records are scanned before selecting close candidates. It does not relax close gates, policy checks, live GitHub-state checks, checkpoint limits, or write permissions.