Spaces:
Paused
Paused
Commit History
-
Close the guard gaps behind the last three bugs; withdraw one review finding
Claude +1: Claude Opus 4.8Unverified signatureFindings 4, 5 and 8 of docs/code-review-2026-08.md, plus a correction to 7. #8 tools/ ships to the browser but was outside the purity guard. boot.js imports tools/selfplay.js; competition.js, competitionWorker.js and playerFingerprint.js import tools/duelCore.js and tools/genome.js. So three "Node bench" files run in a browser Worker and decide the outcomes that become persisted Elo ratings, while the purity scan only ever walked engine/ and what engine/ imports — structurally identical code guarded on one side of a directory line and unguarded on the other. The review said moving the files was "simplest and better". Measuring first showed otherwise: 30+ prose references across engine/, README and docs would have had to move with them, for no safety gain. Extended the scan instead, and DERIVED the extra roots by walking out from index.html (plus the Worker entry, whose `new Worker(new URL(...))` edge no import walk can see) so a fourth file pulled into the app tomorrow is covered the…021c865
-
Tier 1, step 1: make the static guards actually guard
Claude +1: Claude Opus 5Unverified signatureSix findings from docs/code-improvement-tiers.md (C1-C4, C12, C13). Each was verified red before the fix and, where the guard is new, re-verified by reproducing the bug it exists to catch. C1 — determinism.test.js fingerprinted with its own hand-rolled snapshot that had drifted into a WEAKER one than test/_helpers.js's shared entitySnapshot: it recorded only order.type, and no cargo, tier, charge, constructing flag or state.time. So a float-accumulation drift moving a hauler's cargo or a move order's destination replayed "identically". It now imports the shared fingerprint, and a new sensitivity test mutates each sim-owned field in turn and requires the fingerprint to move (red against the old snapshot on all seven). C2 — the all-worlds roster sweep ran 400 ticks, which measurably produced ZERO combat orders on all eleven worlds: an opening-only replay that could not see a divergence in combat, veterancy, wreckage or separation under pressure. Running longer doesn't fix it (the playe…9af10ec
-
Tier 5: harden the test net (roster sweep, full-state compare, static + DOM guards)
Claude +1: Claude Opus 4.8Unverified signatureAdd the coverage a no-build-step, determinism-critical codebase needs to fail loudly instead of silently shipping a white screen or a desync. - test/_helpers.js: shared full-precision fingerprints (entitySnapshot / galaxySnapshot) that capture every sim-owned fact in a fixed, order-immune field layout, plus jumpReadyGalaxy() — the recurring "poised to jump" setup. - determinism roster sweep: same-seed replays must be byte-identical on EVERY settleable world, not just ferros — each world has its own map/terrain/AI, so a nondeterminism bug could hide on one the headline test never touches. - galaxy continues-identically at FULL precision: the existing check compares a rounded, count-only fingerprint; this compares exact positions/hp/orders/ economies/stance/pressure, so an un-persisted transient that shifts the sim by an epsilon surfaces. (It did during development — an unset-vs-0 AI wave counter the engine treats identically; normalised in the fingerprint, not the sim.)…302a725
-
Tier 1: seed the sim, attack-move/hotkeys, onboarding, rally-to-mine, tiebreak
Claude +1: Claude Fable 5Unverified signatureSix high-leverage quick wins from the improvement review. Seed the sim (engine/rng.js, state.js, main.js): production now draws a seed at match start and flows it through a shared mulberry32, so a match is reproducible — the seed shows on a topbar chip (click to copy) and the game-over screen, and can be re-entered on the setup screen to replay the exact same world. This is the keystone that later unlocks replays/save-load. Engine determinism is now guarded by a test that scans engine/ for Math.random/Date/performance.now (the two sanctioned defaults + the render clock are marked deterministic-exempt). Standard army verbs (input.js): A-then-click issues attack-move (the missing genre default — plain right-click still moves and ignores enemies); the waypoint queue moves from Ctrl to Shift so Ctrl is add-to-selection only; Esc cancels a pending attack-move or build placement. A crosshair cursor shows when armed. A is no longer a pan key (pan left with arrows/edge-scroll). Onboarding (…4f1cb54