github ilyakruchinin/SomnoTrace v4.0.0-rc1

pre-release2 hours ago

SomnoTrace v4.0.0-rc1

Release candidate — stability and import-pipeline hardening since v4.0.0-beta8.
Focus this round: stop the IMPORT folder from re-processing itself forever,
kill a bridge-resolver deadlock, survive long HTTP requests without resets,
and make the web UI reflect reality on first load. 🎯

🔄 Import pipeline — no more Groundhog Day

  • 📇 Persistent import state — each staged day-group now records a file
    signature, seen-count and an evidence epoch on SD. Unchanged groups are
    skipped after a confirmation pass, so retained evidence no longer triggers
    a full day rebuild every cycle. Import passes dropped from ~5 minutes of
    rebuild churn to sub-second no-ops. ⚡
  • 🧹 Imported files are cleaned up — once a session's content is safely
    committed (and its provenance recorded in the session manifest), staged
    source files are removed from IMPORT/. Ambiguous or contested files
    still stay put — they're evidence, not trash. 🗂️
  • 🔁 STR deadlock fixed — a staged-but-evaluated STR.edf no longer
    vetoes its own replacement. SomnoBridge can now archive the old copy and
    pull a fresher one, unblocking the channel that was designed to resolve
    staged ambiguity. Genuinely unverified files still defer, as before. 🔓
  • 🔕 Warning diet — repeated "conflicting identity" / "STR retained"
    messages now only re-fire when the outcome actually changes, and the
    "EDFs remain" warning only reports files that genuinely can't match a
    session group (with the path of the first offender). Staged files
    patiently waiting for evidence are no longer treated as noise. 🤫
  • 🧠 Smarter session pairing — verified same-machine MaskOn events within
    a minute of TherapyStart can pair without STR evidence; wave stems
    earlier than their annotation stem are excluded from pairing candidates;
    foreign-machine native settings are ignored rather than blocking. 🧩
  • 🩹 Soft conflicts — unreadable manifests/identity files now withhold
    daily settings instead of aborting STR generation, and interrupted-rebuild
    sentinels are released when their day is gone or permanently pending. 🕊️

🌐 Web server & UI

  • 🚦 Offloaded the HTTP task — slow SD listings, log downloads, BLE
    scans/RPCs, upload probes and oximetry queries now run on deferred
    workers; file downloads stream through the shared worker with correct
    Content-Length handling. No more stalled pages or mid-request resets. 🏎️
  • 🔌 More sockets, bigger backlog — lwIP and httpd limits raised so
    concurrent browser tabs and the WebSocket coexist peacefully.
  • 🖥️ SomnoBridge cards appear on first load — bridge telemetry now rides
    the periodic status payload (and BLE websocket pushes), so Status and
    Actions show bridge info without a detour through Settings. 👀
  • 🎛️ Honest buttons — Sync now pulls the recent-day window and imports;
    Import now is a real import-only mode that drains IMPORT/ without
    waking the bridge (perfect after manual FTP/SD copies); the misleading
    Full sync (365 days) button is gone — out-of-window days belong in
    IMPORT/ anyway. Feedback now shows on the card you clicked. ✅

💾 Memory

  • 🧊 Big static buffers moved to PSRAM — ML pending state, upload index and
    scheduler arrays, battery samples, web-auth routes, mDNS and the touch
    worker all live in external RAM now, leaving more internal heap for
    Wi-Fi/TLS and fewer low-water scares. 📉

🧪 Verification

  • Host suite: 37 tests, 0 failures (import dedupe, cross-stem consumption,
    pairing and marker-version cases covered). ✔️
  • Flashed and soak-tested on-device: consecutive quiet import passes,
    contested sources correctly reported as skipped, scheduled bridge syncs
    unaffected. 🛰️

Stats: 8 commits · 28 files · +1175 / −181

Don't miss a new SomnoTrace release

NewReleases is sending notifications on new releases.