Skip to content

Add doctor and config diagnostics commands#123

Merged
robzolkos merged 2 commits intomasterfrom
feature/fizzy-doctor
Apr 7, 2026
Merged

Add doctor and config diagnostics commands#123
robzolkos merged 2 commits intomasterfrom
feature/fizzy-doctor

Conversation

@robzolkos
Copy link
Copy Markdown
Collaborator

@robzolkos robzolkos commented Apr 7, 2026

Summary

This adds a comprehensive diagnostics workflow to fizzy-cli so users can understand the health of their install, configuration, authentication, profile setup, and agent integrations without guessing. The goal is to make setup and troubleshooting much easier, especially now that Fizzy supports multiple profiles, layered config precedence, and agent-specific setup.

What’s included

  • add fizzy doctor for full CLI health diagnostics
  • add fizzy doctor --profile NAME to check one saved profile explicitly
  • add fizzy doctor --all-profiles to sweep every saved profile
  • include checks for:
    • global/local config validity
    • saved profile store health
    • saved profile names
    • effective config resolution
    • credential presence and storage source
    • legacy config/credential usage
    • API URL validity
    • API reachability
    • authentication
    • account access
    • default board access
    • shell completion
    • agent skill install/version
    • agent integration health
  • make optional Claude integration issues warnings instead of hard failures
  • add fizzy config show to display the effective config
  • add fizzy config explain to explain precedence and why each value won
  • improve human-readable rendering for config inspection so values like token source and saved profiles are displayed cleanly
  • surface the new diagnostics commands in quickstart, help, README, and the embedded skill docs
  • regenerate command surface snapshots

Notes

  • doctor is read-only and provides remediation hints / next steps instead of attempting auto-fix
  • config show focuses on the resolved values
  • config explain focuses on precedence and overridden candidates
  • token values are never displayed; only whether they are configured and where they come from

Summary by cubic

Adds fizzy doctor for a full, read‑only health check and new fizzy config tools to show and explain effective configuration. Also fixes precedence and verbose output issues in doctor --all-profiles and config show.

  • New Features

    • fizzy doctor with --profile NAME, --all-profiles, --verbose, --json: runs install/config/profile store/credentials/API URL & reachability/auth/account access/default board/shell completion/agent skill checks; includes filesystem and insecure HTTP warnings; shows remediation hints and next steps; per‑profile results when sweeping; Claude integration issues are warnings.
    • fizzy config show and fizzy config explain: display effective values and why they won (flags/env/profile/local/global); never prints tokens, only whether configured and storage source; lists saved profiles.
    • Improved human‑readable config rendering with styled output; quickstart, help, README, and skill docs updated to surface diagnostics.
    • Command catalog updated to include doctor and config.
  • Bug Fixes

    • doctor --all-profiles now falls back to local/global YAML for api_url and board when the profile store lacks values, matching effective precedence.
    • Token source detection in doctor now accepts YAML tokens without gating on account name, aligning with config.Load().
    • config show --verbose correctly shows saved profiles by using the profiles key so the human renderer finds the list.

Written for commit 12ad2e3. Summary will update on new commits.

Copilot AI review requested due to automatic review settings April 7, 2026 18:10
@github-actions github-actions bot added the enhancement New feature or request label Apr 7, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 12 files

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds comprehensive diagnostics and configuration inspection commands to fizzy-cli:

Summary:
The PR implements three main features: fizzy doctor for complete CLI health diagnostics, fizzy config show to display effective configuration, and fizzy config explain to explain configuration precedence. These commands help users understand setup health, diagnose issues, and troubleshoot configuration problems without guessing.

Changes:

  • Adds fizzy doctor command with comprehensive health checks (CLI version, runtime, config validity, profile store, API connectivity, authentication, board access, shell completion, skill installation, and agent integration)
  • Adds fizzy config show and fizzy config explain commands to inspect configuration precedence and resolved values
  • Exports GlobalConfigPaths() from config package to support diagnostics
  • Improves mock test handler to generically strip account prefixes while preserving "my" and "signup" paths
  • Updates documentation, README, help metadata, and embedded skill docs to surface new commands
  • Regenerates SURFACE.txt command snapshots
  • Includes comprehensive test coverage for both new commands

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/commands/doctor.go Main diagnostics command (~1373 lines) with checks for installation, config, auth, API, board access, shell integration, and agent setup
internal/commands/doctor_test.go Comprehensive tests for doctor command including healthy setup, credential checks, config validation, and profile sweep scenarios
internal/commands/config_cmd.go Config show/explain commands (~543 lines) with precedence resolution and human-readable output
internal/commands/config_cmd_test.go Tests for config show and explain commands with precedence validation
internal/config/config.go Exports GlobalConfigPaths() as public API for doctor diagnostics
internal/commands/test_helpers_test.go Improves mock handler to generically strip account-scoped SDK paths
SURFACE.txt Auto-generated command surface snapshots updated with new commands
skills/fizzy/SKILL.md Embeds references to new diagnostic commands
README.md Adds quickstart steps and troubleshooting section for new commands
internal/commands/help.go Adds help metadata and examples for new commands
internal/commands/quickstart.go Includes new commands in quickstart suggestions
internal/commands/commands.go Adds "doctor" and "config" to utilities command group

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- doctorTargetsFromProfileStore now falls through to local/global YAML
  config for api_url and board when the profile store lacks values,
  matching the precedence in resolveDoctorEffectiveConfig()
- doctorStoredTokenSourceForProfile no longer gates YAML tokens on
  account name match, matching the unconditional fallback behaviour
  in config.Load() and doctorTokenSourceWithValue()
- configShowData verbose path uses "profiles" key (not "saved_profiles")
  so renderConfigShowHuman finds the profile list
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robzolkos robzolkos merged commit ed7c533 into master Apr 7, 2026
24 checks passed
@robzolkos robzolkos deleted the feature/fizzy-doctor branch April 7, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants