Skip to content

Refactor: resolver compiler templates and resolution-step building #574

Closed

Description

@lesnik512

This was generated by AI during a pre-4.0 audit of main at 9cd88e7.

Internal, no behaviour change.

  • _TRANSIENT and _CACHED (resolver_compiler.py:61-137) duplicate the navigation prologue and both except clauses verbatim. Compose them from shared string fragments at format time (no frame cost, consistent with ADR-0001; the shape-enumeration test is the gate).
  • arg_lines is recovered by suffix-matching rendered source lines (:176-181). Have the shape's source builder return the line-to-argument map as it emits lines.
  • _navigate(scope: typing.Any) (:292) should be enum.IntEnum.
  • Module docstring cites performance.md instead of ADR-0001.
  • Provider-to-ResolutionStep construction exists three times: exceptions/rendering.py:36-47 (provider_step, redirect_steps), Factory.resolution_step (factory.py:148), dependency_graph.build_cycle_error (:97). One builder on the provider; rendering.py keeps only drawing.
  • _render_chain, _render_suggestion_lines, _deeper_members, _next_deeper are imported across modules despite the underscore; rename.
  • CircularDependencyError.prepend_step docstring (exceptions/resolution.py:150-157) describes interpreted vs compiled paths that no longer exist since ADR-0001.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions