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

Alan-Jowett / sonde / 26771948327
82%

Build:
DEFAULT BRANCH: main
Ran 01 Jun 2026 06:00PM UTC
Jobs 1
Files 124
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

01 Jun 2026 05:49PM UTC coverage: 82.117% (-0.05%) from 82.162%
26771948327

push

github

web-flow
fix(gateway): stamp `master_key_id`/`master_key_epoch` at INSERT time (#1115)

GW-2001 specified `init_master_key_id` as a first-startup backfill, but
nodes registered after startup had permanently NULL `master_key_id` in
the DB. Engine.rs line 1217 drops escrow fields from ACTUAL_STATE when
`master_key_id` is empty, so post-startup nodes never had escrow data
in the Azure actual-state table.

Root cause: all five INSERT paths (`upsert_node`, `insert_node_if_not_exists`,
`replace_state`, `store_phone_psk`, `replace_phone_psks`) omitted the
`master_key_id` and `master_key_epoch` columns.

Fix:
- Add `read_current_key_metadata()` helper that reads current key ID and
  epoch from `gateway_config`, failing closed if `init_master_key_id` has
  not been called (GW-2001 AC-6).
- Stamp all five INSERT paths with current key metadata.
- `upsert_node` ON CONFLICT also repairs stale/NULL metadata.
- Add shape validation (32-byte key ID, epoch >= 1).
- Add T-2005b integration test: node registered after init has escrow
  fields in ACTUAL_STATE.
- Update E2E harness to call `init_master_key_id` in constructors.

Spec changes:
- GW-2001 AC-6 (gateway-requirements.md)
- S23.6 INSERT-time stamping (gateway-design.md)
- T-2005b test case + traceability (gateway-validation.md)

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

66 of 97 new or added lines in 2 files covered. (68.04%)

9 existing lines in 2 files now uncovered.

37943 of 46206 relevant lines covered (82.12%)

251.25 hits per line

Uncovered Changes

Lines Coverage ∆ File
31
83.15
-0.48% crates/sonde-gateway/src/sqlite_storage.rs

Coverage Regressions

Lines Coverage ∆ File
7
81.27
-0.27% crates/sonde-azure-companion/src/main.rs
2
83.03
-0.15% crates/sonde-gateway/src/engine.rs
Jobs
ID Job ID Ran Files Coverage
1 26771948327.1 01 Jun 2026 06:00PM UTC 124
82.12
GitHub Action Run
Source Files on build 26771948327
  • Tree
  • List 124
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26771948327
  • e2b1fb08 on github
  • Prev Build on main (#26703053776)
  • Next Build on main (#26794705748)
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