Repository navigation
chore(routes): delete the route baseline nothing has ever read - #531
Merged
Merged
Conversation
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.
Contributor
Wire-size diff vs merge base
Brotli q11, the quality the edge serves. Every number here is deterministic: Client assetsNo change. 22 files, 77.74 KiB Brotli total. PagesNo change. 50 files, 531.29 KiB Brotli total. Worker bundleNo change. 237.85 KiB gzip. Dictionary deltas (
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
aadhar-sh | 6c3a941 | Aug 24 2026, 01:27 AM |
oddharsh
added a commit
that referenced
this pull request
Aug 24, 2026
Second tier, and the seventh program to declare the flag. #530's ratchet test asserts every program setting strictNullChecks appears in its declared list; this adds tools/ to it. RATCHETED RATHER THAN CLEAN, which is the difference from tier 1. tools/ carried 395 diagnostics under strictNullChecks; 101 are fixed here and the remaining 292 are seeded into config/ts-tools-baseline.json, where check-tool-types.mjs has held a per-file count since it was written. That ratchet fails on a new file, on a file that got worse, and on a file that got BETTER without the baseline being updated, so the number is monotone. The alternative was leaving the flag off until all 395 were done, which protects nothing in the meantime. The seeded number is 292 rather than 294 because #531 landed while this was in flight and removed two of them. The ratchet caught that on the rebase, by its third arm: a file that got BETTER without the baseline being updated fails too, which is what keeps the number honest in both directions. Three files cleared outright: tools/lib/html-to-md.ts 45 → 0 talks/…/build-deck.mjs 30 → 0 tools/deploy-promote.mjs 26 → 0 THE .mjs AND .ts RULES ARE EXACT INVERSES, and getting this backwards costs a compile. A .ts file ignores JSDoc types; a .mjs file rejects a TypeScript annotation outright with TS8010. tools/ is 88 .mjs files, so nearly everything in this tier is JSDoc, and the three .ts files under tools/lib take annotations. Worth knowing before the next tier, since the same directory holds both. TYPING `die` AS `never` CLEARED A CLUSTER, and it is the more general lesson. deploy-promote.mjs uses `die()` as control flow throughout ("bail unless X"), and without `@returns {never}` TypeScript keeps the impossible branch alive and reports the value the caller just refused as still nullable. One annotation took that file from 11 remaining to 9, and the same shape is waiting in every other script with a bail helper. html-to-md.ts gained real types rather than annotations of convenience: `Token` as a discriminated union whose raw-text arm carries `raw` and `owner` together (they are one fact, and pairing them is what lets the tree builder drop a <script> body without proving the field is there), and `TextNode | ElementNode` with the stack declared as elements only, which is the invariant that makes `top().children` total. VERIFIED, because this converter publishes every Markdown twin. Built the twins with this branch's converter and with origin/main's, hashing all 58: identical at 568b28e024de910a957c6bc382e0a3e241764fd91e068297b68a1b1ede0ecbc9. And `deploy:promote --dry-run` runs end to end, resolves a target, and prints its freshness guard, which is the release path exercised rather than assumed. One behavioural addition, in deploy-promote: the sampling loop's result is read after the loop, so a zero SAMPLE_ATTEMPTS would have ramped to the next step having verified nothing. That now dies by name. It is a guard on a constant rather than on the network, and it is the one outcome the script exists to prevent. typecheck (10 programs), lint, 354 contract tests, build, and the site bundle at 237.34 KiB gzip.
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The third of the three judgment calls flagged in #525.
tools/verify-baseline.aadhar.sh.jsonis 480 committed lines written byverify-routes.mjson a production run and read by nothing — not in this repo, not in CI, from the day it was added. A file named "baseline" that nothing compares against is worse than no file, because the name reads as a check somebody is running.Deleted on evidence, not on the name
I regenerated it against production before deciding. After eight months the diff was 52 new rows, 0 removed, and exactly one differing row:
That is the calendar fail-closed path, and the
ROUTEStable already declares itstatus: [200, 503], flaky: true. So the entire recorded lifetime of this file produced one difference, on the one row the oracle itself calls transient by design.The table is the expectation, and it is strictly richer
Parsed with a brace-balanced scan rather than a regex (my first regex attempt claimed 36 routes had no content-type assertion, and it was wrong — nested
headers: {}objects broke it, which is the same naive-scanner failure this repo keeps catching):statusctare301s, where content-type is meaningless[200, 503],flaky, body markers, byte capsThe deeper reason
A recording of observed production blesses whatever production did at capture time, an upstream outage included. That is the opposite of what an assertion does, and the 503 above is exactly that case caught in amber. The right move when a route needs covering is a row in
ROUTES.Also removed
bun run routes:check(142 routes) and a realhttps://aadhar.shsweep (147 routes) both run clean afterwards and leave nothing behind.writeFileSyncimport..gitignorerule forscripts/verify-baseline.localhost_*.json, which was doubly dead: it namesscripts/, merged intotools/on 2026-08-18, and the ephemeral local write it guarded had already been fenced behindif (isProd).design/PORTING.mdstill mentions the file. Left alone on purpose:design/README.mdmarks that doc as a design pass the site did not converge on, and this repo deliberately does not rewrite historical mentions.Verification
353 tests, typecheck, lint, build,
pages:check, and both oracle runs green.