Skip to content

Stop hashing every same-titled meeting's audio while deleting - #1763

Merged
claude[bot] merged 1 commit into
mainfrom
claude/fix-delete-duplicate-hash-stall
Sep 23, 2026
Merged

claude[bot] merged 1 commit into
mainfrom
claude/fix-delete-duplicate-hash-stall

Conversation

@claude

@claude claude Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

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 @MainActor paths wait on that same serializer (SpeakerNamingCoordinator.finishNamingFlow and MeetingSessionController.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

  • Affects: meetings
  • Lane: meeting reliability
  • Why this matters: this was found in the 1.1.62 feature review and is one of the four fixes queued before that release.

What changed

  • HomeMeetingDeletion.duplicateRetainedAudioMeetings filters candidates by a new audioSizeSignature (sorted role:size per retranscription file) before calling audioSignature. The selected meeting is hashed only if at least one candidate matches on size.
  • Equal digests imply equal sizes in the same roles, so no real duplicate can be dropped. An unreadable file makes both signatures nil and excludes the candidate, exactly as before.
  • New fast-test suite: three same-titled meetings, one with same-size but different bytes and one with different sizes. Only the selected one is deleted. The existing duplicate, different-title, and swapped-role suites cover the unchanged cases.

How I checked it

  • scripts/dev/agent-preflight.sh
  • python3 scripts/dev/check-build-source-lists.py: passed
  • bash build.sh --no-open / bash run-tests.sh: not run locally (Linux session, no Swift toolchain). Hosted CI is the first compile.
  • Manual check: delete a meeting whose title repeats across several long recordings while another meeting is transcribing. There should be no stall.

Risk Review

  • Privacy / local-first behavior reviewed: no change
  • Storage path or migration impact reviewed: which files get deleted is unchanged, only the cost of deciding
  • Release/update impact reviewed: none
  • Agent PRs stay draft until human review
  • No private transcripts, audio, tokens, personal paths, or customer data are included

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

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
@claude claude Bot assigned r3dbars Sep 23, 2026
@claude
claude Bot requested a review from r3dbars September 23, 2026 14:33
@claude
claude Bot marked this pull request as ready for review September 23, 2026 17:28
@claude
claude Bot merged commit eb3a204 into main Sep 23, 2026
7 checks passed
@claude
claude Bot deleted the claude/fix-delete-duplicate-hash-stall branch September 23, 2026 17:30
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.

2 participants