fix: newcomer-UX papercuts — clean-machine doctor, pathful errors, --version (#161)#164
Merged
Conversation
…version (#161) Three first-run friction points found during fresh-install verification: 1. `sigil doctor` on a clean personal machine no longer exits 1. Target paths for uninstalled tools are now reported as [INFO] ("tool not installed — simply not watched") instead of [WARN], and a state.db that doesn't exist yet (the daemon creates it on the first `sigil run`) is [INFO] rather than the degradation WARN. Neither gates the exit code, so a healthy fresh install reports "All checks passed." A *present-but-unopenable* state.db still warns. 2. `sigil run` startup IO failures now name the path and operation via anyhow context (state.db dir creation, HashCache::open, JsonlSink::open) instead of a bare "Permission denied (os error 13)". 3. `sigil-hook --version`/`-V` (clap version attr) and `sigil-mcp --version`/ `-V` (handled before server start) now print the version and exit 0. Tests: doctor_absent_state_db_is_info_not_warn; version_flag integration tests for both binaries. Hardware-verified on macOS: clean-env doctor exits 0, all four --version invocations print "<bin> 0.5.1". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Closes #161.
Three first-run friction points found during fresh-install verification of the newcomer path.
1.
sigil doctoron a clean personal machine no longer exits 1[INFO] … tool not installed — simply not watched(was[WARN]), with an absent-count summary line. Does not gate the exit code.state.dbthat doesn't exist yet (the daemon creates it on the firstsigil run) →[INFO] state.db not yet present (created on first 'sigil run')instead of the degradation[WARN].2. Pathful startup errors
sigil runstartup IO failures now name the path + operation viaanyhowcontext (state.db dir creation,HashCache::open,JsonlSink::open) instead of a barePermission denied (os error 13).3.
--versionsupportsigil-hook --version/-Vvia clapversionattr.sigil-mcp --version/-Vhandled before server start (a bare invocation otherwise launches the MCP server).Tests
doctor_absent_state_db_is_info_not_warn(integration, uses--state-dbat a nonexistent path).version_flagintegration tests for bothsigil-hookandsigil-mcp(long + short flag).Hardware verification (macOS)
sigil doctor(isolatedHOME/XDG_*): exits 0, "All checks passed."--versioninvocations print<bin> 0.5.1.Gates:
cargo fmt --all,cargo clippy --all-targets --all-features -D warnings,cargo test(sigil-agent/-hook/-mcp) — all green.🤖 Generated with Claude Code