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

Alan-Jowett / sonde / 23306737354
82%

Build:
DEFAULT BRANCH: main
Ran 19 Mar 2026 05:04PM UTC
Jobs 1
Files 71
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

19 Mar 2026 04:55PM UTC coverage: 82.632% (+0.02%) from 82.614%
23306737354

push

github

web-flow
Implement modem admin gRPC handlers (#314)

* Implement modem admin gRPC handlers

Wire up the three stub modem gRPC handlers in `admin.rs`:

- `get_modem_status` — calls `transport.poll_status()` and maps the
  protocol `ModemStatus` to the protobuf `ModemStatus`.
- `set_modem_channel` — validates channel 1-14 and calls the new
  `transport.change_channel()` method.
- `scan_modem_channels` — calls the new `transport.scan_channels()`
  and maps `ScanResult`/`ScanEntry` to protobuf types.

Changes to `modem.rs`:

- Add `channel_ack_slot` and `scan_slot` shared oneshot slots
  (same pattern as the existing `status_slot`).
- Add public `change_channel()` and `scan_channels()` methods.
- Extend `dispatch_message` to route `SetChannelAck` to the shared
  slot after startup (falling through from the consumed local oneshot)
  and `ScanResult` to the new scan slot.
- Clear new slots on modem error (matching existing error recovery).
- Add tests: T-1106 (change_channel success), T-1107 (invalid channel),
  T-1108 (scan_channels success).

All three handlers return `Status::unavailable` when no modem transport
is configured (headless gateway mode).

Closes #310

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

* Make modem slot operations cancellation-safe and fix error messages

Switch `channel_ack_slot` and `scan_slot` from `tokio::sync::Mutex` to
`std::sync::Mutex` so a `SlotGuard` Drop impl can clear them
synchronously.  This ensures slots are released when a gRPC handler
future is cancelled (client disconnect), preventing "already in
progress" errors on subsequent calls.

Also fix ambiguous error messages: "channel ack channel closed" ->
"SET_CHANNEL_ACK channel closed", "scan channel closed" ->
"SCAN_RESULT channel closed".

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>

144 of 171 new or added lines in 2 files covered. (84.21%)

3 existing lines in 1 file now uncovered.

16523 of 19996 relevant lines covered (82.63%)

49.62 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
75.69
5.05% crates/sonde-gateway/src/modem.rs
10
62.11
-2.52% crates/sonde-gateway/src/admin.rs

Coverage Regressions

Lines Coverage ∆ File
3
62.11
-2.52% crates/sonde-gateway/src/admin.rs
Jobs
ID Job ID Ran Files Coverage
1 23306737354.1 19 Mar 2026 05:04PM UTC 71
82.63
GitHub Action Run
Source Files on build 23306737354
  • Tree
  • List 71
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23306737354
  • 5d4322f1 on github
  • Prev Build on main (#23305965148)
  • Next Build on main (#23309406050)
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