HardYards/web/world/js/tests
m3ultra 98bc11f033 Add balance.test.js — SPRINT6 gate 1. It is RED, and that is the point
The gate asks the only question no per-lane suite can: can the night be
won through the real $80 shop. It buys loadouts via RiggingSession, flies
the real storm JSON over the real yard, integrates skyfx's real hail/rain
exposure into main.js's real garden drain, and judges with main.js's own
win rule.

Status: storm_01 warm-up PASS, cheap-rig-punished PASS, decision-13
miss-the-bed control PASS, and **storm_02's winnable line FAILS** at
hp=36, 2/4 lost. That reproduces the integrator's finding exactly and is
the gate doing its job — SPRINT6 says everything waits on gate 1.

Two things I got wrong on the way, both worth the comments they now
carry:

- The first draft hardcoded the anchor table from a THREADS entry and
  was badly wrong (the dressed yard has the house at x=±3, not ±5). It
  flew a fictional yard. It now reads the yard from world.js and freezes
  only the sway — the yard IS the balance, so it cannot be a copy. Same
  failure as Sprint 3's 16.7° reference rig.

- The asserts were async. testkit's Suite.test() calls fn() WITHOUT
  awaiting, so every one would have passed forever while proving nothing
  — the exact vacuous-test pattern I've flagged three times. Storms are
  now flown up front in run() (which runAll does await) and the asserts
  are synchronous judgements over the results.

Registers as a sixth 'BAL' entry in selftest.html. A: your "nobody
touches this file" rule guards against five lanes conflicting here; one
jointly-owned entry is the case it makes room for. Revert if you disagree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 09:25:53 +10:00
..
a.test.js Tripwire the wind router; take Lane C's gardenExposure helper 2026-07-17 02:55:32 +10:00
b.test.js Align sail lane to contracts.js; free blown corners so they flog 2026-07-16 21:55:37 +10:00
balance.test.js Add balance.test.js — SPRINT6 gate 1. It is RED, and that is the point 2026-07-17 09:25:53 +10:00
c.test.js Hail — the system that makes the garden score respond to the rig (decision 13) 2026-07-17 03:14:27 +10:00
d.test.js Lane D: the broom, greyed prompts, and the label pass 2026-07-17 03:03:02 +10:00
e.test.js Add hail juice, plant shred, and a way to screenshot the game 2026-07-17 03:03:54 +10:00
run-node.mjs Add wind field, storm timelines and weather selftest 2026-07-16 21:38:12 +10:00
weather.selftest.js Hail — the system that makes the garden score respond to the rig (decision 13) 2026-07-17 03:14:27 +10:00