Skip to content

extraction: remaining fixed-size TSNode walk stacks silently cap graph content #2388

Open

Description

@DeusData

Several AST walkers still keep their pending nodes in fixed-size stacks and stop pushing children once full. The graph then silently loses whatever lies beyond the cap, which our rule forbids: no work cap may decide graph content.

Remaining sites on main (approximate lines):

Fix pattern: cbm_walk_stack_reserve / cbm_walk_stack_release from #2375. The first chunk stays on the C stack and spills to the memory core for wide or deep trees. An allocation failure is logged (extract.walk_stack_alloc_failed) instead of silently truncating. #2373 did the same for the definitions walk.

Tests: each walker gets a wide or deep input that exceeds the old cap and asserts that all content is extracted: RED on main, GREEN with the fix.

Activity

  1. added
    bugSomething isn't working
    priority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.
    on Oct 19, 2026
  2. DeusData commented on Oct 25, 2026

    @DeusData
    OwnerAuthor

    The three ts_lsp.c walks (infer_return_type_from_body, rebuild_signatures_from_ast, convert_signature_type_params) no longer stop at 256 nodes as of 4a1e6d1 (#2091 -- thanks to @CaptainMittens). Keeping this open for the remaining fixed-size walk stacks it tracks.

  3. DeusData commented on Oct 28, 2026

    @DeusData
    OwnerAuthor

    Progress: #2760 by @gaurav0107 is merged as e425666, so the YAML walkers grow their stacks instead of capping content. This issue stays open for any remaining fixed-size walk stacks it tracks.

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

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edgespriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions