Add runtime post-recreate sanity check (peer of smoke-test.sh)

scripts/recreate-sanity-check.sh verifies what is actually live in a
recreated container — persisted volumes, pi runtime wiring (keybindings,
extensions, mempalace.ts bridge, settings.json, fork/obsmem/studio
registrations), /tmp/sshcm, skel defaults, /opt toolkits. smoke-test.sh
runs at build time with --entrypoint="" and cannot see any of this.

Variant (studio/plain) auto-detected via /opt/pi-studio. pi version is
asserted only with --expected-version (built from 'latest', no Dockerfile
pin to self-derive). Maintainer tooling, not baked into the image.

Documented in README and CHANGELOG.
This commit is contained in:
pi
2026-06-15 22:04:02 +02:00
parent f8da7890df
commit 4ed6764323
3 changed files with 312 additions and 0 deletions
+19
View File
@@ -37,6 +37,25 @@ Pre-v1.0.0 tags followed the pi npm version (`v{pi_version}[letter]`).
— which hashes differently than a SHA and triggers one *extra* rebuild,
never a *missed* one (fail-toward-rebuild).
### Added (maintainer tooling, no image change)
- **`scripts/recreate-sanity-check.sh`** — runtime post-recreate sanity
check; the runtime peer of `smoke-test.sh`. Where `smoke-test.sh` runs at
build time with `--entrypoint=""` (and so can never see persisted volumes
or the entrypoint's runtime deploy), this verifies what is actually live
in the container *after* `docker compose up -d --force-recreate`:
persisted named volumes survived, the pi runtime wiring is intact
(keybindings symlink, ≥4 extensions, `mempalace.ts` bridge, `settings.json`,
and pi-fork / pi-observational-memory / pi-studio registrations),
`/tmp/sshcm` is mode 700, shell defaults re-seeded, and `/opt` toolkits
intact. Variant (studio/plain) auto-detected via `/opt/pi-studio`. Since
pi is built from `latest` (no concrete Dockerfile pin), the version check
asserts only when `--expected-version` is passed, else WARNs. Not baked
into the image — repo/maintainer tooling, same category as
`smoke-test.sh`. A short-name wrapper (`pi-devbox-sanity`) lives in
`cli_utils/bin`, kept separate from opencode-devbox's `devbox-sanity` so
hosts with only one devbox checked out stay self-contained.
### Docs (no image change)
- Correct the MemPalace `diary_write` anyOf workaround watch-target in