Skip to content

fix(cli): treat missing whisper-cpp as a skippable prerequisite, not a command failure#1628

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/transcribe-fail-soft-whisper-unavailable
Jun 22, 2026
Merged

fix(cli): treat missing whisper-cpp as a skippable prerequisite, not a command failure#1628
miguel-heygen merged 1 commit into
mainfrom
fix/transcribe-fail-soft-whisper-unavailable

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

hyperframes transcribe hard-failed and reported a command error whenever whisper-cpp was not present. On environments without Homebrew or a compiler toolchain (most Linux containers and CI), neither of the auto-install paths in ensureWhisper() (brew install / build-from-source) can succeed, so the command threw a generic error — even though a missing optional binary is a setup prerequisite, not a bug.

This had two problems:

  • It conflated "install the optional prerequisite" with genuine transcription failures (whisper present but the run crashed).
  • The skill pipelines already tolerate a non-zero transcribe exit and continue without captions, so nothing was actually broken — the CLI was just mis-reporting an environment condition as a crash.

Changes

  • ensureWhisper() now throws a typed WhisperUnavailableError when no binary exists and none can be built, distinct from a real transcription failure.
  • The transcribe command reports this on its own transcribe_unavailable signal (with one actionable install hint) instead of the command-error path.
  • New --optional flag: pipelines that treat captions as skippable exit 0 instead of 1.
  • Genuine transcription failures still error and exit non-zero. init and the skill pipelines already continue without captions — unchanged.

Verification

  • tsc --noEmit (cli), oxlint, oxfmt, and the repo audit gate all pass.
  • New unit test whisper/manager.test.ts covers the classification: typed error, cross-bundle code tag, and that real failures are not misclassified.
  • Existing telemetry and command-failure suites pass.

@miguel-heygen miguel-heygen changed the title fix(cli): classify missing whisper-cpp as a setup gap, not a command error fix(cli): treat missing whisper-cpp as a skippable prerequisite, not a command failure Jun 22, 2026
Comment thread packages/cli/src/commands/transcribe.ts Fixed
@miguel-heygen miguel-heygen force-pushed the fix/transcribe-fail-soft-whisper-unavailable branch from 986c621 to da64995 Compare June 22, 2026 00:08
…error

transcribe hard-failed with cli_error whenever whisper-cpp was absent. On
Linux/Docker/CI (no Homebrew, no compiler toolchain) that is unavoidable, so it
drove ~30k cli_error/day that are really "install the prerequisite" rather than
bugs — and buried genuine transcription failures in the command-error budget.

ensureWhisper now throws a typed WhisperUnavailableError when no binary exists
and none can be built. The transcribe command reports that on a dedicated
transcribe_unavailable metric instead of cli_error, and a new --optional flag
lets pipelines skip captions and exit 0. Real transcription crashes still fail
as cli_error. init and the skill pipelines already continue without captions.

Also removes a stale doc reference to a `transcribe --provider groq` flag that
does not exist.
@miguel-heygen miguel-heygen force-pushed the fix/transcribe-fail-soft-whisper-unavailable branch from da64995 to 5d422e0 Compare June 22, 2026 00:21
@miguel-heygen miguel-heygen merged commit f12754f into main Jun 22, 2026
71 of 73 checks passed
@miguel-heygen miguel-heygen deleted the fix/transcribe-fail-soft-whisper-unavailable branch June 22, 2026 00:39
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.

2 participants