Audit of what bun run deadcode (knip) reports, classified — the raw output mixes three very
different things and only one of them is actually dead.
Measured by counting references to each symbol in the file that defines it: one occurrence means it
is defined and never called anywhere; more than one means it is used in-module and the export is
what is unnecessary.
1. Defined and never called — 12 symbols
| symbol |
file |
note |
buildFastStoreNextTheme |
migrate/targets/faststore-next.ts |
behaviour gap — filed separately as #309 |
ALL_REPORT_SECTIONS |
report/extract-section.ts |
looks like it was meant to validate --section. Today an invalid name reaches the extractor and comes back as section "naoexiste" not present in this report — which reads like the section is missing from this run rather than not existing at all |
promptForSelector |
engine/interactive-selector-prompt.ts |
a whole interactive prompt, never wired. Feature that was built and never connected, or superseded by LLM selector discovery? |
providerName, getLlmLanguage |
llm/client.ts |
providerLabel is the one that gets used |
LLM_MODEL_ANTHROPIC, LLM_MODEL_OPENROUTER |
llm/client.ts |
superseded by llm/models.ts |
isComponentRefineLlmAvailable |
llm/component-refine.ts |
sibling isComponentDetectionLlmAvailable is used |
PLP_STEP_LABELS, SPA_NAVIGATION_CRITICAL_STEPS |
checks/lib/step-names.ts |
|
pageRoleHint |
checks/lib/pairing.ts |
|
__TEST__ |
llm/resolve-search-terms.ts |
test hook nothing imports |
2. Used in-module, export unnecessary — 18 symbols
fetchLlmsTxtQuality, classifyAll, fetchDecoPages, USER_AGENT_BY_VIEWPORT,
extractAgentA11y, SEVERITY_WEIGHTS, DECAY_K, effectiveRate, SelectorCacheEntrySchema,
ALL_FEATURES, PREMIUM_FEATURE_TIER, nodeFetchText, findPage, SOURCES, SOURCE_BY_KIND,
TARGETS, buildWaterfallRows, formatMs.
Not dead — dropping the keyword is a one-line change each. Caveat worth deciding before touching
these: @decocms/parity is a published package, so an export may be someone's public API even
with no in-repo consumer. Since dist/cli.js is a bundle and the package has no library entry
point in exports, I believe none of these are reachable by a consumer — but that is worth
confirming rather than assuming.
findPage is mine, from #294. Happy to unexport it.
3. Also flagged
scripts/regen-report.ts — reported as an unused file. It is a maintainer utility run by
hand (bun run scripts/regen-report.ts), which knip cannot see. Either add it to knip's entry
patterns or drop it if parity report --deck/serve covered its purpose.
@types/diff — unused devDependency. diff ships its own types now.
- 34 unused exported types — same in-module-vs-public question as section 2, lower stakes.
Suggested split
Not doing any of it blind: deleting something that turns out to be a half-finished feature is worse
than leaving it, which is why the list is split by why it is unreferenced instead of just being a
list.
Audit of what
bun run deadcode(knip) reports, classified — the raw output mixes three verydifferent things and only one of them is actually dead.
Measured by counting references to each symbol in the file that defines it: one occurrence means it
is defined and never called anywhere; more than one means it is used in-module and the
exportiswhat is unnecessary.
1. Defined and never called — 12 symbols
buildFastStoreNextThememigrate/targets/faststore-next.tsALL_REPORT_SECTIONSreport/extract-section.ts--section. Today an invalid name reaches the extractor and comes back assection "naoexiste" not present in this report— which reads like the section is missing from this run rather than not existing at allpromptForSelectorengine/interactive-selector-prompt.tsproviderName,getLlmLanguagellm/client.tsproviderLabelis the one that gets usedLLM_MODEL_ANTHROPIC,LLM_MODEL_OPENROUTERllm/client.tsllm/models.tsisComponentRefineLlmAvailablellm/component-refine.tsisComponentDetectionLlmAvailableis usedPLP_STEP_LABELS,SPA_NAVIGATION_CRITICAL_STEPSchecks/lib/step-names.tspageRoleHintchecks/lib/pairing.ts__TEST__llm/resolve-search-terms.ts2. Used in-module,
exportunnecessary — 18 symbolsfetchLlmsTxtQuality,classifyAll,fetchDecoPages,USER_AGENT_BY_VIEWPORT,extractAgentA11y,SEVERITY_WEIGHTS,DECAY_K,effectiveRate,SelectorCacheEntrySchema,ALL_FEATURES,PREMIUM_FEATURE_TIER,nodeFetchText,findPage,SOURCES,SOURCE_BY_KIND,TARGETS,buildWaterfallRows,formatMs.Not dead — dropping the keyword is a one-line change each. Caveat worth deciding before touching
these:
@decocms/parityis a published package, so anexportmay be someone's public API evenwith no in-repo consumer. Since
dist/cli.jsis a bundle and the package has no library entrypoint in
exports, I believe none of these are reachable by a consumer — but that is worthconfirming rather than assuming.
findPageis mine, from #294. Happy to unexport it.3. Also flagged
scripts/regen-report.ts— reported as an unused file. It is a maintainer utility run byhand (
bun run scripts/regen-report.ts), which knip cannot see. Either add it to knip'sentrypatterns or drop it if
parity report --deck/servecovered its purpose.@types/diff— unused devDependency.diffships its own types now.Suggested split
ALL_REPORT_SECTIONSandpromptForSelectordeserve a decision rather than a deleteNot doing any of it blind: deleting something that turns out to be a half-finished feature is worse
than leaving it, which is why the list is split by why it is unreferenced instead of just being a
list.