feat: Zenzic Language Server (ZLS) Foundation & Diagnostic Engine#154
Merged
Conversation
- Hardened JSON-RPC layer with TypedDict and compliant parse error handling - Implemented O(N) rule engine integration on the in-memory document state - Decoupled state patching from diagnostic emission via manual 'select' buffering - Solved architectural debt with a 300ms CPU-friendly debounce strategy - Rotated CHANGELOG into v0.20.x archive and fixed .bumpversion.toml coverage - Documented debounced emission model in architecture docs Signed-off-by: PythonWoods-Dev <gianluca.catalano@gmail.com>
Signed-off-by: PythonWoods-Dev <gianluca.catalano@gmail.com>
Signed-off-by: PythonWoods-Dev <gianluca.catalano@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
This PR implements Phases 1, 2, and 3 of the architecture for the Zenzic Language Server (ZLS), introducing native support for the JSON-RPC 2.0 protocol and resolving computational debt associated with keystroke-level execution overhead.
Resolves #12.
Key Changes
zenzic lspCLI command which establishes JSON-RPC 2.0 communication overstdiowithout relying on external dependencies (pygls/lsprotocol).DocumentManager(textDocumentSync = 2) which mathematically resolves the impedance mismatch between Python string indices and UTF-16 code units (safely handling Surrogate Pairs and Emojis).AdaptiveRuleEngineto thetextDocument/publishDiagnosticsnotification, mappingline/characterproperties and structuralseveritylevels.select.select(). State updates are applied instantly, but the engine defers execution until a 300ms debounce threshold of inactivity is met.TypedDictto enforce IPC schema compliance and guard against malformed payloads. Hardened memory hygiene by accurately purging AST states within thedidCloseevent handler.Documentation
docs/explanation/language-server-architecture.mddetailing the UTF-16 incremental sync math and the single-threaded Debounce strategy.README.md.