Repository navigation
fix: a transient decoder loss no longer drops the learnt capacity to the floor (#189) - #190
Conversation
…the floor (#189) - Losses at a load below a proven one (played PROBE_QUIET_MS without losses) count as a transient: the lowest full cell is demoted as before, but proven, failedLoad and the capacity (at least proven) stay. A second such demotion within TRANSIENT_WINDOW_MS (10 min) means the proven load was wrong: handled as any failure, as before. - The retry of a failed load (FAILED_RETRY_MS) is timed from the last demotion (or the last retry), not from the last lossy sample, which key-frame cells keep resetting. - When the highest-priority key-frame cell is held back (a failed load, or it does not fit and no probe is due), the first lower-priority cell that fits within the capacity and stays below the failed load is promoted. Probes and retries stay with the first cell. Unit tests for each case, including the #189 timeline and stored values. No existing test changed: none relied on the changed behaviour. versionName 2.10, versionCode 35.
PR Summary by QodoPreserve learned decoder capacity after transient losses
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
…ed one below the floor is not trusted)
Code Review by Qodo
1.
|
…ad plays quietly again, not once per 10 minutes (Qodo on #190)
|
Device test 2026-10-15 on Aceline-1 (AG-216, .144): passed.
|
…ad plays quietly again, not once per 10 minutes (Qodo on #190)
fix: a transient decoder loss no longer drops the learnt capacity to the floor (#189)
Fixes #189.
Changes (
DecodePlanner)proven(a load that playedPROBE_QUIET_MSwithout losses) demote the lowest full cell as before, butproven,failedLoadand the capacity (kept ≥proven) stay. Repeated transients: a transient is forgiven once. The next below-proven demotion meansprovenitself is wrong and is handled as before (failed load set,provencut, capacity lowered; floor of Planner: learnt decoder capacity can be poisoned by a system stall and blocks full rate for an hour #126 kept), unless a load at least as high asprovenhas playedPROBE_QUIET_MSwithout losses again in between (Qodo on fix: a transient decoder loss no longer drops the learnt capacity to the floor (#189) #190: no time window, so losses spaced far apart still count).FAILED_RETRY_MS(1 h) is timed from the last demotion (newlastFailMs, also moved by the retry itself), no longer fromquietSinceMs, which any lossy sample resets.failedLoad × FAILED_MARGIN, or no fit and no probe due), the first lower-priority cell that fits within the capacity and stays below the failed-load margin is promoted. Probes beyond the capacity and the failed-load retry stay with the highest-priority cell; theUNKNOWN_WAIT_MSwait is unchanged.Decoder.javaunchanged: it persists capacity / failed load as before.Tests
New: transient keeps capacity and failed load (the #189 timeline 312 338 → 239 719), repeated transient falls back (also 15 min later), a transient is forgiven again after the proven load plays quietly again, a light cell is promoted in the #189 state (capacity 244 800, failed 239 719 in the session, nine key-frame cells), probes keep priority order, retry an hour after the demotion despite sparse losses. Existing tests unchanged.
Verify on device (.144, AG-216)
capacity244800 /failed_load239719; a stored failed load at or below the floor is not trusted after a restart (Planner: learnt decoder capacity can be poisoned by a system stall and blocks full rate for an hour #126), so the box starts from capacity 244800 and relearns. The real check is the next loss within a session: light cells keep being promoted and the capacity stays ≥ the proven load.Decoder losses: … to key framesbelow a proven load keepscapacity≥ the proven load.