8000 feat: add vmsan doctor command and fix JSON output by angelorc · Pull Request #56 · angelorc/vmsan · GitHub
[go: up one dir, main page]

Skip to content

feat: add vmsan doctor command and fix JSON output - #56

Merged
angelorc merged 3 commits into
mainfrom
feat/doctor-json-audit
Mar 9, 2026
Merged

angelorc merged 3 commits into
mainfrom
feat/doctor-json-audit

Conversation

@angelorc
@angelorc angelorc commented Mar 9, 2026
Copy link
Copy Markdown
Owner

Summary

  • Add vmsan doctor command with 8 diagnostic checks: KVM access, disk space, default network interface, Firecracker/Jailer/Agent binaries, kernel image, and base rootfs. Supports both human-readable and --json output modes.
  • Fix stop and remove commands missing try/catch error handling with handleCommandError().
  • Fix network command bypassing evlog structured logging by using console.log(JSON.stringify(...)) directly — now uses cmdLog.set() + cmdLog.emit() like other commands.
  • Add 16 unit tests covering all doctor checks (pass/fail), summary counts, and categorization.

Workflow task: D1

Test plan

  • bun run test — 196 tests pass (180 existing + 16 new)
  • bun run typecheck — passes
  • bun run lint — passes
  • Manual: vmsan doctor shows human output with check statuses
  • Manual: vmsan --json doctor emits structured JSON with checks array and summary

- Add `vmsan doctor` with 8 diagnostic checks (KVM, disk, network,
  binaries, kernel, rootfs) with human and JSON output modes
- Fix stop/remove commands missing try/catch error handling
- Fix network command bypassing evlog with direct console.log
- Add unit tests for all doctor checks
@vercel
vercel Bot commented Mar 9, 2026 •
Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
vmsan Ignored Ignored Preview Mar 9, 2026 0:08am

Request Review

@coderabbitai
coderabbitai Bot commented Mar 9, 2026 •
Copy link
Copy Markdown

Warning

Rate limit exceeded

@angelorc has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 49 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e88be964-ded3-456e-aff2-3efe4f277ba5

📥 Commits

Reviewing files that changed from the base of the PR and between 77854cf and 99932ed.

📒 Files selected for processing (7)
  • .changeset/bright-clouds-dance.md
  • bin/cli.ts
  • src/commands/doctor.ts
  • src/commands/network.ts
  • src/commands/remove.ts
  • src/commands/stop.ts
  • tests/unit/doctor.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/doctor-json-audit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@angelorc
angelorc commented Mar 9, 2026
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
coderabbitai Bot commented Mar 9, 2026
Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Use the explicit VmsanPaths interface import instead of
ReturnType<typeof vmsanPaths> for better readability and
consistency with the test file.
@angelorc
angelorc merged commit 07ac73b into main Mar 9, 2026
2 checks passed
angelorc added a commit that referenced this pull request Mar 9, 2026
* docs: sync documentation with beta.1 CLI changes

* fix(docs): correct --cpus to --vcpus and remove premature doctor section

- Fix `--cpus` → `--vcpus` in vm-lifecycle and docker-images examples
  (the CLI flag is `--vcpus`, `--cpus` does not exist)
- Remove `vmsan doctor` section from CLI reference since the command
  has not been merged to main yet (lives on feat/doctor-json-audit)

* docs: re-add vmsan doctor section (merges after PR #56)
@github-actions github-actions Bot mentioned this pull request Mar 9, 2026
@angelorc angelorc mentioned this pull request Mar 9, 2026
@angelorc
angelorc deleted the feat/doctor-json-audit branch March 14, 2026 10:41
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

0