fix: address PR 68 review findings (doctor UX)
Merged
TO
3mo ago+689+689+012345678901234567890123456789-343-343-012345678901234567890123456789
Summary
Doctor UX follow-up on top of refactor/ux-improvements: repair by default, --scan report-only, no doctor --fix/--yes, soft-fail PreMutation Doctor snapshots, off-PATH via setup nu use without --yes.
Review finding triage (ceb00f1)
Fixed:
doctor.rs:check_active_version_markerErr hint useshints::CMD_DOCTOR_FIXinit.rs: mutation lock before NuPaths/Lockfile reload; validate from post-lock stateinit.rstests: PreMutation reason assert, concurrent lock contention, snapshot failure does not write pathsbootstrap.rs: sharedsnapshot_before_nu_setuphelper for both PreMutation call sitesdocs/numan-doctor.md: default mode applies confirm-tier without TTY/not_confirmedgate (nestedsetup nu useconsent unchanged;--scanunchanged)
Skipped (already fixed):
- Merged Markdown table rows in
docs/numan-doctor.md(active_version / activate+registry sync)
Skipped (out of minimal scope):
- Capturing/restoring full
paths.jsonas a snapshot sidecar on Init/rollback: would expand snapshot schema + rollback commits beyond documented snapshot scope (docs/snapshots-and-rollback.md); Nu identity hash/version is already recorded when available
Test plan
-
cargo fmt/cargo clippy -- -D warnings -
cargo test --lib 'cmd::init::' -
cargo test --lib 'cmd::doctor::tests::doctor' -
cargo test --test doctor_test --test init_test -
cargo test --lib 'nu::bootstrap'

