Skip to content

fix(review): permit float citation rates in ReviewProfile verdict_distributions (#640) - #641

Merged
dan-petty merged 1 commit into
release/v0.2.23from
fix/640-reviewprofile-verdict-distributions-float-citation-rates
Sep 27, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
fix/640-reviewprofile-verdict-distributions-float-citation-rates

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Closes #640 by updating ReviewProfile.verdict_distributions and ReviewProfiler annotations to accept dict[str, dict[str, int | float]].

Problem

When compute_verdict_distributions returns citation_rates containing float rates (e.g. 0.61), building ReviewProfile raised:

ValidationError: 1 validation error for ReviewProfile
verdict_distributions.citation_rates.unknown
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=0.61, input_type=float]

Changes

  • Updated ReviewProfile.verdict_distributions annotation in src/devops_cli/ai/review/profile.py from dict[str, dict[str, int]] to dict[str, dict[str, int | float]].
  • Updated ReviewProfiler._verdict_distributions and set_findings method signature.
  • Added regression assertions in tests/test_verdict_polarity.py ensuring serialization and round-trip deserialization of citation_rates.

Invariants & Verification

  • uv run devops ci passed 100% across all quality gates.
  • McCabe complexity <= 10 and nesting depth <= 5 maintained.

@dan-petty
dan-petty merged commit 35435c6 into release/v0.2.23 Sep 27, 2026
8 checks passed
@dan-petty
dan-petty deleted the fix/640-reviewprofile-verdict-distributions-float-citation-rates branch September 27, 2026 13:36
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