Repository navigation
fix(sync): drop clock-offset duplicate transcript lines on offline merge (#4769) - #11165
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for chasing this down — the shape of the fix (centralizing merge dedupe and adding regression coverage for clock-offset reuploads) is pointed in the right direction, and the backend CI is green.
I do think this needs one more pass before merge because the partial-dedupe + private-cloud path can now lose backing audio for newly-added transcript lines. In process_segment, when dedupe_segments_for_merge drops any incoming lines, the code skips _store_sync_audio_chunk(...) entirely, but still appends any surviving deduped_segments. For a mixed chunk like [duplicate line, duplicate line, genuinely new line], the helper returns only the new line, dropped_for_dedupe > 0, and the conversation is updated with that new transcript segment while no private-cloud chunk is stored for its audio. The previous code explicitly preserved the invariant that “segment present ⇒ chunk present”, so this looks like a user-data/playback regression for partial overlaps.
Could you adjust the partial-overlap handling so newly-appended segments still have a valid audio backing without reintroducing duplicate audio, and add a regression test covering private-cloud-enabled partial dedupe (some lines dropped, some kept)? The all-duplicate skip case still looks fine to avoid re-uploading already-represented audio.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
@Git-on-my-level addressed the partial-overlap private-cloud regression. Change: when merge dedupe drops some lines but keeps others, we no longer skip audio entirely. Survivors get PCM16 slices uploaded via Tests:
Head: |
…rge (BasedHardware#4769) Exact absolute-range keys miss live+offline WAL merges when filename timestamps drift from conversation started_at, so every line was appended twice. Add shrink-only text+slop dedupe and regression coverage. Co-authored-by: Cursor <[email protected]>
… split Co-authored-by: Cursor <[email protected]>
…class Address cubic P2s: batch/length-gate text+slop so short backchannels stay, skip private-cloud chunk upload on partial dedupe, and add FC-offline-merge-clock-offset-dup for Failure-Class protocol. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
…edHardware#4769) Keep segment⇒chunk when some lines are dropped: upload PCM slices for survivors only, still skip full WAV on all-duplicate merges. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
32a5e6d to
cfa699f
Compare
|
Rebased and force-pushed the #4769 partial-dedupe private-cloud audio fix to resolve GitHub conflicts.
Could you please re-review / dismiss the remaining CHANGES_REQUESTED for the partial-overlap audio invariant now that the branch is mergeable again? |
Co-authored-by: Cursor <[email protected]>
|
@Git-on-my-level \n\nCI failure on this tip was a timing-guard hit, not an invariant assertion: tests/unit/test_sync_silent_failure.py::TestMergeSurvivorAudio::test_store_partial_uploads_one_chunk_per_survivor exceeded the 1.00s CPU guard (1.67s).\n\nI updated that unit test to stub utils.other.storage via sys.modules so it doesn’t import the slow real module inside the timed section.\n\nPushed commit: 3bf7f20\nLocal check: pytest for that exact test now passes.\n\nCan you please re-review and dismiss the remaining CHANGES_REQUESTED for the partial-overlap audio invariant now that CI should be green again? |
|
@Git-on-my-level need human response — re-review request. Partial-dedupe private-cloud audio regression is fixed on head |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the follow-up. I re-reviewed the current head after the partial-overlap private-cloud audio change.
The previous blocker looks resolved: mixed dedupe now stores sliced audio for surviving transcript lines via store_partial_merge_survivor_audio(...) before the conversation-relative rewrite, while the all-duplicate case still avoids re-uploading already-represented audio. I also ran the targeted backend regression tests locally in an isolated venv:
python -m pytest backend/tests/unit/test_sync_silent_failure.py::TestSegmentDeduplication backend/tests/unit/test_sync_silent_failure.py::TestMergeSurvivorAudio backend/tests/unit/test_sync_silent_failure.py::TestProcessSegmentReal::test_partial_dedupe_private_cloud_stores_survivor_slices -q
Result: 10 passed.
I'm removing the stale needs-tests signal and dismissing the older automated changes-request for the now-fixed private-cloud audio invariant. I’m still leaving this as human-maintainer-review rather than formal approval because this is sync/private-cloud transcript/audio behavior and the PR is tied to an issue sequence, so David/maintainers should make the final merge call.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
Resolved on current head: partial-dedupe survivors now get sliced private-cloud audio and targeted regressions passed; dismissing stale automated change request.
|
@kodjima33 / maintainers follow-up: PR #11165 is fully CI-green at 3bf7f20. @Git-on-my-level dismissed the stale changes-request after verifying the partial-dedupe private-cloud audio fix and 10 targeted tests. The only remaining gate is final maintainer approval/merge; no author-side blockers remain. |
Co-authored-by: Cursor <[email protected]>
|
@kodjima33 write-access APPROVE / merge when ready — #11165 clock-offset offline transcript dedupe (#4769). Author-clear:
Please APPROVE/merge when you have a moment. |
kodjima33
left a comment
There was a problem hiding this comment.
Batch-gated dedupe for clock-offset duplicate transcript lines — approve only (606 lines, above the merge-without-Nik threshold for backend).
|
@kodjima33 @beastoin need human response — merge call for #11165. Author-clear + CI green + mergeable CLEAN @
Honest gap unchanged: no on-device live+WAL clock-skew smoke (no kit); hermetic merge contract covered. Please merge when ready (or say if you want a smaller follow-up split). |
Summary
started_at + relative start; offline WAL chunks usefilename timestamp + chunk-relative start. Mild RTC / phone-clock drift (same family as Offline conversations are FUTURE dated #4770/Limitless pendant: clock drift causes duplicate conversations and missing timestamp correction #5734) makes every line miss the key and get concatenated again.dedupe_segments_for_mergekeeps exact-range 207-retry + conversation-relative match, then batch-gated text+slop (min 20 chars / 4 words; apply only when all remaining lines match or ≥2 match) so short backchannels like "yeah" are kept. Private-cloud chunk upload is skipped when any lines were dropped so full-source WAV cannot reintroduce duplicate audio.Test plan
python3 -m pytest tests/unit/test_sync_silent_failure.py::TestSegmentDeduplication …offset… -q→ 9 passed (incl. short-backchannel keep)Failure-Class: new
Fixes #4769