← Recipes

Question

Which represented consumers will a change to this file affect, directly and indirectly?

Recipe

loct slice src/config.rs --depth 1
loct impact src/config.rs --depth 2 --json
loct query who-imports src/config.rs

Start with a real file found through the ownership map. slice explains the neighborhood. who-imports is a direct relationship query. impact walks reverse dependencies, and --depth 2 deliberately bounds the traversal.

Expected answer shape

Look for direct consumers, transitive consumers with depths, and coverage limitations. Preserve the target root, snapshot identity and emitted/total counts. A file impact report is not a precise symbol-level impact report: two consumers may import different symbols from the same module.

A useful answer names the consumers and the route by which the change reaches them. It does not merely quote a risk label.

Decision

List the files and integration boundaries requiring review, then choose tests covering those consumers. A private implementation change and a public contract change can have different consequences even when their file graph is identical.

Check the interpretation

loct find Config --where-symbol --limit 8
loct occurrences Config --group-by-file --limit 40

Replace Config with a symbol exported by the target. Check path-qualified calls, aliases and references outside the reported neighborhood. A literal occurrence is a lead: establish whether it is a call, type use, comment or unrelated namesake.

Compare CLI and MCP only with the same target, root and traversal semantics. Compare both the graph facts and their evidence boundaries. A displayed list shorter than its total needs explicit truncation or pagination information.

Counterexample

An FFI caller, generated binding, plugin manifest, reflection path or installer may use a file without a modeled import edge. Zero represented consumers means no consumers found in that graph; it does not mean safe removal.

Evidence

The September round found useful file-level impact results but missed some qualified calls and cross-crate relationships. An October CLI/HTTP comparison reported matching totals while HTTP omitted some transitive rows and coverage metadata. Recheck these boundaries on your installed version before relying on the result.