You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: restrict entry-role classification to function/method-kind symbols (docs check acknowledged)
codegraph roles --role entry classified any exported, zero-fan-in node as
`entry` regardless of kind, so non-exported interfaces/constants (e.g.
ParsedUserConfig, WorkspaceEntry, _configCache in config.ts) were also
sweeping into the entry bucket via a separate bug: the barrel-reexport-chain
"exported" inference (#837) marks every symbol in a re-exported file as
exported, including symbols that were never independently exportable
(class/interface methods) and symbols without the `export` keyword.
Two fixes, mirrored in the TS classifier and the Rust native engine:
- classifyNodeRole / classify_node: the exported+zero-fan-in branch now
requires kind IN ('function', 'method') to return `entry`. Every other
exported kind (interface/type/constant/class) is classified `leaf` instead
— a live, intentional part of the public surface, but not something
invoked from outside the codebase. This also refines two #1583 cases
(exported interface with same-file-only type usage) from `entry` to the
more accurate `leaf`, while keeping their "never dead" guarantee intact.
- classifyNodeRolesFull / classifyNodeRolesIncremental (structure.ts) and
do_classify_full / do_classify_incremental (roles.rs): exclude `method`
from the barrel-reexport-chain exported-inference query. A `reexports`
edge only ever concerns top-level module bindings, so a class method can
never be an independently re-exportable binding — without this exclusion,
abstract base-class methods (e.g. Repository.findNodeById) were promoted
to `entry` merely because a sibling symbol in the same file was
re-exported through a barrel.
Verified real entry points are unaffected: CLI command execute/validate
methods, MCP tool handlers, ESM loader hooks, and event:/route:/command:
framework-prefixed handlers all still classify as `entry`.
Symptom 2 from the same issue (dead-unresolved for LanguageRules interface
members in visitor-utils.ts) was already fully fixed by #1723's
isTypeDeclarationMember exemption — verified via fresh build, no changes
needed.
Fixes#1780
Impact: 3 functions changed, 4 affected
0 commit comments