Skip to content

java: path next: names a caller twice when it is also an entry point #1389

Closed

Description

@swapnilpaliwal-sd

path '*' X ends with a next: line that names the same caller twice when that caller is also an entry point:

next: the nearest callers are at 1 hop(s): Initializer.initialize src/main/java/com/example/Initializer.java:4, Initializer.initialize src/main/java/com/example/Initializer.java:4 -- read those; farther hops matter only if these pass the change on (of 1 in all)

There is one caller; "callers are" and "read those" send the reader to open two places. Measured on 0.1.3 at 0df257c; CLI path and the MCP axiomcode_path tool print the same text.

Reproduction

One class per file, each starting with package com.example; on line 1:

package com.example;                                   // Initializer.java
public class Initializer {
    private final Wire w = new Wire();
    public void initialize() { w.initContext(); }      // the only caller, and nothing calls it
}
// Wire.java: public class Wire { public void initContext() { System.out.println("a"); }
//                                 public void other() { System.out.println("b"); } }
// Mid.java:  public class Mid { private final Wire w = new Wire(); public void x() { w.other(); } }
// Top.java:  public class Top { private final Mid m = new Mid(); public void y() { m.x(); } }
axiomcode index
axiomcode path '*' Wire.initContext   # next: names Initializer.initialize twice
axiomcode path '*' Wire.other         # control: "the nearest caller is at 1 hop(s): Mid.x ... -- read it"

In the first answer Initializer.initialize is listed once under "nearest callers" and once under "entry points among them". In the control, Mid.x is not an entry point and is named once.

Root cause

next_path in plugins/axiomcode/skills/axiomcode/scripts/ax_pages.py: line 108 collects every N hop(s) Name file:line row in the whole answer, which matches the row in both lists, and line 111 keeps every row at the nearest hop with no de-duplication. The count then chooses "callers are" over "caller is".

Expected: each caller is named once, and the wording follows the number of distinct callers.

Activity

  1. added
    bugSomething isn't working
    skillAgent-facing query skill (skills/axiomcode)
    mcpthe MCP layer of the plugin
    on Sep 27, 2026
  2. swapnilpaliwal-sd commented on Sep 28, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Consolidates #1479, #1554: same root cause (next_path in ax_pages.py derives the next: line by pattern-matching the printed answer text instead of the answer's structure).

    #1479: Orders.dump() calls load(). axiomcode path Orders.dump '*' ends next: the nearest caller is at 1 hop(s): Orders.load ...; on a forward answer those rows are callees and should be called callees.

    #1554: a Flask view listing under @bp.route("/widgets"), and create_app() that calls app.register_blueprint(bp). axiomcode path create_app listing says no unresolved site would connect them and names the route registration, then ends next: ... the graph loses the call at one of the unresolved sites named above, although none was named. Expected: next: names unresolved sites only when the answer printed some.

  3. swapnilpaliwal-sd commented on Sep 28, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Fixed by #1641.

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

    bugSomething isn't workingjavaJavamcpthe MCP layer of the pluginskillAgent-facing query skill (skills/axiomcode)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions