Complete source index reuse across extractors

This commit is contained in:
2026-11-26 01:41:33 +00:00
parent 553276c0a0
commit a27c2cd89c
17 changed files with 83 additions and 15 deletions

View File

@@ -24,7 +24,10 @@ func TestExtractMapsEnemyEventsInSourceOrder(t *testing.T) {
{Name: "Ashfang", Kind: "incapacitated", SourceRefs: []enemySourceRefResponse{{StartUnitID: 2, EndUnitID: 2}}},
}}}
result, err := runExtraction(context.Background(), newEnemyExtractor(t, client), enemyExtractionRequest(t))
req := enemyExtractionRequest(t)
index := source.NewDocumentIndex(req.Source)
req.SourceIndex = &index
result, err := runExtraction(context.Background(), newEnemyExtractor(t, client), req)
if err != nil {
t.Fatal(err)
}