Skip to content

v0.2.3 — completing the review fixes

Choose a tag to compare

@yodax yodax released this 07 Sep 09:48
· 4 commits to main since this release

The v0.2.2 fixes were themselves re-reviewed, and several turned out to be
partial. No sensor values change; no reconfiguration needed.

The miss that mattered

Transactions had their own pagination loop, a few hundred lines away from
the shared one fixed in v0.2.2 — and it kept both of the same bugs. A server
answering "here are 0 records, there are 100" produced 0 points earned this
month
. There is now exactly one pagination implementation; the duplication
was the entire cause.

Also fixed

  • Advancing the offset does not help against a server that ignores it. Two
    identical pages turned one 10-point transaction into 20. Records are now
    matched by id, and a page containing only repeats is an error — matched by
    id rather than by content precisely so that Trappers' own duplicate tag
    reads, which are separate records sharing a date, still work normally.
  • A fast poll could still schedule a redundant one. If a refresh finished
    just before the slot it was woken for, the next poll was scheduled a minute
    later instead of three hours later.
  • The monthly reset timestamp could name the wrong month. A poll starting
    at 23:59:59 on the 31st computes that month's figures and can finish a second
    into the next one — and would then file them under the new month.
  • The euro rate accepted a catalogue split exactly 80/20, treated an unreadable
    expiry date as "never expires", and read "Cadeaukaart € 25,00 2026 editie"
    as 25.002026. The rate is also re-checked after midnight now, since article
    availability is expressed in whole days.

The leak guard, where two holes were in the code written to close a hole

  • The new commit-message check skipped lines starting with #, assuming git
    strips comments. git commit -m does not, so a commented-out secret went
    straight through the very hook added to catch it.
  • Files with non-ASCII names were committed unscanned, because git renders
    such paths escaped and the escaped form matches no file.
  • The hook's own test suite counted any failed commit as a successful block,
    so a broken test environment would have reported passes without ever reaching
    the hook — the same fail-open the guard exists to prevent, one level up.

171 tests, 34 hook cases.