To verify a test actually ran, compare the result it was declared to produce with the result it did produce, on every run, and treat a missing result as a failure of the harness. We learned this from our own detector catalogue. Our documentation printed "34 automatic" detectors while three of those 34 had no code that could read them, because the tally counted what each row claimed, not what came back.

Two descriptions of one fact

Mosaic's catalogue of public detectors lives in one file, and each row carries a verdict field: automatic, manual or reference. That field is read by the app's Detection tests screen, by GET /detection-tests, by the MCP tool and by the report's tallies.

What actually produces a verdict is somewhere else: a switch in the runner script with one extractor per detector, the code that reads CreepJS's trust score or Pixelscan's consistency card off the page. So one fact, "this row is machine-read", had two descriptions in two files. They had drifted in both directions at once:

amiunique, fingerprintjs, ipleak   said automatic, had no extractor at all
12 rows, every challenge site      said manual, had a working one

The second line is embarrassing; we had written extractors and never updated the labels. The first is the dangerous one, because it inflates the number the whole catalogue exists to produce.

How a test that did not run looked like one that did

The runner picks an extractor with a switch on the row's id. A row with no case of its own lands in default, and default reports manual, meaning a person has to read the page. For a row that really is manual that is correct. But the tally never looked at what default returned. It read the catalogue, saw automatic on amiunique, fingerprintjs and ipleak, and counted all three.

So the run finished, the report rendered, and docs/DETECTION.md said 34 when 31 was the number we could read. No line in any log disagreed.

Test a profile the way a site would, before a site doesIn Mosaic: Leak tests and detectors. A leak test and 49 public detectors, read for you. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

How it works: Leak tests and detectors

Why we did not fix it with a static check

A script could parse the runner's switch and confirm every automatic row has a case. Our notes already had a rule against that kind of tool: a tool that decides whether something ran must not itself be able to lose it. A regular expression over source can lose things.

This catalogue has its own example. When it held 41 automatic rows, a grep for verdict: 'automatic' answered 43. Two of those hits were the comment at the top of the file explaining what the word means, and a pattern cannot tell an explanation from an entry. The count that holds comes from compiling the module.

reconcile(): the claim against the outcome, on every run

So the check sits in the run itself. reconcile() gets two things per row, the verdict the catalogue declared and whatever the extractor returned, and decides what goes in the report:

  • automatic with nothing extracted becomes unread, and the run names it as a catalogue bug: "amiunique is marked verdict: 'automatic' and no extractor produced a verdict". It is never filed as a result about the profile.
  • manual with a real pass or fail keeps that verdict, since the verdict is genuine, and reports the label as stale.
  • reference that comes back manual stays reference. A page that renders no verdict owes us nothing.
  • An unreachable site stays unreachable. That is the site's problem, not a labelling one.

If any row disagrees with its label, the run exits with a non-zero code. Every tally in the report is computed from the catalogue's copy, so one wrong label is one wrong report.

How to verify a test actually ran: test the tester

A check like this is only evidence if somebody has seen it fail. npm run check:catalogue runs reconcile() against six fixed cases, with no browser, no network and no profile, in about a millisecond, plus the catalogue's own invariants: every row has one of the three verdicts, and no id appears twice. It runs in every build. This is what it printed on 3 November 2026, trimmed to the six cases and the count:

ok    automatic + manual      -> unread + bug
ok    automatic + pass        -> pass
ok    manual    + FAIL        -> FAIL + bug
ok    reference + manual      -> reference
ok    reference + attention   -> attention
ok    automatic + unreachable -> unreachable

49 tests: 40 automatic, 9 reference

No manual rows are left. Every detector either has an extractor or is a reference page with nothing to extract, which is where the Detection tests screen wants to be. The set itself is described in forty-nine detectors.

What this means for any test suite

None of this is specific to detectors. A skipped test file, a case filtered out by a tag, a CI job that stops before its assertions: each one is still in the list, and a count taken from the list includes it. Three habits would have caught ours:

  1. Count what came back. A test has run when its result is in the output, and not before.
  2. Fail the run when a declared result is missing. Filling the gap with a default is how amiunique became "manual".
  3. Put the fault back once and watch the right line fire. A check nobody has seen fail is a guess.

The worst case is a missing result that looks like a pass. A row in this same catalogue pointed at a retired DataDome demo that now serves its author's homepage with 200 and no challenge on it, which the challenge extractor would have read as clean. We deleted the row, since another one already covers DataDome. The first time we met that pattern, on the same site, is a dead detector that returns 200.