Add autter doctor end-to-end setup validation command - #51
Merged
Conversation
`autter debug` is a full support dump: it always exits 0 and buries failures in ~200 lines of report, so users have no one-command way to answer "is autter actually working right now?". `autter doctor` closes that gap with a focused pass/warn/fail report built on the existing diagnostics primitives: - Setup: git binary/version, config-file parse (surfacing the silently ignored malformed ~/.autter/config.json), repository allow/exclude eligibility - Background service: daemon readiness + real trace2 ingestion probe - Git capture: trace2 global config for both configured and terminal git, plus the trace2 file self-check - End-to-end checkpoint: a real checkpoint event through checkpoint -> daemon -> working log -> commit -> attribution (skipped with a pointer when the service check already failed) - AI agent hooks: per-agent install/up-to-date status via the install-hooks installers, including the VS Code >= 1.109.3 native hooks chain (refactored out of debug.rs for reuse) - Account & sync: auth state (expired sessions fail loudly since sync silently no-ops) and an API reachability probe when authenticated Every failure prints a concrete `fix:` line. Exits 0 when nothing failed (warnings allowed), 1 otherwise; `--json` emits a stable machine-readable report for CI/scripts. Error paths that previously suggested `autter debug` now point at `autter doctor`; debug remains unchanged as the deep support dump. Generated-By: PostHog Desktop Task-Id: c84ac9ce-31cc-4e70-8451-62857be00f1c
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.
What
New
autter doctorcommand: one-command setup validation that answers "is autter actually capturing and attributing right now?" — including validating a real checkpoint event end-to-end (checkpoint → daemon → working log → commit → attribution).Requested by Alan and Kanka (and implicitly Mayank): a doctor/validation command to identify missing hooks, invalid configuration, and service/connectivity failures. Built as a focused presentation layer over the existing
diagnostics.rs+install-hooksinstaller primitives rather than a new check framework.Checks
human/mock_known_human/mock_aicheckpoints in a scratch repo, committed, attribution verified via blame — skipped with a pointer when the service check already failedinstall-hooksinstallers; VS Code ≥ 1.109.3 native-hooks chain (hook file +chat.useHooks+chat.hookFilesLocations) refactored out ofdebug.rsfor reuse; undetected agents collapse to one lineUX / contract
✓ / ⚠ / ✗ / -line per check; every failure gets a concretefix:line (failure details + command logs stay available inautter debug).0when no check fails (warnings allowed),1otherwise — unlikeautter debug, which stays a full always-exit-0 support dump.--json: stable single-line machine-readable report (checks[],summary,ok) for CI/scripts.--skip-trace2-checksmirrors the debug flag (the file self-check briefly rewrites global git config).suggest_autter_debug) now point users atautter doctor; shared remediation strings updated likewise.Why the config-file check matters
The runtime load path silently falls back to defaults when
~/.autter/config.jsonis malformed — a typo disables every setting with zero signal. Doctor is now the place that failure mode becomes visible (it reuses the error-propagatingload_file_config_public()path).Tests
tests/integration/doctor.rs): full end-to-end pass — the test writes the trace2 global configautter installwould write (pointed at the per-test daemon socket) and asserts the checkpoint round-trip check passes, plus JSON/summary/exit-code consistency, unknown-flag rejection, and--skip-trace2-checks. Connectivity is assertedskippedso tests never touch the network.Manually smoke-tested in a fully isolated env (HOME/gitconfig/daemon dir): misconfigured trace2 renders the expected failures + fixes; correctly configured env passes the full round-trip;
--jsonand--helpverified.Created with PostHog Desktop