Skip to content

Mock provider: diagnostics not sorted by range.start (spec §9.2 MUST) #68

Closed

Description

@e54-bot

Audit finding M1 — verified live.

Problem

methods.rs:94,119 emit parsed.diagnostics verbatim. parse.rs pushes diagnostics in phases — body-loop syntax errors first, then missing-section at puzzle.name_range (line ~0), duplicate-op, unresolved-op, warnings — so a document with a late syntax error and a missing section emits [error@line5, missing-section@line0]. §9.2: "Diagnostics within an entry MUST be sorted by range.start."

Reproduction

lpp/check on "puzzle p {\n start = 1\n ops {\n d: x => x + 1\n }\n solution = [ d ]\n ???\n}" — the ??? error at line 5 precedes the missing-target diagnostic at line 0.

Acceptance criteria

  • diagnostics arrays emitted by lpp/check and lpp/compile are sorted by range.start (stable within equal positions).
  • 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 72c6f06).

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