Repository navigation
Stop hashing every same-titled meeting's audio while deleting - #1763
Merged
Merged
Conversation
Deleting an app-owned meeting looks for duplicate retranscriptions by hashing the retained audio of every same-titled meeting, and since #1751 it does that while holding the transcript serializer that main-thread saves wait on. A recurring title with many long recordings could stall the app for the whole scan. Compare per-role file sizes first and only hash the candidates that could possibly match. Equal digests imply equal sizes, so no real duplicate is missed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015njvTLqC9Fao3TMUNouKka
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.
Requested by Justin · project thread
Why
Before: deleting a meeting from Home looks for duplicate retranscriptions by SHA-256 hashing the full retained audio of every app-owned meeting with the same title. Since #1751 that happens inside
MeetingTranscriptFileUpdateSerializer.sync, and two@MainActorpaths wait on that same serializer (SpeakerNamingCoordinator.finishNamingFlowandMeetingSessionController.clearGeneratedSummaryAfterReplacementRetranscription). So deleting one "Weekly 1:1" with many hour-long recordings, while another meeting is finishing, can beachball the app for the whole scan.After: deletion compares per-role file sizes first and only hashes candidates that could possibly be byte-identical. In practice that's the real duplicates, or nothing.
Product Impact
meetingsmeeting reliabilityWhat changed
HomeMeetingDeletion.duplicateRetainedAudioMeetingsfilters candidates by a newaudioSizeSignature(sortedrole:sizeper retranscription file) before callingaudioSignature. The selected meeting is hashed only if at least one candidate matches on size.niland excludes the candidate, exactly as before.How I checked it
scripts/dev/agent-preflight.shpython3 scripts/dev/check-build-source-lists.py: passedbash build.sh --no-open/bash run-tests.sh: not run locally (Linux session, no Swift toolchain). Hosted CI is the first compile.Risk Review
Notes
Hashing true duplicates still happens under the serializer. That stays correct and bounded to real matches. Moving it out of the lock entirely would mean re-validating after, which is a bigger change than this release needs.
Agent handoff
COORD_DONE: BRIEF | this PR | size pre-filter before duplicate hashing | none | none | preflight, build source lists | CI green🤖 Generated with Claude Code
https://claude.ai/code/session_015njvTLqC9Fao3TMUNouKka
Generated by Claude Code