Parent: #126
Problem
Phase-specific fields on PipelineContext (e.g., stabilizationFeedback, testOutput, previousPlanRawOutput) persist across transitions. Some are manually nulled, but there's no systematic reset — fields from phase N can leak into phase N+1.
Solution
Add resetPhaseState(context, nextPhase) call at each phase transition point. Clears fields that are phase-scoped:
stabilizationFeedback → only for verification
testOutput → only for testing/test-fix
previousPlanRawOutput → only for revision
- Other phase-local fields identified during implementation
Files
packages/pipeline/src/pipeline/context.ts — new resetPhaseState function
packages/pipeline/src/pipeline/planning-phases.ts — call at transitions
packages/pipeline/src/pipeline/execution-phases.ts — call at transitions
packages/pipeline/src/types.ts — document which fields are phase-scoped
Parent: #126
Problem
Phase-specific fields on
PipelineContext(e.g.,stabilizationFeedback,testOutput,previousPlanRawOutput) persist across transitions. Some are manually nulled, but there's no systematic reset — fields from phase N can leak into phase N+1.Solution
Add
resetPhaseState(context, nextPhase)call at each phase transition point. Clears fields that are phase-scoped:stabilizationFeedback→ only for verificationtestOutput→ only for testing/test-fixpreviousPlanRawOutput→ only for revisionFiles
packages/pipeline/src/pipeline/context.ts— newresetPhaseStatefunctionpackages/pipeline/src/pipeline/planning-phases.ts— call at transitionspackages/pipeline/src/pipeline/execution-phases.ts— call at transitionspackages/pipeline/src/types.ts— document which fields are phase-scoped