Repository navigation
Closed
Labels
P1Queen takes before unlabelled work (priority.t27 HIGH)Queen takes before unlabelled work (priority.t27 HIGH)area/specs.t27 spec files and conformance.t27 spec files and conformanceenhancementNew feature or requestNew feature or requestspec
Description
Turn the server skeleton into a router that tells the truth. Today specs/lsp/server.t27 defaults 14 provider flags to true (lines 171-184) and sets prepare_provider = true (line 235) although no handler exists, and specs/lsp/protocol.t27 has 14 METHOD_* constants out of 95. After this issue the server advertises a capability only when the method registry says implemented and a handler is registered. Part of the LSP epic, Refs #12209 (wave 0, foundation). Only .t27: no code in any other language, not even scratch probes or a loader; see skill only-t27.
Reuse the types in specs/lsp/protocol.t27 and specs/lsp/schema.t27; if a second Range or Position exists anywhere under specs/, point it at these (see #10891).
Prior art:
- Capabilities and dispatch by method name: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/
- rust-analyzer lists in
capabilities.rsexactly what it provides and states what it does not: https://rust-analyzer.github.io/book/features.html
Boundary
- specs/lsp/server.t27
- specs/lsp/protocol.t27
- specs/lsp/schema.t27
User Scenarios
- Given no provider is registered, when a client sends
initialize, then the result advertises 0 providers; the 14 hard-codedtrueflags are gone. - Given a request for a method that is in the registry but has no handler, when the router dispatches it, then the answer is
-32601with the method name, never a crash or a silent empty result. - Given a handler registers for
textDocument/hover, when the server answersinitialize, thenhoverProvideris advertised, and removing the registration removes it. - Given a handler fails with an internal error, when the router catches it, then the client gets
-32603and the next request is served.
Requirements
- FR-001: The router MUST dispatch by method name through the registry in
specs/lsp/methods.t27, gate each request on the lifecycle state, and answer unknown methods with-32601. - FR-002: The capability builder MUST derive every
*Providerentry from the registered handlers; a test MUST fail if any entry istruewithout a handler. - FR-003:
specs/lsp/protocol.t27MUST carry aMETHOD_*constant for all 95 methods, or read the names from the registry, with 0 duplicates. - FR-004: The router MUST map a stale snapshot to
-32801, a cancelled request to-32800, and a handler failure to-32603, and MUST keep serving afterwards. - FR-005: The router MUST expose
register(method, handler)so each feature module is wired by one line in a wire issue; this issue wires only the lifecycle and document-sync handlers. - FR-006: Types duplicated between the three files MUST be declared once.
Success Criteria
- At least 18 tests across the three files pass, run on the lab with
t27c test-report(exit 0), including a test that the number of advertised providers equals the number of registered handlers. - A grep for
= trueon a provider flag inspecs/lsp/server.t27finds 0 hard-coded provider flags. git diff --name-only masterlists only the 3 files in Boundary (0 files in other languages).
Metadata
Metadata
Assignees
Labels
P1Queen takes before unlabelled work (priority.t27 HIGH)Queen takes before unlabelled work (priority.t27 HIGH)area/specs.t27 spec files and conformance.t27 spec files and conformanceenhancementNew feature or requestNew feature or requestspec
Activity
gHashTag commentedon Nov 17, 2026
Spec created for this issue (typecheck OK, tests pass).
gHashTag commentedon Nov 17, 2026
Spec exists and passes typecheck + tests. M9 milestone complete.
gHashTag commentedon Nov 18, 2026
Reopened: closed as spec-only. A .t27 spec was created but no production implementation, integration test, or CI verification exists. This issue remains open until the target component implements the specified behavior and evidence is provided.