Verify schema projection and snapshot ownership
This commit is contained in:
@@ -44,6 +44,11 @@ func TestRuntimeSchemaReplacementUsesPromptScope(t *testing.T) {
|
||||
if got := client.requests[0].StructuredOutput.JSONSchema.Schema; got != true {
|
||||
t.Fatalf("inline submitted schema = %#v", got)
|
||||
}
|
||||
base.Validation.Schema = false
|
||||
result, err = engine.Run(context.Background(), base)
|
||||
if err != nil || result.Validation.Status != promptkit.ValidationFailed || client.requests[1].StructuredOutput.JSONSchema.Schema != false {
|
||||
t.Fatalf("false schema = %+v, %v", result, err)
|
||||
}
|
||||
base.Validation = &promptkit.OutputContract{Format: promptkit.FormatJSON, ValidationMode: promptkit.ValidationJSONSchema, SchemaPath: "schema.json"}
|
||||
if err := engine.ValidateRequest(context.Background(), base); err != nil {
|
||||
t.Fatalf("runtime path validation = %v", err)
|
||||
|
||||
Reference in New Issue
Block a user