Skip to content

fix(skills): make /fixer loop until the backlog is drained and park on stall, not fixed counts - #2165

Merged
carlos-alm merged 1 commit into
mainfrom
fix/fixer-scope-and-loop
Jul 29, 2026
Merged

carlos-alm merged 1 commit into
mainfrom
fix/fixer-scope-and-loop

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Summary

  • Loop until actually done. /fixer previously processed one batch of --count issues 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. --once restores the old single-batch behavior.
  • Repo scope + do-nothing. /fixer only ever acts on the repo it's invoked in. An empty issue queue is now reported and exits cleanly (exit 0, not an error) — with an explicit rule against searching other repos or inventing unrelated work to fill a batch.
  • Stall-based parking, not fixed round/pass counts. Convergence rounds (2f) and drain passes (Phase 4) were both capped at a flat 3, parking a PR/stopping drain regardless of whether real progress was still happening. Both now track a per-round/per-pass 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. A PR that's still moving keeps going past 3, 5, or however many rounds it takes.

Test plan

  • Syntax- and logic-checked the new stall-detection bash blocks standalone
  • npm run lint clean (skill file is outside src//tests/ scope)
  • Dry-run /fixer --dry-run on a future run to confirm batch/round bookkeeping behaves as designed

…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.
Comment on lines +795 to +796
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Fix in Claude Code

Comment on lines +737 to +739
# 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Batch state leaks across runs

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.

Fix in Claude Code

@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR changes /fixer to process multiple issue batches, introduces --once, and replaces fixed convergence/drain limits with progress-based stall detection.

  • Restricts issue and PR operations to the dynamically detected repository.
  • Treats an empty qualifying queue as a successful no-op.
  • Adds per-PR gate signatures with three-stall and fifteen-round limits.
  • Adds multi-batch continuation and parked-PR drain bookkeeping.

Confidence Score: 2/5

This 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

Filename Overview
.claude/skills/fixer/SKILL.md Adds backlog-wide batching and stall-based convergence, but drain progress is not reflected in its tracked list and retained run counters can corrupt later invocations.

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
Loading

Fix All in Claude Code

Reviews (1): Last reviewed commit: "fix(skills): make /fixer loop until the ..." | Re-trigger Greptile

@carlos-alm
carlos-alm merged commit f9af42e into main Jul 29, 2026
35 checks passed
@carlos-alm
carlos-alm deleted the fix/fixer-scope-and-loop branch July 29, 2026 00:25
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant