← Recipes

Question

What appears available but has no demonstrated consumers, and what evidence would disprove that?

Recipe

loct dead --full
loct occurrences unused_helper --group-by-file --limit 40
loct query where-symbol unused_helper
loct impact src/legacy.rs --json

Replace the name and path with one candidate. Begin with the detector's complete result so a confidence filter does not hide relevant uncertainty. Read the reason, definition address, scope and reference evidence for each candidate.

Expected answer shape

The answer identifies the definition, the kinds of references found, represented consumers and unresolved entry-point mechanisms. A definition-only result supports a candidate within the searched universe. Test-only use, documentation, dynamic registration and a production call are distinct cases.

Decision

Build a bounded investigation or removal proposal. To authorize a deletion on evidence, also account for external callers, build inputs and runtime registrations; a detector's VERY-HIGH label is insufficient.

Check the interpretation

Look for console-script declarations, router registration, native protocol conformance, C ABI exports, generated bindings, plugin manifests, command dispatch and string-based loading. Check renamed/generated counterparts, not only the spelling of the exported function.

If the graph excludes the relevant caller language or registration format, record the gap. Do not turn inability to see a caller into evidence that no caller exists. Verification of a removal requires the project's actual build and relevant runtime/tests after the separately authorized change.

Counterexample

A Rust function exposed through generated bindings can be called from Swift without a recognized Rust import. A framework can instantiate a component or invoke a protocol method externally. The same zero-consumer presentation may therefore cover both genuinely unused code and live public APIs.

Evidence

The September recipes already warned about Python console scripts, App Intents, generated includes and native protocol methods. An October smoke report found Swift-side counterparts for five functions labeled VERY-HIGH by the dead-code detector. That report is a concrete falsification lead, not a fresh certification of the detector or those current source trees.