mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 07:19:52 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user