Migrate facade tests to the new configuration contracts

This commit is contained in:
2026-11-21 14:36:07 +00:00
parent cf03bca753
commit bab3422e62
47 changed files with 183 additions and 155 deletions

View File

@@ -85,7 +85,7 @@ func TestInlineSchemaOwnershipAcrossPublicSnapshots(t *testing.T) {
endpoint, model := "https://example.invalid/v1", "model"
profiles := promptkit.ProfileSource("profile", []promptkit.ProfileConfig{{ID: "profile", Endpoint: &endpoint, Model: &model}})
client := &schemaOwnershipClient{}
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Underlays: []configkit.Underlay{{Inputs: []configkit.Input{{Source: profiles}, {Source: source}}}}}}, promptkit.WithLLMClient(client))
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Underlays: []configkit.Underlay{{Inputs: []configkit.Input{{Destination: configkit.Keys("promptkit"), Source: profiles}, {Destination: configkit.Keys("promptkit"), Source: source}}}}}}, promptkit.WithLLMClient(client))
if err != nil {
t.Fatal(err)
}
@@ -126,7 +126,7 @@ func TestInlineSchemaOwnershipAcrossPublicSnapshots(t *testing.T) {
t.Fatalf("inspection = %+v, %v", again, err)
}
runtimeSchema := map[string]any{"title": "captured", "type": "object"}
runtimeRequest := promptkit.RunRequest{PromptID: "p", ProfileID: "profile", Validation: &promptkit.OutputContract{Format: promptkit.FormatJSON, ValidationMode: promptkit.ValidationJSONSchema, Schema: runtimeSchema}}
runtimeRequest := promptkit.RunRequest{PromptID: "p", ProfileID: "profile", Validation: &promptkit.OutputContractInput{Format: promptkit.FormatJSON, ValidationMode: promptkit.ValidationJSONSchema, Schema: runtimeSchema}}
runtimeHandle, err := engine.PrepareExecution(context.Background(), runtimeRequest)
if err != nil {
t.Fatal(err)