Skip to content

feat(cli): airs doctor — credential and connectivity preflight#285

Merged
cdot65 merged 1 commit into
mainfrom
cdot65/feat/doctor-command
Jul 7, 2026
Merged

feat(cli): airs doctor — credential and connectivity preflight#285
cdot65 merged 1 commit into
mainfrom
cdot65/feat/doctor-command

Conversation

@cdot65

@cdot65 cdot65 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

airs doctor runs 6 preflight checks — node version, config file validity, both credential groups (with source: env/file), scanner API reachability, management OAuth — and prints ✓/⚠/✗ with fix hints. Exit 0 when no failures (warns OK), 1 otherwise. --output json|yaml for CI use.

Notable decisions

  • Scanner check uses queryByScanIds([randomUUID()]) — validates auth + reachability with zero scan quota burned
  • Management check uses listTopics() — smallest authenticated GET, forces token fetch
  • SDK errors carry no .status; auth failures detected by message pattern (tested) so bad keys read "API key rejected" not "network unreachable"
  • All network checks time-boxed 5s

Testing

  • 30 new tests (injected fakes: resolve/reject/hang paths, exit logic, json shape); 750/750; gates clean
  • Smoke: real creds 6/6 pass exit 0; bogus key → scanner fail exit 1

Checklist

  • TDD
  • Gates green
  • Docs + changeset (minor)

Closes #273

@cdot65 cdot65 merged commit 6dc3485 into main Jul 7, 2026
4 checks passed
@cdot65 cdot65 deleted the cdot65/feat/doctor-command branch July 7, 2026 02:25
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.

feat(cli): airs doctor — credential and connectivity check

1 participant