Spaces:
Paused
Paused
Commit History
-
Fix the smoke job: npx --package does not do what I assumed
Claude +1: Claude Opus 4.8Unverified signatureThe smoke job failed on main with `sh: 1: playwright: not found` (exit 127). Two mistakes, and I merged before CI confirmed either — which is precisely the discipline the review said was the root problem. Owning that: the fix is here, and this one waits for a green run before it merges. MISTAKE 1: playwright-core ships no CLI. Only the full `playwright` package carries the binary that downloads browsers. The install step could never have worked. MISTAKE 2, the more interesting one: `npx --yes --package X -- node script.js` does not make X importable by the script. npx puts the package's BIN on PATH; it does not put its module on a child node process's resolution path, so the `require` inside tools/smoke.js fails with MODULE_NOT_FOUND regardless of which package was named. I had verified the script by setting NODE_PATH by hand and never exercised the mechanism the CI command actually used, so my local run proved the test worked and proved nothing about the plumbing around it. Both ve…d3f8729 -
Boot the game in a real browser in CI — the one thing 2502 tests cannot see
Claude +1: Claude Opus 4.8Unverified signatureThere is no build step, so the files in the repo are the files the browser loads. The suite is headless and dependency-free, which is the point of it, and it means nothing in it can catch a page that parses, imports cleanly, and then throws on load. static-integrity.test.js catches STATIC breakage — a syntax error, an import pointing at a moved file, a getElementById for an id that does not exist — and stops exactly there. The failure it cannot reach is a blank white screen, and the way that has been found here before is a human clicking. Measured rather than asserted. Adding a bad draw call to renderUnits.js — one line, valid syntax, imports fine — leaves all 2502 tests passing and takes the game down on its first frame. tools/smoke.js catches it and exits 1 with the stack. A second mutation (a runtime throw in boot.js) is caught by BOTH this and the existing "imports cleanly under Node" guard, which is why the render one is the honest demonstration of what is new here. tools/smoke.…778e159 -
Cut 1.1.0, un-deprecate the CI actions, and run the browser smoke test
Claude +1: Claude Opus 4.8Unverified signatureFinding 9 of docs/code-review-2026-08.md, and the release checklist step that had never gated any of this work. CONTRIBUTING's release checklist is thorough and was going unused: the app sat at 1.0.0 while [Unreleased] accumulated Observer Mode, patrol orders, the counter-triangle work, doctrine research timing, Odyssey world selection, the endgame clock, a fourth archetype, competitions with Elo, genome evolution and an in-app AI editor. Bumped version.js, package.json and version.json in lockstep (release-manifest.test.js gates that), and dated the changelog section. Save formats are deliberately NOT bumped — nothing changed shape this cycle, so 1.0.0 saves load as-is, and version.json now says so. Deliberately NOT done: `git tag v1.1.0` and any deploy. Those are outward-facing and yours to make; everything they need is prepared. actions/checkout and actions/setup-node bumped v4 -> v5. Both were being force-run on Node 24 with a deprecation warning on every job. Ran the browser s…dd41939
-
Get CI green, and make the AI's opponent belief fade the way it says it does
Claude +1: Claude Opus 4.8Unverified signatureActs on the first three findings of docs/code-review-2026-08.md. CI has been red since 2026-08-05 and two PRs merged through it. Two causes, both fixed here: - competitionLedger.js had two wrong JSDoc signatures. addRosterEntry never declared the `genome` field its body reads and writes (the RosterEntry typedef omitted it too), and recordCompetition typed its match rows as bare `object`, so every row.aName / row.winner / row.margin read in the file was an error the moment a checker looked. Adds a real CompetitionResultRow typedef and narrows the one ternary TypeScript was widening to `string`. - CI installed TypeScript unpinned via `npx --package typescript`, so the same tree reported 2 errors under 5.7 and 21 under 7.0.2 — a green commit could go red overnight with no code change. The invocation is pinned to 5.7.2; the compiler still stays out of package.json, it is just no longer a moving target. Verified clean on both 5.7.2 and latest. The third is a real behavi…15f3a03
-
Add tests for dom.js/saveload.js/renderShared.js + a CI typecheck gate
Claude +1: Claude Sonnet 5Unverified signatureThe UI/wiring layer had zero direct tests versus 659 passing engine tests, and CONTRIBUTING.md's release checklist requires `npm run typecheck` but no CI step ever ran it — the eight @ts-check'd files could silently regress on every green PR. Three new test files open a crack in the UI-layer coverage gap, each picked because its own source comments already claimed Node-safety nobody had pinned down: dom.js's document-guard (every handle now asserted null under Node), saveload.js's window-guard (its pure hasSave/hasOdysseySave/ storedSaveVersions, exercised through their real missing-localStorage fallback path in this environment), and renderShared.js's pure geometry/ facing helpers (hashStr, seededRng, shade, hexA, polygonPoints, toWorld, inView, snapshotPositions/lerpXY/updateFacing/pruneFacing/resetFacing). The canvas-drawing helpers and saveload's DOM-driven paths are explicitly left for a follow-up, not silently skipped. CI: add a typecheck step. TypeScript stays out of package.j…759927d
-
Tier 3: scale perf-regression guard + a CI Node-version matrix
Claude +1: Claude Fable 5Unverified signatureMeasured first: ~500 units on a Gigantic (4x) map runs ~10.6 ms/tick — roughly 5x real-time headroom against the 20 Hz (50 ms) budget, with fog only 16% of a tick. So there is no perf problem to fix; a behaviour-changing fog throttle would risk determinism for no gain. Instead, lock in the healthy baseline: - A scale perf guard (test/determinism.test.js) — the bigger sibling of the existing 200-unit alarm, at ~500 units on a 4x map (both fog grids >16k cells), where an O(n^2) neighbour scan or a per-tick fog rebuild would actually bite. Loose 20s/300-tick budget (~6x measured), so it only trips on a real regression. - CI runs the suite on a Node 20 + 22 matrix so a version-specific break can't slip through. Kept zero-dependency on purpose — the game and its tests run on the Node standard library alone (package.json: "No dependencies, no build step"), so ESLint/tsc are deliberately NOT added here. 297 tests pass on Node 22 locally. Co-Authored-By: Claude Fable 5 <noreply…561ae59 -
Tier 0: fix latent defects, add determinism/perf tests and CI
Claude +1: Claude Fable 5Unverified signature- Building construction no longer heals away combat damage every tick: updateBuildingConstruction now ADDS the hp built this tick (capped at the progress ceiling) instead of overwriting hp downward, so sustained fire can actually raze a half-built structure — raiding buildings-in-progress works for both sides now. - createGameState resets the entity-id counter so a fresh game is a pure function of its seed; same-seed runs replay byte-identically. - A worker re-tasked to a different-commodity node hauls its existing load home instead of silently discarding the mined resources. - render.js prunes dead entities from the facing Map each frame and exposes resetFacing(), wired into new-game startup — no more unbounded growth. - New tests: full-sim determinism, id-reset reproducibility, a perf guard, construction-under-fire persistence + destruction, cargo preservation. - Add GitHub Actions workflow running `node --test` on push/PR. Co-Authored-By: Claude Fable 5 <noreply@ant…430c532