Add doctor diagnostics, install tooling, and ADF driver auto-resolution#46
Merged
Merged
Conversation
Replace the proprietary Hyperion binary with a 0-byte placeholder. Add size checks in driver auto-resolution and doctor so ADF mounts gracefully report "driver not found" rather than crashing on load.
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.
Summary
AmiFUSE currently requires users to manually install dependencies, diagnose missing components, and pass
--driverflags for common ADF images. This PR adds a diagnostic/repair command (amifuse doctor) and platform-specific bootstrap scripts that get new users from zero to a working mount in one command. ADF floppy images now auto-resolve their filesystem handler without--driver.What's New
amifuse doctor— standalone diagnostic command (extracted from fuse_fs.py intoamifuse/doctor.py):--jsonflag for CI/scripting — structuredCheckResultoutput per checkamifuse doctor --fix— auto-repairs what it can:Bootstrap scripts:
tools/install-windows.ps1— detects Python/WinFSP via winget (manual URL fallback), creates venv at%LOCALAPPDATA%\amifuse\venv, installs machine68k-amifuse fork, hands off toamifuse doctor --fixtools/install.sh— brew/apt/dnf detection, FUSE backend install, same venv strategy at~/.local/share/amifuse/venvpip install -e .instead of PyPIBundled FastFileSystem handler — ADF floppy images don't embed a filesystem driver (unlike HDF hard disk images). The Commodore FastFileSystem handler (~28KB, freely distributable) is bundled in
amifuse/drivers/and handles all standard ADF DOS types (DOS0–DOS7: OFS, FFS, and their international/dir-cache variants). This eliminates the need for users to source and specify--drivermanually when mounting floppies. The.gitignoreis updated to scope handler exclusion patterns to the repo root (wheremake downloadplaces them) so the bundled copy is tracked.README — new "Quick install (recommended)" section with bootstrap scripts as the primary path, "From source" section for developers, and "Diagnosing Issues" section with doctor examples.
How It Works
Doctor architecture: Each check returns a
CheckResultdataclass carrying status, message, optionalfix_fn(callable), and optionalfix_description(human-readable repair instruction). This separates execution from display — the same results render as color-coded text or JSON depending on the flag.FUSE detection split:
detect_fuse_backend()returns a dict of discovered backends for diagnostic display. The existingcheck_fuse_available()remains the mount-time guard (raises SystemExit). They query the same things but serve different callers.Venv strategy: Bootstrap scripts use the active venv if one is detected, otherwise create a dedicated venv. They never pass
--break-system-packages.WinFSP version check: Uses
GetFileVersionInfoW+VerQueryValueWonwinfsp-x64.dllto enforce >= 2.0.machine68k on Windows: The PyPI
machine68kpackage segfaults; both the bootstrap script and doctor explicitly install/check for themachine68k-amifusefork.Files Changed
amifuse/doctor.pyamifuse/drivers/FastFileSystemtools/install-windows.ps1tools/install.shtests/unit/test_doctor.pyamifuse/fuse_fs.py__version__amifuse/platform.pydetect_fuse_backend(), driver resolution functionspyproject.tomlpackage-datafor bundledamifuse/drivers/*README.md.gitignoretests/unit/test_cli_help.pytests/unit/test_fuse_fs.pyTest Plan
Automated (all passing):
test_doctor.py— all check types, --fix mode, JSON output serialization, edge cases (missing deps, partial installs, segfaulting machine68k)test_cli_help.pyupdated with doctor subcommand and JSON schema assertionstest_fuse_fs.pyupdated for doctor delegation and ADF auto-resolutionManual validation performed:
install-windows.ps1-> all doctor checks greendoctor --fixregistered shell extensionsdoctor --jsonoutput validated with Pythonjson.loads()--driverflag using bundled FastFileSystem handler