mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
Review follow-ups on the previous commit. Its claim that "nothing is learned or persisted" was wrong. BatteryEstimator buckets drain samples by the current listening mode and force-persists the accumulated window whenever that mode changes, so a misattributed mode can write a drain rate to disk under the wrong bucket, and the corrective report does not remove it. This is not new: the misreport being fixed here already mis-buckets in the same way, and more often, since the device claims OFF while the pods play Adaptive. Classifying corrects the common case and only gets it wrong on the rarer misattribution. The design stands, the claim does not. Two other claims were also too strong. The recorded echo is the first report after the verification was installed, which is not exactly the wire write, so write contention above the latency boundary can still inflate a fast refusal. And a superseded write is not left alone entirely: classification is skipped, but it still falls through to the ordinary retry path. The supersession regression test asserted nothing: it fed a fresh ADAPTIVE report in before its only assertion, overwriting either outcome, so it passed whether or not the guard existed. It now asserts on the state left by the delayed echo, and fails with the guard removed. Also drops an unused import and restores an indent lost when the remap argument was removed.