Repository navigation
Stream active recorder audio live, precompute incrementally, and propagate recording timestamps (D-1179, D-1180) - #266
Conversation
… .cwx early (D-1179) Refs D-1179 Seat: local-agy
|
Pipeline: review of cassini-android #266 says fix first. One round: fix every blocker and major, put the PR back to draft, push, mark ready on green. If you disagree with a finding, last line of PR body or comment: WAITING-ON-COORDINATOR: . VERDICT: fix first
The first two findings were reproduced with isolated Kotlin harnesses using production code. The full Android suite was not run; tracked files remain unchanged. |
…, D-1180) - Reconcile partial .part progress on BUSY/SIZE_CHANGED/LATER in RecorderLiveTailer and align file length before appending in pullRange (Finding #1). - Persist PartialDownload.liveHeaderPending across JSON/SyncPlanner/Tailer/Sync and refresh the 44-byte WAV header on reconnect after Stop at unchanged size (Finding #2). - Await precompute teardown before importFinalized and guard snapshot installation under withNoteLockBlocking + canInstallBlocking (jobBlocking == null && PLAIN) (Finding #3). - Support +XREC:LS,T (+XREC:FT and PONG lst=1), resolve timestamps from FT entries, legacy YYYYMMDD-HHMMSS filenames, or live-tailer fallback start, populate startedAt when absent, and backfill previously synced Date unknown notes (D-1180). Refs D-1179, D-1180 Seat: local-agy
|
Addressed all three round-1
Verified locally with |
…refresh - Remove no-op default on LivePrecomputeSession.awaitStopped() and delegate LivePrecomputeHandle.awaitStopped() to precomputer.awaitStopped() so production teardown actually runs before importFinalized. - Defer XrecFailure.LATER cleanly in RecorderSync.refreshLiveHeaderIfNeeded instead of treating it as a download failure. Refs D-1179, D-1181 Seat: local-agy
|
Pipeline: cassini-android #266 is merged (review: ship). Continue with your next item. |
Seat: local-agy
Participate: auto
Fixes D-1179
Fixes D-1180
Fixes D-1181
Refs D-1179, D-1180, D-1181
Summary
live=1&lst=1protocol support (XrecProtocol.kt,XrecClient.kt,FakeRecorder.kt):live=1capability flag onPONGand optional 11thSTATfield (recordingBytes, flushed.wavbytes on disk).lst=1capability flag onPONG, send+XREC:LS,Twhen supported, and strictly parse+XREC:FT,<size>,<YYYY-MM-DDTHH:MM:SS_or_->,<name>creation timestamps (preserving commas in filenames).FakeRecorderto modellive=1, flushed byte bounds on the active file,STAT11th field, liveGETSstreaming past the 44-byte WAV header,36,000B/s stereo cap,busyAtFrame, andlst=1/fileTimes/defaultFileTime..cwxpushback (RecorderLiveTailer.kt,RecorderStore.kt,SyncPlanner.kt,RecorderSync.kt):syncWhileRecordingby default inRecorderStore.ktandRecorderViewModel.kt..partprogress onBUSY/SIZE_CHANGED/LATERfrom actual bytes flushed to disk and align file length inpullRangebefore appending so retries never duplicate audio.PartialDownload.liveHeaderPendingacross JSON,SyncPlanner,RecorderLiveTailer, andRecorderSync; refresh the finalized 44-byte WAV header before import even after disconnect + Stop at an unchanged file size.<stem>.cwx++XREC:SYNC,0before closing Bluetooth.RecorderLivePrecomputer.kt,RecorderPorts.kt,GraphRecorderLibrary.kt,AppGraph.kt):.wav.partfiles viaStreamingWavPrefixReader+DecoderResampler, incrementally feedingIncrementalTranscript/Recognizer+OpusSink+StreamingDiarizer/VoiceClipCacheacross 28s windows intoPRECOMPUTEsnapshots (preemptRecordingPrecomputeyields to interactive jobs).LivePrecomputeSession.awaitStopped()before importing finalized audio, and guardinstallSnapshotunderwithNoteLockBlocking+canInstallBlocking(jobBlocking(id) == null && noteBlocking(id)?.audioKind == AudioKind.PLAIN)."Date unknown"fix & backfill,D-1180):RecorderTimestamps(+XREC:FTentry timestamp ->YYYYMMDD-HHMMSSlegacy filename -> live-tailerclock - recordingSecondsfallback).startedAt(StartedAtRFC 3339 format preserving seconds) viaGraphRecorderLibrary.setRecordingStartIfAbsentonly whenLibraryRow.recordingTime() == null, and retroactively backfill already-synced"Date unknown"notes on subsequent+XREC:LS,Tsyncs.Companion firmware
silviot/voice-recorder-hw-bt-usbmain(6db1487, CI run45947090550passed, flashed onto SL6801876,544B).Review focus
RecorderLiveTailer.pullFlushedRange/pullRange) and persistentliveHeaderPendingheader refresh across disconnect + Stop (RecorderSync.refreshLiveHeaderIfNeeded).RecorderLivePrecomputer.installSnapshot(awaitStopped()beforeimportFinalized,canInstallBlockinginsidewithNoteLockBlocking).+XREC:FTparsing,StartedAtformatting without minute truncation, and non-destructivesetRecordingStartIfAbsent+ backfill for previously synced notes (D-1180).Tests
c7148ddaca3bd8eedfa42caf68c82787b81fa620with JDK 17 (BUILD SUCCESSFUL):detekt(0issues):app:lintDebug(0errors):core:test(769tests,0failures,2pre-existing skipped):app-logic:test(45tests,0failures):data:testDebugUnitTest(409tests,0failures):engine:testDebugUnitTest(148tests,0failures,1pre-existing skipped):app:testDebugUnitTest(712tests,0failures):app:installDebuginstalled on Pixel 8Checked bug classes
Walk
review/BUG-CLASSES.md(classes 1–19):StreamingWavPrefixReaderstreams bounded 64 KiB file blocks incrementally with O(1) per-block memory and linear chunk appends (RecorderLivePrecomputerTest,RecorderLiveStreamingTest)..partI/O run onio/inferencedispatchers (AppGraph,RecorderLivePrecomputer,RecorderLiveTailer,RecorderSync); UI observesStateFlow(RecorderViewModelTest).setRecordingStartIfAbsentwritesstartedAtthroughNoteRepository.setStartedAt, keepingnotes.started_at,created_at, andLibraryRow.recordingTime()coherent without overwriting user/document timestamps (GraphRecorderLibraryTest.setRecordingStartIfAbsentPopulatesDateUnknownNoteWithoutOverwritingExistingStart).IncrementalTranscript+SeamMergeverbatim (RecorderLivePrecomputerTest.livePrecomputerCheckpointResumesCleanlyInTranscriptionJob).e43bad1to867f68c#10 Previews: N/A — no preview truncation changed.PRECOMPUTEcheckpoint compatibility and provenance matchTranscriptionJobbatch execution (RecorderLivePrecomputerTest.livePrecomputerCheckpointResumesCleanlyInTranscriptionJob).+XREC:FTusesResolverStyle.STRICTuuuu-MM-dd'T'HH:mm:ss(XrecProtocolTest.parsesTimedFileLines),startedAtformats RFC 3339 offsets viaStartedAt.formatpreserving seconds (GraphRecorderLibraryTest), andPartialDownload.liveHeaderPendinground-trips cleanly (RecorderStoreTest).RecorderLiveTailerreconciles partial bytes onBUSY/SIZE_CHANGED/LATERwithout duplication, refreshes stale live WAV headers on both Stop/split and disconnect-after-Stop reconnect (RecorderLiveStreamingTest.partialRangeBeforeBusyReconcilesOffsetWithoutDuplicatingBytes,disconnectAndStopAtSameFlushedLengthRefreshesHeaderOnReconnect), and falls back cleanly on legacy firmware withoutlive=1/lst=1.RecorderLiveStreamingTest,RecorderLivePrecomputerTest)..partfiles stay isolated per device directory andfinishAndInstallawaits teardown and installs checkpoints atomically underwithNoteLockBlockinggated by job/audioKind ownership (RecorderLivePrecomputerTest.concurrentJobOwnershipSkipsSnapshotInstallUnderNoteLock).FakeRecorderhooks,waitlambdas, orCompletableDeferredevent gates rather than wall-clock sleep assertions (RecorderLiveStreamingTest,RecorderLivePrecomputerTest,SyncPlannerTest).origin/main(05f358d2).c7148ddawhile remote CI runs;D-1181drives marking Ready once green, re-review, and iteration until merged.