Founder Notes
The Undeclared Input
A junk file had been sitting in one of our main branches for about thirteen months. It was the residue of an editor's interrupted save: the opening lines of a real page, stopping mid-comment, with no component and nothing exported. Its name began with a dot, so the framework's router skipped the whole path. There was never a route and never any production impact.
What made it worth an afternoon was that on my machine, a clean checkout of that branch failed to lint before I touched anything. In continuous integration, the same commit passed.
That is a familiar shape, and it arrives with its own explanation already attached: my laptop and the build runner are different operating systems, so something about the platform must differ. I believed that for about ten minutes. It was wrong.
The variable was the address
The linter's file walker skips hidden files by default. There is one exception, and it is a defensible one: if the pattern you hand it already points inside a hidden directory, it assumes you meant to include hidden things and stops filtering them out. The framework's lint command hands that walker absolute paths.
My copy of the repository was in a worktree nested inside a hidden directory belonging to my own tooling. The runner checks out to a plain path with no hidden segment anywhere in it. So the operating system question was entirely beside the point. One absolute path contained a dot segment and the other did not, and that alone decided whether the junk file was one of the files under consideration.
The control that settled it was cheap. Same machine, same operating system, same dependency tree, byte-identical files. I moved the checkout from a plain directory into a hidden one and ran the identical command. It went from passing to failing. The number of files the walker considered went from one hundred and eighty-nine to one hundred and ninety, and that one file of difference was the entire failure.
Everything I suspected was pinnable
It is worth noticing what my hypotheses had in common.
Operating system. Language runtime version. Package manager version. Lockfile drift, which was a live possibility because the main branch genuinely moved underneath me mid-investigation. Container versus host. Every one of those is a respectable suspect, and every one of them is something we pin. They have version numbers. They appear in manifests. They are the inputs that have burned people before, which is precisely why they are written down.
The actual variable had no version number and appeared in no manifest. It was where the directory happened to sit on disk. Nobody had declared it, because nobody thinks of it as an input at all.
But anything that finds its work by walking the filesystem is sensitive to where it started walking. That makes the starting point an input, and it is close to the only input a build never records.
The guard should not inherit the accident
There is a tail to this that changed what I actually built.
The linter surfaced the junk file, but the linter was not looking for junk files. It stumbled over this one because of where I happened to be standing. Every build in continuous integration had passed lint on that commit, and would have gone on passing, because that checkout path is spelled without a dot.
So the obvious guard, trusting lint to catch this class of thing in future, would have inherited the accident and inherited the blind spot with it. A leftover temp file in a tree is not a lint problem at all. It is a tracked-file problem, and the component that knows what is tracked is the version control system. The check that genuinely closes it asks git what is in the tree. It takes about a second and needs nothing installed.
The general form
When two runs of the same thing disagree, the temptation is to hunt for the difference among the things you pinned, because those are the differences you have vocabulary for. Usually it is not there. The inputs you pinned are the inputs you have already stopped being wrong about.
Look for what nobody declared. And when a tool decides what to work on by walking the world, its answer depends on where it was standing when it started.