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

Alan-Jowett / sonde / 26771948327 / 1
81%
main: 81%

Build:
DEFAULT BRANCH: main
Ran 01 Jun 2026 06:01PM UTC
Files 124
Run time 4s
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.1

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>

37943 of 46206 relevant lines covered (82.12%)

251.25 hits per line

Source Files on job 26771948327.1
  • Tree
  • List 124
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26771948327
  • e2b1fb08 on github
  • Prev Job for on main (#26703053776.1)
  • Next Job for on main (#26794705748.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc