1
0
This repository has been archived on 2026-08-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tera/scripts
karti 285b5b19e7 fix: the merged board's live feeds, and two instruments it could not be judged without
An ultracode investigation mapped the single-board work across five parallel
readers and three adversarial reviewers. It found things this session would have
walked into, and two of them are fixed here.

**THE MERGED BOARD WAS SHIPPING WITH THREE FEEDS SILENTLY OFF.** Live ADS-B and
live weather were gated on `id !== "california"` — "not the coarse statewide
board", correct the day it was written, since live aircraft over a board at
1,919 m to the unit are a glyph problem and one station cannot speak for a
thousand kilometres of coast. `cities/unify.ts` then built a board that is the
whole state AND metro-detailed, keeping the `california` id deliberately so the
fire gate, the ladder's region table and every `?city=` deep link keep working.
It inherited a gate meant for something else. Measured before the fix: the
`#source` badge read `""` on the merged board and `live weather · live traffic`
on the Bay Area's. A defect that reads as "it feels less alive" and never as an
error.

`carriesMetroDetail(city)` asks the pack instead: `focusRegions` is the honest
predicate and needs no new field, because the coarse state pack declares none
and every pack with ground worth drawing at metro resolution declares one.

**AND ASKING WAS NOT ENOUGH, BECAUSE THE FEEDS ARE PER-METRO.** With the gate
fixed the board asked — and was refused: `GET /flights?lat=37.30&lng=-119.25&
radiusNm=402 → 400 bad_request, "Nothing this deployment serves is near
37.3,-119.25"`. Correctly: `regionOf` derives its circle from the board's bounds,
which on a statewide board is 402 nautical miles centred on the middle of the
state, and what the deployment serves is San Francisco and the Southland, five
hundred and sixty kilometres apart.

`mergedTraffic` asks for both. In `adapters/http.ts` and not `engine/flights.ts`
for the reason `TrafficSource` itself lives there: the engine draws darts at
coordinates and has no business with provenance, and every interesting part of
this merge is provenance. De-duplicated by id, because overlapping circles both
see the aircraft between them and `flights.ts` measures a track's span from
repeated observations — a duplicate is not merely a double image. `live()` is
`some` and not `every`, so one dark metro does not make the other's observed
traffic claim to be simulated. Verified: `?lat=37.77` → 200 live, 24 aircraft;
`?lat=33.82` → 200 live, 15 aircraft; `#source` now reads `live traffic` on the
merged board and stays `""` on the coarse one.

**TWO INSTRUMENTS, BOTH BECAUSE THIS SESSION KEPT FAILING WITHOUT THEM.**

`scripts/performance-budget.mjs` gains a `california-one` cell. Until now the
only way to measure the merged board was to hand-edit the `california` cell's
query, run, and edit it back — done six times in one session, which is exactly
the procedure that gets half-done. Its `ready` asserts `#sea-section`, not just
the signature chapter: `california-overview` is on the coarse board too, so a
cell whose `?one=1` quietly stopped working would measure the coarse board and
pass. No ports, no section, no readiness. Caps are RECORDED from its first run
with headroom, in the same spirit as bay-area and socal — they were briefly
copied from `california` and that is wrong for the same reason that cell's
numbers are wrong for this board. **No existing cap was raised.**

`scripts/look.mjs` gains `--lat/--lng/--standoff/--height`. Every aim in this
harness goes through a control a reader also uses, which is right and stays the
default — but it means a board can only be photographed where a chapter already
points, and the merged board carries the state pack's six: the whole state, the
north, two corridors, two doors. None is near a city. The board exists to put
cities on the state and there was no way to photograph one; three attempts by
clicking the minimap and guessing wheel notches landed in open ocean twice and
on empty coast once. The seek moves the camera and nothing else.

**A regression the new cell caught within one run.** The first version of the
marker fix gated on bounds alone, like the office doors. The coarse state
board's rectangle contains San Francisco, so it picked up forty-four company
markers it has no business drawing at 1,919 m to the unit: 373 draw calls → 417.
Now gated on `carriesMetroDetail` as well, and `california` measures 372,415
triangles / 373 draws — identical to before this commit.

All twelve budget cells pass. 1,705 tests pass.

Recorded for the next round, from the review: **SoCal's two focus rectangles
overlap by 1.7 x 4.6 km** (verified: lat 34.075–34.090, lng −118.300–−118.250),
so any per-rectangle terrain tier must clip them to a disjoint cover first or it
draws that ground twice. Today's per-axis lattice is what hides it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 04:16:33 -07:00
..