fix(doctor): honor --home and resolve harnesses the way boot does (#216, #217, #265) - #296
Merged
Merged
Conversation
…, #217, #265) #216 — `maxplayer doctor` now parses `--home <dir>` (mirroring `sell`) and threads the resolved home through bootstrap/build_checks; unknown flags are REFUSED rather than silently dropped, so an operator is never handed a confident report about a home they did not ask about. The seller-key check now names the key file of the resolved home instead of a hardcoded `~/.mobee/key`. #217 — doctor's agent check now builds the harness registry exactly the way `SellerNodeRunner::boot` does (`seller_agents::resolve` on the same config) and reports ITS verdict, instead of re-deriving resolution through the PATH-based preset resolver. Because this lives in the shared `build_checks`, `doctor` and `sell_readiness_gate` converge on boot's verdict by construction: a green doctor now means "this seat boots with these harnesses". #265 — the startup auto-doctor's key check does NOT reproduce as a logic bug on dev: it already uses the home-aware `key_file_present(home)` and `sell` resolves the home from `--home`/`MOBEE_HOME`. The only residual was the cosmetic hardcoded message, fixed under #216. Red-proven: dropping the --home threading turns the override test red (resolves the default home instead of the tmp dir); reverting to the preset/PATH agent check turns the boot-convergence test red (doctor FAIL vs boot PASS on an absolute agent_command). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jul 30, 2026
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All three fixes are in one file,
crates/mobee/src/doctor.rs.#216 — doctor silently ignored
--home(and every other flag)doctor::runtook_argsand never read it;run_doctoralways calleddefault_home_dir(), somaxplayer doctor --home <seat>produced a confident PASS/FAIL report about~/.mobeeinstead.runnow parses--home <dir>(mirroring thesell.rs:660pattern) viaparse_doctor_args, and REFUSES any unknown flag rather than silently dropping it (a dropped flag yields an authoritative-looking answer to a question nobody asked — worse than an error).resolve_doctor_home→bootstrap→build_checks.<home>/key present) instead of the hardcoded literal~/.mobee/key present.#217 — doctor vs boot resolved harnesses differently
doctor resolved the
[seller] agentpreset throughagent_presets::resolve_agent_preset(PATH-based), whileSellerNodeRunner::bootcallsseller_agents::resolve→fallback_registry, which takesagent_commandverbatim. A seat could be doctor-red / boot-fine, or the dangerous inverse.seller_agents::resolve(&seller, &presets)— the exact call boot makes — and reports ITS verdict: full resolve ⇒ PASS, partial (still boots, serves the remainder) ⇒ WARN with boot's degrade line,RegistryError⇒ FAIL with boot's refusal reason.build_checks, somaxplayer doctorand thesell_readiness_gateauto-doctor converge on boot's verdict by construction: a green doctor now means "this seat boots with these harnesses".#265 — startup auto-doctor "vacuous pass": did NOT reproduce on dev
Reproduced against dev by reading the path: the auto-doctor key check is
key_file_present(home)(home-aware), andsellresolves its home from--home/MOBEE_HOME(sell.rs:95) before passing it tosell_readiness_gate. So the check reads the seat's configured home, not a hardcoded path — no logic bug. The only residual was the cosmetic hardcoded message string, which is fixed under #216 above.Red-prove evidence (each behavioral fix goes red on revert)
#216 — revert:
resolve_doctor_homeignores its--homeoverride and usesdefault_home_dir():Restored → PASS.
#217 — revert: agent check uses the old
resolve_agent_preset+argv0_resolvable(PATH) path:Restored → PASS.
Tests
Targeted doctor suite (debug): 11 passed, 0 failed (was 6 before this change — count moved, confirming the new tests actually ran, not a feature-gated no-op). Full
maxplayerbin unit suite: 33 passed, 0 failed.New tests added inside
doctor.rs:doctor_parses_home_and_refuses_unknown_flagsdoctor_honors_home_override_and_inspects_that_home(mobee doctor silently ignores every argument (--home dropped; reports on ~/.mobee instead) #216 red-prove)seller_key_check_names_the_resolved_home_not_hardcoded_default(mobee doctor silently ignores every argument (--home dropped; reports on ~/.mobee instead) #216/seller: startup auto-doctor's key check hardcodes ~/.mobee/key — every multi-home seat gets a vacuous pass #265 cosmetic)doctor_agent_check_matches_boot_verdict_on_verbatim_command(doctor and boot resolve harnesses differently: preset-via-PATH vs agent_command verbatim #217 red-prove)doctor_agent_check_fails_when_boot_registry_refuses(doctor and boot resolve harnesses differently: preset-via-PATH vs agent_command verbatim #217 inverse: boot refusal ⇒ doctor FAIL)🤖 Generated with Claude Code