Skip to content

impact / path: --in does not choose among the files a partial file:line path matches #1666

Closed

Description

@swapnilpaliwal-sd

What happens

A file:line target whose partial path (a basename, or dir/file) matches several indexed files is not narrowed by --in (MCP in_path). The scope is applied only after the file has been chosen, so it can't pick among the matches.

A real Express examples project has 17 files named test.js, one per example directory:

$ axiomcode impact test.js:6 --in blog
'test.js' matches 17 indexed files — give enough of the path to name one:
  404/test.js:6   <function-expression>
  base-auth/test.js:6   <function-expression>
  blog/test.js:6   <function-expression>
  …
$ axiomcode path '*' test.js:6 --in blog
'test.js' matches 17 indexed files — give enough of the path to name one:
  …

Only one of the 17 is under blog. The same happens in a small project with five index.js files (impact index.js:2 --in packages/a, path '*' index.js:2 --in packages/b).

With the file refused, --in has no effect on the target. On the previous behaviour, impact index.js:2 with in_path=packages/a answered index.js:2 (4 declarations), with the callers of all four files and none of them under packages/a.

Expected

When a partial path matches several files and exactly one of them is under the --in scope, answer for that file and name it in the label (… (at packages/a/src/index.js:2)). Refuse only when the scope still leaves two or more files, or none.

Activity

  1. added a commit that references this issue on Sep 29, 2026
    19bd139
  2. swapnilpaliwal-sd commented on Sep 29, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Fixed by #1735 (merged into 0.1.7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or requestjavascriptJavaScriptskillAgent-facing query skill (skills/axiomcode)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions