Complete the core operation execution cutover

This commit is contained in:
2026-11-25 16:17:59 +00:00
parent b6a3638d70
commit 7d96c69a32
73 changed files with 891 additions and 1065 deletions

View File

@@ -173,7 +173,7 @@ func TestTypedCacheDecodeUsesCodecAndCurrentSourceWithoutSemanticAssessment(t *t
var warnings []contracts.ProducerDiagnostic
cache := artifactProducerCache(RunInput{Cache: store}, typed, contracts.ExecutionClassLLMBacked,
contracts.DiagnosticOrigin{Stage: contracts.DiagnosticOriginStageExtract, ModuleKey: "native"}, doc, nil, &warnings)
specialized := specializeProducerOperation[codecNotes](contracts.ProducerOperation[any]{Cache: cache}).Cache
specialized := specializeExecutionContext[codecNotes](ExecutionContext[any]{Cache: cache}).Cache
for _, test := range []struct {
name string
content []byte
@@ -191,7 +191,7 @@ func TestTypedCacheDecodeUsesCodecAndCurrentSourceWithoutSemanticAssessment(t *t
})
}
// A codec mismatch stays a typed error at the registry boundary.
wrong := specializeProducerOperation[codecScore](contracts.ProducerOperation[any]{Cache: cache}).Cache
wrong := specializeExecutionContext[codecScore](ExecutionContext[any]{Cache: cache}).Cache
if _, err := wrong.Decode([]byte(`{"items":[]}`)); err == nil {
t.Fatal("cache decode crossed an incompatible Go type")
}
@@ -215,7 +215,7 @@ func TestProducerCacheCancellationDuringHitCannotDeliverAcceptance(t *testing.T)
}
return nil
}
_, outcome, err := RunProducer(ctx, engine, operation, nativeProducerInitial(), interpretProducerNumber, nil, nil)
_, outcome, err := runNativeOperation(ctx, engine, operation, contracts.NativeOperation[int]{Initial: nativeProducerInitial(), Interpret: interpretNumberEvaluation, Correction: nil, Fallback: nil})
if !errors.Is(err, context.Canceled) || outcome.Disposition != "" {
t.Fatalf("canceled hit delivered acceptance: %#v %v", outcome, err)
}