Skip to content

Run results: carry per-step document identity so a failure inside a referenced section lands in the editor #105

Description

@aslakhellesoy

Follow-up to #104 (ADR 0016). This is the one gap with user-visible consequences.

docPath — the document a spliced step's spans belong to — reaches PlannedStep and the plan conformance artifact, but not the persisted .varar/<oathPath>.json payload (ADR 0014).

Consequence

A comparison failure inside a referenced section is reported to the language server with:

  • spans in the referenced document's coordinates, and
  • a sourceHash for the referencing document.

So the LSP cannot place the diagnostic: it will either land on unrelated text or be dropped when the hash doesn't match the buffer. The run itself still fails, with the correct message, in every runner — this is a reporting gap, not a correctness one.

What's needed

ADR 0014 assumes one document per oath. The smallest extension:

  • per-step docPath in the failure payload (absent = the example's own document, as everywhere else);
  • a hash per referenced document alongside the oath's own sourceHash, so the LSP can invalidate on a change to any document an oath reaches;
  • the LSP dropping/keeping diagnostics per document rather than per oath.

This is a cross-port payload change, so per CLAUDE.md it needs a corpus entry — a golden/results.json case with a spliced failing step — landing with the first port, not after. Bundle 20-reference-splice is the obvious place to grow one (make its sensor mismatch), or a new bundle beside it.

Seven ports plus the LSP.

Activity

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions