* fix(#3619): update flow waits for a genuinely new server instance before reload (#3713) @rodboev. _waitForServerThenReload() reloaded on the first healthy /health response without confirming the server instance changed, so a slow restart could reload onto the old process or show a premature error toast. Now captures a baseline server identity from /health's existing server_started_at and only reloads on a changed identity. Frontend-only (server_started_at already in /health on master). ui.js verified byte-identical to PR head; test_update_banner_fixes 82 passed. + CHANGELOG v0.51.299. * fix(#3713): reload on observed outage when uptime-only identity not lower (Codex catch) Codex found a CORE edge case: when a deployment strips server_started_at and BOTH the baseline and replacement /health expose only uptime_seconds, the reload trigger relied solely on 'next.uptime < baseline.uptime'. If the old server's baseline uptime was very low (~0) and the new instance is first seen at equal/higher uptime, that never fires and the user is stranded on the restart banner. Fix: track _observedOutage (set in the /health probe catch arm) and, for the uptime-only-on-both-sides case, treat an outage-then-healthy sequence as the new instance and reload. A real restart almost always produces an outage given the pre-probe interval, so this closes the gap without weakening the identity check. + regression test. * fix(#3713): harden outage fallback — require >=2 consecutive outages, count non-OK (Codex round 2) Codex round 2 found two refinements to the outage fallback: (1) a single transient fetch blip could set the flag and reload onto the still-running old server; (2) a reverse-proxy 502/503 returns r.ok===false (not a thrown error) so the proxy-outage case didn't register. Replaced the boolean with a _consecutiveOutages counter: require >=2 consecutive outages before the uptime-only reload; count BOTH thrown errors and non-OK/non-status-ok responses; reset to 0 when the old server answers healthy (so unrelated blips can't accumulate). Updated the regression test to the counter contract. --------- Co-authored-by: nesquena-hermes <[email protected]> |
||
|---|---|---|
| .. | ||
| vendor | ||
| apple-touch-icon.png | ||
| boot.js | ||
| commands.js | ||
| favicon-32.png | ||
| favicon-192.png | ||
| favicon-512.png | ||
| favicon-512.svg | ||
| favicon.ico | ||
| favicon.svg | ||
| i18n.js | ||
| icons.js | ||
| index.html | ||
| login.js | ||
| manifest.json | ||
| messages.js | ||
| onboarding.js | ||
| panels.js | ||
| pwa-startup.js | ||
| sessions.js | ||
| style.css | ||
| sw.js | ||
| terminal.js | ||
| ui.js | ||
| workspace.js | ||