M3: runPipeline fixer integration #94

Closed
opened 2026-08-01 01:43:59 +00:00 by david · 1 comment
Owner

runPipeline Fixer Integration

Wrap implement/remediate/mr stages with fixer retry loop in runPipeline.

Modified Files

  • src/orchestrator/services/runPipeline.ts — wrap eligible stages with fixer retry loop
  • src/orchestrator/types/orchestrator.ts — add runFixer seam to RunPipelineSeams

Changes

  1. Extract eligible stages: const FIXER_ELIGIBLE_STAGES = ["implement", "remediate", "mr"]
  2. Wrap each eligible stage in try/catch for GitError
  3. On GitError, loop 3 times: run fixer → dispose → retry stage
  4. After 3 failed attempts, re-throw (caught by existing outer catch → classifyError → error.json)
  5. Add runFixer seam for testability

Tests

  • runPipeline.test.ts — test fixer retry loop (mock stage throws GitError, fixer runs, stage succeeds on retry)
  • runPipeline.test.ts — test 3 attempts exhausted → error.json

Acceptance Criteria

  • Implement stage wrapped with fixer retry
  • Remediate stage wrapped with fixer retry
  • MR stage wrapped with fixer retry
  • Review stage NOT wrapped (read-only)
  • runFixer is injectable seam
  • Tests pass for retry loop and exhaustion
## runPipeline Fixer Integration Wrap implement/remediate/mr stages with fixer retry loop in runPipeline. ### Modified Files - `src/orchestrator/services/runPipeline.ts` — wrap eligible stages with fixer retry loop - `src/orchestrator/types/orchestrator.ts` — add `runFixer` seam to `RunPipelineSeams` ### Changes 1. Extract eligible stages: `const FIXER_ELIGIBLE_STAGES = ["implement", "remediate", "mr"]` 2. Wrap each eligible stage in try/catch for GitError 3. On GitError, loop 3 times: run fixer → dispose → retry stage 4. After 3 failed attempts, re-throw (caught by existing outer catch → classifyError → error.json) 5. Add `runFixer` seam for testability ### Tests - `runPipeline.test.ts` — test fixer retry loop (mock stage throws GitError, fixer runs, stage succeeds on retry) - `runPipeline.test.ts` — test 3 attempts exhausted → error.json ### Acceptance Criteria - [ ] Implement stage wrapped with fixer retry - [ ] Remediate stage wrapped with fixer retry - [ ] MR stage wrapped with fixer retry - [ ] Review stage NOT wrapped (read-only) - [ ] runFixer is injectable seam - [ ] Tests pass for retry loop and exhaustion
david self-assigned this 2026-08-01 01:43:59 +00:00
Author
Owner

pi-loop opened a Draft pull request for this issue: #110

pi-loop opened a Draft pull request for this issue: https://git.excelera.net/david/pi-loop/pulls/110
david closed this issue 2026-08-01 02:34:53 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
david/pi-loop#94
No description provided.