Skip to content

feat(doctor): add policy health and Claude Code version checks#367

Open
eliothedeman wants to merge 1 commit intomainfrom
feat/doctor-policy-health-checks
Open

feat(doctor): add policy health and Claude Code version checks#367
eliothedeman wants to merge 1 commit intomainfrom
feat/doctor-policy-health-checks

Conversation

@eliothedeman
Copy link
Copy Markdown
Collaborator

Summary

  • Policy health check: loads the compiled policy tree and reports how many rules are configured. Warns if no rules exist.
  • Default effect check: warns when the default effect is allow (permissive), guiding users toward deny or ask.
  • Claude Code check: verifies the claude CLI is installed on PATH and reports its version.

All three checks are non-fatal (Pass/Warn only) and include unit tests following existing patterns.

Test plan

  • cargo test -p clash — 492 tests pass
  • cargo clippy -p clash — no warnings
  • Run clash doctor manually to verify new checks appear in output

Add three new diagnostic checks to `clash doctor`:

- Policy health: verifies compiled rules exist and reports the count
- Default effect: warns when default effect is 'allow' (permissive)
- Claude Code: checks if `claude` CLI is installed and reports version
@eliothedeman eliothedeman added this pull request to the merge queue Mar 23, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant