feat(rebuild): update every installed component from one rebuild

This commit is contained in:
Lap Tran committed 2026-11-23 12:49:53 -05:00
1 parent cff3c8873e
commit 4e1b65b5d2
6 files changed
+280 -20

No files matched your search

+21
View File
@@ -54,6 +54,7 @@ The captain confirmed the split on 2026-11-15. Leave it unchanged:
./tests/fm-launcher.sh --live # installed zshrc; fails while it still launches Pi
./tests/fm-launcher.sh # generated zshrc; must pass
./tests/crew-dispatch.sh # routing via firstmate, model IDs via opencode models
./tests/rebuild-update-steps.sh # static audit of rebuild.sh update steps
./tests/run.sh # all checks
```
@@ -75,6 +76,26 @@ The Nix sources in this repository are the durable record. The live files are ge
This follows the NIST SP 800-128 Rev. 1 (2019) Section 3.3 "Controlling Configuration Change" (CM-3) practice: route every change through review and approval, test it, record it in version control, and restrict who can change the operational configuration. The 2011 edition is withdrawn and superseded by Revision 1.
## What `rebuild.sh` updates
One `./rebuild.sh` run brings every installed component to its latest supported version. Each step is idempotent: a current copy is left alone, and a re-run repeats no install. When a tool or the network is absent, the step prints a warning and the rebuild continues.
Before the switch:
- Homebrew formulae and casks, through `brew update` and `brew upgrade`. `configuration.nix` stays the declaration; `onActivation.upgrade` repeats the upgrade during the switch.
- npm globals through `/opt/homebrew/bin/npm`, never Nix's npm: `@steipete/bird`, `acpx`, `backpass`, `chrome-devtools-axi`, `defuddle`, `forgejo-axi`, `gh-axi`, `lavish-axi`, `quota-axi`, and `tasks-axi`. Each package is compared with the registry before an install. `tasks-axi` keeps its firstmate floor of 0.2.6 in `home.activation.axiTools`, which now installs only a missing or older copy, so the latest release survives the switch.
- Retired npm packages are removed only while their evidence still holds: `@opencode-ai/cli`, `opencode-ai`, and the June `pi-cli`/`pi-coding-agent` placeholders. The global `pi-context` is removed only when Pi keeps its own copy under `~/.pi/agent/npm`. If `pi` resolves into npm's global tree, the script warns and leaves those packages in place.
- `no-mistakes update`, using the binary at `~/.no-mistakes/bin/no-mistakes`.
- `hermes update --yes`, which pulls the configured channel and restarts the services that run its new code.
- `nix flake update`, so the switch builds from the newest locked inputs. Commit the resulting `flake.lock` change.
After the switch:
- The Skills CLI updates every skill tracked in `~/.agents/.skill-lock.json`. The pinned pstack skills are not in that lock, so they stay on the `home.nix` revision (see [pstack skills](#pstack-skills-pinned-on-every-rebuild)). `security-audit` is excluded on purpose, because `home.nix` freezes it so a rebuild never pulls a new skill mid-session; renew it by hand with the command in [security-audit skill](#security-audit-skill-agent-security-reviews).
- `pi update --extensions --no-approve`, run after the switch because the Homebrew bundle may have upgraded the `pi` binary.
Two tools have no supported updater: `actionlint` and `shellcheck` are standalone binaries in `~/.local/bin`, downloaded from their release pages. The rebuild does not replace them. Both were current on 2026-11-23 (actionlint 1.7.12, shellcheck 0.11.0); fetch a new release by hand when one is published. The pinned pstack tree also stays put; see its section for how to move it.
## security-audit skill (agent security reviews)
`home.activation.securityAuditSkill` installs Cloudflare's `security-audit` skill from `https://github.com/cloudflare/security-audit-skill` so the coding agents can run a structured vulnerability audit. The exact command: