Align validator identity and span domain checks

This commit is contained in:
2026-09-25 02:48:57 +00:00
parent 31979d4081
commit 640f663ace
19 changed files with 148 additions and 49 deletions

View File

@@ -48,6 +48,13 @@ func TestCorrectionProposalValidate_AllowsEmptyCorrectedText(t *testing.T) {
}
}
func TestCorrectionProposalValidate_AllowsWhitespaceOriginalText(t *testing.T) {
proposal := CorrectionProposal{TargetSegmentID: 42, OriginalText: " ", CorrectedText: " ", Confidence: 0.95}
if err := proposal.Validate(); err != nil {
t.Fatalf("expected whitespace span to be valid, got %v", err)
}
}
func TestCorrectionProposalValidate_InvalidConfidence(t *testing.T) {
proposal := CorrectionProposal{
TargetSegmentID: 42,