Enforce bounded output repair contracts

This commit is contained in:
2026-08-25 09:41:15 +00:00
parent e827631d8c
commit f9e8afa2c3
9 changed files with 149 additions and 25 deletions

View File

@@ -892,6 +892,38 @@ output:
format: text
validation_mode: none
repair_attempts: -1
`,
wantErr: true,
wantDiagnostic: "repair_attempts",
},
{
name: "repair attempts above maximum",
definition: `
id: normalization-rule
version: "1"
messages:
- role: user
content: test
output:
format: text
validation_mode: basic
repair_attempts: 4
`,
wantErr: true,
wantDiagnostic: "repair_attempts",
},
{
name: "none validation with repair attempts",
definition: `
id: normalization-rule
version: "1"
messages:
- role: user
content: test
output:
format: text
validation_mode: none
repair_attempts: 1
`,
wantErr: true,
wantDiagnostic: "repair_attempts",