Skip to content

python: impact's next: line for a module-level constant points at line 1 of the module, not the assignment #1486

Closed

Description

@swapnilpaliwal-sd

Symptom

For a module-level constant, the next: line of impact sends the reader to line 1 of the module instead of the assignment. A function in the same file is sent to its own line.

Reproduction

app/__init__.py empty.

# app/settings.py
 1  INSTALLED_WIDGETS = [
 2      "widgets",
 3  ]
 4
 5
 6  ORDER_LIMIT = ["orders"]
 7
 8
 9  def order_limit():
10      return ORDER_LIMIT
$ axiomcode impact ORDER_LIMIT
change: const ORDER_LIMIT   [field]
next: ... read app/settings.py:1, app/settings.py:9 and edit there; ...
$ axiomcode impact order_limit
next: ... read app/settings.py:9 and edit there

The graph has the right line (symbols: ORDER_LIMIT|const|app/settings.py|6). The MCP axiomcode_impact tool answers the same.

Root cause

plugins/axiomcode/skills/axiomcode/scripts/axiomcode-impact:2137 builds the places to read from seeds, and for a field target the seed is its owner, not the field (dl/impact.dl:564, seed_of(q, t) :- target(q, "field", fl, _), field(fl, t, _, _, _).). A module-level constant's owner is settings.<module> at line 1. Measured on 0.1.3 at 0df257c.

Expected

next: for ORDER_LIMIT reads app/settings.py:6.

Activity

  1. added
    bugSomething isn't working
    skillAgent-facing query skill (skills/axiomcode)
    on Sep 28, 2026
  2. added 2 commits that reference this issue on Sep 28, 2026
  3. swapnilpaliwal-sd commented on Sep 28, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Fixed by #1622.

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 workingpythonPythonskillAgent-facing query skill (skills/axiomcode)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions