Run processing from the prepared invocation

This commit is contained in:
2026-11-27 01:17:45 +00:00
parent 2dc057b97e
commit b4bc5e5640
12 changed files with 133 additions and 66 deletions

View File

@@ -13,6 +13,7 @@ import (
"gitea.maximumdirect.net/eric/audita/v4/internal/core/schema"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/contracts"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/outcomes"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/preflight"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/proposals"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/runner"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/structuredoutput"
@@ -74,8 +75,8 @@ func TestFatalBatchRetainsEarlierDecisionsInLedger(t *testing.T) {
client := &interruptedValidationClient{cause: origin}
cfg := config.Config{Chunking: config.Chunking{MaxSectionTokens: 8192, MinSectionTokens: 1}, Validation: config.Validation{MaxPromptTokens: 150}}
result, err := runner.New(partialModule{validator}).Run(context.Background(), runner.RunInput{
Sections: []chunking.Section{{Index: 0, StartSegmentID: 1, EndSegmentID: 1, Segments: []schema.Segment{{ID: 1, Text: "hello"}}}}, Transcript: &schema.Transcript{Segments: []schema.Segment{{ID: 1, Text: "hello"}}},
ModuleSpecs: []contracts.ModuleRunSpec{{ModuleKey: "grammar", InstanceName: "grammar", ValidationClient: client, Settings: config.Stage{Validation: cfg.Validation}}}, Evidence: &runner.EvidenceSelection{Reports: true, Debug: true},
Plan: &preflight.Plan{Sections: []chunking.Section{{Index: 0, StartSegmentID: 1, EndSegmentID: 1, Segments: []schema.Segment{{ID: 1, Text: "hello"}}}}, Transcript: &schema.Transcript{Segments: []schema.Segment{{ID: 1, Text: "hello"}}},
Specs: []contracts.ModuleRunSpec{{ModuleKey: "grammar", InstanceName: "grammar", ValidationClient: client, Settings: config.Stage{Validation: cfg.Validation}}}}, Evidence: &runner.EvidenceSelection{Reports: true, Debug: true},
})
if !errors.Is(err, origin) || client.calls != 3 {
t.Fatalf("fatal cause/calls: %v %d", err, client.calls)