From 7c4df3afbf99a600585bbd0803a9517ec4217e99 Mon Sep 17 00:00:00 2001 From: efiten Date: Mon, 14 Sep 2026 10:20:34 +0200 Subject: [PATCH] release: v1.18.1 ec55d31 fixed the inverted guard in noteLinkState but changed app.js without bumping the version or the service-worker cache, so a field log from a phone running the fix would still have read "v1.18.0" and could not have shown whether the fix was in. Version, cache name and release notes go together. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_012GJuEuyG3JMrSeAGCmJ1GP --- docs/releases/v1.18.1.md | 27 +++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- public/sw.js | 2 +- 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 docs/releases/v1.18.1.md diff --git a/docs/releases/v1.18.1.md b/docs/releases/v1.18.1.md new file mode 100644 index 0000000..e2142e8 --- /dev/null +++ b/docs/releases/v1.18.1.md @@ -0,0 +1,27 @@ +# CoreDrive RX v1.18.1 + +Fixes the link-state lines that v1.18.0 added, which fired the wrong way round. + +## What's new + +- **Fix: "companion link back" once a second on a healthy link, and never "link + down".** The guard in `noteLinkState` was inverted. The stored flag holds the inverse of + the link being up, so the steady state is `linkQuiet !== linkUp` and an edge is + `linkQuiet === linkUp`; the guard returned on the edge and fell through in the steady + state. Every tick of a working link announced a return, and the flag never left its + initial value, so a real drop could not be announced at all. + + A field log from 2026-09-14 shows 157 of the 200 buffered lines spent on it, the whole + buffer covering 2 minutes 36 seconds, and not one "link down" line. The heard, asks + and regions lines had rolled out underneath. + + The edge decision is now the pure `linkTransition` in `src/monitor.js`, with tests for + both steady states, both edges, and a full drop-and-return cycle. + +## Upgrade notes + +- **Service-worker cache bumped to `coredrive-rx-v50`.** +- No behaviour change beyond the log. The link gate itself (discover, RF sampling and + region asks standing down while the companion is gone) was correct in v1.18.0; only + its two announcements were wrong. +- Tests: 275 pass (+5). diff --git a/package-lock.json b/package-lock.json index b616535..134371f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coredrive-rx", - "version": "1.18.0", + "version": "1.18.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coredrive-rx", - "version": "1.18.0", + "version": "1.18.1", "license": "GPL-3.0-or-later", "dependencies": { "@noble/ed25519": "^3.2.0", diff --git a/package.json b/package.json index b66a12d..1e1138d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coredrive-rx", - "version": "1.18.0", + "version": "1.18.1", "private": false, "license": "GPL-3.0-or-later", "type": "module", diff --git a/public/sw.js b/public/sw.js index 00ac3af..0dce30c 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,7 +1,7 @@ // Minimal service worker: makes the app installable and lets the shell load // offline. Network-first (always fresh online), cache fallback (offline). // Only the static app assets go through fetch; MQTT runs over WSS (not cached). -const CACHE = 'coredrive-rx-v49'; +const CACHE = 'coredrive-rx-v50'; // config.json is deliberately NEVER cached, in either direction. It is // per-deployment runtime config, and a stale copy is worse than none: flags added