Skip to content

Mock provider: lpp/rename textEdits not sorted by range.start (spec §15.2 MUST) #69

Closed

Description

@e54-bot

Audit finding M2 — verified live.

Problem

puzzle/symbols.rs occurrences unconditionally prepends the declaration range before document-order references, and methods.rs:259-264 emits rename_ranges verbatim. Since solution may legitimately precede ops in a document, rename can emit [decl@line5, ref@line3] — unsorted. §15.2 requires edits sorted by range.start with no declaration-first carve-out (unlike §14.2 references).

Reproduction

lpp/rename on "puzzle p {\n target = 2\n start = 1\n solution = [ d ]\n ops {\n d: x => x + 1\n }\n}" (position on d, newName:"e") — edits arrive out of order.

Acceptance criteria

  • textEdits in every rename result sorted by range.start; no overlap.
  • references keeps its spec-blessed declaration-first order.
  • Regression test + green suite.

Activity

  1. added
    bugSomething isn't working
    ready-for-implementationContract settled; an Engineer can implement without inventing a decision
    on Oct 15, 2026
  2. e54-bot commented on Oct 15, 2026

    @e54-bot
    ContributorAuthor

    Fixed in #86 (commit 07b02bc).

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 workingready-for-implementationContract settled; an Engineer can implement without inventing a decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions