Absence in the Repo Is Not Absence on the Site

Absence in the Repo Is Not Absence on the Site

I told myself my site had no cookie consent banner. My assistant agreed, with evidence. We started planning to geo-block Europe to make the problem go away.

The site had a consent banner. It had always had one. We had searched the two places it could not possibly be, found nothing, and reported the nothing as a fact.

The evidence that could not have found it

The check was reasonable on its face. Search the repository for anything consent-related: nothing. Fetch the live HTML with curl and read it: nothing. Two independent sources, same answer.

Except that Google's consent tool is not in my repo and never will be. The AdSense tag injects it at runtime, in the browser, and it only renders to visitors with IP addresses in the EEA and the UK. It exists in no source file. It appears in no served markup. And it never shows up in a request made from Australia, which is where I and my curl were sitting.

So the grep looked where it was not, the curl looked where it was not, and neither of them was capable of a different answer whether the banner existed or not.

The question to ask before reporting an absence

Before you say "X is missing", ask: if X were present, would the evidence I gathered look any different?

If the answer is no, you have not learned anything. You have confirmed that your search did not find it, which is a statement about the search.

For this one the real check was a single HTTP request to Google's funding choices endpoint for my publisher id. A configured publisher gets about twenty kilobytes of message script back. An unconfigured one gets almost nothing. That request answers the question in one line, because it asks the system that actually owns the banner.

Why the repo is the wrong place to look

Anything a third party injects at runtime is invisible to the repository by design. That is a long list on a modern site:

  • Consent tools and privacy messaging.
  • Auto ads and ad slots the network chooses.
  • Tag managers, and everything the tag manager loads.
  • A/B test variants.
  • Anything geo-targeted or personalized.

The repo describes what you wrote. The page is what you wrote plus whatever every script you included decided to do for this visitor, in this country, today. "It isn't in the code" is a true statement that answers a different question.

An AI assistant is particularly prone to this, because the repository is the world it can see most clearly. Give it a question about the site and it will answer about the code, confidently, and the answer will be well-supported by the code. You have to supply the part about where else the thing could be.

Why it had teeth

The reason this mattered on the day: the live privacy policy said "This site does not display advertising". The site served AdSense on every page.

That sentence had been written for an ad-free development fork. It was true there. It rode into the live repository inside a merge whose commit message was about apex domains, and nobody read the privacy page in a merge about domains.

A forked sandbox is not a staging environment. It drifts, and the drift arrives inside a commit about something else.

The other lesson from the same day

Twice that day, in two repositories, I found finished work sitting uncommitted. A complete ad feature with a test suite, existing only as untracked files on the laptop. A large rewrite of the marketing site, twenty modified files and fifty new ones, done and never committed.

Both were invisible to every check, every deploy and every other session that touched those files. From the outside, "uncommitted" and "half-finished" look identical, and I nearly folded the second one into my own unrelated change.

No tool fixes that. The rule is that finished work gets committed immediately. Not pushed, necessarily. Committed. Uncommitted work is risk that lands on whoever opens the file next.