From 5f22273393d67faf497c6871732cd7df8d1246ef Mon Sep 17 00:00:00 2001 From: otivm Date: Tue, 28 Apr 2026 05:50:17 +0000 Subject: [PATCH] =?UTF-8?q?Add=20archive=20entry=202026-04-28=20=E2=80=94?= =?UTF-8?q?=20OTIVM-II=20complete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/archives.md | 189 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 133 insertions(+), 56 deletions(-) diff --git a/docs/archives.md b/docs/archives.md index 8625098..63dea6c 100644 --- a/docs/archives.md +++ b/docs/archives.md @@ -1,82 +1,83 @@ -# OTIVM — Offline Archive InventoryOffline archives are vzdump snapshots of LXC container 1105 (otivm-dev) on srv-a.Each archive is stored in `/var/lib/vz/dump/` on srv-a and copied to USB after creation.Before restoring any archive, read the state description carefully.Restoring will overwrite everything on the container — all code, all data, all PM2 state. +# OTIVM — Offline Archive Inventory + +Offline archives are vzdump snapshots of LXC container 1105 (otivm-dev) on srv-a. +Each archive is stored in `/var/lib/vz/dump/` on srv-a and copied to USB after creation. +Before restoring any archive, read the state description carefully. +Restoring will overwrite everything on the container — all code, all data, all PM2 state. The Gitea repo is always the SSOT for code. Archives cover the OS, stack, and configuration. --- ## Archive log -### vzdump-lxc-1105-2026_04_25-04_10_53.tar.zst +### vzdump-lxc-1105-2026_04_28-00_39_03.tar.zst | Property | Value | |---|---| -| File | vzdump-lxc-1105-2026_04_25-04_10_53.tar.zst | -| Date | 2026-04-25 04:10 UTC | -| Size | 552 MB | +| File | vzdump-lxc-1105-2026_04_28-00_39_03.tar.zst | +| Date | 2026-04-28 00:39 UTC | +| Size | 1014 MB | | Container | LXC 1105 — otivm-dev | | Host | srv-a (10.0.0.11) | -| Storage | /var/lib/vz/dump/ + USB copy | +| Storage | /var/lib/vz/dump/ + workstation cold storage | +| Gitea HEAD | main — see commit log for exact SHA | **Container state at time of archive:** -- Debian 12, unprivileged LXC -- 2 cores, 512 MB RAM, 8 GB disk (upgraded to 4 cores, 2 GB RAM on 2026-04-25 after archive) +- Debian 12, unprivileged LXC, 4 cores, 2 GB RAM, 8 GB disk - LAN IP: 10.0.0.23, WireGuard: 10.110.0.18 -- Node.js v22 installed (system) -- Python venv at /home/otivm/venv -- `serve` installed globally at /home/otivm/.npm-global/bin/serve -- Nginx on wg-pk configured and proxying otium.civicus.us → 10.110.0.18:3000 -- SSL active on otium.civicus.us -- otivm user created, bashrc configured, `work` alias present -- Gitea repo cloned to /home/otivm/OTIVM -- PM2 NOT yet configured at time of this archive -- Vite + React scaffold NOT yet present at time of this archive +- Node.js v22 (system), Python venv at /home/otivm/venv +- PM2 running, startup configured via systemd pm2-otivm.service +- Nginx on wg-pk proxying otium.civicus.us → 10.110.0.18:3000, SSL active +- `/opt/data/TESSERA_APR26` and `/opt/data/TESSERA_WORLD` are bind mounts — excluded from backup, not restored +- pipeline-venv at /home/otivm/pipeline-venv with full dataset pipeline packages + +**OTIVM game state:** + +- OTIVM-I complete — five trade routes, journal, otium/negotium, per-player saves +- OTIVM-II complete — fog-of-war map rendering from real TESSERA H7 data +- Fastify backend on port 3000 — static serving, save API, TESSERA map endpoint +- `data/otivm.sqlite3` present — 12,005 H9 rows across five H5 waypoints, status=2 +- `data/otivm.sqlite3` has `paleo_epochs` table — 9 epochs, FK integrity clean +- `better-sqlite3` installed in node_modules +- `/api/map/:h5/:epoch` endpoint live — returns H7 land/sea classification with real lat/lon centroids +- Map renders H7 land cells at real geographic positions, fog-of-war reveal by chapter +- Sea level parameterised by epoch — default `roman_14bce` (sl_offset_cm = -10) +- `data/saves/` contains live player save files (gitignored) +- `staging_otivm.sqlite3` present and in sync with production database + +**Architecture decisions present in this build:** + +- `active_dispatch` and `events[]` in save state — sequencing substrate for future releases +- `galleyProgress()` utility in gameState.js +- Provenance fields on all routes (`origin_h3_r5`, `origin_region`, `cultural_note`) +- `session_abandoned` event written to old save on new game — save files never deleted +- `paleo_epochs` table follows RFC-TESSERA-3.0-PALEO-001 + +**Known deferred items:** + +- Journal local state does not reset on new game (React state issue, low priority) +- H7 cell rendering uses circles — hex geometry deferred until h3-js available client-side +- Map coastline is five isolated H5 clusters — route corridor H5 hexes not yet in database +- Tree primitive 180° spread bug (inherited from CIVICVS, not applicable here) **What this archive is good for:** -Restoring the base OS and software stack if the container is lost or corrupted. -After restore, you must: clone the repo, run `npm install`, run `npm run build`, -install serve globally, and start PM2 manually. +Full working OTIVM-II baseline. Game is live and playable. TESSERA SQLite integration +complete. Fog-of-war map rendering from real elevation data working. This is the correct +restore point if any subsequent OTIVM-III development breaks the database integration +or map rendering pipeline. **Restore command (run on srv-a as root):** ```bash -pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_25-04_10_53.tar.zst --force +pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_28-00_39_03.tar.zst --force ``` ---- +After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm` -### vzdump-lxc-1105-2026_04_25-07_16_04.tar.zst - -| Property | Value | -|---|---| -| File | vzdump-lxc-1105-2026_04_25-07_16_04.tar.zst | -| Date | 2026-04-25 07:16 UTC | -| Size | 759 MB | -| Container | LXC 1105 — otivm-dev | -| Host | srv-a (10.0.0.11) | -| Storage | /var/lib/vz/dump/ + USB copy | - -**Container state at time of archive:** - -- All of archive 1 plus: -- Vite + React scaffold present at /home/otivm/OTIVM -- `npm run build` completed — dist/ present -- `serve` installed globally at /home/otivm/.npm-global/bin/serve -- PM2 configured via ecosystem.config.cjs, running, saved -- PM2 startup configured via systemd unit pm2-otivm.service -- App serving on port 3000, responding HTTP 200 -- otium.civicus.us live and serving Vite welcome page over HTTPS -- Gitea repo at commit 6725f11 (scaffold) + subsequent config commits - -**What this archive is good for:** - -Restoring a fully working serving stack. After restore the app will come up -automatically via PM2 on boot. The game code is not yet present — pull from -Gitea and run `npm run build` to get the latest game. - -**Restore command (run on srv-a as root):** -```bash -pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_25-07_16_04.tar.zst --force -``` +Note: `otivm.sqlite3` is gitignored — it is present in the archive but not in the repo. +If restoring to a fresh container without this archive, the database must be regenerated +from `data/create_otivm_db.sql` and the pipeline scripts. --- @@ -120,8 +121,84 @@ pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_25-12_08_28.tar.zst -- --- +### vzdump-lxc-1105-2026_04_25-07_16_04.tar.zst + +| Property | Value | +|---|---| +| File | vzdump-lxc-1105-2026_04_25-07_16_04.tar.zst | +| Date | 2026-04-25 07:16 UTC | +| Size | 759 MB | +| Container | LXC 1105 — otivm-dev | +| Host | srv-a (10.0.0.11) | +| Storage | /var/lib/vz/dump/ + USB copy | + +**Container state at time of archive:** + +- All of archive 1 plus: +- Vite + React scaffold present at /home/otivm/OTIVM +- `npm run build` completed — dist/ present +- `serve` installed globally at /home/otivm/.npm-global/bin/serve +- PM2 configured via ecosystem.config.cjs, running, saved +- PM2 startup configured via systemd unit pm2-otivm.service +- App serving on port 3000, responding HTTP 200 +- otium.civicus.us live and serving Vite welcome page over HTTPS +- Gitea repo at commit 6725f11 (scaffold) + subsequent config commits + +**What this archive is good for:** + +Restoring a fully working serving stack. After restore the app will come up +automatically via PM2 on boot. The game code is not yet present — pull from +Gitea and run `npm run build` to get the latest game. + +**Restore command (run on srv-a as root):** +```bash +pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_25-07_16_04.tar.zst --force +``` + +--- + +### vzdump-lxc-1105-2026_04_25-04_10_53.tar.zst + +| Property | Value | +|---|---| +| File | vzdump-lxc-1105-2026_04_25-04_10_53.tar.zst | +| Date | 2026-04-25 04:10 UTC | +| Size | 552 MB | +| Container | LXC 1105 — otivm-dev | +| Host | srv-a (10.0.0.11) | +| Storage | /var/lib/vz/dump/ + USB copy | + +**Container state at time of archive:** + +- Debian 12, unprivileged LXC +- 2 cores, 512 MB RAM, 8 GB disk (upgraded to 4 cores, 2 GB RAM on 2026-04-25 after archive) +- LAN IP: 10.0.0.23, WireGuard: 10.110.0.18 +- Node.js v22 installed (system) +- Python venv at /home/otivm/venv +- `serve` installed globally at /home/otivm/.npm-global/bin/serve +- Nginx on wg-pk configured and proxying otium.civicus.us → 10.110.0.18:3000 +- SSL active on otium.civicus.us +- otivm user created, bashrc configured, `work` alias present +- Gitea repo cloned to /home/otivm/OTIVM +- PM2 NOT yet configured at time of this archive +- Vite + React scaffold NOT yet present at time of this archive + +**What this archive is good for:** + +Restoring the base OS and software stack if the container is lost or corrupted. +After restore, you must: clone the repo, run `npm install`, run `npm run build`, +install serve globally, and start PM2 manually. + +**Restore command (run on srv-a as root):** +```bash +pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_25-04_10_53.tar.zst --force +``` + +--- + ## Convention Archive filenames follow Proxmox default: `vzdump-lxc-{CTID}-{YYYY_MM_DD-HH_MM_SS}.tar.zst` -Add a new entry to this file every time an archive is created and copied to USB. +Add a new entry to this file every time an archive is created and copied to cold storage. Always note exactly what is and is not present in the container at time of archive. +Most recent archive listed first.