Skip to content

v0.4.2

Choose a tag to compare

@disruptivepatternmaterial disruptivepatternmaterial released this 05 Sep 01:24
· 24 commits to main since this release

A Japanese view title or location split across two BLE packets no longer
disappears. Atmoph's titles and locations are Japanese, a notification can be
split at any byte including the middle of a character, and decoding each
packet on its own raised on both halves — so the update the window pushed was
dropped and the sensor sat on the previous view until the next poll, up to a
minute later. The decoder now holds the incomplete character until the rest of
it arrives.

Nothing to do to upgrade, and no configuration changes.

What else changed

Only tests, but they are the reason the fix above exists. A review found the
suite could be deleted through in places: stubbing out the notification
dispatcher — the whole of what makes this integration local_push — left all
80 tests passing.

The fakes now model the window docs/PROTOCOL.md actually describes rather
than a polite one, which turned up the split-character bug and several
untested requirements:

  • Notifications are delivered through a bleak-shaped sender object, and every
    notifying characteristic is followed to the entity state it lands in.
  • Quick-setting bounds come from the device and reach 25, not 10, and all nine
    settings the app knows are reported, so three number entities and two
    switches are no longer registered-but-unavailable throughout the suite.
  • A setting write is echoed back and clamped, so the optimistic update is
    checked against what the device actually accepted.
  • The display's habit of silently dropping a toggle sent within about a second
    of one that took effect is modelled, and the retry pause has to outlast it.
  • A nameless advertisement, and passive versus active scanning, are both
    modelled: the name rides in the scan response, so the same window is seen
    named and nameless seconds apart.

Statement coverage of the integration is 100%, up from 96.7%, and 34 deliberate
mutations of the production code are each caught by a named test.