M2: Fixer agent runner #93

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

Fixer Agent Runner

Create the fixer agent runner that creates a session, composes the prompt, runs the fixer, and disposes.

New Files

  • src/fixer/types/fixer.ts — input/output types
  • src/fixer/services/runFixerAgent.ts — fixer session runner

Interface

interface RunFixerAgentInput {
  error: GitError;
  stage: ErrorStage;
  repoRoot: string;
  model?: string;
  thinkingLevel?: ThinkingLevel;
  eventSink?: (line: string) => void;
  createSession?: (options: CreateStageSessionOptions) => Promise<StageSession>;
}

interface RunFixerAgentResult {
  text: string;
  toolCalls: string[];
}

Tests

  • runFixerAgent.test.ts — mocks session, verifies prompt composition, dispose in finally

Acceptance Criteria

  • runFixerAgent creates session with correct prompt/tools
  • Session is always disposed in finally block
  • createSession is injectable for testing
  • Tests pass
## Fixer Agent Runner Create the fixer agent runner that creates a session, composes the prompt, runs the fixer, and disposes. ### New Files - `src/fixer/types/fixer.ts` — input/output types - `src/fixer/services/runFixerAgent.ts` — fixer session runner ### Interface ```typescript interface RunFixerAgentInput { error: GitError; stage: ErrorStage; repoRoot: string; model?: string; thinkingLevel?: ThinkingLevel; eventSink?: (line: string) => void; createSession?: (options: CreateStageSessionOptions) => Promise<StageSession>; } interface RunFixerAgentResult { text: string; toolCalls: string[]; } ``` ### Tests - `runFixerAgent.test.ts` — mocks session, verifies prompt composition, dispose in finally ### Acceptance Criteria - [ ] runFixerAgent creates session with correct prompt/tools - [ ] Session is always disposed in finally block - [ ] createSession is injectable for testing - [ ] Tests pass
david self-assigned this 2026-08-01 01:43:50 +00:00
Author
Owner

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

pi-loop opened a Draft pull request for this issue: https://git.excelera.net/david/pi-loop/pulls/98
david closed this issue 2026-08-01 02:14:19 +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#93
No description provided.