fix(cli): classify missing whisper-cpp as a setup gap, not a command error (#1628)

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.
This commit is contained in:
Miguel Ángel
2026-06-21 20:39:19 -04:00
committed by GitHub
parent a843b2acb7
commit f12754f5ad
6 changed files with 156 additions and 5 deletions
+8
View File
@@ -330,6 +330,14 @@ export function trackCommandFailure(command: string, err: unknown): void {
});
}
// Whisper being absent/uninstallable is an environment prerequisite gap, not a
// command crash — track it on its own low-severity metric instead of cli_error
// so the command-failure budget reflects real bugs. `optional` records whether
// the caller (init / skill pipeline) treated captions as skippable.
export function trackTranscribeUnavailable(props: { optional: boolean }): void {
trackEvent("transcribe_unavailable", { optional: props.optional });
}
export function trackRenderFeedback(props: {
rating: number;
renderDurationMs: number;