Skip to content

codegraph: same-file consumption not recognized by dead code detector #841

@carlos-alm

Description

@carlos-alm

Context

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

Description

Constants DEFAULT_WEIGHTS, ROLE_WEIGHTS, DEFAULT_ROLE_WEIGHT in src/graph/classifiers/risk.ts are flagged as dead-leaf despite being consumed by scoreRisk in the same file. The dead code detector does not recognize internal consumption within the same file as "alive".

Impact

Same-file consumers are not tracked, causing constants and helpers used within their own module to appear dead.

Source

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