sots-engine/src/shim
alex 55408a980a shim: aivisit, the fleet-assignment visit-order log (lane BU)
Three function-entry detours, off unless `aivisit=on`:

  * StrategyAIAgent::AssignFleetsAndIssueOrders -- the bracket, recording
    (agent, task, pass, walked vector, its slots in index order);
  * StrategyAIAgent::ClaimShipsOfFleet   -- the head loop, one row per element;
  * StrategyAIAgent::ReleaseShipsOfFleet -- the tail loop, one row per element.

The two per-element targets have exactly ONE caller each in the whole image and
that caller is the third target, so the module's traffic cannot come from
anywhere else in the game and no return-address filter is needed. The element
loop's own body is deliberately not patched: its first instruction is a branch
target, which is the shape rule 19 exists for.

Each element row carries the element address (the hypothesis under test), the
fleet's id, its ship ids and its Location pointer. The ship ids are the join key
to the command block's list 10; the join must not be by position because the
walk can visit more elements than it emits commands for.

Reads of game addresses are probed before every access and laundered through a
register, so a wrong offset logs a zero instead of faulting inside a detour.

Also: shim.cfg.bupin, which is shim.cfg.bppin plus exactly three non-comment
lines, and is marked `# exhaustive` so tools/check_shim_configs.py enforces
that every registered hook is named in it.
2026-09-09 03:10:52 -04:00
..
hooks shim: aivisit, the fleet-assignment visit-order log (lane BU) 2026-09-09 03:10:52 -04:00
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
binkw32.def m0: binkw32 proxy shim, minhook, trace hook on Application::Initialize; build/deploy tooling 2026-09-07 17:22:15 -04:00
fpu_force.cpp Z: measure the strategic RNG, do not assume it 2026-09-08 09:16:24 -04:00
fpu_force.h shim: force and verify the x87 control word around the turn gate 2026-09-08 05:09:16 -04:00
main.cpp shim: aivisit, the fleet-assignment visit-order log (lane BU) 2026-09-09 03:10:52 -04:00
shim.cfg b3: research hook + RNG-snapshot compare design; fix draw mapping to y/(2^32-1), NextInt inclusive, float32 odds, spend floor, decay constants 2026-09-07 23:14:08 -04:00
shim.cfg.b4compare 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.cfg.b4scout 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.cfg.b4trace 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.cfg.bupin shim: aivisit, the fleet-assignment visit-order log (lane BU) 2026-09-09 03:10:52 -04:00
shim.cfg.cbcapture CB: the seed capture and its predictions -- the seeds are part of the stream 2026-09-08 18:59:24 -04:00
shim.cfg.cboff CB: the seed capture and its predictions -- the seeds are part of the stream 2026-09-08 18:59:24 -04:00
shim.cfg.cbpin shim: fix cbpin's wrapped header and six unnamed hooks; add a config check 2026-09-09 02:01:58 -04:00
shim.cfg.cbtrap CB: the seed capture and its predictions -- the seeds are part of the stream 2026-09-08 18:59:24 -04:00
shim.cfg.fpu1a7f shim: force and verify the x87 control word around the turn gate 2026-09-08 05:09:16 -04:00
shim.cfg.fpu007f shim: force and verify the x87 control word around the turn gate 2026-09-08 05:09:16 -04:00
shim.cfg.fpu027f shim: force and verify the x87 control word around the turn gate 2026-09-08 05:09:16 -04:00
shim.cfg.fpu127f shim: force and verify the x87 control word around the turn gate 2026-09-08 05:09:16 -04:00
shim.cfg.fpu137f shim: force and verify the x87 control word around the turn gate 2026-09-08 05:09:16 -04:00
shim.cfg.fpuoff shim: force and verify the x87 control word around the turn gate 2026-09-08 05:09:16 -04:00
shim.cfg.hoff lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hp0 lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hp4 lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hp8 lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hp9 lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hp10 lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hp11 lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hpall lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hprobes lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.hprobes2 lane H: entry-probe module, ProcessTeamRecord hook, probes= config, and the outcome of the five predictions 2026-09-08 13:38:59 -04:00
shim.cfg.l1control L1: probe the AI client seed across two processes -- it is fresh every time 2026-09-08 18:22:14 -04:00
shim.cfg.l1hive L1: probe the AI client seed across two processes -- it is fresh every time 2026-09-08 18:22:14 -04:00
shim.cfg.l1off L1: probe the AI client seed across two processes -- it is fresh every time 2026-09-08 18:22:14 -04:00
shim.cfg.l1seed L1: probe the AI client seed across two processes -- it is fresh every time 2026-09-08 18:22:14 -04:00
shim.cfg.l1snlv L1: probe the AI client seed across two processes -- it is fresh every time 2026-09-08 18:22:14 -04:00
shim.cfg.l3cont watch.mode=cont: both containers, both ends, re-armed every turn; and hooks=off no longer disarms the watchpoints 2026-09-08 19:10:10 -04:00
shim.cfg.l3control watch.mode=cont: both containers, both ends, re-armed every turn; and hooks=off no longer disarms the watchpoints 2026-09-08 19:10:10 -04:00
shim.cfg.l3probe watch.mode=cont: both containers, both ends, re-armed every turn; and hooks=off no longer disarms the watchpoints 2026-09-08 19:10:10 -04:00
shim.cfg.l4control L4: research-selection capture -- candidate stream in arrival order, and the fallback probes that separate a tie from a rotation 2026-09-08 18:15:28 -04:00
shim.cfg.l4dump L4: research-selection capture -- candidate stream in arrival order, and the fallback probes that separate a tie from a rotation 2026-09-08 18:15:28 -04:00
shim.cfg.l4off L4: read the AI's command block out of the running game 2026-09-08 18:01:19 -04:00
shim.cfg.l4probes L4: research-selection capture -- candidate stream in arrival order, and the fallback probes that separate a tie from a rotation 2026-09-08 18:15:28 -04:00
shim.cfg.l4research L4: research-selection capture -- candidate stream in arrival order, and the fallback probes that separate a tie from a rotation 2026-09-08 18:15:28 -04:00
shim.cfg.l5budget L5: the interest literals verified live at a boundary, with a control that fails 2026-09-08 17:48:42 -04:00
shim.cfg.l5control L5: the interest literals verified live at a boundary, with a control that fails 2026-09-08 17:48:42 -04:00
shim.cfg.output lane N: the population -> base-output term, live-verified 2026-09-08 12:11:36 -04:00
shim.cfg.parbr PAR: roll parity -- the AI's per-turn RNG word count is NOT fixed, at any scope 2026-09-08 19:32:19 -04:00
shim.cfg.parctl PAR: roll parity -- the AI's per-turn RNG word count is NOT fixed, at any scope 2026-09-08 19:32:19 -04:00
shim.cfg.parorders PAR: roll parity -- the AI's per-turn RNG word count is NOT fixed, at any scope 2026-09-08 19:32:19 -04:00
shim.cfg.parpin PAR: roll parity -- the AI's per-turn RNG word count is NOT fixed, at any scope 2026-09-08 19:32:19 -04:00
shim.cfg.recapb1 recapture: golden traces with guards on the live game 2026-09-08 03:04:34 -04:00
shim.cfg.recapb3 recapture: golden traces with guards on the live game 2026-09-08 03:04:34 -04:00
shim.cfg.recapmisc recapture: golden traces with guards on the live game 2026-09-08 03:04:34 -04:00
shim.cfg.recaptrace recapture: golden traces with guards on the live game 2026-09-08 03:04:34 -04:00
shim.cfg.sdbr SD: predictions for the ship-design composer, written before the build 2026-09-08 20:08:40 -04:00
shim.cfg.sdoff SD: predictions for the ship-design composer, written before the build 2026-09-08 20:08:40 -04:00
shim.cfg.sdpin SD: predictions for the ship-design composer, written before the build 2026-09-08 20:08:40 -04:00
shim.cfg.sdpin2 SD: predictions for the ship-design composer, written before the build 2026-09-08 20:08:40 -04:00
shim.cfg.tturn T: hook for Game::ServerPlayer::ProcessTurn, with the prediction committed first 2026-09-08 08:08:47 -04:00
shim.cfg.tturncmp T: hook for Game::ServerPlayer::ProcessTurn, with the prediction committed first 2026-09-08 08:08:47 -04:00
shim.cfg.w2control merge lane W2: watchpoints + multiplayer Tier 0 (CMake list and main.cpp union-resolved to keep both instruments; header regenerated) 2026-09-08 15:28:28 -04:00
shim.cfg.w2watch merge lane W2: watchpoints + multiplayer Tier 0 (CMake list and main.cpp union-resolved to keep both instruments; header regenerated) 2026-09-08 15:28:28 -04:00
shim.cfg.w3control W3: watch.mode=tshn -- arm the NVO/TShn record and the trade+spy containers from the same S 2026-09-08 16:38:55 -04:00
shim.cfg.w3mod W3: watch.mode=tshn -- arm the NVO/TShn record and the trade+spy containers from the same S 2026-09-08 16:38:55 -04:00
shim.cfg.w3tshn W3: watch.mode=tshn -- arm the NVO/TShn record and the trade+spy containers from the same S 2026-09-08 16:38:55 -04:00
shim.cfg.zledger Z: per-call-site draw ledger -- seven entry points, keyed by return address 2026-09-08 10:42:05 -04:00