You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(core): add PartialValidationResult with tri-state semantics #898
Add PartialValidationResult to mellea/core/requirement.py alongside the existing ValidationResult (line 19). It has a tri-state success field: "pass", "fail", or "unknown".
Why
ValidationResult is binary. During streaming, a requirement may not yet have enough data to decide — it needs a third state to defer judgement until more chunks have arrived or the stream ends. This is the foundation for all streaming validation work.
Follow the existing ValidationResult pattern: private fields with property accessors, not a @dataclass
Add PartialValidationResult to __all__ in mellea/core/__init__.py
Acceptance criteria
PartialValidationResult exists in mellea/core/requirement.py
success accepts "pass", "fail", and "unknown" — rejects other values (enforced via Literal)
reason and score are optional keyword arguments defaulting to None
Exported from mellea.core via __all__ in mellea/core/__init__.py
Unit tests added to test/core/ covering construction and all three states
Class docstring states that "pass" is informational in Phase 1 — the orchestrator always calls validate() at stream end for non-"fail" requirements; mid-stream "pass" does not short-circuit final validation
Google-style docstring on the class
Size
Small — new class plus tests. No existing code changes.
Implementation note: Follow the existing ValidationResult pattern in the same file (private fields, property accessors). The class is small — main thing to get right is that success is enforced via Literal["pass", "fail", "unknown"] at construction time, not just as a type hint. Check how ValidationResult handles its success: bool field for the pattern to follow.
Activity
planetf1 commentedon Apr 24, 2026
Implementation note: Follow the existing
ValidationResultpattern in the same file (private fields, property accessors). The class is small — main thing to get right is thatsuccessis enforced viaLiteral["pass", "fail", "unknown"]at construction time, not just as a type hint. Check howValidationResulthandles itssuccess: boolfield for the pattern to follow.feat(core): add PartialValidationResult with tri-state semantics
feat(core): add PartialValidationResult with tri-state semantics (gen…
feat(core): add PartialValidationResult with tri-state semantics (gen…