Parent: #250
Recommended tier: strong
Depends on: #255 and preferably #256
Informed by: #263
Goal
Build the first IDE vertical as a pure-Rust LSP for .own files:
document text
-> own-syntax
-> own-cfg
-> own-analysis
-> own-diagnostics
-> LSP diagnostics
This is the smallest end-to-end IDE path and the proving ground for spans, cancellation, stale-result handling and broken-code tolerance before the hybrid C# host.
MVP protocol surface
Implement at minimum:
- initialize/shutdown/exit;
- textDocument/didOpen;
- textDocument/didChange;
- textDocument/didClose;
- publishDiagnostics;
- document version tracking;
- cancellation of superseded analysis;
- configurable/debounced analysis where justified by measurement.
No completion, rename, references or code actions in the MVP unless they are essentially free and separately reviewed.
Parser/broken-code contract
An IDE analyzes incomplete code on every keystroke. The LSP must:
- never panic on truncated or malformed input;
- publish syntax diagnostics for recoverable errors;
- run semantic analysis on the safely recoverable portion where the existing parser contract permits it;
- avoid publishing diagnostics from an older document version;
- clear diagnostics when a document closes or becomes clean;
- preserve stable byte-offset/span mapping through edits.
If current own-syntax cannot satisfy a required recovery case, record the exact parser gap rather than hiding it in LSP glue.
Scheduling/cancellation
- New document versions supersede older work.
- Cancelled/superseded computations must not publish.
- Analysis of one document must not indefinitely block another.
- No unbounded task/thread creation on rapid edits.
- Server shutdown must terminate cleanly.
Diagnostic mapping
Map the Rust diagnostic model to LSP:
- severity;
- range;
- code;
- message;
- source
Owen;
- related information where supported by the Evidence contract.
Line/column conversion must use the agreed source indexing contract and be tested with Unicode.
Integration tests
Drive the server through real JSON-RPC/LSP messages and cover:
- open clean document;
- open leaking/invalid document;
- rapid edit sequence where only the final version publishes;
- edit from error to clean;
- syntax error recovery;
- truncated token/expression;
- Unicode before/inside diagnostic range;
- close clears diagnostics;
- cancellation/supersession;
- two documents analyzed independently;
- graceful shutdown.
Performance targets
Use the budgets established by #263. Record:
- cold first diagnostic;
- warm edit-to-diagnostic;
- no-op change behavior;
- peak memory for representative documents.
Do not introduce salsa or another incremental framework merely by reputation. Add it only if the measured invalidation model and complexity justify it.
Guardrails
.own only; no C# Roslyn integration.
- No new diagnostic semantics.
- No public Owen CLI cutover.
- No completion/rename feature expansion.
- No stale diagnostics.
- No swallowed panics or automatic process restart presented as correctness.
Acceptance
- A standalone Rust LSP binary runs on supported development platforms.
- Broken/incomplete
.own input does not crash the server.
- Superseded document versions never publish stale diagnostics.
- Diagnostic code/message/range mapping is correct, including Unicode controls.
- Integration tests exercise real LSP messages.
- Measured edit latency meets the approved MVP budget or the gap is explicitly documented before merge.
- Workspace DAG and CI remain green.
Parent: #250
Recommended tier: strong
Depends on: #255 and preferably #256
Informed by: #263
Goal
Build the first IDE vertical as a pure-Rust LSP for
.ownfiles:This is the smallest end-to-end IDE path and the proving ground for spans, cancellation, stale-result handling and broken-code tolerance before the hybrid C# host.
MVP protocol surface
Implement at minimum:
No completion, rename, references or code actions in the MVP unless they are essentially free and separately reviewed.
Parser/broken-code contract
An IDE analyzes incomplete code on every keystroke. The LSP must:
If current
own-syntaxcannot satisfy a required recovery case, record the exact parser gap rather than hiding it in LSP glue.Scheduling/cancellation
Diagnostic mapping
Map the Rust diagnostic model to LSP:
Owen;Line/column conversion must use the agreed source indexing contract and be tested with Unicode.
Integration tests
Drive the server through real JSON-RPC/LSP messages and cover:
Performance targets
Use the budgets established by #263. Record:
Do not introduce
salsaor another incremental framework merely by reputation. Add it only if the measured invalidation model and complexity justify it.Guardrails
.ownonly; no C# Roslyn integration.Acceptance
.owninput does not crash the server.