Reuse source indexes in registry extraction

This commit is contained in:
2026-11-26 01:36:25 +00:00
parent 6345727601
commit f789e41faf
10 changed files with 25 additions and 8 deletions

View File

@@ -18,7 +18,10 @@ func TestExtractMapsItemsWithOwnedEvidenceAndDeterministicOrder(t *testing.T) {
{Name: " Gold Pieces ", SourceRefs: responseSourceRefs(3, 2)},
{Name: "Star Compass", SourceRefs: []itemSourceRefResponse{{StartUnitID: 2, EndUnitID: 2}, {StartUnitID: 1, EndUnitID: 1}, {StartUnitID: 1, EndUnitID: 1}}},
}}}
result, err := runExtraction(context.Background(), newExtractor(t, client), extractionRequest())
req := extractionRequest()
index := source.NewDocumentIndex(req.Source)
req.SourceIndex = &index
result, err := runExtraction(context.Background(), newExtractor(t, client), req)
if err != nil {
t.Fatalf("Extract() error = %v, want nil", err)
}