Skip to content

Give unknown doctor results a distinct exit code - #160

Merged
myobie merged 1 commit into
mainfrom
fix/doctor-unknown-exit
Sep 5, 2026
Merged

Give unknown doctor results a distinct exit code#160
myobie merged 1 commit into
mainfrom
fix/doctor-unknown-exit

Conversation

@myobie

@myobie myobie commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • return 0 only when every doctor finding is verified healthy
  • return 1 when a problem or setup remains
  • return 3 when the run has only unknown findings
  • document all codes and reserve Clap code 2 for usage errors

Red proof

The new integration test failed before the implementation because an unknown finding returned 1. The help test also failed because doctor documented only codes 0 and 1.

Verification

  • cargo test --lib: 471 passed, 4 ignored
  • cargo test --bin fabric: 19 passed
  • cargo test --test doctor: 2 passed
  • git diff --check

The repository-wide format check has existing drift outside this patch. The new integration test passes its individual rustfmt check.

No release or deployment is part of this change.

@myobie
myobie force-pushed the fix/doctor-unknown-exit branch from bdb32b3 to 5fa84a5 Compare September 4, 2026 23:54
@myobie
myobie merged commit 68c3afc into main Sep 5, 2026
3 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.

1 participant