Skip to content

fix(cli): doctor stops reporting a failure when only optional checks are missing - #7688

Open
wonjangcloud9 wants to merge 2 commits into
heygen-com:mainfrom
wonjangcloud9:fix/doctor-optional-failures
Open

wonjangcloud9 wants to merge 2 commits into
heygen-com:mainfrom
wonjangcloud9:fix/doctor-optional-failures

Conversation

@wonjangcloud9

Copy link
Copy Markdown
Contributor

Context: I've been using HyperFrames every day for the past two weeks to make Korean Shorts and long-form videos, and it's been great to work with. This PR is one of a batch of fixes for things I ran into along the way, so you'll see several PRs from me at once — sorry for the pile-up, and thanks for your patience. Each one is reproduced on current main, independent of the others, and can be reviewed, merged or closed on its own.

What

hyperframes doctor no longer ends with Some checks failed — and doctor --json no longer returns "ok": false — when the only rows that failed are the ones it labels optional (whisper-cpp, TTS (Kokoro), BGM (MusicGen)). Those rows now show a yellow ○ instead of a red ✗, keep their install hint, and carry "optional": true in JSON.

Why

On a machine where every render dependency passes (FFmpeg, FFprobe, Chrome, Docker), doctor still closed with a failure because two optional Python fallbacks were not installed:

  ✗ TTS (Kokoro)     Not installed (optional — local voice fallback)
  ✗ BGM (MusicGen)   Not installed (optional — local music fallback)
  ...
  ◇  Some checks failed — see hints above

The docs describe doctor as "Check the machine for everything a render needs" and tell CI to gate on doctor --json | jq -e '.ok'. With ok computed as checks.every(o => o.ok) (packages/cli/src/commands/doctor.ts, buildDoctorReport and the allOk in run), that gate fails on any machine without Kokoro or MusicGen, which nothing in a render uses. The optional npm packages (onnxruntime-node, @google/genai) already follow the intended rule — checkOptionalPackage says "Not a failure when missing" — the three Python/whisper rows were the exception.

Related work

No existing issue or PR. #7407 is about doctor's Chrome row and does not overlap.

How

  • CheckResult / CheckOutcome get an optional?: boolean; checkWhisper, checkLocalVoice and checkLocalMusic set it on their not-installed result.
  • requiredChecksPass() (o.ok || o.optional) drives both the JSON ok and the human summary. doctorSummary() returns All checks passed, All required checks passed — optional, not installed: <names>, or the old Some checks failed — see hints above.
  • redactOutcome keeps the new field, and a small toOutcome() replaces the two copies of the outcome-building block in run.
  • The process exit code is unchanged (always 0, as the existing comment and docs say).
  • Docs: one paragraph in the doctor section of docs/packages/cli.mdx, one bullet in skills/hyperframes-cli/references/doctor-browser.md (manifest regenerated).

Test plan

Same machine, same environment, main (affa03b) vs this branch:

main this branch
summary line ◇ Some checks failed — see hints above ◇ All required checks passed — optional, not installed: TTS (Kokoro), BGM (MusicGen)
doctor --json → .ok false true
failing rows in JSON Kokoro, MusicGen (no marker) Kokoro, MusicGen with "optional": true
exit code 0 0

A required failure still fails: with docker taken off PATH, this branch prints ✗ Docker Not found and ◇ Some checks failed — see hints above.

  • Unit tests added: doctorSummary (optional-only → passes and names them; required + optional → fails; nothing missing → "All checks passed") and buildDoctorReport (optional-only → ok: true, rows marked; required + optional → ok: false). Against main's doctor.ts 4 of the 5 new tests fail (the fifth, required + optional → ok: false, already held on main); with the fix bunx vitest run src/commands/doctor --project unit passes 49/49.
  • Manual testing performed: hyperframes doctor and hyperframes doctor --json before/after as above.
  • Documentation updated (docs/packages/cli.mdx, doctor-browser.md skill reference)
  • Comments follow CONTRIBUTING.md "Comments"
  • Gates: oxlint, oxfmt, typecheck, fallow audit --base origin/main (0 issues), comment ratchet — all pass.

🤖 Generated with Claude Code

@mintlify

mintlify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 9cbc835.

Approve preview

@wonjangcloud9
wonjangcloud9 force-pushed the fix/doctor-optional-failures branch from 82d3e31 to e0df765 Compare November 15, 2026 09:38
@wonjangcloud9

Copy link
Copy Markdown
Contributor Author

Rebased onto main (797a622b) to clear the conflict. It was only in the generated skills-manifest.json, which I regenerated with gen-skills-manifest.ts; the rest of the diff is unchanged. The new head e0df765b is signed. On it, doctor.test.ts (42 tests), tsc --noEmit for the CLI, oxlint, oxfmt, the comment checks and gen-skills-manifest.ts --check pass.

@wonjangcloud9
wonjangcloud9 force-pushed the fix/doctor-optional-failures branch 4 times, most recently from ad6fabe to 7b4a4e1 Compare November 22, 2026 09:24
…are missing

whisper-cpp, TTS (Kokoro) and BGM (MusicGen) are labelled optional, yet a
missing one turned the summary into "Some checks failed" and the --json
payload's ok into false, so the documented `jq -e '.ok'` gate failed on a
machine that renders fine. These rows now carry optional: true, show a
yellow circle instead of a red cross, and are left out of the summary and ok.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wonjangcloud9
wonjangcloud9 force-pushed the fix/doctor-optional-failures branch from 7b4a4e1 to d60db63 Compare November 24, 2026 14:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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