False positive unused file for Vercel vercel.ts config
What happened?
fallow dead-code reports apps/web/vercel.ts as an unused file, but Vercel treats vercel.ts as a project configuration file that is discovered and executed by convention.
The file is not imported by application source, so it looks unused to a pure import graph. It should be treated as a Vercel config entrypoint.
Reproduced the reported error: Yes. I built the CLI and created a fixture matching the issue (package.json with vercel/@vercel/config devDeps plus a root vercel.ts exporting config satisfies VercelConfig). fallow dead-code reported vercel.ts under "Unused files", exactly as described.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Fallow should treat Vercel programmatic config files as used config entrypoints when Vercel is active.
At minimum, the Vercel plugin/config detection should mark these app-root files as always used:
vercel.ts
vercel.js
vercel.mjs
vercel.cjs
vercel.mts
A fix could add these to the relevant Vercel plugin config/always-used patterns, similar to how other framework config files are protected from unused-file reporting.
Fallow version
2.85.0
Operating system
macOS
Configuration
Interface
No new interfaces are introduced.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work.
For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state.
You can also reset all changes in the repository using git reset --hard command.
Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later.
Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands.
However you don't need to use git add or git commit before submitting your changes. In fact,
submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.
CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
If an error was reported in the issue description, I have successfully reproduced it.
If an error was reported in the issue description, I have confirmed that my fix resolves the error.
I have thought about edge cases and made sure my fix handles them as well.
I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass.
I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /fallow, current file: none) bash-$
Confirmed the fix resolves the error: Yes. After adding the new vercel plugin (registered in plugins/mod.rs and registry/builtin.rs), the same fixture reports only the genuine orphan (src/orphan.ts); vercel.ts is now a plugin-provided entry point. I re-verified for vercel.js, vercel.mjs, vercel.cjs, vercel.mts, and vercel.json, for a declared-workspace monorepo (apps/web/vercel.ts), and for a nested app root that is not a declared workspace.
Edge cases: Activation happens from a vercel/@vercel/config dependency, a vercel package script, a root Vercel config file, or a discovered config file that sits at a project root — so repos with vercel.json/vercel.ts but no dependency are covered. To avoid hiding genuine dead code, only files at a project root (analyzed root or a directory owning package.json) are credited, so src/lib/vercel.ts still reports as unused (verified). Used-export rules for config/default are static for the root pattern and path-scoped for nested roots. Paths outside the root are dropped, Windows separators normalized, imports of programmatic configs credited as referenced deps, and vercel.jsonfunctions keys / builds[].src become entry patterns.
Existing tests pass: Yes. cargo test --workspace --no-fail-fast passes except fix_batch_aborts_when_a_target_directory_is_read_only, which I confirmed fails identically on the pristine checkout (git stash) because the sandbox runs as root and ignores read-only dirs. cargo fmt and cargo clippy --workspace --all-targets are clean. I did not modify or add any existing test files; the only tests added are the unit tests inside the new plugin module, matching repo plugin conventions. Docs/counts (README, .claude/rules/*, CHANGELOG) were updated to include the new plugin.