Skip to content

path rejects an exact node ID when another label normalizes to it #5361

Closed

Description

@FeOsTyLeOp

Summary

An explicit node ID supplied to the CLI path command still becomes ambiguous when another node has a label that normalizes to that ID. This is a remaining endpoint-resolution case related to #3913. The ambiguity message recommends the exact ID that was already supplied.

Reproduce on graphifyy 0.9.113

Save this synthetic graph as graph.json.

{
  "directed": true,
  "multigraph": false,
  "graph": {},
  "nodes": [
    {
      "id": "demo::src_alpha_prepare",
      "label": "prepare()",
      "source_file": "alpha.py",
      "source_location": "L1"
    },
    {
      "id": "demo::src_beta_finish",
      "label": "finish()",
      "source_file": "beta.py",
      "source_location": "L1"
    },
    {
      "id": "decoy",
      "label": "demo src alpha prepare",
      "source_file": "notes.md",
      "source_location": "L1"
    }
  ],
  "links": [
    {
      "source": "demo::src_alpha_prepare",
      "target": "demo::src_beta_finish",
      "relation": "calls"
    }
  ]
}

Run:

graphify path "demo::src_alpha_prepare" "demo::src_beta_finish" --graph graph.json

Expected: one directed hop from prepare() to finish(), via calls.

Actual on 0.9.113: exit 3, ambiguous source. Candidates are the exact ID in alpha.py and decoy in notes.md. The message suggests retrying with the full node ID. On 0.9.61 the same fixture reports no directed path and exits 0.

An exact key in the node map should take precedence over label matches before endpoint scoring or ambiguity checking. Ordinary ambiguous labels should still produce an ambiguity diagnostic.

Activity

  1. github-actions commented on Nov 20, 2026

    @github-actions

    Thanks for opening this issue, @FeOsTyLeOp. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

  2. Arav-Arun commented on Nov 21, 2026

    @Arav-Arun
    Contributor

    I'd like to take this. An endpoint that is an exact node id should resolve outright, the same precedence explain's resolver already gives it (#5343). I have the fix and tests ready locally and will open the PR shortly.

  3. added a commit that references this issue on Nov 21, 2026
    02f7507
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