What is missing
The server handles one message at a time and only ever replies. Three behaviours need more than that:
The one extension point
Built one at a time, these become three scheduling paths and three ways to write to the client. That is feature × mechanism, the M×N shape this project forbids.
There is one scheduler, in the transport and dispatch tier, and it is the only place that:
- runs a unit of work and can cancel it (every unit carries a cancellation token);
- decides when a server-initiated message is sent (debounce, ordering);
- writes to the client, through the existing
ClientConnection and OutgoingMessage channel.
A feature adds a job kind or a notification value. It never adds a loop, a timer, a fork, or a write to the transport. A change that does is rejected in review.
Constraints (RFC 1 §6)
- The resolution interior stays synchronous and correct without the scheduler.
pcntl and ext-parallel are feature-detected with a synchronous fallback; Fibers and FFI may be relied on.
- Background results re-enter symbol state through
SymbolSink only.
- When the rule freeze lifts (build manifest, last step), a deny entry confines
TransportInterface::write() to the Client tier so a second output path cannot appear. The tier and its rule land together.
Acceptance
- A superseded request is abandoned and answered with
RequestCancelled.
- A debounced notification reaches the client through
ClientConnection; no other class writes to the transport.
- A background job cannot starve an interactive request, and can be cancelled.
When
After the last step of docs/architecture/build-manifest.md lands, and only when the first push feature (#266) is scheduled.
This issue body was written by AI and has not been reviewed line by line by a human.
What is missing
The server handles one message at a time and only ever replies. Three behaviours need more than that:
$/cancelRequest: drop a completion request the client has already superseded.textDocument/publishDiagnostics: push errors and warnings as the user types (Design: Diagnostics architecture (errors, warnings, type checking) #266).The one extension point
Built one at a time, these become three scheduling paths and three ways to write to the client. That is feature × mechanism, the M×N shape this project forbids.
There is one scheduler, in the transport and dispatch tier, and it is the only place that:
ClientConnectionandOutgoingMessagechannel.A feature adds a job kind or a notification value. It never adds a loop, a timer, a fork, or a write to the transport. A change that does is rejected in review.
Constraints (RFC 1 §6)
pcntlandext-parallelare feature-detected with a synchronous fallback; Fibers and FFI may be relied on.SymbolSinkonly.TransportInterface::write()to theClienttier so a second output path cannot appear. The tier and its rule land together.Acceptance
RequestCancelled.ClientConnection; no other class writes to the transport.When
After the last step of
docs/architecture/build-manifest.mdlands, and only when the first push feature (#266) is scheduled.This issue body was written by AI and has not been reviewed line by line by a human.