sots-engine/tests
alex 5d29ee60e4 lane T2: the treaty-turn stamp; 76 leaves closed across five pairs, 0 regressed
H02 StampTreatyTurns -- the diplomacy ledger's "this treaty was last in force on turn
N" stamp, over every ordered pair of players that holds one, creating the entry on
demand. It is a host step, not a phase of either turn driver: its sole caller is the
command-application step, which runs after the frame counter has advanced and before
both drivers. On a turn with no combat and no diplomatic command it is the only writer
of these fields, which is why a whole per-player dipstats vector is its output.

Read from the instruction stream; three things an earlier reading had wrong are
corrected in findings/subsystems/treaty-turn-stamp.md: the stamped value is the TURN and
not the modification counter, the relation codes are 3=allied / 2=NAP / 1=cease-fire and
not the reverse, and the bit is the player's index field rather than its position in the
player vector -- the opposite convention from the shared-vision mask two files away.

Measured, closed and regressed reported separately and never netted:

  turn1 -> turn2 (reference)   209 -> 132   closed 77 (was 51), regressed 0
  turn2 -> turn3               108 ->  73   closed 35 (was 21), regressed 0
  human-turn2 -> turn3                      closed 76 (was 64), regressed 0
  zuul-turn15 -> turn16                     closed 30 (was 18), regressed 0
  zuul-turn16 -> turn17                     closed 29 (was 17), regressed 0

The last three are pairs from a different game at turns 2, 15 and 16 that the model was
never fitted to, and it closes exactly the twelve ordered treaty pairs each of them holds.
The rule also reproduces the ledger of ten of the eleven corpus saves entry for entry,
including each entry's order and every stamped value; the eleventh is the turn-1 save
whose ledger no turn has yet written, and it is the reference pair's input.

app_test_treaty pins the five things the corpus cannot separate: the relation codes (no
save exercises cease-fire), the bit's source, the missing alliance-id guard, the -1
initialiser on a fresh entry, and the append-at-the-end order that makes re-running the
step idempotent instead of duplicating rows.

The betrayal half of the same function needs the turn's diplomatic commands; with no
command stream it is provably a no-op and is not modelled.
2026-09-08 14:47:47 -04:00
..
app lane T2: the treaty-turn stamp; 76 leaves closed across five pairs, 0 regressed 2026-09-08 14:47:47 -04:00
game_combat B5: the post-battle retreat rules as a pure planner (game/combat) 2026-09-08 11:52:57 -04:00
game_config m2: manifest/id dictionary hooks + manifest_loader; thiscall support in Hook template; struct sizes pinned (+0x14 word) 2026-09-07 22:41:42 -04:00
game_data tests: restore test_catalog fixture text (rename only member accesses) 2026-09-07 22:15:20 -04:00
game_design lane D2: aggregate hull size in the record's MEMORY slot order, not its wire order 2026-09-08 12:47:14 -04:00
game_effects b2: OnTechResearched hook + 10 effects-table corrections (float32, xenotech block size, no already-researched guard, sticky mask, AI bonus values) 2026-09-08 00:01:04 -04:00
game_events lane P: post the research events from ours (count-only), declare ObservedTech 2026-09-08 04:16:22 -04:00
game_nav lane P2: fleet path planning (game/nav) 2026-09-08 12:43:11 -04:00
game_sim merge lane E1: income chain 25/25 on the BnkEl oracle; difficulty multiplier resolved (turn.cpp union-resolved: tail phases 17, 21, 31) 2026-09-08 13:55:49 -04:00
mars_parse mars/parse + mars/text: engine parity (Mars::Script tokenizer, first-wins keys, trailing-pair drop); oracles 1531/1531, 64/64 2026-09-07 18:10:18 -04:00
mars_stream mars::rng: the seven draw entry points, with their word costs 2026-09-08 09:59:05 -04:00
mars_text mars/parse + mars/text: engine parity (Mars::Script tokenizer, first-wins keys, trailing-pair drop); oracles 1531/1531, 64/64 2026-09-07 18:10:18 -04:00
mars_vfs mars/vfs: gob ZIP reader + native override, miniz 3.1.2; oracle-verified 8352+2035 entries 2026-09-07 17:40:51 -04:00
shim_budget b1: ComputeBudget hook + adapter; fix researchMoneyKept to be charged only with a research target; budget out-param is int[22] 2026-09-07 23:24:10 -04:00
shim_colony b4: colony + movement hooks; 22 formula corrections (growth curve has no capacity term, range margin +0.05f, ties-to-even rounding); 3 verified signatures 2026-09-08 00:57:55 -04:00
shim_events lane P: post the research events from ours (count-only), declare ObservedTech 2026-09-08 04:16:22 -04:00
shim_movement b4: colony + movement hooks; 22 formula corrections (growth curve has no capacity term, range margin +0.05f, ties-to-even rounding); 3 verified signatures 2026-09-08 00:57:55 -04:00
shim_player_turn T: hook for Game::ServerPlayer::ProcessTurn, with the prediction committed first 2026-09-08 08:08:47 -04:00
shim_rng_ledger Z: measure the strategic RNG, do not assume it 2026-09-08 09:16:24 -04:00
shim_techfx b2 live: 3 completions compared 0 divergences; float32 confirmed on the game; RollResearchEvent RNG region added; xenotech block size bug fixed 2026-09-08 01:18:39 -04:00
shim_trace harness: compile-time Coverage on every descriptor, guard regions, replace-mode records; audit of 23 undeclared side effects 2026-09-08 01:28:35 -04:00
addr_smoke.cpp m0: binkw32 proxy shim, minhook, trace hook on Application::Initialize; build/deploy tooling 2026-09-07 17:22:15 -04:00