Exercise production CLI contracts through native loaders and providers

This commit is contained in:
2026-11-22 05:01:09 +00:00
parent 572b267c5d
commit 5e68b74469
7 changed files with 343 additions and 578 deletions

View File

@@ -44,7 +44,7 @@ func TestProductionNPCOccurrencePipelineResolvesAndPrepares(t *testing.T) {
t.Fatalf("generated bindings = %#v", bindings)
}
}
if _, err := pipeline.Prepare(resolved, components.registries, pipeline.ModuleDependencies{LLM: &productionFakeLLMClient{}}); err != nil {
if _, err := pipeline.Prepare(resolved, components.registries, pipeline.ModuleDependencies{Engine: productionNativeEngine(t, &productionFakeLLMClient{})}); err != nil {
t.Fatalf("Prepare() error = %v", err)
}
@@ -120,7 +120,7 @@ func TestProductionNPCOccurrenceReferencesRejectIncompatibleExternalRegistries(t
if err != nil {
t.Fatalf("MaterializeReferences() error = %v", err)
}
if _, err := pipeline.Prepare(materialized, components.registries, pipeline.ModuleDependencies{LLM: &productionFakeLLMClient{}}); err == nil || !strings.Contains(err.Error(), test.want) {
if _, err := pipeline.Prepare(materialized, components.registries, pipeline.ModuleDependencies{Engine: productionNativeEngine(t, &productionFakeLLMClient{})}); err == nil || !strings.Contains(err.Error(), test.want) {
t.Fatalf("Prepare() error = %v, want %q", err, test.want)
}
})
@@ -175,7 +175,7 @@ func TestProductionOccurrencePipelinesAcceptCompatibleExternalRegistries(t *test
if err != nil || len(warnings) != 0 {
t.Fatalf("MaterializeReferences() error = %v warnings = %#v", err, warnings)
}
if _, err := pipeline.Prepare(materialized, components.registries, pipeline.ModuleDependencies{LLM: &productionFakeLLMClient{}}); err != nil {
if _, err := pipeline.Prepare(materialized, components.registries, pipeline.ModuleDependencies{Engine: productionNativeEngine(t, &productionFakeLLMClient{})}); err != nil {
t.Fatalf("Prepare() error = %v", err)
}
})