Skip to content

codegraph: class instantiation not tracked as consumption #836

@carlos-alm

Description

@carlos-alm

Context

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

Description

Error class instantiation (new ClassName()) is not tracked as consumption by the dead code detector. All error hierarchy classes in src/shared/errors.ts (CodegraphError, ParseError, DbError, etc.) appear dead despite 47 uses across 21 files via new ClassName(). Codegraph only tracks import-level references, not class instantiation.

Impact

All error classes incorrectly show 0 consumers, inflating dead symbol counts and causing false positives in dead code reports.

Source

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    titan-auditIssues discovered during Titan audit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions