Commit graph

72 commits

Author SHA1 Message Date
alex
fdd0b72b7a state-checksum: whole-state diagnostic checksum harness (lane C)
The complement to the per-function compare harness. Instead of "did this
function's declared outputs match", it asks "is the entire simulation state
still identical" -- so no region-declaration mistake can hide from it.

Coverage is PROVED, not declared: the digest tree is re-serialised and compared
byte-for-byte against the inflated save on every run. When that reconstruction
reproduces the stream, the whole file is a function of the digest's inputs. A
run that cannot account for the file says so and exits non-zero. This is the
direct answer to B4's three hooks that printed "0 diverged" over an empty
region set.

It localises. The root is the fold of a per-subsystem / per-object tree with
named objects, so the known load->re-save delta reports as exactly five leaves
-- /Summary/Checksum and four /Sim/players/Player[...]/Status 4->0 -- naming the
two Singularity players by id where the raw byte diff could only say "1st of
two". One real End Turn reports as 108 fully attributed differences.

Float-parity policy is explicit and strict by default (STATE_CHECKSUM.md 3):
raw IEEE-754 bits; a `canonical` policy for signed zero and NaN payloads only;
and deliberately NO tolerant hashing mode, because quantisation moves the cliff
rather than removing it and destroys the roll-up. Tolerance lives in the differ
as --ulps, applied after localisation. Corpus census: 0 NaN, 0 -0.0, 0
subnormals across 4,474 float leaves, so the strict default costs nothing today
and a test fails the day that changes.

Validated on the real saves (verify/results/state-checksum/): 10 files, 4
distinct contents, all STABLE + COVERED; chain record/verify works on the real
turn1-3 saves. The VM-driven replay loop is designed (section 5) but UNRUN.

Section 3.5 names the one question the host side cannot settle -- whether the
turn pipeline depends on x87 intermediate precision -- and the experiment that
would: force fpu_cw to 0x027f / 0x127f / 0x137f across End Turn and checksum
the three autosaves.

Also recorded: Summary.Checksum is NOT a byte sum over the inflated stream nor
a sum over the int leaves (both ruled out), so nobody repeats those two.

38 tests; sots-engine untouched, clean_room_check.sh OK.
2026-09-08 03:46:34 -04:00
alex
5b74b98778 board: claim VM140 for lane M; MoveFleet ULP + ObservedTech rows 2026-09-08 03:09:37 -04:00
alex
05095e93da lane R: golden-trace recapture with guards on the live game
Five hooks recaptured, build recap-7584bad-20260908T0615Z, no source change.

- ProcessResearch: the over-budget event is now a compare divergence
  (side.events.after.v.next_id orig=4 ours=3) instead of a 609 KB save diff.
  15 calls over 5 turns, 3 diverged, RNG matched 15/15.
- ComputeBudget: 4284 compared, 0 diverged, guard quiet - but only 20 distinct
  states and 13 of 22 slots always zero.
- MoveFleet: 8 of 45 calls diverge by 1 ULP of position. B4's clean verdict was
  a one-sample verdict.
- First guarded captures for OnTechResearched (RollResearchEvent draw fired and
  matched), the colony turn and MoveFleet.
- Guards mapped SetResearched live and found an undeclared ObservedTech append.

VM140 released at the main menu, hooks=trace.
2026-09-08 03:06:43 -04:00
alex
cdada28d78 harness: coverage reporting + --strict-coverage in tracecmp 2026-09-08 01:28:36 -04:00
alex
5b6f812e31 b2 live artifacts; click_helper shot verb 2026-09-08 01:18:39 -04:00
alex
4d535028ed b4 static findings: 22 formula corrections, 3 verified signatures, contract -> 324 entries 2026-09-08 00:57:55 -04:00
alex
f146a7616a m2 code merged (VM window pending); record the 3-word vector struct hazard 2026-09-07 22:43:05 -04:00
alex
8116f9e0c8 P2-M1 verified on the live game: golden trace, 0-divergence compare, replace passes the End-Turn oracle 2026-09-07 22:18:22 -04:00
alex
31153cd278 parsers: engine parity (first-wins, Mars::Script tokenizer rules, trailing-pair drop); untrack pyc 2026-09-07 18:10:17 -04:00
alex
254a077d6c docs: annotate R1 tag spellings; dashboard refresh 2026-09-07 17:57:21 -04:00
alex
436a51fa04 save-reader: real tag names (byte-confirmed), 36 tests, strict 3/3 2026-09-07 17:56:59 -04:00
alex
1eb967756b verified: End-Turn oracle byte-identical cross-process; stream tag corrections 2026-09-07 17:46:20 -04:00
alex
4547f6c8fe verify: compare harness (trace format, tracecmp, replay, oracle bridge); board catch-up; sim formula gaps 2026-09-07 17:28:37 -04:00
alex
5614940650 p2-m0 evidence: shim log + menu screenshot; Initialize signature caution 2026-09-07 17:22:21 -04:00
alex
daea98feba verify: ship-design rules + validator, 127/127 stock designs pass; species index order decoded 2026-09-07 16:45:25 -04:00
alex
f644b83581 battle-load: profile filed, bug parked; sampler + resume recipe kept 2026-09-07 16:43:14 -04:00
alex
426df0232a verified: save_reader strict-clean on 3 real saves; all core layouts confirmed; SAVE_FORMAT confirmed 2026-09-07 16:39:41 -04:00
alex
afbfdf5ce8 verified: real saves parse; ServerPlayer/StarFleet/StarShip confirmed, ServerSystem conditional gaps listed; game-run recipe 2026-09-07 16:09:28 -04:00
alex
2ea16f0036 ignore pycache 2026-09-07 15:55:37 -04:00
alex
15ecd22aa6 verify: Streamable save reader + writer stub + tests + SAVE_FORMAT 2026-09-07 15:55:27 -04:00
alex
7139dee219 verify: mars data parsers proven 100% on 1595 files; catalogs; tech-tree graph 2026-09-07 15:22:55 -04:00
alex
9ad30bffce scaffold RE campaign: board, backlog, findings template, verify tree 2026-09-07 14:40:44 -04:00