My privacy policy was accurate for nine hours. A commit that evening changed one line inside that page and left the paragraph below it saying the opposite. Eleven assertions covered the page, and all eleven kept passing for the next 78 days.

The page explained how this site handles analytics. Google Consent Mode v2 takes a set of defaults before any measurement happens, and the policy described them in prose: analytics defaulted to denied, nothing was stored until you granted consent, and a consent message decided the rest.

That was a fair description of 59e236c, committed at 09:11 on 21 May 2026.

The commit that falsified it edited the same file

By that evening the analytics dashboard was showing "No data received". Consent Mode had defaulted analytics_storage to denied and nothing ever granted it, so GA4 was sending cookieless pings and recording nothing. The fix was one word.

b51310b  2026-05-21 18:16:52 -0300
- analytics_storage: 'denied'
+ analytics_storage: 'granted'

That commit touched privacy/index.html. It changed exactly one line of it, +1 -1, because the consent script is inlined into every page's <head> and the privacy page is a page like any other. Two hundred lines further down the same file, the prose still told readers that analytics defaulted to denied.

Nine hours and five minutes separated the sentence from the commit that made it false. The commit rebuilt the page carrying the sentence and did not touch a word of it.

One line of the consent script flipping from denied to granted while the paragraph below it keeps the original wording

Eleven green assertions over a false page

The page was not untested. tests/legal-pages.test.mjs had covered it since the policy went in, and it is not a lazy test by the usual standards. It renders the component, walks the footer, and checks eleven things.

page contains "Privacy"            passing
page contains "Google AdSense"     passing
page contains "cookies"            passing
links to the contact page          passing
links to Google Ads Settings       passing
links to aboutads.info/choices     passing
...
assertions referencing a consent value    0

Every assertion was about presence. Does the page mention cookies? It did. Does it link to the opt-out controls? It did. Nothing in the file compared a single word of the policy against the configuration the policy was describing, because the configuration lives in getConsentBootstrapScript() in scripts/generate-static-pages.mjs and the test never reads it.

So the suite was answering a question I had not thought to distinguish from the one I cared about. I wanted to know the page was correct. I had written a test that knew the page was on topic.

I have now made this mistake twice

The second time is what convinced me it is a shape rather than an oversight.

Earlier this month a body diagram on this site shipped a 114 KB PNG while a 31 KB WebP sat unused on disk beside it. The build had generated four WebP variants and the published markup referenced none of them. That defect is written up in full, but the part that matters here is the test that failed to catch it: broken-images.test.mjs walks every src and srcset in the generated HTML and confirms the file exists.

It does exactly what it says. The file existed. The page served the wrong one.

Two defects sharing one shape: an assertion that a thing exists passing while the thing served is wrong

Different subsystems, different file types, same structure. An assertion that something is present passes trivially on a page where the present thing is the wrong thing. Prose that mentions cookies is not prose that describes your cookies. An image file that exists is not the image file being served.

The guard reads the config

The fix for the policy was to rewrite it against what the code actually does: analytics storage granted, ad_storage, ad_user_data and ad_personalization all denied, no consent message shown to anyone.

Rewriting it is not a guard, though. The same rewrite could go stale on the next config change, in nine hours or nine weeks, and I would find out the same way.

So tests/privacy-consent-claims.test.mjs parses the Consent Mode defaults out of getConsentBootstrapScript() and holds the prose to them. It does not hardcode which state is correct. It reads what shipped and branches:

analytics_storage granted  -> page must say analytics storage is enabled by default
                           -> page must not say "defaults to a denied state"
ad_* all denied            -> page must say "non-personalized"
                           -> page must not promise a consent message

Flip the config back to denied and the test demands the opposite prose. The correspondence is the assertion.

I checked that it fails. I put the 21 May wording back into the page, ran the file, and watched it go red before restoring the correction and watching it pass. A guard written after the fact and never seen failing is a guard you are trusting on faith. The suite went from 147 tests to 149.

Updating the expected object hides the lie again

The branch in the section above is what tests/privacy-consent-claims.test.mjs did on 7 August 2026, in 8d50dcf. It parsed getConsentBootstrapScript() and chose the sentence from the constant. I re-read that file at the commit before writing this update. Granted required the enabled sentence and forbade "defaults to a denied state". Denied required the opposite.

The file does not do that at f46b909. Commit 5f235c0 on 20 August 2026 rewrote the test when the defaults went back to denied for the AdSense consent work. The test I have now hardcodes the four defaults as denied, and it hardcodes the sentence the privacy page must contain. It does not read the constant and then pick the sentence. tests/legal-pages.test.mjs is the same shape it was in May. I count 11 expect( calls in it, and none of them mention consent or analytics_storage. The copy at 8d50dcf already had 11.

I checked the new shape in a detached worktree, three runs of npx vitest run on vitest 3.2.4, each from a clean checkout of f46b909. Nothing here was committed.

Run What I changed Duration Result
A CONSENT_DEFAULTS.analytics_storage set to granted. Prose and the test's expected object left denied. 21.96 s 1 failed, 196 passed, 197 total. The failure is the hardcoded toEqual. The test that reads the page text passed.
B The same config change, and the expected analytics_storage in the test updated to granted. Prose still says denied. 12.72 s 197 passed.
C Config left denied. One privacy sentence changed from "to denied" to "to granted". 12.47 s 1 failed, 196 passed. legal-pages.test.mjs passed. The failure is the hardcoded sentence.

Run A puts the original bug back for one command. The script would grant analytics storage. The page would still say the four signals start denied. The red test compares CONSENT_DEFAULTS to a literal object. The test named "states the consequences of the generated defaults" stays green, because the page still contains the words it looks for, and those words are now false. The diff vitest printed is only the constant:

-   "analytics_storage": "denied",
+   "analytics_storage": "granted",

Run B is the edit that failure invites. Update the expected object so it matches the new constant, and leave the sentence. The suite is green. The page still says denied. No remaining test holds the sentence and the constant against each other. The first run took longer than the next two. I am reporting the three durations vitest printed, not a cleaned-up average.

Run C is the mirror. Change the sentence, leave the constant. The correspondence test goes red. The legal-page test stays green, because "Privacy", "Google AdSense", and "cookies" are all still on the page. Those are the same presence checks as in May. They tell me the page is on topic. They do not tell me the sentence matches the script.

The published defaults are still all denied, and the privacy page still says so. I restored the worktree after the three runs. The measurement is what the suite notices.

What I am not claiming

Two defects in one small repository is a pattern worth watching, not a law. The November run was not a third production lie. It was this article's guard, re-read at f46b909, and the branch is gone. Run B is the result I would not ship past: 197 green tests, and a privacy sentence that contradicts the constant, after the one assertion that names the constant has been pointed at the new value.

When an assertion checks that something is present, write down what it would still pass on. Then change the value it claims to police, update only the literal the test hardcodes, and run the suite. If the run is green, the test was measuring the literal.