Skip to content

👀🤏 Doctor tool PR review#121

Merged
andycreed0x merged 2 commits into
developfrom
doctor-tool-pr-review
Jul 17, 2026
Merged

👀🤏 Doctor tool PR review#121
andycreed0x merged 2 commits into
developfrom
doctor-tool-pr-review

Conversation

@coelhogonzalo

@coelhogonzalo coelhogonzalo commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

PR review fixes for aqua doctor

Feel free to edit this PR, no issue is big enough to block the original PR being merged.

Addresses findings from the review of the doctor tool. Two focused commits:

9509fcb — Fix run_tool: keep output rendering inside the error handler

Adding a return value moved click.echo(render(...)) after the try/except, so a failure while rendering or echoing a successful result (e.g. BrokenPipeError from aqua ... | head, or a TypeError from a non-serializable result under --format json) escaped as an uncaught traceback with the wrong exit code instead of the formatted render_error + exit 1 that every CLI command relied on. Move the echo and return back inside the try and add a regression guard.

4cc0926 — doctor: surface orphan values and align default lookup with runtime

Two safety touch-ups from PR review:

  • _is_prunable_default now uses .get(name, True), matching features.is_tool_enabled exactly, so doctor's notion of "matches the default" can't drift from the value the runtime applies for an absent key. Documents that pruning default-matching entries is sound only while an existing tool's shipped default never changes.
  • Orphan-tool findings now include the value ('foo'=False ...) so --fix never silently drops a deliberate disable — relevant under version skew, where a tool a newer binary added and the user disabled looks like an orphan to an older binary and would fall back to its default once re-recognized.

Adding a return value moved `click.echo(render(...))` after the
try/except, so a failure while rendering or echoing a successful result
(e.g. BrokenPipeError from `aqua ... | head`, or a TypeError from a
non-serializable result under --format json) escaped as an uncaught
traceback with the wrong exit code instead of the formatted
render_error + exit 1 that every CLI command relied on. Move the echo
and return back inside the try and add a regression guard.
Two safety touch-ups from PR review:

- `_is_prunable_default` now uses `.get(name, True)`, matching
  `features.is_tool_enabled` exactly, so doctor's notion of "matches the
  default" can't drift from the value the runtime applies for an absent
  key. Documents that pruning default-matching entries is sound only
  while an existing tool's shipped default never changes.
- Orphan-tool findings now include the value (`'foo'=False ...`) so
  `--fix` never *silently* drops a deliberate disable — relevant under
  version skew, where a tool a newer binary added and the user disabled
  looks like an orphan to an older binary and would fall back to its
  default once re-recognized.
@coelhogonzalo coelhogonzalo changed the title Doctor tool pr review 👀 Doctor tool PR review Jul 15, 2026
@coelhogonzalo coelhogonzalo changed the title 👀 Doctor tool PR review 👀:hand_pinching:Doctor tool PR review Jul 15, 2026
@coelhogonzalo coelhogonzalo changed the title 👀:hand_pinching:Doctor tool PR review 👀🤏 Doctor tool PR review Jul 15, 2026
@coelhogonzalo
coelhogonzalo marked this pull request as ready for review July 15, 2026 18:11
Base automatically changed from doctor-tool to develop July 16, 2026 03:00

@andycreed0x andycreed0x 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.

good job. Thanks Gon

@andycreed0x
andycreed0x merged commit 0cf8ab4 into develop Jul 17, 2026
3 checks passed
@andycreed0x
andycreed0x deleted the doctor-tool-pr-review branch July 17, 2026 19:59
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