Harden model results with lossless isolated repair and scoped permissions
This commit is contained in:
@@ -52,6 +52,11 @@ func TestStableNativeSessionContractLive(t *testing.T) {
|
||||
if len(session.Permission) != 3 || session.Permission[2]["permission"] != "bash" {
|
||||
t.Fatal("scoped native permission contract not retained", string(data))
|
||||
}
|
||||
// Validate the real native JSON-schema request without provider inference.
|
||||
_, err = c.Native(ctx, "post", "/session/"+result.Data.ID+"/message", map[string]any{"noReply": true, "format": map[string]any{"type": "json_schema", "retryCount": 0, "schema": map[string]any{"type": "object", "required": []string{"outcome", "output"}, "additionalProperties": false, "properties": map[string]any{"outcome": map[string]any{"type": "string", "enum": []string{"success", "error"}}, "output": map[string]any{"type": "object"}}}}, "parts": []map[string]string{{"type": "text", "text": "No inference; validate structured format."}}})
|
||||
if err != nil {
|
||||
t.Fatal("native schema request rejected", err)
|
||||
}
|
||||
ref, err := c.Reference()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user