From 535d1c3b58f05ff3f6a3ce7a5ec45764b0cfcad3 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 8 Sep 2026 00:30:32 -0400 Subject: [PATCH] B3 live partial pass; record the undeclared-side-effect-list harness gap --- campaign/DASHBOARD.md | 26 +++++++++++++------------- campaign/board.md | 9 +++++---- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/campaign/DASHBOARD.md b/campaign/DASHBOARD.md index f08cce5..96b1eb4 100644 --- a/campaign/DASHBOARD.md +++ b/campaign/DASHBOARD.md @@ -1,19 +1,19 @@ # SotS RE campaign — coverage dashboard -Generated 2026-09-08 04:02 UTC · `sots-re` @ db9b561,2026-09-08 · `sots-engine` @ f28c639,2026-09-08 (54 commits) · regenerate with `tools/dashboard.py` +Generated 2026-09-08 04:30 UTC · `sots-re` @ ef3858c,2026-09-08 · `sots-engine` @ 646e4e8,2026-09-08 (56 commits) · regenerate with `tools/dashboard.py` > **North star:** A functional reimplementation of the engine — behavior-equivalent, NOT byte-for-byte ## 1. Map coverage (campaign/board.md) -59 targets · mapped-or-better **45/59** `[████████░░] 76%` · verified **29/59** `[█████░░░░░] 49%` +60 targets · mapped-or-better **46/60** `[████████░░] 77%` · verified **29/60** `[█████░░░░░] 48%` | Status | Count | % | |---|---:|---:| -| verified | 29 | 49% | -| mapped | 16 | 27% | -| in-progress | 4 | 7% | -| backlog | 9 | 15% | +| verified | 29 | 48% | +| mapped | 17 | 28% | +| in-progress | 3 | 5% | +| backlog | 10 | 17% | | blocked | 1 | 2% | | Type | verified | mapped | in-progress | backlog | blocked | total | @@ -22,8 +22,8 @@ Generated 2026-09-08 04:02 UTC · `sots-re` @ db9b561,2026-09-08 · `sots-engine | control-flow | 0 | 2 | 0 | 0 | 0 | 2 | | subsystems | 2 | 6 | 1 | 3 | 1 | 13 | | engine | 10 | 0 | 0 | 0 | 0 | 10 | -| verify | 4 | 2 | 0 | 3 | 0 | 9 | -| phase2 | 4 | 0 | 3 | 2 | 0 | 9 | +| verify | 4 | 2 | 0 | 4 | 0 | 10 | +| phase2 | 4 | 1 | 2 | 2 | 0 | 9 | | meta | 4 | 4 | 0 | 1 | 0 | 9 | ## 2. Binary understanding @@ -48,7 +48,7 @@ Generated 2026-09-08 04:02 UTC · `sots-re` @ db9b561,2026-09-08 · `sots-engine | `game/data` | 2,053 | 12 | 462 | yes | game-data.md | | `game/design` | 1,024 | 17 | 250 | yes | game-design.md | | `game/effects` | 973 | 3 | 231 | yes | game-effects.md | -| `game/sim` | 1,722 | 9 | 512 | yes | game-sim.md | +| `game/sim` | 1,731 | 9 | 512 | yes | game-sim.md | | `mars/parse` | 875 | 12 | 277 | yes | mars-parse.md | | `mars/rng` | 206 | 0 | 0 | yes | mars-rng.md | | `mars/stream` | 3,703 | 6 | 222 | yes | mars-stream.md | @@ -57,7 +57,7 @@ Generated 2026-09-08 04:02 UTC · `sots-re` @ db9b561,2026-09-08 · `sots-engine | `shim` | 5,051 | 0 | 0 | direct (WIN32) | M0.md | | `shim/hooks` | 2,924 | 0 | 0 | direct (WIN32) | M0.md | | `shim/trace` | 1,836 | 8 | 248 | direct (WIN32) | shim-trace.md | -| **total** | **22,612** | **88** | **2718** | | | +| **total** | **22,621** | **88** | **2718** | | | Board `engine:` rows: verified **10**, mapped 0, in flight 0 (of 10) — verified & merged `[██████████] 100%` @@ -94,10 +94,10 @@ Most recent open: ## 8. Delta since previous dashboard -- verified targets: 29 → 29 (+0) · mapped-or-better: 45 → 45 (+0) -- engine LOC: 20,812 → 22,612 (+1,800) · test files: 88 → 88 (+0) · checks: 2,647 → 2,718 (+71) +- verified targets: 29 → 29 (+0) · mapped-or-better: 45 → 46 (+1) +- engine LOC: 22,612 → 22,621 (+9) · test files: 88 → 88 (+0) · checks: 2,718 → 2,718 (+0) - addresses verified: 202 → 202 (+0) · recovered layouts: 21 → 21 (+0) · open questions: 27 → 27 (+0) --- warnings: mars-rng.md: no oracle total row parsed; mars-stream.md: no oracle total row parsed; mars-vfs.md: no oracle total row parsed - + diff --git a/campaign/board.md b/campaign/board.md index 6280e8b..ced1fab 100644 --- a/campaign/board.md +++ b/campaign/board.md @@ -55,12 +55,13 @@ Status flow: `backlog → in-progress → mapped → verified` (or `blocked`). | engine: game/design | engine | verified | high | 100% | 2026-09-07 | merged; see ShipDesignDef row | | P2-B1 ComputeBudget (behavioral) | phase2 | verified | high | 90% | 2026-09-08 | LIVE + GREEN: 4,623 calls traced, 4,437 compared 0 divergences (all 8 End-Turn calls identical on 22 slots), REPLACE fed the game its budget for a full turn and the End-Turn oracle reproduced byte-for-byte. Corrections: out-param is int[22] not int[25] (next 3 words are a std::vector); researchMoneyKept only charged with a research target (real bug). Coverage: 8 slots verified on varied values, 8 slots always 0 in this save (expenses/aid/debt tail UNTESTED), 6 are inputs by construction | | P2-B2 OnTechResearched (behavioral) | phase2 | in-progress | med | 70% | 2026-09-08 | CODE-COMPLETE (engine f28c639), dist-b2 staged, ctest 28/28. TEN static corrections: all float32 w/ widened literals; AI-bonus values 0.5 (odds .1/.2); PrGtTrf is int; +0x308 is a POINTER (RAD>REND>RIP first-hit, no species gate); undocumented sticky mask at +0x1a4; capture-designs/design-masks/bore are tail checks on EVERY completion; NO already-researched guard (our early-return would have made every call a no-op); *(int*)TechDef is not a TechId; full g_TechIdNames dump found XenoTechId(Proliferate,Morrigi) returning the HUMAN node-track tech (block is 5 not 6). NEEDS VM window (queued behind B3) | -| P2-B3 ProcessResearch (behavioral, RNG) | phase2 | in-progress | med | 70% | 2026-09-08 | CODE-COMPLETE (engine 3ebc8bf), dist-b3 staged. Static analysis found 5 REAL BUGS in our code: draw = y/(2^32-1) not y*2^-32 (constant 1/4294967295; compare could NOT have caught this - 0 decision flips in 1e6); NextInt is [0,n] INCLUSIVE by pointer; spend has no floor at 0; odds/roll/ratio are float32 not double; decay constants are widened float literals. ProcessResearch arg2 = the RNG object. ctest 26/26. NEEDS VM window (queued behind M2) | -| RNG signatures (Ghidra) | meta | verified | high | 100% | 2026-09-08 | Seed/Twist/NextFloat verified (own pass) + NextInt pinned by B3: [0,n] inclusive, bound by pointer. Draw mapping = y/(2^32-1). Lazy twist, left@+0x9c4. Open: x87 precision-control mode at runtime (instrumented - hook logs fpu_cw) | +| P2-B3 ProcessResearch (behavioral, RNG) | phase2 | mapped | high | 85% | 2026-09-08 | LIVE, PARTIAL PASS: 15 calls compared, 13 zero-divergence; RNG post-state matched 14/15 incl. every roll (validates MT19937 + draw mapping + odds together). 2 divergences are the declared SetResearched boundary. ORACLE FAILS by exactly one item across 40,300: an unposted EVENT_RESEARCH_OVERBUDGET - compare was blind because the event list was never a declared region. fpu_cw=0x127f => 53-bit double, x87 question SETTLED. No Zuul in the save: double roll still disassembly-only | +| RNG signatures (Ghidra) | meta | verified | high | 100% | 2026-09-08 | Seed/Twist/NextFloat/NextInt verified; draw = y/(2^32-1); NextInt [0,n] inclusive; lazy twist; left@+0x9c4. RUNTIME CONFIRMED: fpu_cw=0x127f (53-bit double, round-nearest) - our next_float model is right, float_from_pc24 is an unused contingency | | engine: game/effects | engine | verified | high | 100% | 2026-09-08 | merged: TechId enum (196 slots @10000+i), 44 ids with typed strategic effects, species flag bits, ApplyTechEffect; 254 checks | -| VM140 exclusivity (lab rule) | meta | verified | high | 100% | 2026-09-08 | one agent at a time deploys/relaunches. Holder: B3. QUEUE: B2, then B4. Non-holders build in /srv/re-lab/build/sots-engine-, stage dist-, deploy C:\SOTS\shimdist-. NOTE: a Windows Update dialog can hide a crash dialog and mimic a hang - screenshot first | -| Zuul double-roll (behavioural) | verify | backlog | — | 0% | 2026-09-08 | the reference save may have no species-5 player; if so the Zuul double roll is verified only by disassembly. Needs one extra compare from a Zuul save | +| VM140 exclusivity (lab rule) | meta | verified | high | 100% | 2026-09-08 | one agent at a time deploys/relaunches. Holder: B2. QUEUE: B4. Non-holders build in /srv/re-lab/build/sots-engine-, stage dist-, deploy C:\SOTS\shimdist-. NOTE: a Windows Update dialog can hide a crash dialog and mimic a hang | +| Zuul double-roll (behavioural) | verify | backlog | — | 0% | 2026-09-08 | CONFIRMED NEEDED: ref-turn2 has only species 0 and 2, so the double roll is verified by disassembly + host tests only. Needs one compare from a species-5 save; the check is just that `left` drops by 2 not 1 | | budget tail coverage (expenses/aid/debt) | verify | backlog | — | 0% | 2026-09-08 | 8 ComputeBudget slots were always 0 in ref-turn2 (no sliders, no aid, no debt, no handicap). Need a save with expense sliders, a debtor and a research-aid treaty to exercise ExpenseTotal + the aid/bonus tail | | hook GetDifficultyMods | meta | backlog | — | 0% | 2026-09-08 | B1 derived the two difficulty rows from trace values (AI maintenance divisor 3, research x1.5) instead of snapshotting them; hook it properly so they stop being constants | | section-loader compare crash | verify | backlog | — | 0% | 2026-09-08 | SectionDictionary compare crashes the engine while the identical weapon path succeeds -> fault is in re-running LoadSection, not the manifest reader. Next boundary: hook LoadSection itself. docs/M2.md has 3 ranked leads | | P2-B4 colony + movement (behavioral) | phase2 | in-progress | — | 0% | 2026-09-08 | offline lane + Ghidra: verify ServerSystem::ProcessTurn / MoveFleet signatures (unverified), then hook vs game/sim colony+movement; RNG-snapshot design (colony consumes RNG for plague/rebellion) | +| harness gap: undeclared side-effect lists | verify | backlog | — | 0% | 2026-09-08 | B3's replace-oracle failed on one unposted event while compare passed, because the player's EVENT list was never a declared region. Every hook that can post events or append to a list must declare that list, else compare gives false confidence. Audit B1/B2/M2 descriptors for the same blind spot |