Repository navigation
fix(skills): make /fixer loop until the backlog is drained and park on stall, not fixed counts - #2165
Conversation
…n stall, not fixed counts Two changes: - /fixer previously stopped after one batch of --count issues even when more qualifying open issues remained. It now loops across batches by default (Phase 3), re-fetching a fresh queue and continuing until no qualifying open issues remain or a 15-batch safety cap is hit. --once restores the old single-batch behavior. An empty queue is now reported as a clean stop (exit 0), with an explicit rule against wandering to other repos or inventing unrelated work to fill a batch. - Convergence rounds (2f) and drain passes (Phase 4) were capped at a fixed 3, parking/reporting a PR regardless of whether it was still making real progress. Both now track a per-round/per-pass progress signature and park only after 3 consecutive rounds/passes with zero measurable change (genuinely blocked), backed by a 15-round/15-pass safety cap for runaway cases.
| PARKED_BEFORE=$(cat .codegraph/fixer/drain-parked-count 2>/dev/null || wc -l < .codegraph/fixer/parked.txt) | ||
| PARKED_AFTER=$(wc -l < .codegraph/fixer/parked.txt) |
There was a problem hiding this comment.
Drain list never records progress
When a drain pass merges a parked PR while others remain, parked.txt is never updated, so its line count stays unchanged and the pass is recorded as stalled. After three successful passes, the drain stops and reports the remaining PRs as blocked even though each pass made progress.
| # 2>/dev/null: batches-done is expected to be absent before the first batch completes | ||
| BATCHES_DONE=$(( $(cat .codegraph/fixer/batches-done 2>/dev/null || echo 0) + 1 )) | ||
| printf '%s\n' "$BATCHES_DONE" > .codegraph/fixer/batches-done |
There was a problem hiding this comment.
When /fixer is invoked after a completed run whose artifacts were retained, Phase 0 leaves batches-done and queue.json intact. The next invocation therefore reuses an empty or stale queue and increments the previous run's batch count, causing newly opened issues to be skipped or the 15-batch cap to trigger prematurely.
Greptile SummaryThe PR changes
Confidence Score: 2/5This PR should not merge until drain progress is tracked from actual merges and per-run batch state is initialized without breaking genuine crash resumes. The new drain loop can stop after successful merge passes because its input list never shrinks, while persistent batch and queue artifacts can cause later invocations to skip new issues or reach the safety cap prematurely. Files Needing Attention: .claude/skills/fixer/SKILL.md Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Build issue queue] --> B[Solve current batch]
B --> C{More qualifying issues?}
C -->|Yes and below cap| A
C -->|No, once, dry-run, or cap| D[Drain parked PRs]
D --> E{Parked count decreased?}
E -->|Yes| D
E -->|No three times or pass cap| F[Final report]
E -->|All merged| F
Reviews (1): Last reviewed commit: "fix(skills): make /fixer loop until the ..." | Re-trigger Greptile |
Summary
--countissues and stopped, even if more qualifying open issues remained. It now loops across batches by default (new Phase 3 — Continue the Batch Loop, or Proceed to Drain), re-fetching a fresh queue and continuing until no qualifying open issues remain or a 15-batch safety cap is hit.--oncerestores the old single-batch behavior.exit 0, not an error) — with an explicit rule against searching other repos or inventing unrelated work to fill a batch.Test plan
npm run lintclean (skill file is outsidesrc//tests/scope)/fixer --dry-runon a future run to confirm batch/round bookkeeping behaves as designed