Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f305c6d
appliance: rig-side updater — signed bundle over Tor, spare-slot inst…
Nov 13, 2026
4e08b72
tests: rig-update KVM leg — check, refusals, install and verdict on t…
Nov 13, 2026
dd7ad08
tests: shfmt the rig-update scripts
Nov 13, 2026
f866d20
tests: drop the suite guard from the rig-update leg — run.sh sources …
Nov 13, 2026
b59ea40
tests: rig-update leg — v1 is the declared marker, settle the planted…
Nov 14, 2026
e16e8a9
tests: register rig-update with the completion list, both verb ledger…
Nov 14, 2026
5701099
tests: rig-update leg — capture the refusal stderr, poll the verdict,…
Nov 15, 2026
23f501e
tests: rig-update leg — drop explanatory comment
Nov 20, 2026
3cd1bfb
Merge remote-tracking branch 'origin/develop-v2.0.5' into agent/4013-…
Nov 21, 2026
66f77f2
tests: rig-update leg — drop trailing comment
Nov 21, 2026
3c8dd0f
rig-update: drop explanatory comments on added lines
Nov 21, 2026
9294b41
rig-update: record Tor-helper failures, write pending before the slot…
Nov 21, 2026
14a1226
docs: rig-update status file ordering and kept verdicts; shfmt selftest
Nov 21, 2026
abd7d8f
Merge remote-tracking branch 'origin/develop-v2.0.5' into agent/4013-…
Nov 21, 2026
aaed523
tests: keep rig.sh at its file-budget ceiling with the rig-update call
Nov 21, 2026
a22e9ab
Merge remote-tracking branch 'origin/develop-v2.0.5' into agent/4013-…
Nov 27, 2026
8b00967
tests: rig-update selftest pins the test-seam marker gate (#4258)
Nov 27, 2026
9b7376f
Merge develop-v2.0.5 into the rig-update branch
Nov 28, 2026
b5445c1
Merge branch 'develop' into agent/4013-rig-side-updater-download-the-…
pithead-developer[bot] Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ per the process in [`docs/dev/releasing.md`](docs/dev/releasing.md).

- The **Stack Topology & Egress** panel shows the host's own traffic: a scope pill, host-OS nodes for time sync, OS and release fetches and image pulls, a warning when the host audit counted flows outside the allowlist, and a not-observed notice when the audit table is not loaded. `GET /api/system/egress-audit` and `egress_audit` in `/api/state` expose the counters (#4415, #4416, #4417).
- With `tor.auto_heal`, a Tor stuck at 95% bootstrap with no circuit and an up guard (a relay refusing circuit creation) is cured by a guard rotation (`DROPGUARDS`) on the NEWNYM budget instead of a refresh that keeps the guards, and the heal never restarts Tor after one (#4121).
- Rigs take OS updates themselves: `pithead rig-update check` reads the release channel through the
image's on-demand Tor client, and `pithead rig-update install` downloads the signed bundle over Tor,
verifies it against the baked keyring with every shared refusal, writes the spare slot and reboots;
the intent lands in `rig-update.json` on `/data` and the boot settles the verdict — self-commit and
`updated`, or fallback with the failed slot marked bad and a `rolled_back` record (#4013).

### Fixed

Expand Down
9 changes: 8 additions & 1 deletion docs/dev/rig-os-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ On request only, never on a schedule. A request names no URL: the rig fetches th

### Status file

The rig keeps its last request time, verdict and reason in a status file on `/data`; its path and fields are fixed by #4013, which adds them to this page before it merges. The journal carries the same lines.
The rig keeps its last request outcome in `/data/pithead/rig-update.json` (`$PWD/rig-update.json` on the rig checkout), written by `pithead rig-update` before the reboot and settled by the rig branch of `pithead-boot` on the next boot through `pithead rig-update boot-record`. Fields:

- `state` — `pending` (written after the bundle verified and before the spare slot is written, so a status file that cannot be written aborts the install before anything changes; settled by the next boot, or replaced by `refused` if the slot write fails), `refused` (a refusal — the running slot was untouched and the rig kept mining), `updated` (the pending slot booted with the miner up and committed), or `rolled_back` (the miner never came up there; the bootloader fell back and the failed slot was marked bad).
- `from`, `to` — the running version at the time and the target version, bare `X.Y.Z`; `to` is the version a pending install is waiting on, and a pending record blocks a new install until the reboot settles it. A refusal, including a failure of the Tor helper (clock, bootstrap or lock), never overwrites a `pending` record or a `rolled_back` verdict.
- `ts` — Unix seconds of the last state change.
- `reason` — present on refusals and on `rolled_back`: the one-line why, the same text printed to the console. The journal carries the same lines.

A status read is what the feed (#4014) surfaces; the file is plain JSON, world-readable, and lives on `/data`, so it survives the slot swap.

### Trust model

Expand Down
1 change: 1 addition & 0 deletions docs/dev/testing-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ the situations above; `missing` means nothing does yet, with the issue that owns
| `firstboot-wizard` | covered | KVM (`pithead-firstboot.service`) |
| `local-miner` | covered | KVM rig phase, via `pithead-boot` |
| `os-update` | covered | KVM (appliance-only verb) |
| `rig-update` | covered | KVM rig phase, its own leg (#4013) |
| `factory-reset` | covered | KVM (appliance-only verb) |
| `control-run-pending` | covered | DIY bench |
| `egress-run-pending` | covered | firewall-on clearnet sync on the DIY bench |
Expand Down
18 changes: 18 additions & 0 deletions lib/pithead/18-help-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,24 @@ Maintenance:
--reboot reboot to finish the update once it is
installed (asks first unless -y is given).

rig-update check Rig-side OS updater (rigs only). Starts Tor through the image's
on-demand client, reads the hardened release channel, prints the
running and available OS versions, stops Tor, installs nothing.

rig-update install [--tag T] [--max-version V]
Downloads the signed bundle over Tor into /data (resumable,
refused up front when /data lacks the room), verifies it against
the baked release keyring with the same refusals as every other
door (signature, compatible, variant, no downgrade, equal
refused, /data migration floor), refuses while the other slot is
uncommitted or an update is pending, then writes the spare slot
and reboots. The intent and the post-boot verdict live in
rig-update.json on /data. --tag names an exact vX.Y.Z release;
--max-version is a semantic ceiling the target must not exceed.
Every refusal keeps the rig mining and names its reason in that
status file; the bundle and its partial are deleted on every
outcome.

onion-client-key Print the Tor client-auth line for the dashboard onion —
the client PRIVATE key, kept out of 'status'. Add it to your Tor
client's ClientOnionAuthDir to reach a client-auth'd onion.
Expand Down
2 changes: 1 addition & 1 deletion lib/pithead/41-subcommand-chaining.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Every dispatchable subcommand, in help order. main's dispatch, the chain validator, and the
# tab-completion script (pithead-completion.bash) key off this one list; tests/stack/run.sh fails
# if any of the three drift apart.
readonly PITHEAD_COMMANDS="setup apply render up down restart tor-recover upgrade logs status test-alert doctor support-bundle recovery-bundle reset-dashboard config-reset factory-reset backup restore uninstall firstboot-wizard load-images local-miner os-update control-run-pending egress-run-pending egress-status lan-guard-check onion-client-key rotate-dashboard-onion rotate-secrets render-quadlet version help"
readonly PITHEAD_COMMANDS="setup apply render up down restart tor-recover upgrade logs status test-alert doctor support-bundle recovery-bundle reset-dashboard config-reset factory-reset backup restore uninstall firstboot-wizard load-images local-miner os-update rig-update control-run-pending egress-run-pending egress-status lan-guard-check onion-client-key rotate-dashboard-onion rotate-secrets render-quadlet version help"
# The subset allowed in a chain: commands that take no positional argument and terminate on their
# own. Excluded: setup (interactive first-run), logs (follows until Ctrl+C), restore (needs an
# archive path), reset-dashboard (destructive — run it deliberately, alone), test-alert (outbound
Expand Down
2 changes: 1 addition & 1 deletion lib/pithead/47a-os-update-channel.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
os_release_tag_valid() { printf '%s' "${1:-}" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; }
os_release_tag_valid() { [[ "${1:-}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; }

os_release_host_ok() {
case "$1" in
Expand Down
Loading
Loading