install.ps1 warnt vor einem veralteten OTA-Bündel
Beim Prüfen, ob die GitHub-Entfernung eine Versionserhöhung brauchte, fiel eine echte Lücke auf: nichts hielt frontend/app/bundle.json auf demselben Stand wie manifest.json. Bei der nächsten echten Versionserhöhung ohne "npm run ota" hätte das zu einem stillen Widerspruch geführt - die Hinweisleiste hätte "veraltet" gemeldet (liest die Version live), die Update-Seite "aktuell" (vergleicht gegen das eingefrorene, dann falsche Bündel) -, ohne dass ein Update über OTA erreichbar gewesen wäre, bis jemand den Widerspruch bemerkt. install.ps1 liest jetzt direkt nach der Manifest-Version auch frontend/app/bundle.json und vergleicht. Bei Abweichung: deutliche Warnung plus erster Eintrag in der Restliste. Fehlt das Bündel ganz, passiert nichts - OTA ist optional, das ist der normale Zustand. Beide Pfade an einem Mock-Zielordner geprüft: passende Versionen melden "OTA-Bündel passt zur Integration" ohne Restliste-Eintrag; eine testweise erhöhte Manifest-Version (danach byte-genau zurückgesetzt, gegen HEAD gegengeprüft) erzeugt die Warnung und landet als Restliste-Punkt 1. VERSIONIERUNG.md: "Was du tun musst" nennt den OTA-Neubau jetzt als eigenen nummerierten Schritt, statt ihn ganz auszulassen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1982,6 +1982,26 @@ published the new manifest version and a complete `buendel` block; the zip serve
|
||||
identically to `bundle.json`'s `sha256`; `unzip -l`/`-t` confirmed 13 entries, `index.html` at the
|
||||
root, no backslashes, no corruption.
|
||||
|
||||
**A second, quieter bug surfaced 2026-08-24 when a manifest-only metadata change (the GitHub-removal
|
||||
commit) prompted the question of whether it needed a version bump.** It didn't — but the question
|
||||
exposed that nothing enforced `frontend/app/bundle.json`'s version staying in sync with
|
||||
`manifest.json`'s on a *real* bump. Trace the failure: bump manifest to V2, ship via `install.ps1`,
|
||||
forget `npm run ota` → backend publishes `app: "V2"` live, but `bundle.json` (frozen at build time)
|
||||
still says V1, and the already-installed app is still V1. `Hinweisleiste` compares app-vs-server and
|
||||
correctly says "you're outdated, update" (V1 ≠ V2) — but the Update screen's `buendelPasst()`
|
||||
compares app-vs-*bundle* and says "you're current" (V1 = V1, the bundle's stale number). Two
|
||||
contradictory messages, and no way to actually reach V2 via OTA until someone notices and reruns
|
||||
`npm run ota` — the exact kind of silent-until-discovered coordination bug this project has fixed
|
||||
repeatedly elsewhere (trip status, tire counter, `edited_fields`). Fixed at the one chokepoint every
|
||||
delivery already passes through: `install.ps1` now reads `frontend/app/bundle.json`'s version right
|
||||
after reading the manifest's, warns loudly and adds the mismatch as the **first** Restliste item if
|
||||
they differ (a missing bundle file is not a mismatch — OTA is optional, silence is correct then).
|
||||
Verified both ways on a mock config dir: matching versions print "OTA-Bündel passt zur Integration"
|
||||
and add nothing to the Restliste; a deliberately bumped manifest (tested via a temporary edit,
|
||||
reverted byte-for-byte after, diffed against `HEAD` to confirm) produces the warning and lands it as
|
||||
Restliste item 1. `VERSIONIERUNG.md`'s "Was du tun musst" now lists the OTA rebuild as its own
|
||||
numbered step (2, before shipping) instead of omitting it entirely.
|
||||
|
||||
Capacitor's `server.url` pointed at HA was considered and **rejected**: it would make the app as
|
||||
current as the panel, but the shell then cannot boot without reaching HA, gutting the deliberately
|
||||
built offline queue (`api/warteschlange.ts`).
|
||||
|
||||
Reference in New Issue
Block a user