Capture schema roots from configuration sources

This commit is contained in:
2026-11-20 15:25:00 +00:00
parent fbe3d427a2
commit 596e985cff
11 changed files with 204 additions and 100 deletions

View File

@@ -36,9 +36,8 @@ func TestPreparedExecutionFreezesSourcesAndReturnsIndependentDetails(t *testing.
t.Fatal(err)
}
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Underlays: []configkit.Underlay{
{Inputs: profileInputs}, {Inputs: promptInputs},
{Inputs: profileInputs}, {Inputs: promptInputs}, {Inputs: []configkit.Input{schemaRootInput(schemaSource, ".")}},
}}},
promptkit.WithSchemaFS(schemaSource, "."),
promptkit.WithArtifactReader(reader),
promptkit.WithLLMClient(client),
)
@@ -351,8 +350,9 @@ func TestPreparedExecutionRepairsEmptyBasicOutput(t *testing.T) {
func TestPreparedExecutionIsolatesMutatingClientAcrossRepair(t *testing.T) {
client := &mutatingRepairClient{}
engine, err := promptkit.NewEngine(preparedContractConfig("original message", false),
promptkit.WithSchemaFS(preparedSchemaSource(), "."), promptkit.WithLLMClient(client))
config := preparedContractConfig("original message", false)
config.Sources.Underlays = append(config.Sources.Underlays, configkit.Underlay{Inputs: []configkit.Input{schemaRootInput(preparedSchemaSource(), ".")}})
engine, err := promptkit.NewEngine(config, promptkit.WithLLMClient(client))
if err != nil {
t.Fatal(err)
}