Remove the deprecated ups-hat plugin #113

Merged
aluminum-ice merged 1 commit from remove/ups-hat into main 2026-10-31 05:17:13 +00:00
Owner

What this PR does

Removes the deprecated ups-hat plugin, as planned in deferred.md. ups-ws replaced it in 1.0.10 (the same code under the board's name), and 1.0.11 is reflash-class anyway.

  • Deletes plugins/ups-hat.py.
  • Renames the shipped [plugins.ups-hat] table in config.toml to [plugins.ups-ws] (same keys and defaults).
  • ups-ws loses the hooks that existed only for the deprecated pair (DEPRECATED, the yields/notice arguments, the deprecation log line). The ups library keeps its generic yields/notice API.
  • Tests: the plugin-wiring tests in test_reference_plugins.py now run against ups-ws; test_ups_lib.py loads the libraries through it and checks the yielding rule with a stand-in name; test_ups_ws.py drops the same-code and deprecation checks and gains test_ups_hat_is_gone (no plugin, no shipped table, no ups-hat in the user-facing plugin lists, no ups-hat-setup.md); test_plugins_apply.py and test_web.py updated.
  • Docs: deletes docs/user-guide/ups-hat-setup.md; ups-ws-setup.md's "Switching from ups-hat" becomes "Coming from ups-hat" (enable ups-ws after reflashing with the same shutdown_percent); README, managing-plugins.md, user-guides.md, config-reference.md, plugin-libraries.md, GUIDE_MD, CLAUDE.md and two library comments updated; the plugin count goes from nineteen to eighteen.
  • Removes the "Remove the deprecated ups-hat plugin" entry from deferred.md.

Left as is on purpose: the ghost-guide fixture's UPS_NAMES fallback (it renders ups-hat for a stable release from before 1.0.11), tools/beta-check/ (its ups-hat item goes in the 1.0.11 beta-check update), and assets/branding/web-ui-iphone-preview.html, a static snapshot of older sample pages.

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, .forgejo/workflows/, a shipped config default (config.toml / default.conf), or a brand-new lib script.

Notes for review

  • Reflash-class because the shipped config.toml changes: only a reflash puts the [plugins.ups-ws] table on a device. An in-place update would delete ups-hat.py (the engine removes plugins a release no longer ships) and leave a device that had ups-hat on without its battery readout and auto-shutdown, so this must not go out app-layer. Like #112, update_kind=auto won't catch it; 1.0.11-beta.1 needs update_kind=reflash.
  • 1.0.11's release notes should say to enable ups-ws (and eink-ws27) after reflashing if ups-hat (or eink) was in use.
  • test_gps_serial_reader_recovers_from_a_stalled_link fails on my machine on main too and passes in CI; unrelated.

🤖 Generated with Claude Code

## What this PR does Removes the deprecated `ups-hat` plugin, as planned in `deferred.md`. `ups-ws` replaced it in 1.0.10 (the same code under the board's name), and 1.0.11 is reflash-class anyway. - Deletes `plugins/ups-hat.py`. - Renames the shipped `[plugins.ups-hat]` table in `config.toml` to `[plugins.ups-ws]` (same keys and defaults). - `ups-ws` loses the hooks that existed only for the deprecated pair (`DEPRECATED`, the `yields`/`notice` arguments, the deprecation log line). The `ups` library keeps its generic `yields`/`notice` API. - Tests: the plugin-wiring tests in `test_reference_plugins.py` now run against `ups-ws`; `test_ups_lib.py` loads the libraries through it and checks the yielding rule with a stand-in name; `test_ups_ws.py` drops the same-code and deprecation checks and gains `test_ups_hat_is_gone` (no plugin, no shipped table, no `ups-hat` in the user-facing plugin lists, no `ups-hat-setup.md`); `test_plugins_apply.py` and `test_web.py` updated. - Docs: deletes `docs/user-guide/ups-hat-setup.md`; `ups-ws-setup.md`'s "Switching from `ups-hat`" becomes "Coming from `ups-hat`" (enable `ups-ws` after reflashing with the same `shutdown_percent`); README, `managing-plugins.md`, `user-guides.md`, `config-reference.md`, `plugin-libraries.md`, `GUIDE_MD`, CLAUDE.md and two library comments updated; the plugin count goes from nineteen to eighteen. - Removes the "Remove the deprecated `ups-hat` plugin" entry from `deferred.md`. Left as is on purpose: the ghost-guide fixture's `UPS_NAMES` fallback (it renders `ups-hat` for a stable release from before 1.0.11), `tools/beta-check/` (its `ups-hat` item goes in the 1.0.11 beta-check update), and `assets/branding/web-ui-iphone-preview.html`, a static snapshot of older sample pages. ## 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 - [ ] **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. - [x] **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`, `.forgejo/workflows/`, a shipped config default (`config.toml` / `default.conf`), or a brand-new lib script. ## Notes for review - **Reflash-class** because the shipped `config.toml` changes: only a reflash puts the `[plugins.ups-ws]` table on a device. An in-place update would delete `ups-hat.py` (the engine removes plugins a release no longer ships) and leave a device that had `ups-hat` on without its battery readout and auto-shutdown, so this must not go out app-layer. Like #112, `update_kind=auto` won't catch it; 1.0.11-beta.1 needs `update_kind=reflash`. - 1.0.11's release notes should say to enable `ups-ws` (and `eink-ws27`) after reflashing if `ups-hat` (or `eink`) was in use. - `test_gps_serial_reader_recovers_from_a_stalled_link` fails on my machine on `main` too and passes in CI; unrelated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Remove the deprecated ups-hat plugin
All checks were successful
Test / test (push) Successful in 25s
Lint / lint (push) Successful in 32s
Test / test (pull_request) Successful in 21s
Lint / lint (pull_request) Successful in 32s
627541d2af
ups-ws replaced it in 1.0.10 as the same code under the board's name.
Remove ups-hat.py, rename the shipped [plugins.ups-hat] table to
[plugins.ups-ws], drop ups-ws's deprecation hooks, move the ups-hat tests
onto ups-ws, and update the docs, the on-device guide and the plugin counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aluminum-ice deleted branch remove/ups-hat 2026-10-31 05:17:13 +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!113
No description provided.