Skip to content

codegraph complexity --file returns empty functions[] for Lua files #1782

Description

@carlos-alm

Context

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

Description

codegraph complexity --file <f> --health -T --json returns functions:[] for every Lua file in the repo (tests/benchmarks/resolution/tracer/lua-tracer.lua and all 4 tests/benchmarks/resolution/fixtures/lua/*.lua files), even though codegraph where --file correctly extracts all Lua functions/parameters for the same files. Lua is listed as a supported LANGUAGE_REGISTRY language and symbol extraction clearly works — the gap is specific to the complexity-metrics engine not handling the Lua node kinds it is given, producing a false no-functions result rather than an error.

Additional Context

Repro:

codegraph complexity --file tests/benchmarks/resolution/tracer/lua-tracer.lua --health -T --json
codegraph where --file tests/benchmarks/resolution/tracer/lua-tracer.lua --json

The first command returns an empty functions array; the second correctly lists all Lua functions/parameters in the same file.

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