Skip to content

Reduce unresolved import blind spots in modern monorepos #6

@EgemennSahin

Description

@EgemennSahin

Problem

The agent repo lab showed that large modern JS/TS monorepos can still have many unresolved non-relative imports. This weakens reachability evidence and can make agentdiff under-explain why a surface is or is not agent-relevant.

Evidence from tested repos

From .agentdiff/agent-repo-lab/latest/report.md:

  • langchain-ai/langgraphjs: 253 unresolved non-relative imports.

This is a scanner precision issue for agentdiff. It is not a claim that the external repo has a bug or vulnerability.

Proposed fix

Inspect unresolved import samples and add only high-confidence resolver support where the pattern is common and cheap to resolve.

Possible directions:

  • Improve reporting around unresolved import samples so users can see what was skipped.
  • Handle additional simple workspace/package export patterns if evidence supports it.
  • Keep unresolved package imports from becoming high-risk findings by default.

Acceptance criteria

  • npm test passes.
  • npm run lab:agent-repos still has 0 crashes.
  • The lab report shows unresolved import counts and examples clearly enough to drive follow-up work.
  • If resolver support is added, it reduces unresolved imports for at least one cited repo without shelling out to tsc or installing dependencies.

Non-goals

  • No full TypeScript compiler integration.
  • No dependency installs in external repos.
  • No universal package resolver.
  • No live model calls.
  • No claims that the cited external repo is unsafe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    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