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

Alan-Jowett / sonde / 25943429448
81%

Build:
DEFAULT BRANCH: main
Ran 15 May 2026 10:12PM UTC
Jobs 1
Files 126
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

15 May 2026 09:59PM UTC coverage: 82.816% (-0.3%) from 83.094%
25943429448

push

github

web-flow
feat(gateway): decoder BPF programs for APP_DATA enrichment (GW-1900-GW-1906) (#925)

* feat(gateway): decoder BPF programs for APP_DATA enrichment (GW-1900-GW-1906)

Implement gateway-side decoder BPF program support: optional SEC("decoder")
ELF sections are extracted, verified with a restricted DecoderPlatform, and
executed on APP_DATA messages to produce named sensor readings.

New modules:
- decoder_platform.rs: Prevail platform with restricted helpers (IDs 10,
  11, 16, 18). Uses data/end pointer pair context descriptor (16 bytes).
- decoder.rs: BPF execution engine using sonde-bpf. Thread-local state
  for emit_reading collection. Max 32 readings, 64-byte names, last-write-
  wins. 100k instruction budget. Runs via spawn_blocking.

Changes:
- ProgramRecord gains decoder_image: Option<Vec<u8>> field
- ingest_elf() extended with extract_decoder() for decoder section
  extraction, Prevail verification, and CBOR image construction
- HandlerMessage::Data and ConnectorOutboundMessage::AppData gain
  optional readings field at CBOR key 16
- handle_app_data_core() performs decoder enrichment before emitting to
  both handler and connector (GW-1903 AC-6)
- SQLite migration adds decoder_image column; state bundle export/import
  updated with key 7
- sonde_helpers.h gains decoder_context struct and emit_reading helper
- tmp102_sensor.c and sht40_sensor.c gain SEC("decoder") functions

Spec updates:
- decoder_context uses { input_data, input_end } (data/end pointer pair)
  instead of { input_data, input_len } for Prevail verifier compatibility.
  Updated bpf-environment.md, gateway-requirements.md, gateway-design.md.

Tests: 15 new tests in tests/decoder.rs covering T-1900, T-1900a/b/c,
T-1901, T-1901a/b, T-1903b/c, T-1904, T-1904a/b/c, T-1906, and handler
message roundtrip with readings.

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

* feat(gateway): log decoded APP_DATA reading... (continued)

533 of 765 new or added lines in 12 files covered. (69.67%)

9 existing lines in 3 files now uncovered.

34858 of 42091 relevant lines covered (82.82%)

257.94 hits per line

Uncovered Changes

Lines Coverage ∆ File
69
73.15
crates/sonde-gateway/src/decoder.rs
57
90.28
-2.7% crates/sonde-gateway/src/program.rs
56
34.12
crates/sonde-gateway/src/decoder_platform.rs
24
85.4
-1.98% crates/sonde-gateway/src/engine.rs
8
87.08
-0.28% crates/sonde-gateway/src/sqlite_storage.rs
6
84.64
-0.8% crates/sonde-gateway/src/connector.rs
5
80.74
-0.2% crates/sonde-gateway/src/state_bundle.rs
5
94.37
-3.23% crates/sonde-protocol/src/program_image.rs
2
83.5
0.29% crates/sonde-gateway/src/handler.rs

Coverage Regressions

Lines Coverage ∆ File
7
80.73
-0.3% crates/sonde-azure-companion/src/main.rs
1
80.74
-0.2% crates/sonde-gateway/src/state_bundle.rs
1
94.37
-3.23% crates/sonde-protocol/src/program_image.rs
Jobs
ID Job ID Ran Files Coverage
1 25943429448.1 15 May 2026 10:12PM UTC 126
82.82
GitHub Action Run
Source Files on build 25943429448
  • Tree
  • List 126
  • Changed 11
  • Source Changed 10
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25943429448
  • 6fc81673 on github
  • Prev Build on main (#25939302573)
  • Next Build on main (#25943491924)
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