Skip to content

Order doctor's diagnostic references deterministically - #870

Merged
lewisjared merged 2 commits into
mainfrom
fix/doctor-report-ordering
Aug 13, 2026
Merged

Order doctor's diagnostic references deterministically#870
lewisjared merged 2 commits into
mainfrom
fix/doctor-report-ordering

Conversation

@lewisjared

Copy link
Copy Markdown
Contributor

Follow-up to #865.

ref doctor produced a different report on each run. Several diagnostics share a name (the four ozone ones are all "Ozone Diagnostics"), and DiagnosticReference.sort_key was provider plus name only, so the tie broke on set iteration order. Two identical runs gave different missing-reference-data details, which makes a pasted report hard to diff.

  • Adds the slug as the tiebreak, so the order is total.
  • Drops a docstring reference to a --only flag that does not exist.

Found by running the checks against a real deployment and diffing --format json across three runs. Same three runs are now byte-identical.

Several diagnostics can share a name, so sorting on provider and name alone left
the order to settle on set iteration order. Two identical `ref doctor` runs then
produced different reports.

Adds the slug as the tiebreak, and drops a docstring reference to a `--only` flag
that does not exist.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@lewisjared, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d43138bf-f477-4355-ab5e-0ce4414f99d8

📥 Commits

Reviewing files that changed from the base of the PR and between 0fb7b1d and 12986f1.

📒 Files selected for processing (4)
  • changelog/870.fix.md
  • packages/climate-ref-core/src/climate_ref_core/summary.py
  • packages/climate-ref-core/tests/unit/test_summary.py
  • packages/climate-ref/src/climate_ref/doctor/registry.py

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.

@lewisjared
lewisjared merged commit b8b12d2 into main Aug 13, 2026
23 of 24 checks passed
@lewisjared
lewisjared deleted the fix/doctor-report-ordering branch August 13, 2026 12:10
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
core 93.73% <100.00%> (ø)
providers 87.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s/climate-ref-core/src/climate_ref_core/summary.py 98.80% <100.00%> (ø)
...ges/climate-ref/src/climate_ref/doctor/registry.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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