disclaw/tasks/DIS-106.md
Nick Tabeling 722d85c2a5
Some checks failed
CI / build-and-test (ubuntu-latest) (pull_request) Has been cancelled
CI / build-and-test (windows-latest) (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
chore: update task board — Phase 0 and Phase 1 marked done
All DIS-001 through DIS-110 set to status:done with merge dates.
BOARD.md reorganized with Done sections per phase.
Phase 1.5 Refinement epic added as planning placeholder.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 10:42:16 +02:00

1.3 KiB

id status phase priority labels branch assignee started pr merged
DIS-106 done 1 p1
phase:1
type:refactor
priority:p1
phase-1/runner-api-runresult claude-agent null null 2026-04-10

DIS-106: Runner-API-Refactoring → RunResult-Typ

Ziel

runner.ts gibt einen typsicheren RunResult-Typ zurück statt rohem JSON/String. Ermöglicht saubere Fehlerunterscheidung (Timeout, CLI-Error, Parse-Error, Success).

Kontext

docs/development-plan.md §2 (Runner-Refactoring), Phase 1 Task 6.

Scope

  • In: src/agent/types.ts mit RunResult (discriminated union: success | timeout | cli-error | parse-error) · runner.ts gibt RunResult zurück · router.ts und alle Aufrufer nutzen den Typ
  • Out: Streaming-Variante (Phase 5)

Definition of Done

  • RunResult ist ein discriminated union, kein any
  • Alle Aufrufer handhaben alle vier Cases explizit (TypeScript enforcement)
  • Unit-Test tests/unit/runner-result.test.ts mit Mock-Spawn für jeden Case
  • npm run build && npm test grün

Dateien (erwartet)

  • src/agent/types.ts
  • src/agent/runner.ts
  • src/router.ts
  • tests/unit/runner-result.test.ts

Abhängigkeiten

Blockiert durch: DIS-101 (Logger-Refactoring muss vorher stehen).

Spec

docs/backlog.md #DIS-106