Repository navigation
fix(app): release idle ring downloads without discarding received audio - #21829
Conversation
|
Thanks — this is a careful fix for a real liveness gap. Reviewed each changed file:
One non-blocking behavior edge worth a maintainer eye: after this change, a mismatched BEGIN (start != requested) or empty DATA no longer cancels the 5s first-data timer — only valid BEGIN/nonempty DATA do. That matches the "control chatter is not progress" rule documented in the new doc, but it does mean a device that only ever sends garbage/stale BEGIN now fails via the 5s timer instead of the previous implicit paths. Intended per the doc; just confirming it's deliberate. Checks green. Ready for the requested human review pass. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Trusted contributor bug fix, CI green, but mergeStateStatus is DIRTY/CONFLICTING - hard floor + no-rebase hard rule block merge; approve only.
…-idle-timeout # Conflicts: # backend/docs/listen_pusher_pipeline.mdx
|
Pushed 35a4fe6: merged current main and resolved the
|
… unit inventory) (#21925) * fix(app): migrate #21829 decode site to typed client (unbreak backend unit inventory) * style(app): dart format users.dart at the CI language version Co-Authored-By: Claude Opus 5.5 <[email protected]> * style(app): dart format users.dart as CI does (after pub get) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed and why
Bound a ring-buffer download that becomes silent after READ_BEGIN or DATA. The
initial five-second timeout was cancelled on BEGIN, leaving only a 30-minute
overall deadline. A connected, stalled read therefore kept the transfer owner
busy instead of yielding to normal capture/retry orchestration.
matching the existing legacy SD idle bound. Repeated BEGIN, empty DATA and
control chatter are not progress.
notifications, send STOP on the original connection epoch, drain already
received bytes and flush complete records through the existing durable WAL
owner. Do not acknowledge an unfinished source or advance an unproven frontier.
the same cleanup. A valid DONE arrival cancels the radio idle deadline even
while its validation waits behind custody I/O. Healthy DONE and existing
custody capability gates remain.
fixed startup sleeps, keeping the original durable-advance assertions.
failure goes through cleanup; keep catch-and-continue behavior.
Related: #21279 (uploaded jobs queued/429), #21387 (merged polling backoff),
#21319 (merged short-WAL batching), #21755 (merged backfill dispatcher-owner
repair), #21823 (merged batch-worker quarantine), and #21362 (retained-upload
recovery). These are separate stages.
This PR does not close the customer case or assert that the reported 1.4 KB/s,
capture interruption, cloud worker state or missing recaps share this cause.
No firmware version or diagnostic export was supplied for the Discord 0/127
report, and no production repair, storage deletion or deployment is performed.
Why isn't this a shared primitive instead? The existing ring reader already
owns read admission, STOP, notification ordering, durable flush and frontier
validation. Its watchdog belongs inside that owner, not in a parallel recovery
actor. The injectable timer tests the real owner without waiting 15 seconds.
Product invariants affected
registration. Timeout leaves the source pending and sends no unproven
advance. Legacy firmware may reclaim on BLE delivery before app durability;
this does not repair or conceal that existing risk or promise recovery of
incomplete records.
Verification
partial audio, ignored chatter, cancelled deadlines, healthy DONE and bytes
queued behind a deliberately blocked custody check, with and without DONE.
mobile-verify fast --paths app/lib/services/wals/ring_storage_sync.dart): 3 checks passed, no skips.make preflight: 25 checks passed.code, including the diagnostic guard and the 14 ring-owner tests above.
then green with its original stack, cause and phase preserved. Changed-file
analyzer: no issues found.
and released-app retest: not performed; require hardware/account evidence.
Architecture and implementation/release checklist:
app/docs/offline-sync-stall-recovery.md. The listen/pusher pipeline map isupdated. This needs a mobile release after merge, not a backend deployment.
UI evidence
UI-Evidence: none -- transfer lifecycle only; no UI, copy or layout changes
Failure class
Failure-Class: FC-sync-failure-records-drop-cause