the state-scan round: the log is the one truth for status and agenda, the db tiers retired -- scanState (server/session.mjs) derives each kind newest-wins across her emissions (the picked variant's text), the GM's override records, and the boundary state notes; the panes, the run detail, and the stamp all read it, GET /status and detail.status are derived reads, no clerk call, no db copy; the agenda cap is a derivation rule (GM, 2026-11-16: we log all seven items on reception, but the only way to see all seven is the raw event -- at no point an over-cap list can be derived), the reception note still shows the GM what sank; the stamp renders the canonical grammar -- status comma-separated, agenda markdown bullets, matching the line the GM added to invariants; the GM's block edits are overrides (GM, 2026-11-16: mutate during the contwin composition, the logs record the overrides arriving with the GM's turn as they should, the model sees the blocks overwritten with GM's edits attached to her turn, append if empty): the pane editors STAGE (paneEditor reworked -- no save callback, staged state, pending marker, discard), the send attaches them to POST /turn, node logs the override field on the GM turn, the composition renders it as hers -- the log never mutates, her words stay verbatim, the raw surfaces show the record; OOC turns refuse edits client and server both, the out-of-band POST /status and /agenda routes retired; stop writes the boundary state note at the carry head always (the crash-reconcile filters it before comparing), the start gate's n=1 seeding is dead (her authored opening turn IS the seed, the lint keeps requiring it), continuation carryovers are writable in the file editor during dormancy -- the review window's one editing surface, blocks included, no new pane; the clerk lost the tiers wholesale (schema tables, four verbs, canon status/agenda views, dump sections, report fields; the events CHECK keeps the historical op names; old dbs keep dead tables, never read, never dropped -- Irene is hands-off, and by the same day's ruling she is broken and never runs again: logs and db kept as they are, no replay, no continuation, no compatibility designed for her); Chloe hand-migrated to the new protocol -- her most recent turn carries the whole-list blocks applied from her db's exact values, her next context stamps them, her older lost/gained tags stay as history; the mock's agenda blocks went bullet, a new script position for the override turn's reply restates the mind so the boundary assert holds; smoke reworked to the scan battery (+ the 10f override block: the record rides its turn, the composition stamps at her canon point, the log keeps her emission verbatim, the OOC refusal, the boundary note at the carry head, the retired routes 404) -- ALL PASS; restart + reminder + repo checks green; the browser pass caught and fixed two real bugs (the pending marker's display:flex beat the hidden attribute -- any display rule needs a [hidden] override; setEditable(true) never ran the widget sync so the edit button stayed hidden) and proved the whole UX end to end with zero console errors -- staging, send-with-turn, the machinery lines on the table and raw, the OOC gate banner, discard, dormant read-only panes, the boundary note in the dormant preview; typecheck green on both programs; README/DICTIONARY carry the single-truth design, HANDOFF the round record and the Irene rewording, AGENTS the state pointer and the browser lessons

This commit is contained in:
2026-11-16 22:49:50 +00:00
parent 894737fcf3
commit 5ffecee935
17 changed files with 581 additions and 465 deletions
+10 -28
View File
@@ -27,37 +27,19 @@ CREATE TABLE IF NOT EXISTS records (
created TEXT NOT NULL
);
-- her status: freeform descriptions of her immediate
-- situation, admitted by the three-part gate (non-normal, acute,
-- turn-affecting). No keys, no baselines -- just what's true right now.
-- the player mutates it with <lost>/<gained> deltas (exact match);
-- the GM overrides out-of-band. Descriptions never contain commas:
-- both the delta lists and the <status> block are comma-separated.
CREATE TABLE IF NOT EXISTS status (
id INTEGER PRIMARY KEY AUTOINCREMENT,
descr TEXT NOT NULL UNIQUE,
added TEXT NOT NULL
);
-- her agenda: the hot queue of what drives her -- intentions, not
-- states (those live in her status). Id order IS queue order:
-- newest-added at the top, the bottom evicted on overflow -- a recency
-- ring buffer for free. The player mutates it with <add>/<drop>
-- deltas (comma-separated adds, index-based drops); the GM overrides
-- with agenda-set. Items never contain commas: the add transport is
-- comma-separated, same as the status descriptions.
CREATE TABLE IF NOT EXISTS agenda (
id INTEGER PRIMARY KEY AUTOINCREMENT,
descr TEXT NOT NULL UNIQUE,
added TEXT NOT NULL
);
-- her status and agenda lived here once (the paper model's runtime
-- half). Retired 2026-11-16: the log is the one truth -- the state
-- scan reads her blocks, and no db table holds a copy. Old runs keep
-- their dead tables on disk, never read, never dropped (Irene is
-- hands-off; dumps tolerate their presence, restore skips what the
-- schema lacks).
-- append-only audit journal; nothing here is ever updated or deleted.
-- target is 'e<id>' for entries, 'r<id>' for records, 'p<id>' for status
-- rows, 'p' for whole-status replaces.
-- target is 'e<id>' for entries, 'r<id>' for records.
-- prior captures the replaced state of a journaled mutator (the saga
-- rule): amend/discard carry the old record content, status ops carry
-- what was lost -- so turn surgery can compensate mechanically.
-- rule): amend/discard carry the old record content -- so turn
-- surgery can compensate mechanically. The status/agenda op names
-- stay in the CHECK for the historical journals that used them.
CREATE TABLE IF NOT EXISTS events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
session TEXT NOT NULL,