feat(doctor): add health check command for config and tooling - #92
Merged
Conversation
extctl.yaml grew several knobs and external-tool dependencies (git, gh, claude, docker, pnpm, ffmpeg) with no upfront validation — misconfiguration only surfaced deep inside gen/poll/approve-stages, and unknown config keys (like the dangling top-level `scaffold:` block) were silently dropped by yaml.v3's non-strict decode with no warning at all. `extctl doctor` reports config validity, unsupported keys (derived via reflection over Config's yaml tags so the check can't drift out of sync), missing required fields/secrets, missing external tooling, and missing referenced paths — all read-only, no network calls, no mutation. Exits non-zero on any error-level finding. Signed-off-by: Lukas Hirt <info@hirt.cz>
LukasHirt
enabled auto-merge (squash)
July 21, 2026 13:27
- doctor/print.go: ignore fmt.Fprint* return values (_, _ = ...), matching the convention already used in internal/stats/print.go, to satisfy the errcheck linter. - stats_test.go: replace hardcoded absolute dates (e.g. "2026-06-20") with a daysAgo(n) helper relative to time.Now(). The hardcoded dates were only ever "within the 30-day window" relative to when the test was written; today crossed that boundary and started failing CI on main independently of this PR. Signed-off-by: Lukas Hirt <info@hirt.cz>
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
extctl doctor— a read-only health check of the local installation: parsesextctl.yamland flags unsupported keys (e.g. the dangling top-levelscaffold:block, derived via reflection overConfig's yaml tags so the check can't drift out of sync), flags required-but-empty fields (jira.base_url,jira.project,target_repo.remote), confirmsEXTCTL_JIRA_EMAIL/EXTCTL_JIRA_TOKENare set, confirmsgit/gh/claude/docker/pnpm(andffmpegif media capture is enabled) are on PATH, confirms referenced prompt/idea-pool/scaffold paths exist, and reports the shape oftarget_repo.checkout.git.EnsureCheckout) — safe to run at any time, including with a missing or brokenextctl.yaml.Test plan
go build ./...go vet ./...go test ./...extctl doctoragainst a realextctl.yaml— confirmed thescaffold:block is flagged as an unsupported key (WARN, exit 0)extctl doctor --config /nonexistent/extctl.yaml— confirmed it reports a clean Config-section error instead of crashing, still runs tool/secret checks, and exits 1🤖 Generated with Claude Code