# My site's gate only gets a check after the bug ships

On the night of 2026-08-18 three things turned up on my site, none of them planned work. A benchmark on a project page that had been fabricated and live since May. Analytics that had collected nothing for ten days. A link to a Nujoom repo that had never existed, which a new project page that morning had copied into three more places.

The same night I wrote `scripts/check-site.py`, the gate I run before pushing. The rule at the top of the file:

```python
"""Every check in this file exists because the corresponding bug shipped to production and
sat there. It is not a general-purpose linter and shouldn't grow into one — the bar for
adding a check is "this went wrong, or a near-identical thing did"."""
```

That rule is mine.

---

## The bar, tested

Two days later it got tested. The page chrome lived in three copies: `chrome.py` and the hand-written `index.html` and `cv.html`. A check comparing them was the obvious thing to add, and I'd left it out on purpose because drift between them had never shipped.

Then it did. The globe icon's SVG path had been made up and drew a blob. The fix reached `chrome.py` and the generated pages, and the blob stayed in `index.html` and `cv.html` for a day, because nothing compared them and syncing was a step you had to remember. The check went in on 2026-08-20.

---

## How it's built

It resolves links against `dist/`, not the repo. A file can sit at the repo root, be linked from a page, and still 404 in production because it never made it into the copy list in the build script.

It's stdlib only, so a package moving can't fail it.

A host goes on the allowlist only after it's been checked another way. LinkedIn answers bots with `999` and npm with `403`. archive.org went on later: it returns `503` to urllib's TLS fingerprint and serves a browser fine.

And each check gets broken on purpose before it counts. The first version was tested by injecting thirteen faults one at a time, including replaying the real Nujoom 404.

There are fourteen checks now, from `no .html URLs` to `hreflang reciprocal`. In the Astro rebuild, the two that guarded the old Python renderers came out and `old URLs 301` went in. That one bends the rule: nothing had broken yet. It guards the move itself, 68 old URLs that had to keep resolving.

---

## What it can't catch

The fabricated benchmark was valid HTML pointing at a live repo. One check reads a claim, the home lab's duration, and only because that one number had already disagreed with itself. Nothing else in the gate reads what a page says, so that part stays manual.
