Finish PromptKit repair and execution accounting follow-ups
This commit is contained in:
@@ -243,6 +243,25 @@ func TestSubprocessCorrectionRepairConversation(t *testing.T) {
|
||||
if len(ledger) != 3 {
|
||||
t.Fatalf("ledger: %+v", ledger)
|
||||
}
|
||||
paths, err := filepath.Glob(filepath.Join(f.dir, "runs", "run-*", "llm-execution.json"))
|
||||
if err != nil || len(paths) != 1 {
|
||||
t.Fatalf("execution path: %v %v", paths, err)
|
||||
}
|
||||
data, err := os.ReadFile(paths[0])
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var execution struct {
|
||||
Summary struct {
|
||||
ProviderAttempts int `json:"provider_attempts"`
|
||||
} `json:"summary"`
|
||||
}
|
||||
if err := json.Unmarshal(data, &execution); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := execution.Summary.ProviderAttempts; got != len(requests) {
|
||||
t.Fatalf("execution provider attempts = %d, captured requests = %d", got, len(requests))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user