Skip to content

[TS] Extraction misses bodyless overloads when << or >> appear earlier in file #2230

Closed

Description

@squid-protocol

Problem:
GitGalaxy fails to extract pipeable (in fp-ts/pipeable.ts) and createBinder (in typescript_compiler/binder.ts). Both are bodyless TypeScript declarations (e.g. overloads or signatures) that don't end in a semicolon.

Root Cause:
Because they lack a ;, prism.py scans forward for a { or ;. It hits the next declaration's {, realizes it might be a nested type annotation, and scans backwards to check if it's inside (, <, or [. The backward scanner in _slice_by_braces (gitgalaxy/core/detector.py) is completely blind to bitwise operators. When it encounters 1 << 8 earlier in binder.ts or << in pipeable.ts, it sees < at depth 0, sets outer_container = "<", and wrongly concludes the function is just an annotation inside a generic list, dropping it entirely.

To Reproduce:
Run tests/tools/tree_sitter_accuracy_audit.py --lang typescript and observe pipeable and createBinder in _missing_examples.

Activity

  1. added
    bug
    on Aug 24, 2026
  2. added a commit that references this issue on Aug 24, 2026
    9e8cadc
  3. added a commit that references this issue on Aug 24, 2026
    38ee922
  4. added
    core-engine
    threat: false-negative
    on Aug 26, 2026
  5. added 2 commits that reference this issue on Aug 26, 2026
    2382b89
    d45eedd
  6. added this to the v2.4.9 milestone on Aug 31, 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-negative

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions