Repository navigation
Fix live recorder locate race, back-to-back tailing, failure counts, and newest-first upload order - #269
Open
silviot wants to merge 1 commit into
Open
Fix live recorder locate race, back-to-back tailing, failure counts, and newest-first upload order#269silviot wants to merge 1 commit into
silviot wants to merge 1 commit into
Conversation
…and newest-first upload order Signed-off-by: Silvio Tomatis <[email protected]>
This branch has not been deployed
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
Follow-up fixes for live recorder precomputation, post-stop recovery, and sidecar sync ordering on top of #268 (
D-1202):SyncPlanner.kt,SyncPlannerTest.kt): plan.cwxtranscript sidecar uploads from newest copied recording to oldest (state.recordings.asReversed()) so recent recordings become browsable on the recorder first even across multi-session uploads.RecorderLiveTailer.kt): preventlocateActiveEntryfrom throwingRECORDER_MISSINGwhen a live recording finishes or rotates betweenGETLENand listing refresh, handle sub-header (<= 44 B) finalization safely, and propagateFinalizedImport(downloaded, failed, noteId).RecorderLiveTailer.kt,RecorderSync.kt): keep tailing newly started live recordings viamayUploadTranscripts(address, pong), await async transcript completion on resumedliveHeaderPendingpost-Stop downloads, delegate non-LATERverifiedLiveOffsetfailures todownloadFailed, runretryAfterHoldeven after live tailing, fixpostTailDownloadscounting when live finalize fails, and foldfailed/postTailDownloadsinto+XREC:SYNC.RecorderLiveRecoveryTest.kt,FakeRecorder.kt,docs/recorder-sync.md): addbeforeStattest hook and 6 regression tests covering short/stopped locate, back-to-back tailing, transient finalize failure, post-stop async transcript wait, deleted live partial cleanup, and newest-first sidecar ordering; updatedocs/recorder-sync.md.Hardware Verification
Tested end-to-end between Pixel 8 (Android 17 / API 37,
io.codemyriad.cassini.talk.debugat43de74ee) and SL6801 (silviot/voice-recorder-hw-bt-usbd0f878a, temporaryBT=1 BENCH=1mode=rec secs=65 delay_s=6 sync_s=90 rec_ch=1 rec_dsp=0 rec_vor=0, production flash restored afterward):scripts/device-smoke.sh --annotation CiSmoke):50 of 50 testspassed in127.238 s.63.989 srecording (REC_0083.wav,2,043,948 B),1,800,576 B(~88.1%) pulled live viaGETSbefore Stop with live VAD/diarization precomputation running under screen-off power state (ov=0,comp=0,lost=0,sd_err=0)..cwxcommitted &+XREC:SYNC,0:39,024 ms(BENCH bgsync st=done ms=39024,REC_0083.cwx2,404 BCWX1,Wake sync finished: Done(downloaded=1, uploaded=2, skipped=0, deviceRecording=false, failed=0)).Checks
./gradlew detekt ciTestpasses. On macOS or Windows:./gradlew detektand the tests without the pixel comparison pass (seeCONTRIBUTING.md). CI does the pixel comparison../gradlew :app:lintDebug :data:lintDebug :ui:lintDebugpasses.CONTRIBUTING.md).scripts/device-smoke.shon this device and Android version: Pixel 8, Android 17 (API 37)scripts/check-verbatim.shpasses, and I recorded each reviewed change inscripts/check-verbatim.baseline.README.md,docs/,CHANGELOG.md,PRIVACY.md), andscripts/check-links.shpasses.Signed-off-byline (git commit -s, seeCONTRIBUTING.md).Device safety
CAUTION: Do not run the Gradle
connected*or managed-device tasks,adb uninstall io.codemyriad.cassini.talkoradb shell pm clear io.codemyriad.cassini.talkon a device with data that you want to keep. They erase the app data and the downloaded models.