Skip to content

feat(cast/explain): candidateScoreNonWinnerQMHMRatio (77777777)#748

Merged
chitcommit merged 1 commit into
mainfrom
auto/77777777-cast-explain-non-winner-qm-hm-ratio
Jun 16, 2026
Merged

feat(cast/explain): candidateScoreNonWinnerQMHMRatio (77777777)#748
chitcommit merged 1 commit into
mainfrom
auto/77777777-cast-explain-non-winner-qm-hm-ratio

Conversation

@chitcommit

Copy link
Copy Markdown
Contributor

Summary

  • Adds candidateScoreNonWinnerQMHMRatio to buildCastExplanation(): ratio of non-winner quadratic mean to harmonic mean (QM/HM)
  • Present when >= 3 candidates and all non-winner scores > 0
  • Always >= 1; spans the full Power Mean chain HM <= GM <= AM <= QM
  • Product decomposition: QM/HM === (QM/AM) * (AM/HM) — factors through the intermediate ratios
  • For n=3: sqrt((r^2+t^2)/2) * (r+t) / (2*r*t)
  • Broadest single-ratio measure of non-winner Power Mean spread

Test plan

  • 77777777-1: present when >= 3 candidates and all non-winner scores > 0
  • 77777777-2: always finite and >= 1
  • 77777777-3: identity — ratio * HM === QM
  • 77777777-4: for n=3 equals sqrt((r^2+t^2)/2) * (r+t) / (2rt)
  • 77777777-5: absent on cast:no_match
  • 77777777-6: absent when fewer than 3 candidates
  • 77777777-7: product decomposition — QM/HM === QMToAMRatio * AMHMRatio
  • 77777777-8: tool description documents candidateScoreNonWinnerQMHMRatio

https://claude.ai/code/session_01VKBFeSfC62NKttk4spVHsB


Generated by Claude Code

Add candidateScoreNonWinnerQMHMRatio: ratio of non-winner quadratic mean to harmonic
mean (QM/HM). Always >= 1; spans the full HM-to-QM Power Mean range. Product
decomposition: QM/HM === (QM/AM) * (AM/HM). For n=3: sqrt((r^2+t^2)/2)*(r+t)/(2rt).
Provides the broadest single-ratio measure of non-winner Power Mean spread. 8 tests:
presence, bounds, identity (ratio*HM=QM), n=3 formula, no_match absence, sub-threshold
absence, product decomposition identity, and tool-description documentation.

https://claude.ai/code/session_01VKBFeSfC62NKttk4spVHsB
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@chitcommit, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 2 minutes and 42 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 957c99b2-fb0d-41a8-bc1b-49580f705f25

📥 Commits

Reviewing files that changed from the base of the PR and between 43b8832 and 7463647.

📒 Files selected for processing (2)
  • src/aggregator.ts
  • test/77777777-cast-explain-non-winner-qm-hm-ratio.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch auto/77777777-cast-explain-non-winner-qm-hm-ratio

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chitcommit chitcommit merged commit e65e73a into main Jun 16, 2026
4 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.

2 participants