NS8 slice: Implement language provider registry and source identity #50

Closed
opened 2026-06-21 09:12:13 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Multiple LSPs and external tools can apply to one buffer without hiding source identity or surprising the user.

AUTHORITY: Parent #43; KEYMAP.md Multiple providers; req: coding/003-007, governance/001-002, testing/001-004.

AGENT AUTHORITY:

  • Delivery authority: local-commit
  • Tracker authority: this issue may be commented and closed when acceptance passes; parent #43 may be commented/checklisted.
  • Handoff state: committed clean, tracker commented/closed.

PARENT: #43 via explicit issue link and parent checklist.

SCOPE: Provider identity model, source-profile defaults, LSP/tool registration, document sync ownership, result metadata, provider picker primitives for mutating operations, missing-tool diagnostics. Likely files: src/lsp.zig, src/job.zig, src/diagnostics.zig, protocol/session.

BOUNDARIES: Do not install language servers, linters, formatters, or package managers. Do not add runtime config files or public feature-flag matrices. It is acceptable to support a small source-patched provider table first.

ACCEPTANCE:

  • Diagnostics, hover/signature, formatting, code actions, lint, and navigation results carry provider/source identity.
  • Non-mutating results may merge while preserving labels.
  • Ambiguous mutating operations require explicit provider selection unless a source-profile default exists.
  • Missing providers/tools produce clear diagnostics and do not attempt installation.
  • Provider lifecycle failures, stale document versions, and duplicate providers are visible and recoverable.

VERIFICATION:

  • zig build test
  • Unit/headless tests with two fake providers returning overlapping diagnostics/actions/format edits.
  • Adversarial tests for missing provider, crash/exit, stale result, duplicate source names, and ambiguous mutating operation.
  • zig build v1-smoke

BLOCKERS: none.

OBJECTIVE: Multiple LSPs and external tools can apply to one buffer without hiding source identity or surprising the user. AUTHORITY: Parent #43; KEYMAP.md `Multiple providers`; req: coding/003-007, governance/001-002, testing/001-004. AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes; parent #43 may be commented/checklisted. - Handoff state: committed clean, tracker commented/closed. PARENT: #43 via explicit issue link and parent checklist. SCOPE: Provider identity model, source-profile defaults, LSP/tool registration, document sync ownership, result metadata, provider picker primitives for mutating operations, missing-tool diagnostics. Likely files: `src/lsp.zig`, `src/job.zig`, `src/diagnostics.zig`, protocol/session. BOUNDARIES: Do not install language servers, linters, formatters, or package managers. Do not add runtime config files or public feature-flag matrices. It is acceptable to support a small source-patched provider table first. ACCEPTANCE: - Diagnostics, hover/signature, formatting, code actions, lint, and navigation results carry provider/source identity. - Non-mutating results may merge while preserving labels. - Ambiguous mutating operations require explicit provider selection unless a source-profile default exists. - Missing providers/tools produce clear diagnostics and do not attempt installation. - Provider lifecycle failures, stale document versions, and duplicate providers are visible and recoverable. VERIFICATION: - `zig build test` - Unit/headless tests with two fake providers returning overlapping diagnostics/actions/format edits. - Adversarial tests for missing provider, crash/exit, stale result, duplicate source names, and ambiguous mutating operation. - `zig build v1-smoke` BLOCKERS: none.
tmk241 added the sliceready-for-agentgoal labels 2026-06-21 09:12:13 +00:00
Author
Owner

Completed in commit 7e639dd (Add language provider registry).

What changed:

  • Added a first-class provider model and registry for LSPs, linters, formatters, build/test/check providers.
  • Added provider capabilities, preferred mutating-provider selection, ambiguity/missing-provider reporting, duplicate-provider rejection, alive/version state, and stale-result detection.
  • Added uniform provider-labelled row helpers for diagnostics, hover, signature, navigation, code actions, lint, and related non-mutating results.
  • Added provider picker rows for ambiguous mutating operations and missing-provider rows for unsupported capabilities.
  • Added diagnostics helpers to display provider/source identity while preserving compatibility with unlabelled rows.

Verification:

  • zig fmt src/lsp.zig src/diagnostics.zig && zig build test
  • zig build
  • zig build v1-smoke
  • zig build run -- --help
  • zig build run -- src/main.zig
  • redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md

Notes:

  • This slice establishes provider identity/arbitration and fake-provider tests. It does not install or spawn language servers/tools; real hover/signature/diagnostics/job execution remains in later slices.
Completed in commit 7e639dd (`Add language provider registry`). What changed: - Added a first-class provider model and registry for LSPs, linters, formatters, build/test/check providers. - Added provider capabilities, preferred mutating-provider selection, ambiguity/missing-provider reporting, duplicate-provider rejection, alive/version state, and stale-result detection. - Added uniform provider-labelled row helpers for diagnostics, hover, signature, navigation, code actions, lint, and related non-mutating results. - Added provider picker rows for ambiguous mutating operations and missing-provider rows for unsupported capabilities. - Added diagnostics helpers to display provider/source identity while preserving compatibility with unlabelled rows. Verification: - `zig fmt src/lsp.zig src/diagnostics.zig && zig build test` - `zig build` - `zig build v1-smoke` - `zig build run -- --help` - `zig build run -- src/main.zig` - `redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md` Notes: - This slice establishes provider identity/arbitration and fake-provider tests. It does not install or spawn language servers/tools; real hover/signature/diagnostics/job execution remains in later slices.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#50