Harden diagnostic handling and warning presentation

This commit is contained in:
2026-08-27 18:41:59 +00:00
parent 1025001f20
commit 079d5af337
67 changed files with 518 additions and 318 deletions

View File

@@ -86,7 +86,7 @@ func TestValidatorDefersMalformedShape(t *testing.T) {
value := dnd.CombatTurnList{CombatTurns: []dnd.CombatTurn{{Actor: "Aria"}}}
result, err := New(Options{}).Validate(context.Background(), contracts.TypedValidationRequest[dnd.CombatTurnList]{Source: validDocument(), Value: value})
if err != nil || !result.Approved {
t.Fatalf("shape deferral = %#v, %v; want approval without source warning", result, err)
t.Fatalf("shape deferral = %#v, %v; want approval without diagnostics", result, err)
}
}