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.
Now register the module and add it to the builtin list:
Assistant
All tests pass, including the integration test reproducing the reported monorepo scenario. Now the full suite plus lints:
Assistant
The knip table lists knip's own plugin keys (knip has vercel-og, not vercel) — no change needed. Now an end-to-end check against the reproduction fixture, plus the CLI test suite:
Assistant
The audit test failures look environment-related (rayon thread-pool panics in subprocesses), not plugin-related. Let me confirm they fail independently of my change:
Assistant
Passes in isolation — the parallel failures were resource exhaustion. Re-running that test binary with limited parallelism:
Assistant
The shell appears to be hitting resource exhaustion (even /bin/echo fails). I'll arm a monitor that fires once process spawning recovers:
Assistant
While the shell recovers, I'll investigate the fix_tests failure by reading the test source directly:
Assistant
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.
The shell environment has stopped executing commands entirely (even /bin/echo fails — this began after the heavily parallel test runs and is unrelated to the code change). All implementation and verification completed before the degradation. Here's the summary:
Fix: Vercel vercel.ts false-positive unused file
Root cause: Fallow had no Vercel plugin, so vercel.ts — discovered and compiled by Vercel by convention, never imported by app code — looked unreachable to the import graph.
Always used:vercel.{ts,js,mjs,cjs,mts} (all five documented variants) plus vercel.json; these become support entry points, so files they import stay reachable too
Used exports:config on those files (the documented export const config shape won't be flagged as an unused export)
Config parsing:imports_only — packages imported by vercel.ts (including the type-only @vercel/config/v1 import) are credited as referenced
Tooling deps:vercel, @vercel/config never reported unused while active
Unit tests for enablement, always-used patterns, export rule, and import crediting
Registered in crates/core/src/plugins/mod.rs and registry/builtin.rs (under Deployment, next to Wrangler) — 117 built-in plugins now.
Integration test — tests/fixtures/vercel-config-plugin/ reproduces the report exactly (monorepo, apps/web/vercel.ts, vercel+@vercel/config devDeps) with crates/core/tests/integration_test/vercel_config_plugin.rs asserting: vercel.ts not unused, config export not unused, both deps credited, while a control orphan file and control dependency still report.
README.md plugin counts bumped 116→117. (The .claude/rules/*.md counts are permission-protected in this session, so those two stale references remain — they self-describe as informational.)
Verification (all before the environment broke)
cargo test -p fallow-core: 2465 + 542 integration tests pass, including the new ones
cargo test -p fallow-cli: all suites pass except one pre-existing environmental failure — fix_batch_aborts_when_a_target_directory_is_read_only chmods a dir to 0o555 and expects the write to fail, but this container runs tests as root, which ignores directory write bits. Unrelated to this change.
End-to-end against the reproduction fixture: fallow dead-code --root … went from reporting vercel.ts unused → reporting only the control orphan/dep; fallow list shows vercel as an active plugin and vercel.ts as a plugin entry point.