Skip to content

[Detection] Audit barrel-file / re-export resolution (A3) #75

Closed

Description

@AndresL230

Summary

Verify and harden the barrel-file (index.ts re-export) resolution path. Build a fixture matrix covering all re-export shapes and fix the ones that don't resolve.

Why

TS projects heavily use barrels. If a barrel breaks the import chain, the scanner stops at the barrel boundary and silently drops every downstream call.

Current state

src/ast/cross-file-resolver.ts header comment lists "barrel re-exports" as pattern #4. Unclear which exact re-export shapes work — needs a fixture-driven audit.

What to do

  1. Build fixtures for: export *, export { x }, export { x as y }, export { default }, nested barrels, mixed barrels.
  2. Run the resolver against each. Document gaps.
  3. Fix the gaps.
  4. Check performance on a 1000-file repo to ensure no resolution blow-up.

Acceptance criteria

  • All five re-export shapes resolve correctly
  • Nested barrels (2 levels) resolve
  • Imports pointing to non-existent symbols fail gracefully
  • Scan time on a 1000-file repo not impacted measurably

Reference

Full design: https://github.com/recost-dev/extension/blob/main/docs/accuracy/detection.md#a3-barrel-file--re-export-resolution-audit

Activity

  1. added a commit that references this issue on May 15, 2026
    75ea6b4
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions