fix: v0.7.x ultrareview follow-ups (#55–62)#63
Open
fmasi wants to merge 7 commits into
Open
Conversation
Chunked dual-stream recordings tag speaker labels at chunk time in ChunkProcessor and again in TranscriptionRunner.finalize(), producing "Local Local Speaker N" / "Remote Remote Speaker N" in the saved transcript, rename dialog, exports, and summary input. Guard against re-tagging already-prefixed segments so repeated calls are safe. Fixes #55 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Parallel ChunkProcessor tasks append to sessionState.chunks in completion order, not recording order. SpeakerReconciler seeded its global speaker namespace from whichever chunk landed first, and AudioConcatenator stitched the merged archive in that same order — scrambling audio relative to the (time-sorted) transcript. Sort by chunk index inside SpeakerReconciler.reconcile (deterministic regardless of caller order) and sort chunkAudioPaths in finalize(). Fixes #56 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AudioConcatenator deletes its source files after a successful export. When a chunk is still a raw .wav — AAC archival failed (gotcha #38) or a single-stream recording that never archived — merging re-encoded the lossless evidence to a lossy .m4a and then deleted the originals, breaking the "raw archive is never modified" invariant. Only concatenate when every chunk is an archived .m4a; otherwise keep the chunk files separate and log the reason. Fixes #59 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each recovery segment is diarized independently, so "Speaker 1" in one segment is a different person from "Speaker 1" in the next. run() merged the per-segment speaker databases last-write-wins and then ran echo dedup once over all segments, so dedup compared against whichever segment wrote a given label last — dropping genuine local speech or keeping mic bleed. Tag, sort, and dedup within each segment using that segment's own databases (mirroring ChunkProcessor), then accumulate. The common single-segment path is unchanged. Fixes #60 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SettingsView rebuilt SummaryConfig from only 6 of 8 fields, so contextOverheadPercent and maxOutputTokens (config.json-only advanced tunables with no UI) were silently reset to defaults on every Save. Carry the existing values through. Fixes #57 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bug_002: selectedMicId was seeded once in init() and never resynced, so changing the default mic in Settings didn't update the menu label or the device used on the next Start Recording until app restart. Add an onChange to resync when config.lastMicrophoneDeviceId changes. bug_011: xpcRetryCount only ever reset on a fresh startRecording, making ">2" a session-wide cumulative cap. A long recording with sparse transient crashes could be killed even though every prior restart succeeded. Decay the counter when the previous crash was >10 min ago; a genuine crash loop (crashes within ms) still trips the cap. Fixes #58 Fixes #61 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
handleTranscribe assigned logProcess unconditionally after `try? proc.run()`. If /usr/bin/log failed to spawn, the defer called terminate() on a never-launched Process, raising an uncatchable NSException that crashes the CLI on exit. Only retain the process when run() succeeds, and note the failure on stderr. Fixes #62 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
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.
Summary
Fixes for all 8 bugs surfaced by the ultrareview of #46. Bundled on one branch because several touch the same files (
TranscriptionRunner,MenuView) and separate PRs would conflict. One commit per fix.tagWithSourcePrefixmade idempotent → no moreLocal Local Speaker N(+2 tests)SpeakerReconciler.reconcile+finalizeaudio paths (+1 test).wavs present → no deletion of kept evidencerun()(own DBs, not last-write-wins merge)contextOverheadPercent/maxOutputTokenson Settings SaveonChangexpcRetryCount--debuglog-processterminate()against unlaunched taskNotes
TranscriberCorelayer got new unit tests (bug_007, bug_004). Fixes in the app layer (TranscriptionRunner/SettingsView/MenuView/CLIHandler) aren't reachable by the CommandLineTools test target, so they're verified byswift build+ the full suite.Test plan
swift test --filter TranscriberTestsgreen (459/459) after each commitswift buildcleanLocal Speaker N/Remote Speaker N, merged audio plays in order🤖 Generated with Claude Code