Hit by two independent agent runs adding route-handler tests. It produces false results in both
directions, which makes it worse than a plain slow build.
What happens
yarn typecheck is tsc --noEmit with incremental caching into tsconfig.tsbuildinfo (untracked,
at the repo root). Across branch switches and file moves/renames the cache goes stale, and then:
- it reports phantom errors on a clean tree — observed as
TS2451 duplicate-identifier errors for
files that no longer exist at the paths the cache remembers;
- and it keeps reporting an error after the fix has landed, so a correct tree looks broken.
Both were observed in the same session, on different branches.
Why it matters more than a normal caching wrinkle
yarn typecheck is one of five validation.commands in .ai/agentic.config.json — it is the gate
every change is measured against, and the one that substitutes for yarn lint (which cannot run at
all, see #179). A gate that intermittently fabricates failures trains everyone, human and agent, to
distrust it or to work around it with reruns.
Reproduction is branch-history dependent rather than a fixed recipe: switch between two branches whose
test files differ in name or location, then run yarn typecheck. The workaround is:
rm -f tsconfig.tsbuildinfo && yarn typecheck
Options
- Clean in the script —
"typecheck": "rm -f tsconfig.tsbuildinfo && tsc --noEmit". Costs a few
seconds per run, removes the whole class of problem. Probably right for a gate command.
- Drop
incremental: true from tsconfig.json — same effect, but also affects editors and any
other tsc consumer.
- Keep incremental, move the buildinfo per-branch — more machinery than this is worth.
Option 1 is the smallest change that makes the gate trustworthy. Also worth confirming
tsconfig.tsbuildinfo is gitignored (it is currently untracked but should be explicit), the same
hygiene question as #131's next-env.d.ts.
Hit by two independent agent runs adding route-handler tests. It produces false results in both
directions, which makes it worse than a plain slow build.
What happens
yarn typecheckistsc --noEmitwithincrementalcaching intotsconfig.tsbuildinfo(untracked,at the repo root). Across branch switches and file moves/renames the cache goes stale, and then:
TS2451duplicate-identifier errors forfiles that no longer exist at the paths the cache remembers;
Both were observed in the same session, on different branches.
Why it matters more than a normal caching wrinkle
yarn typecheckis one of fivevalidation.commandsin.ai/agentic.config.json— it is the gateevery change is measured against, and the one that substitutes for
yarn lint(which cannot run atall, see #179). A gate that intermittently fabricates failures trains everyone, human and agent, to
distrust it or to work around it with reruns.
Reproduction is branch-history dependent rather than a fixed recipe: switch between two branches whose
test files differ in name or location, then run
yarn typecheck. The workaround is:rm -f tsconfig.tsbuildinfo && yarn typecheckOptions
"typecheck": "rm -f tsconfig.tsbuildinfo && tsc --noEmit". Costs a fewseconds per run, removes the whole class of problem. Probably right for a gate command.
incremental: truefromtsconfig.json— same effect, but also affects editors and anyother
tscconsumer.Option 1 is the smallest change that makes the gate trustworthy. Also worth confirming
tsconfig.tsbuildinfois gitignored (it is currently untracked but should be explicit), the samehygiene question as #131's
next-env.d.ts.