Say an interrupted update was cut short, not that it failed to start #140

Merged
aluminum-ice merged 1 commit from update-interrupted-wording into main 2026-11-01 20:16:30 +00:00
Owner

What this PR does

After an update is interrupted (a power cut or a crash mid-install), the boot-time recovery restores the previous version, and the dashboard's Updates card used to say "The new version did not come up, so retrying the same release may fail again", because the recovery's detail ("…was interrupted and has been rolled back") matched the restart-failure case. The new version never failed there. The card now says the update was cut short, by a power cut or a crash, that the previous version was restored when the device started again, and that it is safe to retry on steady power. A real restart failure keeps its existing warning.

Checklist

  • Lint passes — make lint (ansible --syntax-check, yamllint, shellcheck --severity=error, and the real-data check). The Lint workflow runs this on the PR.
  • Tests pass — make test (the kestrel_pi pytest suite and the real-data check's tests). The Test workflow runs this on the PR.
  • Nothing real: no secrets, no personal information, no real data. This is a public repository. The diff contains no real account passwords or hashes, Wi-Fi passphrases, private keys, API tokens, .env files, real names, personal emails, device serials, and no real captured or device data: SSIDs, MAC addresses, GPS coordinates, capture files, diagnostics bundles, logs, or screenshots of a real device — placeholders only. The real-data check catches MACs, emails, keys and capture files; real SSIDs, coordinates and screenshots are on you.
  • Consent gates intact. Capture and network plugins still ship disabled, enabling them still takes the authorized-use acknowledgment (never pre-ticked or given by code), and the capture whitelist is still enforced.
  • Docs updated in the same PR, if this changes something an operator sees or configures: the README package table, the relevant page under docs/, and the on-device operator guide (GUIDE_MD in kestrel_pi/userguide.py) where it applies.
  • Commit messages are short and imperative.

Release impact

  • App-layer-safe — changes only files the in-place update engine carries: the kestrel_pi package, plugins/*.py, systemd units, the journald drop-in, a lib script already in the engine's LIB_SCRIPTS, or the CLI.
  • Reflash-class — touches a build input the engine does not carry onto a running device: apt or pip packages, boot options / config.txt / cmdline, kernel modules, the base image or partition size, builder/config.json, builder/config.yml, the Makefile, the Release workflow (.forgejo/workflows/main.yml), a shipped config default (config.toml / default.conf), or a brand-new lib script.

Notes for review

  • _update_failure in web.py checks "interrupted" before "rolled back"; a new test pins that an interrupted update's card says it was cut short and never "did not come up".
  • docs/developer/updates-setup.md ("If an update fails", "If an update is interrupted") says what the card shows. The on-device guide doesn't describe the failure verdicts, so it's unchanged.
  • Locally the suite passes except the two tests that depend on this host (the daemon SIGHUP test and the GPS serial-device test); CI runs both.

🤖 Generated with Claude Code

## What this PR does After an update is interrupted (a power cut or a crash mid-install), the boot-time recovery restores the previous version, and the dashboard's Updates card used to say "The new version did not come up, so retrying the same release may fail again", because the recovery's detail ("…was interrupted and has been rolled back") matched the restart-failure case. The new version never failed there. The card now says the update was cut short, by a power cut or a crash, that the previous version was restored when the device started again, and that it is safe to retry on steady power. A real restart failure keeps its existing warning. ## Checklist - [x] **Lint passes** — `make lint` (ansible `--syntax-check`, `yamllint`, `shellcheck --severity=error`, and the real-data check). The **Lint** workflow runs this on the PR. - [x] **Tests pass** — `make test` (the `kestrel_pi` pytest suite and the real-data check's tests). The **Test** workflow runs this on the PR. - [x] **Nothing real: no secrets, no personal information, no real data.** This is a public repository. The diff contains no real account passwords or hashes, Wi-Fi passphrases, private keys, API tokens, `.env` files, real names, personal emails, device serials, and no real captured or device data: SSIDs, MAC addresses, GPS coordinates, capture files, diagnostics bundles, logs, or screenshots of a real device — placeholders only. The real-data check catches MACs, emails, keys and capture files; real SSIDs, coordinates and screenshots are on you. - [x] **Consent gates intact.** Capture and network plugins still ship disabled, enabling them still takes the authorized-use acknowledgment (never pre-ticked or given by code), and the capture whitelist is still enforced. - [x] **Docs updated in the same PR**, if this changes something an operator sees or configures: the README package table, the relevant page under `docs/`, and the on-device operator guide (`GUIDE_MD` in `kestrel_pi/userguide.py`) where it applies. - [x] Commit messages are short and imperative. ## Release impact - [x] **App-layer-safe** — changes only files the in-place update engine carries: the `kestrel_pi` package, `plugins/*.py`, systemd units, the journald drop-in, a lib script already in the engine's `LIB_SCRIPTS`, or the CLI. - [ ] **Reflash-class** — touches a build input the engine does not carry onto a running device: apt or pip packages, boot options / `config.txt` / `cmdline`, kernel modules, the base image or partition size, `builder/config.json`, `builder/config.yml`, the `Makefile`, the Release workflow (`.forgejo/workflows/main.yml`), a shipped config default (`config.toml` / `default.conf`), or a brand-new lib script. ## Notes for review - `_update_failure` in `web.py` checks "interrupted" before "rolled back"; a new test pins that an interrupted update's card says it was cut short and never "did not come up". - `docs/developer/updates-setup.md` ("If an update fails", "If an update is interrupted") says what the card shows. The on-device guide doesn't describe the failure verdicts, so it's unchanged. - Locally the suite passes except the two tests that depend on this host (the daemon SIGHUP test and the GPS serial-device test); CI runs both. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Say an interrupted update was cut short, not that it failed to start
All checks were successful
Test / test (pull_request) Successful in 34s
Lint / lint (pull_request) Successful in 35s
Test / test (push) Successful in 33s
Lint / lint (push) Successful in 34s
60f01a4c2e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aluminum-ice deleted branch update-interrupted-wording 2026-11-01 20:16:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aluminum-ice/kestrel!140
No description provided.