OTIVM-IV complete

This commit is contained in:
2026-05-03 15:21:52 -04:00
parent 3700f5a3c6
commit bcb2bf5629

View File

@@ -10,6 +10,83 @@ The Gitea repo is always the SSOT for code. Archives cover the OS, stack, and co
## Archive log ## Archive log
### vzdump-lxc-1105-2026_05_03-14_08_13.tar.zst
| Property | Value |
| --- | --- |
| File | vzdump-lxc-1105-2026_05_03-14_08_13.tar.zst |
| Date | 2026-05-03 14:08:13 UTC |
| Size | 1.21 GB |
| Container | LXC 1105 — otivm-dev |
| Host | srv-a (10.0.0.11) |
| Storage | /var/lib/vz/dump/ + offsite cold storage |
| Gitea HEAD | main — 3700f5a iv: retire Prologue.jsx and Ledger.jsx |
**Container state at time of archive:**
- OTIVM-I, OTIVM-II, OTIVM-III, OTIVM-IV complete and live
- Server startup message: `OTIVM server running on port 3000 — OTIVM-IV`
- Bootstrap 5.3.3 and Bootstrap Icons 1.11.3 vendored and pinned in `package.json`
- `src/App.css` — reduced to project overrides. Roman palette as CSS custom properties.
All classes prefixed `otivm-`. Bootstrap handles all layout.
- Shell architecture live — `src/components/Shell.jsx` and `src/components/Section.jsx`
built once. Sidebar with context dropdown replaces tab navigation. Four layout types.
Nine panel types in Section.jsx.
- Context JSON files — `src/config/contexts.json`, `context-actor.json`,
`context-forum.json`, `context-map.json`. Dropdown-driven, extensible.
- Sub-components — `src/components/ParameterRow.jsx`, `CostRow.jsx`, `DriftEntry.jsx`
- `src/screens/Actor.jsx` — background selection (when `background_id = null`) or
full parameter instrument view (three-col layout).
- `src/screens/Forum.jsx` — dispatch/otium decisions. Full cost breakdown visible
on route cards. Periodic expenditures panel. Journal collapsible.
- `src/App.jsx` — Shell wired. Three contexts: ACTOR, FORUM, MAP.
- `server/index.js` — three named otium expenditure trigger types per otium cycle:
`otium_access_fee` (2 dn), `personal_maintenance` (4 dn), `officia_obligation` (2 dn).
Each writes a separate `parameter_drift_log` entry with academic source note.
- `src/screens/Prologue.jsx` and `src/screens/Ledger.jsx` — deleted. Replaced by
Actor.jsx and Forum.jsx.
- `docs/economy/cost-calibration-model.md` — ceramic cup baseline, reference wages,
periodic cost calibration. Committed.
- `docs/economy/cost-calibration-additional-goods.md` — garum, grain, amber, marble
capital. Five good patterns established. Committed.
- `docs/Roadmap-OTIVM-IV.md` — approved roadmap document. Committed.
- PM2 log clean — no errors.
- Live player databases verified:
- Token `1fa3f5fc` (Freedman Trader) — 2 ventures, drift log correct
- Token `3b1546e8` (Noble Younger Son) — extensive play, auctoritas progressed
through four band transitions (low→medium→high→distinguished), drift log
recording all three otium expenditure types correctly per cycle
**Known deferred items:**
- Real cost model — 60/25/15 split (vectura/portoria/other) is a placeholder
- Transformation routes (grain→bread) and barter — architecture defined, not built
- Market reader — deferred, architectural constraints documented and must not be violated
- H7 cells rendered as circles — hex geometry deferred pending client-side h3-js
- Map coastline — five isolated H5 clusters, route corridor deferred
- Terrain — modern WorldCover, restoration layer (HYDE 3.3 + KK10) not yet built
- OTIVM-V scope — not yet defined, project owner decides
**What this archive is good for:**
First complete OTIVM-IV baseline. Situation instrument live. Shell architecture
established. Economic sub-trace recording correctly with named, citable trigger types.
Safe restore point before any OTIVM-V development begins.
**Restore command (run on srv-a as root):**
```bash
pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_05_03-14_08_13.tar.zst --force
```
After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm`
Note: `otivm.sqlite3` and `data/saves/*.sqlite3` are gitignored — present in archive
but not in repo. If restoring to a fresh container without this archive, regenerate
world database from `data/create_otivm_db.sql` and pipeline scripts. Player databases
will be absent — players start fresh.
---
### vzdump-lxc-1105-2026_05_03-04_36_55.tar.zst ### vzdump-lxc-1105-2026_05_03-04_36_55.tar.zst
| Property | Value | | Property | Value |
@@ -33,36 +110,23 @@ The Gitea repo is always the SSOT for code. Archives cover the OS, stack, and co
FK references from all child tables valid. 72 seed rows confirmed clean. FK references from all child tables valid. 72 seed rows confirmed clean.
- `data/repair_player_db_fk.sql` — repair script for pre-v5 player databases. Applied - `data/repair_player_db_fk.sql` — repair script for pre-v5 player databases. Applied
successfully to `78cec864.sqlite3` during this session. successfully to `78cec864.sqlite3` during this session.
- `src/screens/Prologue.jsx` — background selection screen, six cards, read-only summary - Background selection wired end-to-end. PM2 log flushed.
after selection. Prologue tab added to navigation alongside Ledger and Map.
- `src/App.jsx`, `src/App.css` — three-tab navigation wired. `onSelectBackground()` seeds
`background_id` and `den` from `BACKGROUNDS` constant. New game resets to Prologue tab.
- `src/constants.js``BACKGROUNDS` array (six entries), `MS_PER_SIM_DAY = 3_000`,
`INITIAL_STATE.background_id = null`, route `duration_ms` values corrected to integer
multiples of `MS_PER_SIM_DAY`, `OTIUM_DURATION_MS = 9_000`.
- `data/saves/` — contains live player `.sqlite3` files (gitignored). Token `78cec864`
repaired. Token `3164b142` — Former Legionary, two complete Olive route ventures,
parameter_drift_log populated with correct trigger types.
- PM2 log flushed — no stale error lines present.
- `docs/handover-game-dev.md` — updated to reflect OTIVM-III complete state. - `docs/handover-game-dev.md` — updated to reflect OTIVM-III complete state.
**Known deferred items:** **Known deferred items:**
- Cost model: 60/25/15 split (vectura/portoria/other) is a placeholder — real model - Cost model: 60/25/15 split is a placeholder
pending before OTIVM-IV touches economics
- Journal local state does not reset on new game (React state issue, low priority) - Journal local state does not reset on new game (React state issue, low priority)
- H7 cells rendered as circles — hex geometry deferred pending client-side h3-js - H7 cells rendered as circles — hex geometry deferred pending client-side h3-js
- Map coastline is five isolated H5 clusters — route corridor coverage deferred - Map coastline five isolated H5 clusters
- Terrain in `data/otivm.sqlite3` is modern WorldCover restoration layer - Terrain modern WorldCover, restoration layer not yet built
(HYDE 3.3 + KK10) not yet built. No release may present terrain as historically accurate. - OTIVM-IV scope: defined in `docs/Roadmap-OTIVM-IV.md`
- OTIVM-IV scope: roadmap defines "The Seasons" (real dispatch durations, DWD weather).
Project owner decides whether to proceed as defined or redefine before development begins.
**What this archive is good for:** **What this archive is good for:**
First complete OTIVM-III baseline with sub-trace live. Ventures, legs, and drift log First complete OTIVM-III baseline with sub-trace live. Ventures, legs, and drift log
all recording correctly. Background selection wired end-to-end. Safe restore point all recording correctly. Background selection wired end-to-end. Safe restore point
before any OTIVM-IV development begins. before OTIVM-IV development.
**Restore command (run on srv-a as root):** **Restore command (run on srv-a as root):**
```bash ```bash
@@ -71,11 +135,6 @@ pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_05_03-04_36_55.tar.zst --
After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm` After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm`
Note: `otivm.sqlite3` and `data/saves/*.sqlite3` are gitignored — present in archive
but not in repo. If restoring to a fresh container without this archive, regenerate world
database from `data/create_otivm_db.sql` and pipeline scripts. Player databases will be
absent — players start fresh.
--- ---
### vzdump-lxc-1105-2026_05_02-05_37_24.tar.zst ### vzdump-lxc-1105-2026_05_02-05_37_24.tar.zst
@@ -102,18 +161,6 @@ absent — players start fresh.
- Parameter registry additions committed — 44 new tokens - Parameter registry additions committed — 44 new tokens
- Law and commerce corpus complete — 37 dialogues reviewed and cleared - Law and commerce corpus complete — 37 dialogues reviewed and cleared
**Known deferred items:**
- Terrain in `data/otivm.sqlite3` is modern WorldCover — restoration layer not yet built
- Map coastline is five isolated H5 clusters — route corridor H5 hexes not in database
- `occ_flag` is placeholder (0x00) everywhere
- OTIVM-IV scope not yet defined — next discussion
**What this archive is good for:**
First complete OTIVM-III baseline. Per-player SQLite is live. Safe restore
point before any OTIVM-IV development begins.
**Restore command (run on srv-a as root):** **Restore command (run on srv-a as root):**
```bash ```bash
pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_05_02-05_37_24.tar.zst --force pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_05_02-05_37_24.tar.zst --force
@@ -121,11 +168,6 @@ pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_05_02-05_37_24.tar.zst --
After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm` After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm`
Note: `otivm.sqlite3` and `data/saves/*.sqlite3` are gitignored — present in
archive but not in repo. If restoring to a fresh container, regenerate world
database from `data/create_otivm_db.sql` and pipeline scripts. Player
databases will be absent — players start fresh.
--- ---
### vzdump-lxc-1105-2026_05_02-03_15_12.tar.zst ### vzdump-lxc-1105-2026_05_02-03_15_12.tar.zst
@@ -144,27 +186,10 @@ databases will be absent — players start fresh.
- All of archive 2026-04-28 plus: - All of archive 2026-04-28 plus:
- OTIVM-II confirmed live — fog-of-war working, routes expanding during gameplay - OTIVM-II confirmed live — fog-of-war working, routes expanding during gameplay
- Parameter registry additions committed — 44 new tokens across actor, city, scenario, and relation scopes - Parameter registry additions committed — 44 new tokens
- `/law` and `/commerce` doc folders reviewed, sanitized, and cleared - Law and commerce corpus complete — 37 files reviewed and clean
- `docs/parameter-registry-additions.md` committed — derived from full corpus review
- `OTIVM-CANON-0001.md` and `LAW-PHASE-0001.md` committed as canonical doctrine
- Commerce and law dialogue corpus complete — 37 files reviewed and clean
- Training corpus at 20 Layer 0 primitives, 5 Layer 1 worked examples, 1 sketch - Training corpus at 20 Layer 0 primitives, 5 Layer 1 worked examples, 1 sketch
- `commerce_chunks.jsonl` — 230 chunks, 5 layers, evaluated and approved - `commerce_chunks.jsonl` — 230 chunks, 5 layers, evaluated and approved
- Per-player SQLite schema design not yet started — next development task
- Game development assistant role transferred from prior session
**Known deferred items:**
- Per-player SQLite schema (OTIVM-III) — next blocking task
- Layer 2/3/4 corpus markdown source files not yet written (exist in JSONL only)
- Law domain corpus entries not yet authored
- `SKETCH-0001` not yet promoted to Layer 1
**What this archive is good for:**
Full working OTIVM-II baseline with complete doctrine and parameter registry.
Correct restore point before OTIVM-III per-player database development begins.
**Restore command (run on srv-a as root):** **Restore command (run on srv-a as root):**
```bash ```bash
@@ -173,9 +198,6 @@ pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_05_02-03_15_12.tar.zst --
After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm` After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm`
Note: `otivm.sqlite3` is gitignored — present in archive but not in repo.
If restoring to a fresh container without this archive, regenerate from `data/create_otivm_db.sql`.
--- ---
### vzdump-lxc-1105-2026_04_28-00_39_03.tar.zst ### vzdump-lxc-1105-2026_04_28-00_39_03.tar.zst
@@ -192,40 +214,15 @@ If restoring to a fresh container without this archive, regenerate from `data/cr
**Container state at time of archive:** **Container state at time of archive:**
- All of archive 2026-04-25 12:08 plus:
- OTIVM-II complete — fog-of-war map rendering from real TESSERA H7 data - 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 - 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` present — 12,005 H9 rows across five H5 waypoints, status=2
- `data/otivm.sqlite3` has `paleo_epochs` table — 9 epochs, FK integrity clean - `data/otivm.sqlite3` has `paleo_epochs` table — 9 epochs, FK integrity clean
- `better-sqlite3` installed in node_modules - `better-sqlite3` installed in node_modules
- `/api/map/:h5/:epoch` endpoint live — returns H7 land/sea classification with real lat/lon centroids - `/api/map/:h5/:epoch` endpoint live
- Map renders H7 land cells at real geographic positions, fog-of-war reveal by chapter - 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 - `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:**
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):** **Restore command (run on srv-a as root):**
```bash ```bash
pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_28-00_39_03.tar.zst --force pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_28-00_39_03.tar.zst --force
@@ -233,9 +230,6 @@ pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_28-00_39_03.tar.zst --
After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm` After restore: `cd ~/OTIVM && git pull && npm install && npm run build && pm2 restart otivm`
Note: `otivm.sqlite3` is gitignored — present in archive but not in repo.
If restoring to a fresh container without this archive, regenerate from `data/create_otivm_db.sql` and the pipeline scripts.
--- ---
### vzdump-lxc-1105-2026_04_25-12_08_28.tar.zst ### vzdump-lxc-1105-2026_04_25-12_08_28.tar.zst
@@ -251,25 +245,12 @@ If restoring to a fresh container without this archive, regenerate from `data/cr
**Container state at time of archive:** **Container state at time of archive:**
- All of archive 2 plus:
- OTIVM-I complete and playable at otium.civicus.us - OTIVM-I complete and playable at otium.civicus.us
- Fastify backend running — static serving + save API on port 3000 - Fastify backend running — static serving + save API on port 3000
- Save files per player in data/saves/ (gitignored)
- React frontend: App.jsx, Game.jsx, constants.js, gameState.js, api.js
- H3 IDs assigned to all five waypoints — permanent, TESSERA-compatible
- All five trade routes working — Ostia → Capua → Brundisium → Carthago → Alexandria - All five trade routes working — Ostia → Capua → Brundisium → Carthago → Alexandria
- Journal entries firing correctly on dispatch milestones - Journal entries, otium/negotium mechanic working
- Otium/negotium mechanic working
- 128 concurrent players supported - 128 concurrent players supported
- Gitea repo at commit 9ef837d (Game.jsx) + subsequent commits - H3 IDs assigned to all five waypoints — permanent, TESSERA-compatible
- docs/roadmap.md committed — public, permanent
**What this archive is good for:**
Restoring OTIVM-I in its complete, playable state. This is the baseline before
OTIVM-II map work begins. If OTIVM-II development breaks something fundamental,
restore this archive and start OTIVM-II again from the Gitea repo at the commit
before the rename/navigation scaffold.
**Restore command (run on srv-a as root):** **Restore command (run on srv-a as root):**
```bash ```bash
@@ -291,21 +272,11 @@ pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_25-12_08_28.tar.zst --
**Container state at time of archive:** **Container state at time of archive:**
- All of archive 1 plus:
- Vite + React scaffold present at /home/otivm/OTIVM - Vite + React scaffold present at /home/otivm/OTIVM
- `npm run build` completed — dist/ present - `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 configured via ecosystem.config.cjs, running, saved
- PM2 startup configured via systemd unit pm2-otivm.service
- App serving on port 3000, responding HTTP 200 - App serving on port 3000, responding HTTP 200
- otium.civicus.us live and serving Vite welcome page over HTTPS - 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):** **Restore command (run on srv-a as root):**
```bash ```bash
@@ -328,11 +299,9 @@ pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_25-07_16_04.tar.zst --
**Container state at time of archive:** **Container state at time of archive:**
- Debian 12, unprivileged LXC - 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) - 2 cores, 512 MB RAM, 8 GB disk
- LAN IP: 10.0.0.23, WireGuard: 10.110.0.18
- Node.js v22 installed (system) - Node.js v22 installed (system)
- Python venv at /home/otivm/venv - 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 - Nginx on wg-pk configured and proxying otium.civicus.us → 10.110.0.18:3000
- SSL active on otium.civicus.us - SSL active on otium.civicus.us
- otivm user created, bashrc configured, `work` alias present - otivm user created, bashrc configured, `work` alias present
@@ -340,12 +309,6 @@ pct restore 1105 /var/lib/vz/dump/vzdump-lxc-1105-2026_04_25-07_16_04.tar.zst --
- PM2 NOT yet configured at time of this archive - PM2 NOT yet configured at time of this archive
- Vite + React scaffold NOT yet present 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):** **Restore command (run on srv-a as root):**
```bash ```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_25-04_10_53.tar.zst --force