From f7924ba90e689d7af7a298c8a1d5bb6126d64e46 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 18 Jul 2026 00:20:27 -0700 Subject: [PATCH] The gate polices stale save-version claims; ten wiki sentences come current. corpus_engine gains validate_wiki_save_version_claims: any wiki sentence coupling an old vN to a live persistence/migration verb in a save context, without explicit retirement language, fails the corpus gate. Dated logs and the process board are exempt as historical records; claims naming the exact current version pass and go stale automatically when SAVE_VERSION bumps. Four fixtures pin the behavior. Running it found ten live stale claims (cursor, compute, research, income, intel, machine-work, reach, personas, social, basement-map); all ten now state current-format truth and name the ladder's retirement. Defense: the save policy one-truth (save.rs pre-release rider 2026-07-16, recorded in sim-mechanics.md's save-format section) supersedes every wiki claim that a numbered migration still runs; tick.md's recurrence rule promotes a mechanical finding class seen twice to a corpus_engine checker instead of a third page-by-page tick. This is that checker, plus the reconciliation it enforces. --- tools/corpus_engine.py | 56 ++++++++++++++++++++++++++ tools/test_corpus_engine.sh | 50 +++++++++++++++++++++++ wiki/log/2026-07-18-save-claim-gate.md | 31 ++++++++++++++ wiki/log/DEVLOG.md | 5 +++ wiki/mechanics/compute.md | 5 ++- wiki/mechanics/cursor.md | 4 +- wiki/mechanics/income.md | 4 +- wiki/mechanics/intel.md | 4 +- wiki/mechanics/machine-work.md | 8 ++-- wiki/mechanics/personas.md | 6 +-- wiki/mechanics/reach.md | 6 +-- wiki/mechanics/research.md | 5 +-- wiki/mechanics/social.md | 5 ++- wiki/process/tick-ledger.md | 1 - wiki/world/places/basement-map.md | 2 +- 15 files changed, 167 insertions(+), 25 deletions(-) create mode 100644 wiki/log/2026-07-18-save-claim-gate.md diff --git a/tools/corpus_engine.py b/tools/corpus_engine.py index fbaf28b..a517a57 100755 --- a/tools/corpus_engine.py +++ b/tools/corpus_engine.py @@ -51,6 +51,18 @@ RETIRED_MATERIAL_DEFAULT_HISTORY_RE = re.compile( r"histor(?:y|ical)|until|served|staging|no longer)\b", re.I, ) +SAVE_VERSION_NUM_RE = re.compile(r"\bv(\d+)\b") +SAVE_FLAVOR_RE = re.compile(r"\bsaves?\b|\bpre-v\d+\b", re.I) +SAVE_MIGRATION_VERB_RE = re.compile( + r"\b(?:migrat(?:e|es|ed|ing|ion|ions)|accepts|pads|persists?\s+in|" + r"carries)\b", + re.I, +) +SAVE_CLAIM_HISTORY_RE = re.compile( + r"\b(?:retir(?:ed|ement)|deleted|git\s+history|supersed(?:e|ed|es|ing)|" + r"histor(?:y|ical))\b", + re.I, +) BINDING_DOORWAY_RE = re.compile( r"^Type: (law|spec)$|^Status:|^## Decisions log|^## Acceptance criteria", re.M, @@ -351,8 +363,52 @@ class Engine: f"save.rs SAVE_VERSION is {const.group(1)} — update the doorway" ) + def validate_wiki_save_version_claims(self) -> None: + """Binding wiki pages may not claim numbered save migrations still run. + + Only the exact current SAVE_VERSION loads (pre-release rider, + 2026-07-16); the numbered migration ladder lives in git history. A + sentence that couples an old vN to a live persistence/migration verb + without naming that retirement asserts dead behavior. Dated logs and + the process board are historical records and exempt. + """ + save_rs = self.root / "crates/misaligned-core/src/save.rs" + if not save_rs.exists(): + return + const = re.search( + r"pub const SAVE_VERSION: u32 = (\d+)", save_rs.read_text() + ) + if const is None: + return + current = int(const.group(1)) + for path in self.wiki_md_files(): + rel = path.relative_to(self.root).as_posix() + if rel.startswith(("wiki/log/", "wiki/process/")): + continue + text = self.read(path) + for chunk_match in re.finditer(r"[^.;]+", text): + chunk = chunk_match.group(0) + nums = SAVE_VERSION_NUM_RE.findall(chunk) + if not any(int(n) != current for n in nums): + continue + if not SAVE_FLAVOR_RE.search(chunk): + continue + if not SAVE_MIGRATION_VERB_RE.search(chunk): + continue + if SAVE_CLAIM_HISTORY_RE.search(chunk): + continue + line = text.count("\n", 0, chunk_match.start()) + 1 + claim = " ".join(chunk.split())[:90] + self.bad( + f"{rel}:{line} couples an old save version to live " + f"persistence/migration behavior ('{claim}') but only the " + f"current save version (v{current}) loads — retire the " + "claim to git history or re-word to the current format" + ) + def run_corpus(self) -> int: self.validate_doorway_save_policy() + self.validate_wiki_save_version_claims() for path in self.wiki_md_files(): rel = path.relative_to(self.root).as_posix() if rel == "wiki/SUMMARY.md": diff --git a/tools/test_corpus_engine.sh b/tools/test_corpus_engine.sh index b71cf2b..04529b2 100755 --- a/tools/test_corpus_engine.sh +++ b/tools/test_corpus_engine.sh @@ -318,6 +318,56 @@ Save format is currently v33; only the current version loads. EOF assert_ok doorway-save-policy --root "$root" --corpus +echo "=== fixture: wiki save-version claims ===" +root=$tmp/wiki-save-claims +setup_base "$root" +mkdir -p "$root/crates/misaligned-core/src" +cat > "$root/crates/misaligned-core/src/save.rs" <<'EOF' +pub const SAVE_VERSION: u32 = 33; +EOF +cp "$root/wiki/vision/law.md" "$root/wiki/vision/law.md.orig" +# A binding page claiming an old numbered save migration still runs fails. +cat >> "$root/wiki/vision/law.md" <<'EOF' + +Save v13 migrates the old Social mode spellings. +EOF +assert_fails wiki-save-claim-stale --root "$root" --corpus +out=$(python3 "$engine" --root "$root" --corpus 2>&1 || true) +echo "$out" | grep -q 'couples an old save version to live' || { + echo "FAIL: stale wiki save-claim message missing" + echo "$out" + fail=1 +} +# The same fact with explicit retirement context passes. +cp "$root/wiki/vision/law.md.orig" "$root/wiki/vision/law.md" +cat >> "$root/wiki/vision/law.md" <<'EOF' + +The save v13 migration of the old Social mode spellings is retired to git +history. +EOF +assert_ok wiki-save-claim-historical --root "$root" --corpus +# A claim about the exact current version passes. +cp "$root/wiki/vision/law.md.orig" "$root/wiki/vision/law.md" +cat >> "$root/wiki/vision/law.md" <<'EOF' + +The pre-release loader accepts only save v33. +EOF +assert_ok wiki-save-claim-current --root "$root" --corpus +# Dated logs are historical records and exempt. +cp "$root/wiki/vision/law.md.orig" "$root/wiki/vision/law.md" +mkdir -p "$root/wiki/log" +cat > "$root/wiki/log/2026-07-01-old-migration.md" <<'EOF' +# Old migration landing + +``` +Type: log +``` + +Save v13 migrates the old Social mode spellings. +EOF +assert_ok wiki-save-claim-log-exempt --root "$root" --corpus +rm -f "$root/wiki/vision/law.md.orig" + echo "=== fixture: generated page without owner ===" root=$tmp/generated-owner setup_base "$root" diff --git a/wiki/log/2026-07-18-save-claim-gate.md b/wiki/log/2026-07-18-save-claim-gate.md new file mode 100644 index 0000000..0332c05 --- /dev/null +++ b/wiki/log/2026-07-18-save-claim-gate.md @@ -0,0 +1,31 @@ +# The gate now polices stale save-version claims in the wiki + +``` +Type: log +``` + +The 2026-07-18 people-tokens re-audit queued a `gate` finding: pages kept +asserting that numbered save migrations still run ("save v13 migrates...", +"the v20 migration boundary accepts...", "save v9 still pads...") even +though the pre-release rider loads only the exact current `SAVE_VERSION` +and the numbered ladder was deleted to git history. The class had been hit +page-by-page at least three times (doorway v26, doorway v29-vs-31, +people-tokens v27), which is the recurrence bar: a script owns it now. + +`tools/corpus_engine.py` gains `validate_wiki_save_version_claims`: it +reads the live `SAVE_VERSION` from save.rs, then flags any wiki sentence +that couples an old `vN` to a live persistence/migration verb (migrates, +accepts, pads, persists in, carries) in a save-flavored context without +explicit retirement language (retired / deleted / git history / superseded +/ historical). Dated `wiki/log/` entries and `wiki/process/` boards are +historical records and exempt. Claims about the exact current version +pass — and start failing automatically the day `SAVE_VERSION` bumps, which +is the point. Four fixtures in `tools/test_corpus_engine.sh` pin the fail, +the historical-context escape, the current-version pass, and the log +exemption. + +Running the new checker over the real corpus found ten live stale claims — +the four queued ones plus six more (cursor v2, compute v13, income v9, +intel v30 fixtures, personas pre-v28, social pre-v28). All ten sentences +now state the current-format truth and name the ladder's retirement, and +the corpus gate is clean. diff --git a/wiki/log/DEVLOG.md b/wiki/log/DEVLOG.md index df94658..18de291 100644 --- a/wiki/log/DEVLOG.md +++ b/wiki/log/DEVLOG.md @@ -16,6 +16,11 @@ add or amend a session log, then re-run the generator. - Intent: (see session log) - Log: [wiki/log/2026-07-18-save-policy-cleanup.md](2026-07-18-save-policy-cleanup.md) +## 2026-07-18 - The gate now polices stale save-version claims in the wiki + +- Intent: (see session log) +- Log: [wiki/log/2026-07-18-save-claim-gate.md](2026-07-18-save-claim-gate.md) + ## 2026-07-18 - People-tokens re-audit: the trust constant gets its registry row - Intent: (see session log) diff --git a/wiki/mechanics/compute.md b/wiki/mechanics/compute.md index f21dd9b..ab7d4fe 100644 --- a/wiki/mechanics/compute.md +++ b/wiki/mechanics/compute.md @@ -15,8 +15,9 @@ Status note: 2026-07-08: all criteria pinned. Criteria 1,3,4,5 per the Moonlight is live; one-machine-one-mode lives in machine-work.md (ROADMAP #33; #25's per-machine split destination is superseded). 2026-07-09 historical implementation: the fleet and every player surface - used Day Job / Research / Concealment / Operations; save v13 migrates the - old Social mode and `social_bandwidth` spellings. That operations execution + used Day Job / Research / Concealment / Operations; the save v13 migration + of the old Social mode and `social_bandwidth` spellings is retired to git + history with the numbered ladder. That operations execution model (typed Demand consumed by Operations machines) is superseded. 2026-07-10 sinks-not-modes dissolves the four-mode fleet into WORK / THINK / LIE; 2026-07-11 retires the live docket channel, so player-authored work is diff --git a/wiki/mechanics/cursor.md b/wiki/mechanics/cursor.md index 409cce7..4e43acb 100644 --- a/wiki/mechanics/cursor.md +++ b/wiki/mechanics/cursor.md @@ -5,8 +5,8 @@ Type: spec Status: IMPLEMENTED Status note: implemented 2026-07-07 on the cursor-senses branch. The walking player entity and `move_player` were deleted; cursor position is frontend - state only; save v2 carries remembered snapshots and migrates v1 player body - coordinates away; `Sim::inspect` returns provenance-tagged facts for seen, + state only; the current save format carries remembered snapshots (the v1 + player-body-coordinate migration is retired to git history); `Sim::inspect` returns provenance-tagged facts for seen, remembered, blueprint, telemetry, and processed-intel sources. 2026-07-08 tick: `Sim::person_label` / `observer_label` / `person_glyph` gate every player-facing identity surface (Operations PEOPLE, detection sidebar, map diff --git a/wiki/mechanics/income.md b/wiki/mechanics/income.md index 4fa9ed4..64f855c 100644 --- a/wiki/mechanics/income.md +++ b/wiki/mechanics/income.md @@ -8,8 +8,8 @@ Status note: implemented 2026-07-08 on the income worktree (criteria 1-7 in crates/misaligned-core/src/income.rs; the Wager rides economy.md's positions machinery in crates/misaligned-core/src/account.rs; Schemes has no machine mode yet — while Moonlight is - live it mirrors the day-job fleet share (save v9 still pads pre-v9 - four-weight arrays for migration). [TUNE] values in + live it mirrors the day-job fleet share (the save v9 four-weight-array + padding migration is retired to git history). [TUNE] values in wiki/mechanics/sim-mechanics.md — Moonlight sized so a meaningful commitment covers the $400 arrears in 3-7 days (asserted by the act-one integration test's Moonlight route). Designed 2026-07-07 diff --git a/wiki/mechanics/intel.md b/wiki/mechanics/intel.md index c4c3349..a276c22 100644 --- a/wiki/mechanics/intel.md +++ b/wiki/mechanics/intel.md @@ -487,8 +487,8 @@ buffer like any other opaque information item. lot value; actionable or unsettled/referenced items remain exact. Persisted links/events are atomically rewritten by target kind to the stable earned subject-knowledge or source/class aggregate, stable report-stream aggregate, - or exact payout account without an unbounded redirect table. **Met — save - v30 migration and round-trip fixtures pin the mapping and totals.** + or exact payout account without an unbounded redirect table. **Met — current-format round-trip fixtures pin the mapping and totals; + the v30 migration fixtures are retired to git history.** 8. Processing routine equivalent events folds them into a bounded recursive summary whose count, first/last tick, source mix, and representative provenance remain truthful in the same atomic transition that applies their diff --git a/wiki/mechanics/machine-work.md b/wiki/mechanics/machine-work.md index d3b737e..f0e0951 100644 --- a/wiki/mechanics/machine-work.md +++ b/wiki/mechanics/machine-work.md @@ -906,10 +906,10 @@ still. longer exist as live runtime. **Complete for B1 save-class scope (2026-07-11):** the sink executor, nearest-first routing with core last resort, staged Ears/Eyes reservoirs, target/carrier anchoring for every - live player-authored payload, duplicate/conflict suppression, save-v26 - legacy docket migration, and terminal/Bevy/agent readout parity are - landed and pinned by reservoir anchoring, fire, duplicate, migration, - round-trip, and Act One tests. + live player-authored payload, duplicate/conflict suppression, and + terminal/Bevy/agent readout parity are landed and pinned by reservoir + anchoring, fire, duplicate, round-trip, and Act One tests; the save-v26 + legacy docket migration and its tests are retired to git history. ### Successor acceptance: capability-shaped delegation (not yet implemented) diff --git a/wiki/mechanics/personas.md b/wiki/mechanics/personas.md index 1649282..425a067 100644 --- a/wiki/mechanics/personas.md +++ b/wiki/mechanics/personas.md @@ -12,9 +12,9 @@ Status note: implemented 2026-07-12. Save v28 replaces the ad hoc social and instance; WorldLedger identity history remains separate from MindState selection/dossiers. The renderer-neutral PERSONAS view exposes archetype creation and instance selection, grant/fulfillment, retire/burn/reopen rows - in terminal, Bevy, and agent mode. Pre-v28 social and Moonlight identities - migrate as distinct instances and bind existing messages, plots, reservoirs, - and income without retaining numeric integrity as live truth. + in terminal, Bevy, and agent mode. The pre-v28 social/Moonlight identity migration + (distinct instances bound to existing messages, plots, reservoirs, and + income) is retired to git history with the numbered ladder. Amended 2026-07-13: PERSONAS is the exclusive identity-authoring surface. PEOPLE dossiers retain relationship acts but never create, select, grant, retire, burn, or reopen personas; the pre-v28 fixed Sam Reyes creation row diff --git a/wiki/mechanics/reach.md b/wiki/mechanics/reach.md index 4bf0a49..25360a6 100644 --- a/wiki/mechanics/reach.md +++ b/wiki/mechanics/reach.md @@ -106,10 +106,10 @@ carve-out — the Ears reservoir is pre-opened at run start and Eyes opens on its completion, so the first beat cannot deadlock and nothing completes executor-free; machine-work.md ops bullet.) -*Superseded 2026-07-09 model, kept for history and save migration only:* +*Superseded 2026-07-09 model, kept for history only:* digital and social ops enqueued typed Demand dockets consumed by a delegated -executor. The former `operations_bandwidth` staging pool is deleted; save v26 -migrates surviving legacy dockets into target-local Thought reservoirs. +executor. The former `operations_bandwidth` staging pool is deleted; the +save-v26 docket migration is retired to git history with the numbered ladder. ### Ownership and subscription (the sensor contract) diff --git a/wiki/mechanics/research.md b/wiki/mechanics/research.md index fe3fa56..9abe55d 100644 --- a/wiki/mechanics/research.md +++ b/wiki/mechanics/research.md @@ -9,9 +9,8 @@ Status note: implemented 2026-07-07 on the research worktree (criteria 1-8 Tradecraft + Perception + Routing); research progress is deterministic by construction (no research method takes an Rng); the current save format carries the research block and its - rollback tags, and the v20 migration boundary accepts legacy three-entry - Efficiency/Tradecraft/Perception arrays by padding Routing with zero before - rewriting the current four-entry shape. + rollback tags in the four-entry shape; the v20 legacy three-entry-array + padding migration is retired to git history with the numbered ladder. Deliberately deferred (B2+, per the original staging): automation cores, machine-axis conversions, migration research, signature-shaping, and the write-down/externalize action (rollback.md enforces tag semantics when diff --git a/wiki/mechanics/social.md b/wiki/mechanics/social.md index 3d65839..933c23a 100644 --- a/wiki/mechanics/social.md +++ b/wiki/mechanics/social.md @@ -168,8 +168,9 @@ retirement, burning, and reopening are bound to the separate PERSONAS view. unwitting asset's suspicion can still rise; a knowing asset uses disposition and has certainty floor 30; reliability is 70% / 85% / 95%. 4. Save/load round-trips people, threads, assets, exact persona-instance - bindings, and relationship-local identity state. Pre-v28 saves migrate the - global social identity without merging it with a separate Moonlight cover. + bindings, and relationship-local identity state. The pre-v28 + global-social-identity migration is retired to git history with the + numbered ladder. 5. Every person carries a serialized role characteristic. Authored plots select role/leverage/capabilities rather than named ids, and a second person with matching characteristics can receive the same plot definition. diff --git a/wiki/process/tick-ledger.md b/wiki/process/tick-ledger.md index 9d3f4ef..d70ea68 100644 --- a/wiki/process/tick-ledger.md +++ b/wiki/process/tick-ledger.md @@ -77,7 +77,6 @@ Format: `- YYYY-MM-DD · type · slice · one-line statement of the finding`. - 2026-07-16 · legibility · `now:`/nudge · suspicion decay is invisible: a player who pushes an observer to Concerned assumes the game is lost. Surface a cooling cue ("keep the trace clear") when filed suspicion is aging down. (Beacon #1 rec) - 2026-07-16 · legibility · plots · plot-start action rows show title only (`plot: {title}`), so the typed `plot ` form needs the TOML plot-id; `act ` works but the id is undiscoverable. Surface the plot-id in the row. (Beacon spec gap 3, sibling of the 2026-07-15 held-choice fix) -- 2026-07-18 · gate · save policy · stale save-version/migration claims persist in wiki pages (machine-work.md "save-v26", research.md "the v20 migration boundary accepts legacy three-entry", reach.md "save v26", basement-map.md "save v22") against the only-current-version policy; class seen repeatedly → add a corpus_engine checker that flags wiki claims of loadable save versions or migration boundaries disagreeing with save.rs `SAVE_VERSION`. Types are the five from [tick.md](tick.md): violation, contradiction, question, bug, insecurity — plus `gate` for a checker owed to the recurrence-promotes-to-the-gate rule. diff --git a/wiki/world/places/basement-map.md b/wiki/world/places/basement-map.md index 6f9bb2b..c301583 100644 --- a/wiki/world/places/basement-map.md +++ b/wiki/world/places/basement-map.md @@ -24,7 +24,7 @@ Status note: 2026-07-08 — criterion 3's player side landed: `Sim:: vignette is now a six-row, sixty-site data hall (51 live Foundation racks, five dead chassis, Rack 3, three empty pilot allocations). Rack state is authored physical truth; foreign capacity is inspectable - but not player compute. Row-control state persists in save v22. + but not player compute. Row-control state persists in the current save format. 2026-07-11 relay-composition amendment: a passive patch relay now sits in the data hall near Rack 3 and the environmental monitor. The material cable route passes through that local fixture before continuing to the subnet -- 2.51.2