Skip to content

test: Hypothesis property tests + ty in CI (restore #31)#32

Merged
davanstrien merged 2 commits into
mainfrom
test/property-tests-and-ty-restore
Jul 7, 2026
Merged

test: Hypothesis property tests + ty in CI (restore #31)#32
davanstrien merged 2 commits into
mainfrom
test/property-tests-and-ty-restore

Conversation

@davanstrien

Copy link
Copy Markdown
Owner

Re-lands #31 unchanged. It was approved and merged, but into its stacked base branch (fix/jury-even-split-tie) rather than main — GitHub only retargets a stacked PR to main if the base branch is deleted when its PR merges, and it wasn't, so the content never reached main. Same commit, cherry-picked onto current main; 283 tests pass, ruff + ty clean, and this PR's CI will exercise the new ty step for real.

See #31 for the full description and review.

🤖 Generated with Claude Code

Property-based tests for the pure functions that consume LLM judge
output — the code whose real inputs are adversarial by nature:

- parse_judge_output never raises on arbitrary text or arbitrary JSON
  (found a real crash: a truncated response consisting of a bare
  markdown fence raised IndexError; fixed here with regression
  examples)
- _unswap_winner is an involution; ties are swap-invariant
- aggregate_jury_votes: output shape, verdict validity, judge-order
  invariance, unanimity
- compute_elo: covers all models, wins/losses balance, swap+winner
  double-flip leaves tallies unchanged

Also finishes the half-done ty adoption: the three suppression
comments in backends.py used mypy syntax (type: ignore[...]) which ty
does not honor for its rule names — switched to ty: ignore[...] — and
CI now runs 'uv run ty check src/' (ty was already a pinned dev dep).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@davanstrien davanstrien force-pushed the test/property-tests-and-ty-restore branch from aa74e95 to 09de139 Compare July 7, 2026 20:43
Newer huggingface_hub types the hardware param as SpaceHardware; the
bare string fails ty. Runtime-equivalent (str enum).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@davanstrien davanstrien merged commit 86e2b67 into main Jul 7, 2026
1 check passed
@davanstrien davanstrien deleted the test/property-tests-and-ty-restore branch July 7, 2026 20:50
@davanstrien davanstrien mentioned this pull request Jul 7, 2026
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.

1 participant