Skip to content

fix(stt): persist interrupted batch transcripts#5246

Merged
ComputelessComputer merged 3 commits into
mainfrom
fix/batch-transcript-recovery
May 19, 2026
Merged

fix(stt): persist interrupted batch transcripts#5246
ComputelessComputer merged 3 commits into
mainfrom
fix/batch-transcript-recovery

Conversation

@ComputelessComputer
Copy link
Copy Markdown
Collaborator

@ComputelessComputer ComputelessComputer commented May 19, 2026

Persist streamed batch transcript snapshots and flush them so interrupted batch jobs can recover transcript progress.


This is part 2 of 2 in a stack made with GitButler:


Note

Medium Risk
Changes how progressive batch transcripts are persisted (replace-mode snapshots + explicit store flush), which could affect transcript integrity/duplication and write frequency. Also alters timeout behavior by disabling idle timeouts for non-progressive/cloud batch runs, which may change failure modes for those providers.

Overview
Progressive batch runs now persist recoverable transcript snapshots. Streamed BatchResponseStreamed segment events are flattened across channels and persisted as full replace-mode snapshots, and final handleBatchResponse also writes via replace.

Batch persistence is made safer/more durable. BatchPersistCallback gains an optional { mode: "append" | "replace" }, the default batch persist in useRunBatch honors replace (avoiding re-reading existing words/hints), wraps updates in a single transaction, and triggers a save() flush after streamed writes.

Idle-timeout monitoring is gated to progressive batches. A new core helper expects_progressive_batch (exported from listener2-core) is used by the plugin to only start the 60s idle timeout monitor when a provider/model should emit progressive batch events; tests cover the new behavior.

Reviewed by Cursor Bugbot for commit bf94153. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 393fc08. Configure here.

Comment thread apps/desktop/src/stt/useRunBatch.ts
@ComputelessComputer ComputelessComputer force-pushed the fix/speaker-count-hints branch 2 times, most recently from 4b5d00f to 95fd574 Compare May 19, 2026 05:05
@ComputelessComputer ComputelessComputer force-pushed the fix/batch-transcript-recovery branch from 393fc08 to bf2a462 Compare May 19, 2026 05:05
@ComputelessComputer ComputelessComputer force-pushed the fix/speaker-count-hints branch from 95fd574 to 4aab320 Compare May 19, 2026 05:13
@ComputelessComputer ComputelessComputer force-pushed the fix/batch-transcript-recovery branch from bf2a462 to 1644e67 Compare May 19, 2026 05:13
Infer participant speaker counts for live and batch STT requests, pass them through Hyprnote proxy URLs, and map them to supported provider diarization parameters.
Persist streamed batch transcript snapshots and flush them so interrupted batch jobs can recover transcript progress.
Skip the progressive idle timeout for direct cloud batch transcription so long uploaded audio can wait for the final provider response.
@ComputelessComputer ComputelessComputer force-pushed the fix/speaker-count-hints branch from 4aab320 to 3ea0efa Compare May 19, 2026 05:25
@ComputelessComputer ComputelessComputer force-pushed the fix/batch-transcript-recovery branch from 1644e67 to bf94153 Compare May 19, 2026 05:26
Base automatically changed from fix/speaker-count-hints to main May 19, 2026 05:41
@ComputelessComputer ComputelessComputer merged commit 17c3eb0 into main May 19, 2026
6 checks passed
@ComputelessComputer ComputelessComputer deleted the fix/batch-transcript-recovery branch May 19, 2026 05:42
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