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

Alan-Jowett / sonde / 26537192756
81%

Build:
DEFAULT BRANCH: main
Ran 27 May 2026 08:44PM UTC
Jobs 1
Files 130
Run time 2min
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

27 May 2026 08:35PM UTC coverage: 82.507% (+0.1%) from 82.412%
26537192756

push

github

web-flow
feat(gateway): implement rotation execution engine (GW-2006, GW-2007, GW-2013) (#1060)

* feat(gateway): implement rotation execution engine (GW-2006, GW-2007, GW-2013)

Implement the master key rotation execution engine -- the critical-path
component that makes SubmitRotation gRPC and DESIRED_STATE rotation
operational.

New module: rotation_engine.rs
- RotationEngine struct receiving rotation payloads from both gRPC
  (rotation_tx channel) and DESIRED_STATE (gateway_desired_state_tx)
- 8-step rotation pipeline: decrypt, verify code, verify epoch,
  prepare, migrate PSKs, rewrap identity, commit, emit
- Crash recovery via resume_pending_rotation() at startup
- AtomicBool flag for concurrent rotation rejection
- ACTUAL_STATE re-emission via existing ConnectorEventHub API

Storage changes: sqlite_storage.rs
- pending_rotation table migration -- previously deferred, now created
  in open() with crash-safe schema
- Dual-key PSK decryption -- rotation_key_state field enables frame
  processing during migration (mixed master_key_epoch values)
- master_key swap support -- changed to RwLock<Arc<Zeroizing<...>>>
  for in-memory key swap after rotation commit
- Pending-rotation-aware startup -- validate_master_key tries both
  old and new keys when an interrupted rotation is detected
- New methods: write_pending_rotation, read_pending_rotation,
  update_rotation_phase, migrate_node_psk, migrate_phone_psk,
  rewrap_identity_seed, commit_rotation, swap_master_key,
  list_node_escrow_state, is_rotation_in_progress

Integration tests: tests/rotation.rs
- T-2003: Rotation code authentication
- T-2004: Happy path (3 nodes + 1 phone PSK, full rotation cycle)
- T-2004a: Validation failures (wrong epoch, wrong code, corrupted, replay)
- T-2004b: Concurrent rotation discard
- T-2005: Crash-safe rotation (partial migration, resume on restart)
- T-2008: gRPC rotation path via spawned engine task
- T-2009: Crash recovery -- all three phases
- T-2010: Pending recovery purge... (continued)

749 of 946 new or added lines in 2 files covered. (79.18%)

38681 of 46882 relevant lines covered (82.51%)

242.82 hits per line

Uncovered Changes

Lines Coverage ∆ File
155
82.78
-2.18% crates/sonde-gateway/src/sqlite_storage.rs
42
87.65
crates/sonde-gateway/src/rotation_engine.rs
Jobs
ID Job ID Ran Files Coverage
1 26537192756.1 27 May 2026 08:44PM UTC 130
82.51
GitHub Action Run
Source Files on build 26537192756
  • Tree
  • List 130
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26537192756
  • 00544c7a on github
  • Prev Build on main (#26536321810)
  • Next Build on main (#26543495002)
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