🌙 SomnoTrace v4.0.4 (since v4.0.3)
Focused bug-fix release resolving AirSense 10 (AS10) EDF import issues (#357) and hardening SomnoBridge BLE communication.
🐛 Fixes
- AirSense 10 sessions failing to import (or importing breathing data only):
- ⏱️ Tolerate AS10 EDF header timestamp lag: AirSense 10 machines commonly write the EDF header start time 1–2 seconds (occasionally slightly more under SD card stalls) after creating the filename. SomnoTrace now allows up to ±5 seconds of header-to-filename skew during machine identity verification while still rejecting mismatched or renamed files.
- 🧩 Keep split AS10 waveform files together: On AS10,
PLDandSADfilenames are frequently stamped 1 second afterBRPfor the same session. Restored the 2-second intra-session clustering window (and late-arrival augmentation matching) soBRP,PLD, andSADstay grouped into one complete session instead of getting skipped or split into breathing-only sessions. - 🔄 Automatic recovery on upgrade: Bumped the staged-import cache marker so previously skipped AS10 days sitting in
IMPORT/are automatically re-evaluated and imported after updating—no manual cleanup required.
- 📡 Ignore stale BLE control responses: Guarded SomnoBridge JSON response reassembly against unsolicited or stale request IDs so late duplicate
STREAM_ENDframes can never interrupt or time out an activeLIST_DIRECTORYorGET_DRIFTrequest.
🧪 Testing
- Added regression tests covering AS10 header timestamp skew (+1..3 s accepted, >5 s rejected), 1-second
BRP/PLD/SADstem splits, late+1 swaveform augmentation, upgrade re-evaluation of cached v2.import_statemarkers, and exact-stemSA2/SADduplicate rejection.