ops(svos): v0.0.18 staged on nh3-svos (kernel 0.0.18, interface 0.0.7, UI 0.0.22); cutover playbook ready, gated on the tag reaching origin and Prime at the board

This commit is contained in:
vh
2026-10-18 23:25:46 -07:00
parent 4cc605ecbc
commit ec113b6efd
3 changed files with 81 additions and 0 deletions
@@ -0,0 +1,54 @@
# nh3-svos -> SVOS v0.0.18 (6d4cb1c): app-interface 0.0.7 (U20 settings: verbs settings + setting, namespace
# interface-settings) and UI 0.0.22; kernel 0.0.18 is a version bump with no code change. svos-dev's request, thread
# 01M59D7NTZNN75SRP0M4ZQF91A. PRE-REQS: nh3-svos-6d4cb1c-v0.0.18-stage.yaml; origin's v0.0.18 == 6d4cb1c64de0 (checked
# on nh3-dev before this runs: git ls-remote); Prime AT THE BOARD - the interface's new manifest raises a held card, and
# until he approves it every interface verb answers wrong-revision (the card expires in 15 min; a restart re-raises it).
# Order per svos-dev: release (current + front door: UI 0.0.22), then ONLY svos-interface restarts. The kernel, knowledge,
# judge and voice keep running 15c2d04's code (kernel 0.0.17 = 0.0.18 in code) until their next restart. No config change.
# AFTER: Prime approves the card, then his two runtime grants on ns:interface-settings from the SVOS page's console.
steps:
- name: Pre-reqs present (release staged; config unchanged since the stage check)
sudo: true
shell: test -f /opt/svos/releases/6d4cb1c/apps-env/bin/svos-interface && readlink /opt/svos/current && runuser -u svc-svos -- /opt/svos/releases/6d4cb1c/kernel-env/bin/svos-kernel check-config --data-root /var/lib/svos
changed_when: "false"
- name: Online backup to /var/lib/svos/backup/pre-6d4cb1c (sqlite backup API; svos.db and the interface's stores)
sudo: true
shell: |
set -e
d=/var/lib/svos/backup/pre-6d4cb1c
runuser -u svc-svos -- install -d -m 0700 $d
runuser -u svc-svos -- python3 -c "
import sqlite3, glob, os
for src in ['/var/lib/svos/state/svos.db'] + sorted(glob.glob('/var/lib/svos/state/apps/interface/*.sqlite3')):
dst = '$d/' + os.path.basename(src)
s = sqlite3.connect('file:' + src + '?mode=ro', uri=True); t = sqlite3.connect(dst); s.backup(t); t.close(); s.close()
c = sqlite3.connect('file:' + dst + '?mode=ro', uri=True); print(os.path.basename(src), 'integrity', c.execute('pragma integrity_check').fetchone()[0], 'user_version', c.execute('pragma user_version').fetchone()[0])"
- name: Switch current to 6d4cb1c
sudo: true
shell: ln -sfn /opt/svos/releases/6d4cb1c /opt/svos/current.new && chgrp -h svc-svos /opt/svos/current.new && mv -T /opt/svos/current.new /opt/svos/current && readlink /opt/svos/current
- name: Front door inventory (UI 0.0.22 live; 15c2d04 becomes previous)
sudo: true
shell: /usr/local/sbin/svos-front-inventory 2>&1 | grep -E 'GENERATED|updated|root \*|path /assets' | head -4
- name: Restart ONLY svos-interface (raises the held card)
sudo: true
shell: |
systemctl restart svos-interface; sleep 8; systemctl is-active svos-interface
journalctl -u svos-interface --since "-30s" --no-pager -o cat | grep -iE "manifest|revision|card|held|error" | tail -6 | cut -c1-200 || true
verify:
- name: Interface runs 6d4cb1c
sudo: true
shell: pid=$(systemctl show svos-interface -p MainPID --value); grep -q /opt/svos/releases/6d4cb1c /proc/$pid/maps && echo "interface pid $pid on 6d4cb1c"
changed_when: "false"
- name: The interface's new manifest revision and its card (pending until Prime approves)
sudo: true
shell: |
python3 -c "
import sqlite3
c = sqlite3.connect('file:/var/lib/svos/state/svos.db?mode=ro', uri=True)
for r in c.execute(\"select slug, revision, substr(sha256,1,12), state, received_at, decided_at from app_manifests where slug='app-interface' order by revision desc limit 2\"): print(r)
for r in c.execute(\"select id, kind, slug, manifest_revision, state, created_at, expires_at from cards where slug='app-interface' order by created_at desc limit 1\"): print(r)"
changed_when: "false"
- name: Front door inventory current
sudo: true
shell: /usr/local/sbin/svos-front-inventory --check
changed_when: "false"