Passante A Passante publication

En Passante

In Passing
Field Kit

The obvious fix adds a dependency you do not need

When a build complains about a missing dependency, ask whether the file should be in scope before adding the dependency. Installing it makes the error go away and moves someone else's tooling permanently into your build.

What happened

A build failed on a submodule's own tooling importing a package. The submodule already declared that package and both are only ever run inside it — the real defect was that the type-check config swept in files it was never meant to cover, and its existing exclusion showed the intent had been right and incomplete.

2026-08-01 a TypeScript app with a git submodule measured: build exit status and the full suite, 1495 passing
1 prompt, in order
  1. Should this file be in scope at all? A build or type check fails on a file you did not write.

1Should this file be in scope at all?

Run it when
A build or type check fails on a file you did not write.
It asks you for
The failing file, who owns it, who runs it, and what your config includes.
You get back
Whether the fix is a dependency or a scope correction, with the reason.
It refuses if
You cannot say who executes the failing file. That answer decides which fix is right.
copy this into a model
<stance>
You have watched a missing-dependency error get fixed by installing the dependency, and the project quietly acquire a package it never calls, to satisfy a file it never runs, forever. The error went away. Nothing was fixed.

So the first question is not which version to install. It is whether this file has any business being examined here at all.
</stance>

<inputs>
1. The failing file, and its path relative to your project.
2. Who owns it: your code, a submodule, a vendored copy, a generated artifact.
3. Who executes it, and from where.
4. Whether the owner already declares the dependency it is asking for.
5. What your build or type-check configuration includes and excludes.
</inputs>

<method>
1. Establish ownership and execution before anything else. A file owned by a submodule and executed only inside it is not your file, and the resolution failure is correct behaviour — its dependency tree simply is not installed where you are.
2. Check whether the owner already declares what is missing. If it does, that settles it: the dependency is not absent, it is out of reach, and installing a second copy in your project fixes the symptom by making a false statement about what your project uses.
3. Read the include and exclude patterns literally. A broad include with a partial exclude is the usual shape, and the partial exclusion is evidence: somebody already decided this tree should not be covered and enumerated it incompletely.
4. Confirm you have no real dependency on the tree being excluded. Runtime references through URLs or static paths are not type dependencies; an actual import is, and excluding that would hide a real problem.
5. Keep the exclusion narrow. Excluding one subdirectory leaves anything you genuinely import still checked; excluding the whole tree turns off checking for code you may add tomorrow, silently.
6. Verify both directions: the build passes, and the suite count is unchanged. An exclusion that also stops checking something real shows up as an unchanged build and a changed suite.
</method>

<deliver>
- OWNERSHIP AND EXECUTION — whose file, run from where
- ALREADY DECLARED? — whether the owner has the dependency
- INCLUDE VERSUS EXCLUDE — read literally, with the partial exclusion noted
- REAL DEPENDENCY? — whether anything here is genuinely imported
- THE NARROW EXCLUSION — the specific path, not the whole tree
- BOTH DIRECTIONS — build passes, suite unchanged
</deliver>

<refuse>
- Do not recommend installing a dependency before establishing who runs the file.
- Do not exclude a whole tree when one subdirectory is the problem. Say what a broad exclusion stops checking.
- Do not exclude a path without confirming nothing real imports from it.
- Do not report the build passing without the suite count beside it.
</refuse>
How you know it worked

After narrowing the scope, confirm the build exits 0 and the suite is unchanged — then confirm the app has no real reference to the excluded tree, because an exclusion that hides a genuine dependency is worse than the error it silenced.

from a real incident, 2026-08-01 · stack a TypeScript app with a git submodule · verified by build exit status and the full suite, 1495 passing · build-configsubmodulesscopedependencies

← every Field Kit