Strengthen validation retries and checkpoint safety
This commit is contained in:
@@ -98,7 +98,7 @@ func rejection(unknown []unknownSpell) contracts.ValidationResult {
|
||||
issues = append(issues, issue)
|
||||
}
|
||||
message := rejectionMessage(issues, len(unknown)-len(issues))
|
||||
return contracts.ValidationResult{Approved: false, ReasonCode: ReasonCode, Message: message}
|
||||
return contracts.ValidationResult{Approved: false, ReasonCode: ReasonCode, Message: message, CorrectionGuidance: "Use recognized D&D spell names supported by the supplied transcript evidence, and omit any candidate that is not a spell cast."}
|
||||
}
|
||||
|
||||
func truncateDisplayedName(name string) string {
|
||||
|
||||
@@ -54,6 +54,9 @@ func TestValidatorRejectsMultipleUnknownCastsInStableOrder(t *testing.T) {
|
||||
if result.Approved || result.ReasonCode != ReasonCode {
|
||||
t.Fatalf("Validate() = %#v, want unknown-spell rejection", result)
|
||||
}
|
||||
if err := contracts.ValidateValidationResult(result); err != nil {
|
||||
t.Fatalf("ValidateValidationResult() error = %v for %#v", err, result)
|
||||
}
|
||||
if want := `spell_casts[0].spell "Unknown First", spell_casts[2].spell "Unknown Second"`; !strings.Contains(result.Message, want) {
|
||||
t.Fatalf("message = %q, want %q", result.Message, want)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user