# How to verify a test actually ran: count the outcomes

> Our docs said 34 automatic detectors while 3 had no extractor. The tally counted labels, not results, so every run now checks claim against outcome.

Source: https://mosaicbrowser.com/blog/tally-counted-declarations

## Our detector tally counted rows nobody could read

Our docs said 34 automatic detectors while 3 had no extractor. The tally counted labels, not results, so every run now checks claim against outcome.

![34: The docs said 34 automatic. Three had no reader, beside a screenshot: a Mosaic leak test: every surface a site reads, checked from inside the profile page](https://mosaicbrowser.com/covers/tally-counted-declarations.webp)

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.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Leak tests and detectors](https://mosaicbrowser.com/features/detection-tests)

## 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](https://mosaicbrowser.com/features/detection-tests) screen wants to be. The set itself is described in [forty-nine detectors](https://mosaicbrowser.com/blog/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](https://mosaicbrowser.com/blog/dead-detector-returns-200).

## Questions

### How do I verify a test actually ran?

Compare what the test was declared to produce with what it produced, on every run, and fail the run when a declared result is missing. A count of declared tests says nothing about which ones executed.

### Why would a test report as passing without running?

Usually because the harness fills a missing result with a default, and the default looks harmless. Ours reported a detector with no extractor as manual, and the tally counted it as automatic because the catalogue said so.

### How do you test the checker itself?

Feed it known cases with known answers, no browser or network needed, and run that in the build. Ours proves six cases in about a millisecond, including the one where a promised verdict never arrives.

### How many detectors does Mosaic run automatically?

When we last ran the check, on 3 November 2026, the catalogue had 49 tests: 40 with a machine-read verdict and 9 reference pages that render no verdict to read.

## Related

[Detection tests: check a profile against 49 public detectors](https://mosaicbrowser.com/features/detection-tests): Test your anti-detect browser against detectors: Mosaic lists 49 public ones in five groups, from Pixelscan to a reCAPTCHA v3 score, and opens any in a profile.

[49 browser fingerprint detectors, and how we read them](https://mosaicbrowser.com/blog/forty-nine-detectors): Our browser fingerprint detectors list: 49 public test pages in five groups, 40 read by a script and 9 kept as reference because they print no verdict.

[A retired bot test can still answer 200 and look like a pass](https://mosaicbrowser.com/blog/dead-detector-returns-200): Antoine Vastel's fp-scanner demo now serves his homepage with HTTP 200, which a challenge reader scores as a pass. His tests moved; here is where.

[What a CreepJS lie is, and why stock Chrome has none](https://mosaicbrowser.com/blog/what-a-creepjs-lie-is): CreepJS lies detected means an API behaved unlike the native one: wrong toString, wrong descriptor, or a worker that disagrees. Stock Chrome has none.









[How Chrome writes Accept-Language, q-values and all](https://mosaicbrowser.com/blog/how-chrome-writes-accept-language): Chrome writes Accept-Language from its language list: first tag bare, then q=0.9, 0.8 and down by 0.1 to a floor of 0.1. A hand-typed header rarely matches.

[An API missing on about:blank is not missing](https://mosaicbrowser.com/blog/securecontext-api-undefined): An API marked SecureContext reads as undefined on an insecure page. We twice mistook that for a browser difference, on about:blank and on a data: URL.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy IP per profile. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
