Pass the dashboard password to the beta check's dashboard section #122

Merged
aluminum-ice merged 1 commit from fix/beta-check-dashboard-password into main 2026-10-31 07:19:07 +00:00
Owner

What this PR does

Fixes the beta check's dashboard section, which never received the dashboard password.

The section ran as printf '%s\n' "$web_pw" | /usr/bin/python3 -I - <<'PY'. The heredoc replaces the piped stdin, so Python read its own code from stdin, then sys.stdin.readline() returned an empty line. Every dashboard-backed check (3.2, 5.4, 6.3, 7.4, 9.10, 9.12, 9.19, 9.25–9.27 for 1.0.11-beta.1) reported "SKIP: no password given", whether the password was typed at the prompt or forwarded with KESTREL_WEB_PASSWORD. The same construct was in earlier betas' scripts.

  • The section's Python is now written to $work/dashboard.py, the check's root-only (0700) temp folder, removed on exit, and the password is piped to it. It still never appears on a command line, in the environment or on disk.

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

  • tools/beta-check/ only; the scripts aren't shipped in the image.
  • Checked off the device:
    • the reproduction: printf 'x\n' | python3 -I - <<PY ... sys.stdin.readline() returns '';
    • the fixed section, extracted and run against a local stand-in dashboard (accepting only an invented test password), gives CHECK 9.19 PASS with the password piped in and SKIP: no password given without one;
    • make lint is clean.
  • The rest of the script is unchanged, so beta 1's checks keep their ids. The updated zip is attached to #119 for a rerun.

🤖 Generated with Claude Code

## What this PR does Fixes the beta check's dashboard section, which never received the dashboard password. The section ran as `printf '%s\n' "$web_pw" | /usr/bin/python3 -I - <<'PY'`. The heredoc *replaces* the piped stdin, so Python read its own code from stdin, then `sys.stdin.readline()` returned an empty line. Every dashboard-backed check (3.2, 5.4, 6.3, 7.4, 9.10, 9.12, 9.19, 9.25–9.27 for 1.0.11-beta.1) reported "SKIP: no password given", whether the password was typed at the prompt or forwarded with `KESTREL_WEB_PASSWORD`. The same construct was in earlier betas' scripts. - The section's Python is now written to `$work/dashboard.py`, the check's root-only (0700) temp folder, removed on exit, and the password is piped to it. It still never appears on a command line, in the environment or on disk. ## 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 - `tools/beta-check/` only; the scripts aren't shipped in the image. - **Checked off the device:** - the reproduction: `printf 'x\n' | python3 -I - <<PY ... sys.stdin.readline()` returns `''`; - the fixed section, extracted and run against a local stand-in dashboard (accepting only an invented test password), gives `CHECK 9.19 PASS` with the password piped in and `SKIP: no password given` without one; - `make lint` is clean. - The rest of the script is unchanged, so beta 1's checks keep their ids. The updated zip is attached to #119 for a rerun. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Pass the dashboard password to the beta check's dashboard section
All checks were successful
Test / test (pull_request) Successful in 22s
Lint / lint (pull_request) Successful in 32s
Test / test (push) Successful in 22s
Lint / lint (push) Successful in 32s
82731c5e6c
The section ran as "printf pw | python3 - <<PY", where the heredoc
replaces the piped password, so Python always read an empty line and
skipped every dashboard check. Write the Python to the check's root-only
work folder and pipe the password to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aluminum-ice deleted branch fix/beta-check-dashboard-password 2026-10-31 07:19:07 +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!122
No description provided.