# Release v2.18.2 — the update checks what it is told

Released 2026-10-27 from `refactor` → `master`, tagged `v2.18.2`, on top of
v2.18.1 (`docs/release-v2.18.1.md`). Found by the first real self-update of
the development gateway (v2.17.0 → v2.18.1 from the release site): the
update itself went through and was confirmed; two things around it did not
work as meant.

## The installer files are checked, not taken on the word

A release whose gatewayd unit or helper scripts changed asks for the
installer's refresh first. Before, the admin ticked "I ran the installer's
refresh" and nothing looked: on the development gateway the refresh had not
reached `gateway-pre-start.sh`, months old.

- gatewayd hashes its unit and helper scripts the way the release build
  hashes them into BUILDINFO's `installer_hash`, and compares the two.
  Prepare refuses while they differ — whatever the box says — and asks
  nothing of a node that has them already.
- **System → Updates → "Refresh them from vX"** runs the cached release's
  own `install-gateway.sh --refresh` (checked against the release's
  SHA256SUMS first): the unit and the helper scripts only — no apt, no
  config, no restart — and counts only when the files then hash to the
  release's. `POST /api/v1/system/update/installer-refresh {version}`.
- auto goes on for a node whose files are the release's.
- A release cached by an older gateway kept only the BUILDINFO fields that
  version knew; the missing ones are read from the release's own BUILDINFO
  file.

## The tunnels coming back do not extend the update window

After the restart the OpenVPN tunnels came back within half a minute, and
the watcher extended the confirmation window three times — each shrink of
the list of failed links counted as a new failure. Now, within a grace
after the start (a tenth of the window, 60 s at most) an outside failure is
logged and extends nothing; past it only a failure not seen before extends
the window. An outside failure still never rolls back.

The watcher of an update is written by the version updated *from*: an
update from v2.18.1 to this release may still extend its window that way —
harmless, Confirm now ends it.

## Upgrading

- From v2.18.1: the unit and helper scripts are the same as v2.18.1's
  (`installer_hash` 1766f722…), but this BUILDINFO still says
  `requires_installer` — the build tool compared a stripped copy of the
  previous release's files, so every release since v2.18.0 said so (fixed
  for the next one). A v2.18.1 node therefore asks once for "I ran the
  installer's refresh": its files are v2.18.1's when its own refresh ran
  (`install.sh` with `GATEWAY_REFRESH=1`), and from v2.18.2 on the files
  are checked by hash, the flag aside. System → Updates fetches the release
  from the site (signed by the built-in keys) or takes the uploaded archive.
- From v2.18.0 or older: as for v2.18.1 (`docs/release-v2.18.1.md`).
