HardYards/tools/site_audit
type-two 19c39acc8d Lane B S14: collateral exposure on the card + the night-5 invoice line (pool item)
COLLATERAL ON THE CARD. 'Winnable at $80' is an incomplete sentence on a yard
where letting a corner go also bills $180 of carport, so the card now prices
it — through world.collateralFor(), the one resolver (A's structKey fix), never
a second copy of that lookup in a panel. Deduped per STRUCTURE the way main.js
bills ('two beams letting go is one carport gone'): site_02's four carport
anchors read $180 total, not $720. The bill also rides on the margin-flag line
itself, because 'knife-edge' and 'knife-edge AND $180' are different authoring
decisions. An unpriced label renders UNPRICED — not scored, in red, never
'free' — which is the gutter bug's shape and the lie the card exists to prevent.

Verified A's structKey fix rather than assuming it: an editor-shaped carport
(id s1 + collateralKey) prices to $180, a second one (s2) also $180, and the
negative control (id s1, no collateralKey) reads null = not scored. My first
test reported a false alarm because I renamed a SHIPPED spec's id without the
palette's collateralKey — A's editor writes that field explicitly, so the
editor path was never broken.

THE NIGHT-5 INVOICE LINE (pool item, offered S13, accepted). Night 5's garden
is beyond saving by design, and the job sheet was the last surface still
dangling 'up to $45 / paid on what's left of the bed at dawn' — a maximum
nobody can earn, phrased as a rigging problem the player could solve.

NO ECONOMY CHANGE, deliberately. week.js's own comment forbids quote and settle
diverging ('the job sheet promises a number the invoice doesn't pay'), and
zeroing the quote would break that in the opposite direction — settle really
does pay the bonus proportionally. So the NUMBER stays and its CONDITION tells
the truth, which is the job sheet's own idiom:
  nights 1-4  'paid on what's left of the bed at dawn'        (unchanged)
  night 5     'scales with the bed at dawn — and tonight the ice takes it
               whatever you rig'
and the ledger names it too, because an unexplained small number next to
'night lost' reads as the player's failure:
  night 4  'garden bonus — 18% of the bed          +$8'
  night 5  'garden bonus — 18% of the bed, beyond saving from the start  +$8'

Verified in the running game on all five nights: flag fires on 5 only, every
quoted and paid figure identical (garden $45, total $136, bonus $8).

Selftest 374 passed / 0 failed / 0 skipped.
2026-07-18 16:29:41 +10:00
..
audit.html Lane B S14: audit.html onto the shared scorecard engine — one copy of the run logic 2026-07-18 16:03:59 +10:00
audit.mjs Lane B S13: THE AUDIT REWRITE — the audit predicts the garden, on C's corrected picture 2026-07-18 13:50:15 +10:00
garden_probe.html Lane B S13: THE AUDIT REWRITE — the audit predicts the garden, on C's corrected picture 2026-07-18 13:50:15 +10:00
gardenfly.js Lane B S13: THE AUDIT REWRITE — the audit predicts the garden, on C's corrected picture 2026-07-18 13:50:15 +10:00
gardenfly.selftest.js Sprint 13 integration: merge all lanes (362/0/0), apply B's pre-authorized gardenfly resolution, [I] entry 2026-07-18 14:30:13 +10:00
scorecard.js Lane B S14: collateral exposure on the card + the night-5 invoice line (pool item) 2026-07-18 16:29:41 +10:00
scorecard.selftest.js Lane B S14 gate 2.3: pin the editor's scored wind to the game's played wind 2026-07-18 16:16:29 +10:00
sweep.js Lane B S13: THE AUDIT REWRITE — the audit predicts the garden, on C's corrected picture 2026-07-18 13:50:15 +10:00
sweep.selftest.js Lane B S13: THE AUDIT REWRITE — the audit predicts the garden, on C's corrected picture 2026-07-18 13:50:15 +10:00