Skip to content

codegraph exports does not credit consumers reached via dynamic import() + destructuring #1781

Description

@carlos-alm

Context

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

Description

codegraph exports src/features/dataflow.ts -T --json reports buildDataflowVerticesFromMap and buildDataflowP4ForNative (both exported) as zero-consumer dead exports, but buildDataflowVerticesFromMap is demonstrably called from src/domain/graph/builder/stages/native-orchestrator.ts:529 (a non-test production file). The consumption path is a dynamic const { buildDataflowVerticesFromMap, ... } = (await import('../../../../features/dataflow.js')) as {...} (native-orchestrator.ts:434) followed by a destructured call — not a static import { X } from '...' statement.

This is a distinct symptom from #1724 (import-type not credited): here it's a VALUE import reached via dynamic import() + object destructuring, not a type-only import, and codegraph's exports consumer-counter does not credit it either.

Additional Context

Repro:

codegraph exports src/features/dataflow.ts -T --json
grep -rn buildDataflowVerticesFromMap src/

Verified via repo-wide grep showing the real call site.

Source

  • Titan phase: gauntlet
  • Severity: bug
  • 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