Changes touching this path
- the drill-down takes the dashboard door and pays for react-table on its own route alone, and ADR 0087 records the metrics pipeline as one document
loot#1804 and loot#1636 in one land, because a docs-only land pays the full
gate and the drill-down is the last code the ADR describes.
The drill-down is /metrics/paths and /metrics/referrers - a react-table over
the same rows each bar panel summarises, sortable, bounded at 200 with the
distinct count beside it. It is the only interactive escalation and it lives
here, not on the dashboard: react-table is imported by this route alone,
pinned by a test and MEASURED - the dashboard chunk moved by 80 bytes gzip for
its two footer links, the drill-down chunk is 13.1 KB gzip and paid only there,
and every other surface grew by ~220 bytes for the route-tree entry, which is
the manifest cost loot#1640 predicted. Excluded from prerender by the /metrics
prefix rule, METRICS_HEADERS for the dashboard reasons.
The door is the hard part and it is the SAME door. operatorReader now lives in
operator-door.ts and both the dashboard and the drill-down reach it through a
dynamic import inside a handler, returning null for every refusal so the loader
raises one notFound - a stranger, a non-operator and an unknown kind are
indistinguishable from each other and from a path we do not serve. The kind is
refused by the LOADER before the server function runs, and the validator
narrows rather than throws, because a thrown validator would surface as a 500,
a third distinguishable answer.
Two defects were found by the BUILD and the BUDGET with the typecheck green
both times, which is why both are pinned as tests rather than remembered. A
plain exported function that a route module imports statically is not
stripped from the client bundle the way a handler body is, so the first
refactor dragged @tanstack/react-start/server into the client and the build
refused it. And a VALUE import of two constants from the pg-backed reader put
pg into every client bundle - 62 surfaces up by 24.8 KB each - so the
constants a route may need now live in lib/metrics-drill.ts with no server
dependency in the graph, and read.ts imports them back.
ADR 0087 records the pipeline: three collection points and why no one of them
can see the surface, the loot_metrics database and its three roles, the
visitor key with the two rejected salt constructions, the route-shape rule and
its two enforcement points, the account-reference amendment to the map, the
retention and rollup boundary, the edge-log posture as the reason uniques
need a beacon at all, and the departures and residue - the kept User-Agent,
the eager beacon as the answer to the gate hazard, the error log, the
out-of-scope vhosts, the shared disk. It is 0087 and not the 0074 the ticket
named: telemetry took 0074 the night after this claimed it, and twelve more
landed while this waited on its build tickets. Four glossary entries ride the
same land - Visitor key, Session, Route-shape path, Marginal rollup - each
with the framing it rejects.
624 site tests, published_surfaces gate green, budget green.
984260b2 · dbf3dbe6…
Renames are not followed. loot's tree maps a path to an address, so a rename is a delete and an add. This list is the history of the name, not of the bytes.