Skip to content

Rank first-test candidates by direct symbol evidence, not import distance #444

Done

Description

@stackbilt-admin

Problem

"What should I run first?" is the question that most changes an agent's next action. Import-graph proximity answers it wrongly.

For packages/adf/src/manifest.ts (owner of resolveModules), charter blast --depth 1 returns manifest.test.ts and vendors.test.ts. The test that actually exercises the resolver is bundler.test.ts, with 7 resolveModules references; manifest.test.ts has 0. The default depth-3 blast returns 48 files, 41 of them through the index.ts barrel. Reproduced at pinned 5412100.

Proposed

Given a seed file (and optionally a symbol), rank test files by:

  1. Tests that reference the file's exported symbols directly (with count and reason).
  2. Tests that import the file.
  3. Transitive importers, capped and collapsed ("48 candidates at depth 3; expand on request").

Each candidate carries a reason and a ready-to-run command. Where evidence runs out, return an explicit unknown rather than a guess.

Acceptance

  • Seed packages/adf/src/manifest.ts ranks packages/adf/src/__tests__/bundler.test.ts first, with a reason like "calls resolveModules (7)".
  • No transitive-only candidate ranks above a direct-reference one.

Starting points

packages/blast (import graph), plus a symbol-reference scan over test files. Stays local-first with no network.

Works on its own. Part of #437.

Activity

  1. added
    enhancement
    type:feature
    priority:p1
    epic:preflight
    on Nov 28, 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

    enhancementepic:preflightpriority:p1type:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions