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>
This commit is contained in:
@@ -324,6 +324,46 @@ try {
|
||||
* log line: a preset that silently photographs the wrong chapter is worse than
|
||||
* one that refuses, because the picture still looks deliberate.
|
||||
*/
|
||||
/*
|
||||
* `--lat/--lng` plants the camera at a place instead of at a chapter.
|
||||
*
|
||||
* Every other aim in this harness goes through a control a reader also uses,
|
||||
* and that stays the default: `--chapter` clicks a chapter button. But a board
|
||||
* can then only be photographed where a chapter already points, and the merged
|
||||
* "one California" board carries the state pack's six — the whole state, the
|
||||
* north, two corridors and two doors — none of which is near a city. The board
|
||||
* exists to put cities on the state, and there was no way to take a picture of
|
||||
* 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. `--standoff` and `--height` are
|
||||
* true metres, so a pose reads the same on a 94 m board and a 1,919 m one.
|
||||
*/
|
||||
const seekLat = flag("--lat", null);
|
||||
const seekLng = flag("--lng", null);
|
||||
if (seekLat !== null && seekLng !== null) {
|
||||
const at = {
|
||||
lat: Number(seekLat),
|
||||
lng: Number(seekLng),
|
||||
standoffM: Number(flag("--standoff", "20000")),
|
||||
heightM: flag("--height", null) === null ? undefined : Number(flag("--height", "0")),
|
||||
azimuth: flag("--azimuth", null) === null ? undefined : Number(flag("--azimuth", "0")),
|
||||
};
|
||||
const placed = await page.evaluate((pose) => {
|
||||
const cam = globalThis.__teraCamera;
|
||||
if (!cam || typeof cam.seek !== "function") return null;
|
||||
return { board: cam.board, ...cam.seek(pose) };
|
||||
}, at);
|
||||
if (placed === null) {
|
||||
console.error("look: no camera hook on the page — is this a build with publishCameraHook?");
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(
|
||||
`look: seek ${at.lat},${at.lng} on ${placed.board} — standoff ${at.standoffM} m`,
|
||||
);
|
||||
await page.waitForTimeout(Number(flag("--settle", "2500")));
|
||||
}
|
||||
|
||||
const chapter = flag("--chapter", null);
|
||||
if (chapter !== null && chapter !== "") {
|
||||
const expect = flag("--expect", null);
|
||||
|
||||
@@ -97,6 +97,37 @@ const SCENES = {
|
||||
signature: "hayes-valley",
|
||||
ready: () => document.getElementById("boot")?.hidden === true && document.querySelector("#chapters .chapter[data-view='hayes-valley']") !== null,
|
||||
},
|
||||
/*
|
||||
* One California — the merged board, behind `?one=1`.
|
||||
*
|
||||
* It needs a cell of its own, and until it had one the only way to measure it
|
||||
* was to hand-edit the `california` cell's query, run, and edit it back. That
|
||||
* was done six times in one session and is exactly the sort of procedure that
|
||||
* gets half-done: the numbers quoted for this board came from a harness that
|
||||
* was, at the time, lying about which board it measured.
|
||||
*
|
||||
* **`ready` asserts the merged board specifically, not just California.** The
|
||||
* signature chapter cannot do it — `california-overview` is on the coarse
|
||||
* state board too, so a cell whose `?one=1` silently stopped working would
|
||||
* measure the coarse board and pass, which is the "a budget that cannot fail"
|
||||
* failure this harness already has a comment about. `#sea-section` is the
|
||||
* discriminator and it is a real one: the note is written only for a board
|
||||
* that has ports, `california.ts` authors none, and `cities/unify.ts` folds in
|
||||
* the Southland's two. No ports, no section, no readiness.
|
||||
*
|
||||
* The caps are RECORDED from the first measured run with headroom left, in the
|
||||
* same spirit as `bay-area` and `socal` above — not copied from `california`,
|
||||
* whose numbers describe a board with no cities on it.
|
||||
*/
|
||||
"california-one": {
|
||||
host: "tera.lumbridgecorp.com",
|
||||
query: "?city=california&one=1&handover=0",
|
||||
signature: "california-overview",
|
||||
ready: () =>
|
||||
document.getElementById("boot")?.hidden === true &&
|
||||
document.querySelector("#chapters .chapter[data-view='california-overview']") !== null &&
|
||||
document.getElementById("sea-section") !== null,
|
||||
},
|
||||
socal: {
|
||||
host: "tera.lumbridgecorp.com",
|
||||
query: "?city=socal&handover=0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"note": "Caps are never raised. A red p95FrameIntervalMs on this box is noise before it is a finding — the GPU here never leaves 500 MHz of a possible 2,725, so a desktop cell on the vsync deadline flips between 16.8 and 33.3 ms with geometry identical to the digit; judge on maxTriangles and maxDrawCalls. The five scene names are bound to board identity in performance-budget.mjs: every scene asserts the data-board of the pressed tab, because ?city= falls back to the first board rather than failing and a bay-area cell that silently measured California would pass its cap by a factor of six.",
|
||||
"note": "Caps are never raised. A red p95FrameIntervalMs on this box is noise before it is a finding \u2014 the GPU here never leaves 500 MHz of a possible 2,725, so a desktop cell on the vsync deadline flips between 16.8 and 33.3 ms with geometry identical to the digit; judge on maxTriangles and maxDrawCalls. The five scene names are bound to board identity in performance-budget.mjs: every scene asserts the data-board of the pressed tab, because ?city= falls back to the first board rather than failing and a bay-area cell that silently measured California would pass its cap by a factor of six. `california-one` is the merged board and its caps are RECORDED, not copied: measured 352,927 triangles / 420 draws desktop and 352,527 / 416 mobile on its first full run, set here with headroom in the same spirit as bay-area and socal. They were briefly copied from `california`, which is wrong for the reason that cell's own numbers are wrong for this board \u2014 `california` describes a state with no cities on it, and this one carries 56,327 buildings, two ports and both metros' bridges and airports. No existing cap was raised to accommodate it.",
|
||||
"scenes": {
|
||||
"california": {
|
||||
"desktop": {
|
||||
@@ -61,6 +61,18 @@
|
||||
"maxDrawCalls": 170,
|
||||
"maxTriangles": 900000
|
||||
}
|
||||
},
|
||||
"california-one": {
|
||||
"desktop": {
|
||||
"p95FrameIntervalMs": 16.7,
|
||||
"maxDrawCalls": 460,
|
||||
"maxTriangles": 400000
|
||||
},
|
||||
"mobile": {
|
||||
"p95FrameIntervalMs": 33.3,
|
||||
"maxDrawCalls": 455,
|
||||
"maxTriangles": 400000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user