fix(FEAT-004-FIX-001): fix MissionExecutionLoop validation parsing and recovery

- Implement actual AI response parsing in parseValidationResult() with JSON extraction
  from markdown code blocks, repair for common JSON issues, and assertion result parsing
- Fix notifyValidationComplete to pass feature.taskId instead of featureId to
  handleTaskCompletion() in in-process-runtime, dashboard, and serve
- Fix recoverActiveMissions() to actually transition validating features back to
  implementing and call processTaskOutcome for features with completed tasks
- Add comprehensive unit tests for MissionExecutionLoop lifecycle, processTaskOutcome,
  recoverActiveMissions, and error handling
This commit is contained in:
gsxdsm
2026-04-11 19:20:42 -07:00
parent 01479ca64b
commit 98bf55c356
5 changed files with 763 additions and 31 deletions

View File

@@ -179,8 +179,12 @@ export class InProcessRuntime
missionStore,
missionAutopilot: missionAutopilot
? {
notifyValidationComplete: async (featureId: string, status: "passed" | "failed" | "blocked" | "error") => {
await missionAutopilot.handleTaskCompletion(featureId);
notifyValidationComplete: async (featureId: string, _status: "passed" | "failed" | "blocked" | "error") => {
// Pass the feature's linked taskId to handleTaskCompletion, not the featureId
const feature = missionStore.getFeature(featureId);
if (feature?.taskId) {
await missionAutopilot.handleTaskCompletion(feature.taskId);
}
},
}
: undefined,