Explain a census tether-socket result in the beta check #152

Merged
aluminum-ice merged 1 commit from beta-check-9.8 into main 2026-11-02 00:32:58 +00:00
Owner

What this PR does

Makes the beta check's 9.8 (the census socket is bound to the phone's tether) explain its result. On 1.0.13-beta.1's first run (#150) it failed nine minutes after the update restarted the daemon, and the report couldn't say why.

With tether_only on, the census section now also prints:

  • When the daemon started (ActiveEnterTimestamp), to compare with a restart.
  • The daemon's UDP sockets by interface: for example bnep0=1 any=2. Interface names only, no address or port.
  • The tether's state, as the check reads it.
  • The census's own pause and failure lines from this daemon process: census paused: …, census cycle failed, the link went down mid-cycle, couldn't write slot, entry missing. It prints the count and the last eight, each as time and message only. The hostname and process field are removed, and the lines go through jscrub like other journal excerpts.

The FAIL detail now points to those lines. Nothing else changed.

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.

(The scripts aren't shipped in the image.)

Notes for review

  • Still read-only: ss, systemctl show and journalctl only.
  • Nothing new can identify the device: the census logs no addresses, and the new lines hold only interface names, times and fixed census messages.
  • Checked off the device:
    • Socket parsing: run on sample ss lines (an interface-bound IPv4 socket, an unbound one, and an IPv6 one bound to another interface) gives any=1 bnep0=1 wlan0=1.
    • Journal parsing: keeps only the census lines, as time and message.
    • Lint: bash -n and make lint pass.

🤖 Generated with Claude Code

## What this PR does Makes the beta check's 9.8 (the census socket is bound to the phone's tether) explain its result. On 1.0.13-beta.1's first run (#150) it failed nine minutes after the update restarted the daemon, and the report couldn't say why. With `tether_only` on, the census section now also prints: - **When the daemon started** (`ActiveEnterTimestamp`), to compare with a restart. - **The daemon's UDP sockets by interface:** for example `bnep0=1 any=2`. Interface names only, no address or port. - **The tether's state**, as the check reads it. - **The census's own pause and failure lines** from this daemon process: `census paused: …`, `census cycle failed`, `the link went down mid-cycle`, `couldn't write slot`, `entry missing`. It prints the count and the last eight, each as time and message only. The hostname and process field are removed, and the lines go through `jscrub` like other journal excerpts. The FAIL detail now points to those lines. Nothing else changed. ## 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. (The scripts aren't shipped in the image.) ## Notes for review - **Still read-only:** `ss`, `systemctl show` and `journalctl` only. - **Nothing new can identify the device:** the census logs no addresses, and the new lines hold only interface names, times and fixed census messages. - **Checked off the device:** - **Socket parsing:** run on sample `ss` lines (an interface-bound IPv4 socket, an unbound one, and an IPv6 one bound to another interface) gives `any=1 bnep0=1 wlan0=1`. - **Journal parsing:** keeps only the census lines, as time and message. - **Lint:** `bash -n` and `make lint` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Explain a census tether-socket result in the beta check
All checks were successful
Test / test (pull_request) Successful in 33s
Lint / lint (pull_request) Successful in 34s
Test / test (push) Successful in 31s
Lint / lint (push) Successful in 34s
9f790dab50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aluminum-ice deleted branch beta-check-9.8 2026-11-02 00:32:58 +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!152
No description provided.