Skip to content

codegraph exports: dynamic-dispatch via registry object literal (LANGUAGE_REGISTRY) not credited as consumer #1779

Description

@carlos-alm

Context

Discovered during Titan audit (phase: gauntlet, date: 2026-07-02).

Description

codegraph exports <file> -T --json reports every per-language extractor entry function (e.g. extractRSymbols, extractDartSymbols) as a zero-consumer dead export. These functions are in fact referenced — via LANGUAGE_REGISTRY in src/domain/parser.ts, where each is assigned to an extractor property in an object literal and invoked later through dynamic property dispatch (registry[lang].extractor(...)), not a direct static call. The exports/dead-role analysis does not attribute a consumer edge for this registry-object-literal + dynamic-dispatch pattern, so it false-positives on every one of the 34 language extractors' top-level entry function.

Verified manually via grep in parser.ts for extractRSymbols/extractDartSymbols — both are demonstrably wired up and invoked.

Additional Context

Repro:

codegraph exports src/extractors/r.ts -T --json
codegraph exports src/extractors/dart.ts -T --json

Both report the top-level extractor function as a zero-consumer dead export despite being referenced via LANGUAGE_REGISTRY[lang].extractor(...).

This is a distinct root cause from #1724 (type-only imports not credited) and #1730 (renamed imports not credited) — here the consumer edge is missing because the reference is an object-literal-property assignment followed by dynamic dispatch through a computed property access, not any form of static import.

Source

  • Titan phase: gauntlet
  • Severity: limitation
  • Category: codegraph

Metadata

Metadata

Assignees

No one assigned

    Labels

    titan-auditIssues discovered during Titan audit

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions