Release, Deployment, and Rollback

This is a pre-cutover contract, not a live-status report.

Stamp and prove

A release token is single-use. Stamp only after source and contract changes are complete:

npm run release:stamp -- <release-token>
npm run check
npm test
npm run story -- check --all --strict
npm run test:browser
audio-service/.venv/bin/python -m unittest discover -s audio-service/tests -v

Stamping regenerates release-managed CSS/icons, updates all seven marked token sites, stages exactly the six runtime files, and rewrites/verifies deploy/runtime-checksums.sha256 transactionally. A later runtime or sidecar byte change consumes that candidate token and requires a new one. (docs/ARCHITECTURE.md:34-46, docs/OPERATIONS.md:17-21)

Stage and publish

Create a unique, timestamp-prefixed immutable directory below /var/www/svnm-releases/. Copy exactly the six runtime files plus referenced PNG/WebP assets, verify runtime hashes against the ledger, then atomically replace /var/www/svnm through a temporary symlink and one rename. Never edit a live release directory. (SVG-Animator-BIBLE.md:322-332, deploy/runtime-files.json:1-8)

The independent audio installation is /opt/svnm/audio-service, configured by /etc/svnm-audio.env and svnm-audio.service. Its bind is 127.0.0.1:52525; public traffic reaches it only through /api/audio/ on https://svnm.loca.zone. Secrets never enter Git, release directories, logs, or this wiki. (audio-service/config.py:65-110, audio-service/__main__.py:521-550)

Roll back

  1. Identify a previously verified immutable release.
  2. Re-verify its six-file ledger.
  3. Atomically repoint /var/www/svnm.
  4. If the crossed release changed audio-service/**, restore matching sidecar source/dependencies and restart the unit.
  5. Re-run health, byte, public-route, and strict production checks.

Retain the live target plus the three newest older releases. Rollback is a verified cutover, not in-place file repair. (docs/OPERATIONS.md:66-93, SVG-Animator-BIBLE.md:324-332)