Install every operator script in the image #121

Merged
aluminum-ice merged 1 commit from fix/install-all-operator-scripts into main 2026-10-31 07:17:31 +00:00
Owner

What this PR does

Makes a freshly flashed card carry every desktop script, as an in-place-updated one already does.

The playbook's "install kestrel operator scripts" task listed two files, pull-agent-diagnostics.sh and README.md. The in-place updater (update-apply.py) installs every file in builder/extra/files/scripts/. So a flashed card has never had pull-health.sh, pull-eink-diagnostics.sh, pull-connectivity-diagnostics.sh, pull-web-diagnostics.sh or gps-check.sh in /usr/local/share/kestrel/scripts/. Devices that reached a release in place had them, so nothing noticed until 1.0.11-beta.1's on-device check (#119, item 4.1) ran on a fresh flash.

  • builder/config.yml: the task now loops over every file in the folder, with the updater's rule (.sh 0755, everything else 0644).
  • New test (test_update_apply.py): it runs the task's shell loop against the repo's scripts/ into a temp dir and checks it installs exactly the names and modes the updater plans. It fails on the old two-file task.

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

  • App-layer-safe by the CLAUDE.md rule: the only config.yml hunk is an install task whose source is under builder/extra/files and whose destination (/usr/local/share/kestrel/scripts/) the engine already writes, with the same files and modes. So 1.0.11-beta.2 should be cut with update_kind=app-layer; auto would mark it reflash because config.yml changed.
  • The stable floor moves to beta.2. Because config.yml changes after beta.1, update_manifest.py will make the stable 1.0.11 app-layer from 1.0.11-beta.2 on rather than beta.1. Beta testers apply beta.2 in place first, which they would anyway. 1.0.10 devices flash either way.
  • Devices on beta.1 get the missing scripts as soon as they apply beta.2: the updater installs every file in the folder.

🤖 Generated with Claude Code

## What this PR does Makes a freshly flashed card carry every desktop script, as an in-place-updated one already does. The playbook's "install kestrel operator scripts" task listed two files, `pull-agent-diagnostics.sh` and `README.md`. The in-place updater (`update-apply.py`) installs every file in `builder/extra/files/scripts/`. So a flashed card has never had `pull-health.sh`, `pull-eink-diagnostics.sh`, `pull-connectivity-diagnostics.sh`, `pull-web-diagnostics.sh` or `gps-check.sh` in `/usr/local/share/kestrel/scripts/`. Devices that reached a release in place had them, so nothing noticed until 1.0.11-beta.1's on-device check (#119, item 4.1) ran on a fresh flash. - **`builder/config.yml`:** the task now loops over every file in the folder, with the updater's rule (`.sh` 0755, everything else 0644). - **New test** (`test_update_apply.py`): it runs the task's shell loop against the repo's `scripts/` into a temp dir and checks it installs exactly the names and modes the updater plans. It fails on the old two-file task. ## 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`, `.forgejo/workflows/`, a shipped config default (`config.toml` / `default.conf`), or a brand-new lib script. ## Notes for review - **App-layer-safe by the CLAUDE.md rule:** the only `config.yml` hunk is an install task whose source is under `builder/extra/files` and whose destination (`/usr/local/share/kestrel/scripts/`) the engine already writes, with the same files and modes. So **1.0.11-beta.2 should be cut with `update_kind=app-layer`**; `auto` would mark it reflash because `config.yml` changed. - **The stable floor moves to beta.2.** Because `config.yml` changes after beta.1, `update_manifest.py` will make the stable 1.0.11 app-layer from **1.0.11-beta.2** on rather than beta.1. Beta testers apply beta.2 in place first, which they would anyway. 1.0.10 devices flash either way. - **Devices on beta.1** get the missing scripts as soon as they apply beta.2: the updater installs every file in the folder. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Install every operator script in the image
All checks were successful
Test / test (push) Successful in 24s
Lint / lint (push) Successful in 33s
Test / test (pull_request) Successful in 21s
Lint / lint (pull_request) Successful in 32s
c14f776c86
The playbook installed only pull-agent-diagnostics.sh and the README into
/usr/local/share/kestrel/scripts, while in-place updates install every
file there, so a freshly flashed card lacked pull-health.sh and the other
desktop scripts. Install the whole folder with the updater's mode rule,
and test that the two agree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aluminum-ice deleted branch fix/install-all-operator-scripts 2026-10-31 07:17:32 +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!121
No description provided.