feat(deploy): sync a scenario's backend/ into the live workspace root

deploy-scenario.sh now single-sources the application backend: it copies the git-tracked files under [scenario].backend into the workspace root (where .pi/ sits beside them), preserving modes and skipping caches/venvs. It overwrites but never prunes, and never restarts -- it prints a restart reminder when backend files change. README's Application code section updated to match.
This commit is contained in:
Kai
2026-08-30 21:48:25 -07:00
parent a337ea978f
commit fb1a1d2b10
2 changed files with 44 additions and 5 deletions
+6 -5
View File
@@ -65,11 +65,12 @@ A scenario that runs its own service keeps that service's source under
units and config templates. It is the single source of truth; the live checkout
at the scenario's `workspace` path is a runtime copy.
`deploy-scenario.sh` installs only `workspace/` (the `.pi` config) and renders the
launch contract; it does not touch `backend/`, build a venv or restart a service.
Rolling application code out to the live checkout and restarting the unit stays an
operator step, deliberately: restarting decides when to interrupt a live
conversation.
`deploy-scenario.sh` installs `workspace/` (the `.pi` config), vendors shared
extensions, renders the launch contract, and syncs `backend/` into the workspace
root — copying only git-tracked files (build caches and virtualenvs never leak)
and preserving file modes. It never prunes files the repo no longer tracks, never
builds a venv, and never restarts the service: it prints a reminder instead, since
restarting decides when to interrupt a live conversation.
## Start here