Skip to content

Map provider-backed Wright findings through SourceMap #408

Description

@e54-bot

Readiness: ready-for-implementation. Prerequisites wrightkit/workshop-rs#272, wrightkit/language-provider-protocol#39, and wrightkit/opy-rs#362 are complete. This is the final end-to-end integration step for the source-mapping chain.

Decision: wrightkit/workshop-rs#271 · workshop-rs ADR-0013. Follows #246 (explicit unmapped evidence).

Goal

Attribute Wright-owned findings and diagnostics (lint, analyze, element cost, validation diagnostics) on provider-backed sources to authored source locations through the workshop-rs SourceMap.

Scope

  • Declare acceptedArtifactFormats on lpp/compile in LPP 1.4 sessions.
  • Apply the returned mapping to the re-parsed Program; add a Mapped variant to SourceProvenance.
  • Transforms preserve shape or drop mapping for the affected rules (enforced by the shape guard).
  • Shape mismatch: fall back to explicitly unmapped findings with a diagnostic.

Non-goals

  • Source-language attribution policy (owned by providers).
  • New lint rules or analysis.

Acceptance criteria

  • On a pinned Bastion revision, wright lint and wright analyze findings resolve to valid .opy locations; nodes without an authored origin stay explicitly unmapped.
  • Providers or sessions without mapped-text-v1 keep current behavior.
  • A forced shape mismatch yields explicitly unmapped findings plus a diagnostic, never displaced locations.
  • JSON and text renderers present mapped paths deterministically.
  • Ablation: removing the mapping handoff makes the Bastion attribution check fail.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions