Show the tether, reachability and dated last push and read on the Census page #141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "census-status-times"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
The Census page's Status card now says whether the census can work right now, and when it last did:
tether_onlyoff).The last push and read used to live only in memory, so after any daemon restart (an update, a reboot) the card showed just "Running." and the data used until the next cycle. They're now kept in a small
status.jsonin the plugin's state folder (0600, like the others) and loaded on the worker's first tick, so they survive restarts and UTC midnight. The page still never touches the network: the tether line reads the daemon's active paths, and the reachability line comes from what the worker last found.Checklist
make lint(ansible--syntax-check,yamllint,shellcheck --severity=error, and the real-data check). The Lint workflow runs this on the PR.make test(thekestrel_pipytest suite and the real-data check's tests). The Test workflow runs this on the PR..envfiles, 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.docs/, and the on-device operator guide (GUIDE_MDinkestrel_pi/userguide.py) where it applies.Release impact
kestrel_pipackage,plugins/*.py, systemd units, the journald drop-in, a lib script already in the engine'sLIB_SCRIPTS, or the CLI.config.txt/cmdline, kernel modules, the base image or partition size,builder/config.json,builder/config.yml, theMakefile, the Release workflow (.forgejo/workflows/main.yml), a shipped config default (config.toml/default.conf), or a brand-new lib script.Notes for review
census.py:_when()(UTC date and time plus how long ago),_valid_last()and_save_last()forstatus.json, saved after each push, check and read;_status_lines()rewritten._clock()is gone (its only callers were these lines).tether_onlyoff, the formatter and a malformedstatus.json), and the old "Last read:" assertion updated. 97 census tests pass.census-setup.md("Reading the page", and the state-folder note) and the census paragraph ofGUIDE_MD.fixture.py), so its Census picture reads "Can read and write the census now: yes" once this ships in a stable release. I rendered the page from this branch on the demo phone and checked it.status.jsonsimply shows up there.🤖 Generated with Claude Code