Last time I made 90 one-character edits to the billing code behind PubTrivia and the tests caught 53. Billing is where I put my care, so I wanted to know what the rest looks like. I pointed the same script at the code that decides what search engines and visitors see.
What I mutated
Eight files, none of them gameplay: the page metadata builder, the site URL, the structured data builders, the footer and header navigation, the maintenance switch, the auth redirect origin, and the IndexNow submitter.
Same method as before. A scratch copy of the repo with the real working tree untouched, a seeded random choice among sites where one of fourteen small edits applies (=== to !==, >= to >, true to false, a number plus one, and so on), one edit at a time, the whole suite run with --bail 1, then the file restored. I asked for 70 mutants and the files only offered 61 sites.
Baseline: 344 of 344 passing. The suite does not know these files are being attacked, which is the point.
The result
6 killed, 55 survived. A kill rate of 9.8 per cent, against 58.9 per cent for the billing code.
| File | Killed | Survived |
|---|---|---|
| IndexNow submitter | 4 | 21 |
| Auth redirect origin | 2 | 0 |
| Navigation builders | 0 | 17 |
| Structured data builders | 0 | 9 |
| Page metadata helpers | 0 | 1 |
| Search metadata defaults | 0 | 3 |
| Site URL | 0 | 2 |
| Maintenance switch | 0 | 2 |
The only file that was fully protected is the 31 line auth redirect function, which has four tests of its own and nothing else to do. The only other kills were in the IndexNow submitter, which has ten tests, and even there 21 of 25 survived.
The survivors worth reading
Some of these are shrugs and some are not.
Breadcrumb positions. BreadcrumbList structured data numbers each item from 1. The builder does that with position: index + 1. I changed it to index + 2 and to index - 1, at three separate sites across the builders. All six edits passed the suite. Numbering a breadcrumb from 0, or skipping 1, produces markup that Google's rich results test flags, and nothing here would notice.
The tests do cover breadcrumbs. They check that the trail for a page is Home, its hub, then the page (breadcrumbFor). The JSON-LD builder that turns that trail into markup (breadcrumbLd) is a separate function with no test. You can see what it emits today: open this guide, view source, and search for BreadcrumbList. On the live page it numbers Home, Guides and the guide as 1, 2 and 3. That is true because the code is right, not because anything checks it.
The site URL. IS_PRODUCTION_SITE is the flag that decides whether the site tells search engines to index it. I inverted it and every test still passed. So did flipping the condition that picks the production URL against the development one. Both are one line.
Index by default. The metadata helper takes a noIndex argument that defaults to false. Defaulting it to true, which would remove every page that does not pass it explicitly from the index, passed. So did changing the default for absoluteTitle.
The maintenance switch. MAINTENANCE = false became MAINTENANCE = true and the suite stayed green. The tests for maintenance mode stub the switch rather than reading the constant, which is a reasonable design. It means nothing in the suite would stop a commit that ships the site down.
The IndexNow submitter. The result of a submission has an ok flag. I flipped it on four different return paths and it survived each time: failed request, bad status, key mismatch, redirect. The ten tests there check the arguments and the happy path.
Navigation. 17 of 17 survived, including the number of links in a footer column, which cluster is excluded, and slice(1, 5) where slice(0, 5) was meant. The registry tests are about the data: every page has a parent, there are no duplicate queries, the graph is connected. They do not render the navigation that the data feeds.
Which are equivalent mutants
A few are noise. Changing MAINTENANCE_RETRY_AFTER_S from 300 to 301 is a value nobody asserts. Changing a human readable message for an HTTP status code in the IndexNow submitter changes a string that appears in logs. I would call about a fifth of the survivors equivalent or cosmetic and leave them. That still leaves the flag, the breadcrumb positions and the defaults.
Why the numbers are so different
The money code has tests written because it hurt: a price was wrong, a webhook did something twice. The SEO code has tests written to check the content, because the content is what I expected to get wrong. The registry test and the page metadata test are the best tests in the repo for the question "is every page well formed". They sit above the builders and look at the data, not below at the code that turns data into markup.
A bug in a builder would not change the data. It would change every page at once, and for the markup nobody looks at.
What I cannot claim
- I ran the suite I had, minus the database integration test, so a mutant that test would catch is counted as survived.
- 61 sites in 8 files is a small sample.
- A survivor is a place the tests do not look. It is not a bug.
- Search engines may well ignore a bad position number. I would not want to find out which.
Fixes, in order of size
One test that runs breadcrumbLd over every path in the registry and asserts positions are 1 to n. One test that reads IS_PRODUCTION_SITE and MAINTENANCE in a fresh module and asserts the shipped values. Those are an hour. The navigation tests are a day. If you want a quiz night run on this code, the product is at pub-trivia.app, and the free plan needs no card.


