• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Alan-Jowett / sonde / 23693546329
82%

Build:
DEFAULT BRANCH: main
Ran 28 Mar 2026 08:23PM UTC
Jobs 1
Files 77
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Mar 2026 08:20PM UTC coverage: 85.697% (-0.04%) from 85.738%
23693546329

push

github

web-flow
Gateway: persist ESP-NOW channel in database (GW-0808) (#561)

* feat(gateway): persist ESP-NOW channel in database (GW-0808)

Fixes three related bugs where the ESP-NOW radio channel was ephemeral:

- #558: set-channel was lost on gateway restart
- #555: modem reconnect restored cli.channel instead of last-set channel
- #541: BLE pairing sent cli.channel instead of the current channel

Changes:

**Spec updates (requirements, design, validation):**
- Add GW-0808 requirement for channel persistence
- Update GW-1103 to reference persisted channel on reconnect
- Document gateway_config table and get_config/set_config in design
- Add test cases T-0815a through T-0815e for channel persistence

**Code changes:**
- Add gateway_config table to SQLite schema with migration
- Add get_config/set_config to Storage trait, InMemoryStorage,
  and SqliteStorage
- SetModemChannel admin RPC now writes the new channel to the database
  after a successful modem channel change
- Gateway startup seeds the database with --channel only if no
  persisted value exists; otherwise the database value wins
- Modem reconnect reads the channel from the database on each iteration
- BLE pairing reads the channel from the database on each
  REGISTER_PHONE event

Closes #558
Fixes #555
Fixes #541

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: fail RPC early when DB read fails for channel rollback

The \get_config\ call used \.ok().flatten()\ which silently swallowed
storage errors. If the DB read failed, the modem channel could be
changed without a valid rollback value, breaking the modem+DB
consistency guarantee required by GW-0808.

Return an internal error immediately if the DB cannot be read, before
touching the modem.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

38 of 62 new or added lines in 3 files covered. (61.29%)

23122 of 26981 relevant lines covered (85.7%)

156.43 hits per line

Uncovered Changes

Lines Coverage ∆ File
20
0.0
0.0% crates/sonde-gateway/src/bin/gateway.rs
4
79.71
-4.66% crates/sonde-gateway/src/storage.rs
Jobs
ID Job ID Ran Files Coverage
1 23693546329.1 28 Mar 2026 08:23PM UTC 77
85.7
GitHub Action Run
Source Files on build 23693546329
  • Tree
  • List 77
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23693546329
  • 472da295 on github
  • Prev Build on main (#23689773746)
  • Next Build on main (#23693547030)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc