feat(exec): surface AttemptRecord slice on Result for session logging
This commit is contained in:
@@ -101,7 +101,9 @@ func main() {
|
|||||||
}
|
}
|
||||||
attempts := make([]iexec.AttemptRecord, 0, len(chain))
|
attempts := make([]iexec.AttemptRecord, 0, len(chain))
|
||||||
orch := iexec.NewOrchestrator(chain, litellmExec.Run, claudeExec.Run, verifier, models.LlamaSwapURL(), &attempts)
|
orch := iexec.NewOrchestrator(chain, litellmExec.Run, claudeExec.Run, verifier, models.LlamaSwapURL(), &attempts)
|
||||||
return orch.Run(ctx, req)
|
result, err := orch.Run(ctx, req)
|
||||||
|
result.Attempts = attempts // attach orchestration metadata before returning
|
||||||
|
return result, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ type Result struct {
|
|||||||
Skill string `json:"skill"` // tdd | review | ...
|
Skill string `json:"skill"` // tdd | review | ...
|
||||||
FilePath string `json:"file_path"` // absolute path to generated file
|
FilePath string `json:"file_path"` // absolute path to generated file
|
||||||
RunnerOutput string `json:"runner_output"` // raw stdout+stderr from test runner
|
RunnerOutput string `json:"runner_output"` // raw stdout+stderr from test runner
|
||||||
Verified bool `json:"verified"` // based on exit code, never self-report
|
Verified bool `json:"verified"` // based on exit code, never self-report
|
||||||
ModelUsed string `json:"model_used"` // model name or "self"
|
ModelUsed string `json:"model_used"` // model name or "self"
|
||||||
Message string `json:"message"` // one sentence summary
|
Message string `json:"message"` // one sentence summary
|
||||||
|
Attempts []AttemptRecord `json:"attempts,omitempty"` // populated by orchestrator, not Claude
|
||||||
}
|
}
|
||||||
|
|
||||||
var validStatuses = map[string]bool{"pass": true, "fail": true, "error": true}
|
var validStatuses = map[string]bool{"pass": true, "fail": true, "error": true}
|
||||||
|
|||||||
Reference in New Issue
Block a user