Repository navigation
Interval/29 gap incident coalescing - #31
Merged
Merged
Conversation
Recognition falling behind capture does not lose audio once. It keeps losing it for as long as it stays behind, and the pipeline reported each accumulated half second as its own gap, so a meeting that spent minutes behind buried its transcript under hundreds of near-identical blockquotes. Observations are now accumulated into a TranscriptGapIncident and written as one marker when the incident ends. The marker states two quantities and keeps them apart: the range the incident spanned, and the audio it actually cost. The total is a sum over distinct evicted buffers — the bounded backlog hands each one back exactly once — and is never derived from the range, because recognition goes on transcribing between the losses. What separates one incident from the next is evidence rather than a delay. TranscriptionAudioInput reports closesIncident once the backlog has accepted a full capacity of audio without evicting any of it, which it could not do while still full; MeetingRuntime closes an incident at every boundary the pipeline cannot see — pause, recogniser restart, capture ending, stop, persistence failure — so no failure is hidden inside another.
A marker's range is not known until the incident ends, so an incident held only in memory would go with the process that was killed during it. The session record now carries openGapStartedAt: set the moment an incident opens, and cleared after the marker has reached the transcript — that order, because the failure window then repeats a notice rather than losing one. Recovery states the start and refuses the rest: the end and the total were still being measured, and either would be invented. The field is additive and optional, like pausedAt, so the record's schema version is unchanged and earlier sessions read exactly as before. Noting one never fails a meeting whose transcript is intact.
Adds the regression the interval exists for: 430 half-second observations over three and a half minutes, through the real Markdown writer to a real file, leaving one blockquote stating the range and the audio lost. Also covers an isolated short gap, separate incidents with speech between them, pause and recogniser-restart boundaries, a stop with an incident still open, a marker that cannot be written at stop, the backlog-recovery evidence in TranscriptionAudioInput, the range and point wordings across a minute boundary and noon, and the open-incident record and its recovery note.
Explains that related recognition-backpressure losses are summarised into one incident with one marker, that the range and the audio lost are separate quantities, and that an incident still open when ScribeKit stops is recorded and reported by recovery without inventing its end or its cost.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
Validation
xcodebuild -project ScribeKit.xcodeproj -scheme ScribeKit -destination 'platform=macOS' buildxcodebuild -project ScribeKit.xcodeproj -scheme ScribeKit -destination 'platform=macOS' testTranscript and privacy impact
Energy and performance impact