From 6c3a94160ee28d0e6c358ac0a881daea4049bc24 Mon Sep 17 00:00:00 2001 From: Aadharsh Pannirselvam <19518661+oddharsh@users.noreply.github.com> Date: Sun, 23 Aug 2026 21:26:03 -0400 Subject: [PATCH] chore(routes): delete the route baseline nothing has ever read tools/verify-baseline.aadhar.sh.json is 480 committed lines written by verify-routes.mjs on a production run and read by nothing, in this repo or in CI, from the day it was added. It is a file named "baseline" that nothing compares against, which is worse than no file, because the name reads as a check somebody is running. Deleted on evidence rather than on the name. Regenerating it against production after eight months found 52 new rows, 0 removed, and exactly ONE differing row: /coffee/availability.json 503 -> 200 which is the calendar fail-closed path that the ROUTES table itself already declares as `status: [200, 503], flaky: true`. So the whole recorded lifetime of this file produced one difference, on the one row the oracle calls transient by design. The ROUTES table is the expectation and is strictly richer. Parsed with a brace-balanced scan rather than a regex, every row asserts a status and the only four with no content-type are 301s where it is meaningless. Rows also carry things a recording cannot: status unions, `flaky`, body markers, byte caps. The deeper reason not to keep it: a recording of observed production BLESSES whatever production did at capture time, an upstream outage included, which is the opposite of what an assertion does. The 503 above is exactly that. Add a row to ROUTES instead. Also gone with it: - the write, so a production run no longer dirties the tree. `bun run routes:check` and a real https://aadhar.sh sweep both run clean afterwards and leave nothing behind. - the now-unused writeFileSync import. - the .gitignore rule for scripts/verify-baseline.localhost_*.json. It was doubly dead: it names scripts/, which merged into tools/ on 2026-08-18, and the ephemeral local write it guarded had already been fenced behind `if (isProd)`. design/PORTING.md still mentions the file. That is left alone on purpose; design/README.md marks PORTING.md as a design pass the site did not converge on, and this repo deliberately does not rewrite historical mentions. 353 tests, typecheck, lint, build, pages and both oracle runs (142 in-process, 147 against production) green. --- .gitignore | 2 - tools/verify-baseline.aadhar.sh.json | 480 --------------------------- tools/verify-routes.mjs | 34 +- 3 files changed, 20 insertions(+), 496 deletions(-) delete mode 100644 tools/verify-baseline.aadhar.sh.json diff --git a/.gitignore b/.gitignore index 33a9be0ee..7544a6ddb 100644 --- a/.gitignore +++ b/.gitignore @@ -49,8 +49,6 @@ cf-garage/node_modules/ # zenc (JPEG thumbnail encoder) build artifacts — Cargo.lock is committed, target/ is not tools/photos/zenc/target/ -# verify-routes.mjs dev baselines against local servers (transient, per-port) -scripts/verify-baseline.localhost_*.json # dcz deltas are BUILD OUTPUT now (build.mjs generates them with node:zlib zstd), not # committed artifacts. Nothing to ignore here; this note exists so the directory is not diff --git a/tools/verify-baseline.aadhar.sh.json b/tools/verify-baseline.aadhar.sh.json deleted file mode 100644 index 085c5ed0e..000000000 --- a/tools/verify-baseline.aadhar.sh.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "base": "https://aadhar.sh", - "routes": [ - { - "path": "/", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/", - "status": 200, - "ct": "text/markdown; charset=utf-8" - }, - { - "path": "/index.html", - "status": 301, - "ct": "" - }, - { - "path": "/favicon.ico", - "status": 200, - "ct": "image/svg+xml; charset=utf-8" - }, - { - "path": "/hit?peek=1", - "status": 200, - "ct": "image/svg+xml; charset=utf-8" - }, - { - "path": "/auth.md", - "status": 200, - "ct": "text/markdown; charset=utf-8" - }, - { - "path": "/.well-known/api-catalog", - "status": 200, - "ct": "application/linkset+json" - }, - { - "path": "/.well-known/agent-card.json", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/.well-known/oauth-protected-resource", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/.well-known/oauth-authorization-server", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/whoareyou", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/whoareyou.json", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/security", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/security", - "status": 200, - "ct": "text/markdown; charset=utf-8" - }, - { - "path": "/security.md", - "status": 200, - "ct": "text/markdown" - }, - { - "path": "/reading", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/updates", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/updates", - "status": 200, - "ct": "text/markdown; charset=utf-8" - }, - { - "path": "/updates.md", - "status": 200, - "ct": "text/markdown" - }, - { - "path": "/restore.md", - "status": 200, - "ct": "text/markdown" - }, - { - "path": "/photos.md", - "status": 200, - "ct": "text/markdown" - }, - { - "path": "/restore", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/restore", - "status": 200, - "ct": "text/markdown; charset=utf-8" - }, - { - "path": "/updates.json", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/lens", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/lens/", - "status": 301, - "ct": "" - }, - { - "path": "/lens.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/lens-browser.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/luna.css", - "status": 200, - "ct": "text/css" - }, - { - "path": "/sw.js", - "status": 200, - "ct": "application/javascript; charset=utf-8" - }, - { - "path": "/nav.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/nav.src.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/notepad.src.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/lens.src.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/lens-browser.src.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/tooltip.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/tooltip.src.js", - "status": 200, - "ct": "text/javascript" - }, - { - "path": "/luna.src.css", - "status": 200, - "ct": "text/css" - }, - { - "path": "/lens/fetch?url=https://example.com", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/lens/shot?url=https://example.com", - "status": 200, - "ct": "image/png" - }, - { - "path": "/lens/browser?url=javascript%3Aalert(1)", - "status": 400, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/lens/compare.json?left=javascript%3Aalert(1)&right=https%3A%2F%2Fexample.com", - "status": 400, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/mcp", - "status": 405, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/search", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/search.json?q=photo", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/llms-full.txt", - "status": 200, - "ct": "text/plain; charset=utf-8" - }, - { - "path": "/ledger", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/ledger.json", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/writing", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/writing/", - "status": 301, - "ct": "" - }, - { - "path": "/writing/in-flux", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/writing/in-flux.txt", - "status": 200, - "ct": "text/plain" - }, - { - "path": "/writing/posts.json", - "status": 200, - "ct": "application/json" - }, - { - "path": "/rn", - "status": 302, - "ct": "" - }, - { - "path": "/rn", - "status": 200, - "ct": "text/markdown; charset=utf-8" - }, - { - "path": "/rn.md", - "status": 200, - "ct": "text/markdown; charset=utf-8" - }, - { - "path": "/rn/tracks", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/rn/tracks.html", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/rn/admin", - "status": 403, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/bot", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/around", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/around/json", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/around/changes.json", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/photos/query.json?q=XT", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/coffee/availability.json", - "status": 503, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/images", - "status": 301, - "ct": "" - }, - { - "path": "/images/", - "status": 301, - "ct": "" - }, - { - "path": "/images/full", - "status": 301, - "ct": "" - }, - { - "path": "/images/full/", - "status": 301, - "ct": "" - }, - { - "path": "/photos", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/photos/", - "status": 301, - "ct": "" - }, - { - "path": "/run", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/run?cmd=garage", - "status": 302, - "ct": "" - }, - { - "path": "/run?cmd=xyzzy-not-a-page", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/images/manifest.json", - "status": 200, - "ct": "application/json; charset=utf-8" - }, - { - "path": "/images/metadata.json", - "status": 200, - "ct": "application/json" - }, - { - "path": "/images/meta/L1000069_3.json", - "status": 200, - "ct": "application/json" - }, - { - "path": "/images/full/L1000069_3.jpg", - "status": 200, - "ct": "image/jpeg" - }, - { - "path": "/images/L1000069_3-400.avif", - "status": 301, - "ct": "" - }, - { - "path": "/i/L1000069_3.17557e80.avif", - "status": 200, - "ct": "image/avif" - }, - { - "path": "/garage", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/garage/", - "status": 307, - "ct": "" - }, - { - "path": "/garage/scroll", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/garage/workers", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/garage/wire", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/garage/blueprint", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/garage/gpt56", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/garage/enc/z-zc90.jpg", - "status": 200, - "ct": "image/jpeg" - }, - { - "path": "/lwe", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/lwe/", - "status": 307, - "ct": "" - }, - { - "path": "/lwe/utf8", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/pixel-peeper", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/pixel-peeper/manifest.json", - "status": 200, - "ct": "application/json" - }, - { - "path": "/access", - "status": 200, - "ct": "text/html; charset=utf-8" - }, - { - "path": "/access.md", - "status": 200, - "ct": "text/markdown" - } - ] -} diff --git a/tools/verify-routes.mjs b/tools/verify-routes.mjs index ab7ddf941..5aa769493 100644 --- a/tools/verify-routes.mjs +++ b/tools/verify-routes.mjs @@ -10,7 +10,7 @@ // node tools/verify-routes.mjs http://localhost:8788 // // Exit code is non-zero if any non-flaky route fails its assertion, so it can -// gate a deploy. Writes the observed results to verify-baseline..json. +// gate a deploy. It writes nothing: the assertions live in ROUTES. // // Cache-busted per request so we measure the deployment, not the edge cache. // @@ -19,7 +19,7 @@ // merge instead of only after a deploy. A local base drops the rows tagged // `remote` (see below); everything else is asserted identically. -import { readFileSync, writeFileSync } from "node:fs"; +import { readFileSync } from "node:fs"; // Every path lookup below is relative to the REPO ROOT, not to this file. // Naming it means moving this script again costs one line instead of 57. @@ -447,19 +447,25 @@ async function main() { console.log(`${tag.padEnd(5)} ${String(r.status).padEnd(4)} ${r.path}${why ? " <- " + why : ""}`); } - // The baseline is a record of a DEPLOYMENT's shape, so only a real deploy - // produces one. A local harness run would otherwise drop an ephemeral - // verify-baseline.127.0.0.1.json (a different port every boot) into the repo. - let outFile = null; - if (isProd) { - const host = base.replace(/^https?:\/\//, "").replace(/[^a-z0-9.-]/gi, "_"); - // Beside this script, which is where the committed aadhar.sh baseline lives. - outFile = `tools/verify-baseline.${host}.json`; - writeFileSync(outFile, JSON.stringify({ base, routes: results.map(({ path, status, ct }) => ({ path, status, ct })) }, null, 2) + "\n"); - } - + // NO BASELINE FILE. A production run used to write tools/verify-baseline..json + // and nothing ever read it, in this repo or in CI, from the day it was added. + // Deleted 2026-08-23 along with the committed aadhar.sh copy, on this evidence: + // + // - the ROUTES table is the expectation and it is strictly richer. Every row + // asserts a status, the only four without a content-type are 301s where it + // is meaningless, and rows carry things a recording cannot (status UNIONS + // like [200, 503], `flaky`, body markers, byte caps). + // - regenerating it against production after eight months found 52 new rows, + // 0 removed, and exactly ONE differing row: /coffee/availability.json at + // 503 rather than 200, which is the calendar fail-closed path the table + // itself already declares as `status: [200, 503], flaky: true`. + // + // So its whole recorded lifetime of drift was one row the oracle calls + // transient by design. A recording of observed production BLESSES whatever + // production did at capture time, including a downstream outage, which is the + // opposite of what an assertion does. Add a row to ROUTES instead. console.log("=".repeat(60)); - console.log(`${results.length} routes, ${hardFails} hard failure(s).` + (outFile ? ` Baseline -> ${outFile}` : "")); + console.log(`${results.length} routes, ${hardFails} hard failure(s).`); process.exit(hardFails ? 1 : 0); }