Skip to content

test(doctor,resources): cover httpProbe + the nodeLarger memory tie-break - #253

Merged
saadqbal merged 1 commit into
developfrom
test/doctor-resources-helpers
Jul 14, 2026
Merged

test(doctor,resources): cover httpProbe + the nodeLarger memory tie-break#253
saadqbal merged 1 commit into
developfrom
test/doctor-resources-helpers

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Coverage-audit "free batch", no production changes.

  • doctor.httpProbe (P0, was 0%): the real proxy-aware connectivity prober the CLI ships — tests inject Options.HTTPProbe, so the prober itself was never exercised. Reachable (any status) → nil; closed host → error; unbuildable URL → error.
  • resources.nodeLarger (P1, was 67%): the equal-CPU memory tie-break no test exercised, so LargestReadyNode determinism on equal-CPU nodes was unverified.

make ci green.

🤖 Generated with Claude Code


Note

Low Risk
Tests only; production paths are unchanged.

Overview
Adds test-only coverage for two previously under-tested helpers; no production code changes.

doctor.httpProbe: New tests call the real default connectivity prober (not injected Options.HTTPProbe mocks). They assert any HTTP response counts as reachable, a closed host returns an error, and an invalid URL fails at request build.

resources.nodeLarger: New table tests pin the equal-CPU memory tie-break used by LargestReadyNode, including cases where CPU alone would disagree with memory.

Reviewed by Cursor Bugbot for commit 2a8cddc. Bugbot is set up for automated code reviews on this repo. Configure here.

…reak
Coverage-audit "free batch", no production changes:
- doctor.httpProbe (P0, was 0%): the real proxy-aware connectivity prober
the CLI ships — the checks inject Options.HTTPProbe in tests, so it was
never exercised. Reachable (any status) -> nil; closed host -> error;
unbuildable URL -> error.
- resources.nodeLarger (P1, was 67%): the equal-CPU memory tie-break no
test exercised, so LargestReadyNode determinism on equal-CPU nodes was
unverified.
make ci green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2a8cddc. Configure here.

@LukasWodkaLukasWodka self-assigned this Jul 14, 2026

@saadqbalsaadqbal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 httpProbe (any status = reachable, dial/build failures = error) and the equal-CPU→memory tie-break in nodeLarger both match. Nice to have the real prober covered rather than just the injected one.

@saadqbal
saadqbal merged commit 800fc45 into developJul 14, 2026
22 checks passed
@saadqbal
saadqbal deleted the test/doctor-resources-helpers branch July 14, 2026 08:51
Sign up for freeto 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

@LukasWodka@saadqbal