Separate runner working state from returned results

This commit is contained in:
2026-11-26 02:04:05 +00:00
parent b0dc84a479
commit d1421a710f
15 changed files with 72 additions and 47 deletions

View File

@@ -88,7 +88,7 @@ func TestRunnerMaterializesAndFullyAssessesEachNativePlanRevision(t *testing.T)
profile.Chunk.Mode, profile.Chunk.MaxAdditionalTurns = &test.mode, &test.turns
profile.Chunk.Validators = ValidatorOverride{Set: true, Validators: []ModuleBinding{Binding("first-plan-policy"), Binding("second-plan-policy")}}
profile.Artifacts = map[string]ArtifactLaneProfile{"notes": registerRunnerNotes(t, catalog, runnerNotesProducer{name: "notes", probe: probe})}
output, err := New().Run(context.Background(), RunInput{Prepared: prepareRunnerProfile(t, catalog, profile, engine), RawInput: []byte("input")})
output, err := New().run(context.Background(), RunInput{Prepared: prepareRunnerProfile(t, catalog, profile, engine), RawInput: []byte("input")})
if (err != nil) != test.wantError || calls != test.turns+1 {
t.Fatalf("native plan output=%#v error=%v calls=%d", output, err, calls)
}