Skip to content

Reject non-finite opinion and evidence coordinates - #2

Merged
ctoth merged 1 commit into
masterfrom
agent/reject-non-finite-coordinates
Aug 6, 2026
Merged

Reject non-finite opinion and evidence coordinates#2
ctoth merged 1 commit into
masterfrom
agent/reject-non-finite-coordinates

Conversation

@ctoth

@ctoth ctoth commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • reject NaN and infinite coordinates when constructing Opinion
  • reject NaN and infinite coordinates when constructing BetaEvidence
  • validate finiteness before range, normalization, and dogmatic checks

Root cause

Python comparisons against NaN are false, so the existing range and normalization checks admitted invalid semantic objects. Positive infinity could also enter BetaEvidence because it satisfied the non-negative evidence check.

Verification

  • uv run pytest tests/test_opinion.py::TestFiniteCoordinates -q (21 passed)
  • uv run pytest (297 passed)
  • uv run pyright (0 errors, 0 warnings, 0 informations)

Closes #1

@ctoth
ctoth marked this pull request as ready for review August 6, 2026 03:52
@ctoth
ctoth merged commit aa137b0 into master Aug 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject non-finite opinion and evidence coordinates

1 participant