Skip to content

typescript class_start: 34.7% precision (537 false-positive classes against 285 real) #1338

Closed

Description

@squid-protocol

What

Flagged as a footnote in #1314 (not that issue's main subject, and not yet investigated): real_classes=285, found_classes=285 (100% recall), extra_classes=537 -> 34.7% class precision. Same shape as #1314's func_start findings (recall is fine, precision is badly hurt by a large false-positive count), different pillar (class_start not func_start).

Why this is worth its own issue

537 phantom classes against only 285 real ones (roughly 2:1) is a large, measured precision problem. #1314's investigation showed this KIND of finding can go either way -- a pure ground-truth measurement-tool bug with zero GitGalaxy engine defect (objective-c: _get_node_name had no handling for a node type lacking a "name" field, so every real method scored as a false "extra"), or a real, fixable regex issue with several distinct false-positive shapes (csharp: static/var/in/when/or contextual keywords captured as phantom function names). This needs its own dedicated diagnosis rather than assuming either direction going in.

Suggested next step

Run tests/tools/tree_sitter_accuracy_audit.py --lang typescript (full report, not --ci) to get _extra_examples sample names, and check whether tree-sitter-typescript's class_declaration/abstract_class_declaration node types have a "name"-field gap the way objc's method_definition did (#1314's ground-truth bug shape), or a real class_start regex false-match shape (interfaces/type aliases/enums matching as classes, generic type parameters, decorators, etc.) the way csharp's contextual keywords did (#1314's engine-bug shape). Trace back to source lines the same way #1266's investigation did for scala/matlab/haskell before assuming either direction.

Related: #1314, #1261 (parent epic)

Activity

  1. added
    bug
    core-engine
    threat: false-positive
    on Aug 12, 2026
  2. added this to the v2.4.8 milestone on Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-enginethreat: false-positive

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions