Route spell extraction through core preparation with remaining extractors pending

This commit is contained in:
2026-11-25 15:24:50 +00:00
parent bab7b2305f
commit ccecf13a4c
24 changed files with 306 additions and 148 deletions

View File

@@ -35,7 +35,7 @@ func TestRunnerPassesIndependentAnnotationScopesToExtractors(t *testing.T) {
chunker.plan.Annotations = source.ChunkAnnotations{"same": json.RawMessage(`{"plan":2}`)}
var gotRange, gotPlan string
installExtractOperation(prepared, 0, func(_ context.Context, request contracts.TypedExtractionRequest[any]) (erasedTypedResult, error) {
installExtractOperation(prepared, 0, func(_ context.Context, request contracts.ExtractionInput) (erasedTypedResult, error) {
gotRange = string(request.Chunk.Annotations["same"])
gotPlan = string(request.Chunk.PlanAnnotations["same"])
request.Chunk.Annotations["same"][0] = '['
@@ -73,7 +73,7 @@ func TestRunnerPassesIndependentConcreteMetadataToValidatorsAndExtractors(t *tes
chunk: validator,
}}
var extractorSeen string
installExtractOperation(prepared, 0, func(_ context.Context, request contracts.TypedExtractionRequest[any]) (erasedTypedResult, error) {
installExtractOperation(prepared, 0, func(_ context.Context, request contracts.ExtractionInput) (erasedTypedResult, error) {
nested := request.Chunk.Units[0].Metadata["typed"].(pipelineTypedMetadata)
extractorSeen = string(nested["raw"].(json.RawMessage))
nested["raw"].(json.RawMessage)[0] = '['