Skip to content

Expose versioned editor metadata and structured project diagnostics #396

Description

@jeremi

Tracked by #399.

Outcome

Editor clients and other automation can consume the exact authoring contract and project diagnostics from the matching registryctl version without scraping human-readable error strings or duplicating private compiler rules.

Requirements

  • Define a versioned, machine-readable editor metadata contract covering:
    • supported authored file roles and their matching patterns;
    • the five embedded JSON Schema documents or stable version-matched locators;
    • project authoring contract/version information;
    • the existing generated xw.v1 editor metadata.
  • Define a versioned diagnostic envelope with:
    • source file;
    • stable diagnostic code;
    • severity;
    • message;
    • start and end line/column when available;
    • related locations when one authored reference conflicts with another.
  • Report YAML syntax and deserialization failures through the structured envelope.
  • Convert project semantic validation failures needed by editor clients to structured diagnostics instead of terminal-only anyhow chains.
  • Keep the public command/library boundary narrow. The private project compiler type system should remain private unless a concrete reusable type is required.
  • Preserve current bounded-file, path-confinement, symlink, and secret-handling invariants.
  • Never include secret values, credential contents, environment contents, or generated private artifacts in diagnostics.

Acceptance criteria

  • A documented registryctl command emits the versioned editor metadata as deterministic JSON.
  • A documented command or reusable in-process API returns structured diagnostics for an invalid project without requiring stderr parsing.
  • Syntax, unknown-field, invalid-reference, and cross-file semantic failures have source locations as precise as the parser/model permits.
  • Diagnostic codes are stable and covered by compatibility tests.
  • The output is deterministic, bounded, and redaction-tested.
  • Golden valid projects return no error diagnostics.
  • Existing human-facing check, test, and build behavior remains compatible.

Non-goals

  • Implementing the language server transport
  • Editor-specific packaging
  • Executing live source tests from an editor

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions