Skip to content

fix(lsp): v0.25.4 severity parity and deterministic UX - #184

Merged
PythonWoods-Dev merged 2 commits into
mainfrom
release/v0.25.4
Jul 26, 2026
Merged

fix(lsp): v0.25.4 severity parity and deterministic UX#184
PythonWoods-Dev merged 2 commits into
mainfrom
release/v0.25.4

Conversation

@PythonWoods-Dev

Copy link
Copy Markdown
Contributor

Objective

Deploy patch release 0.25.4 to enforce strict Severity Parity between the CLI and the LSP server, and to eradicate deterministic divergence by deprecating misleading partial metrics in the IDE.

Architectural Changes

  • Severity Parity (LSP-FIX-013): Added a strict filter in the LSP incremental engine (_findings_to_diagnostics) to drop findings with Severity.INFO (e.g., Z106). This aligns the LSP's default visibility threshold with the CLI, eliminating non-actionable noise in the VS Code PROBLEMS panel.
  • Deterministic UX (LSP-FIX-014): Removed the partial, in-memory DQS calculation and the zenzic/dqsUpdate JSON-RPC notification from the LSP server. Because the LSP operates incrementally (only analyzing opened/modified files for AST rules), its DQS calculation mathematically diverged from the CLI's global batch analysis. Removing this misleading metric restores the Single Source of Truth invariant.

Verification

  • uv run zenzic check all --strict passed (DQS 98/100).
  • pytest suite passed (1484/1484).
  • Verified that INFO findings no longer pollute the LSP output.

…rity (LSP-FIX-014)

Eradicates the deterministic divergence between CLI DQS (25/100, batch mode,
all findings) and LSP DQS (71/100, incremental mode, topological findings only).

Root cause: the LSP operated in incremental mode and only observed Z1xx/Z4xx
topological findings from the VSM. Content findings (Z5xx) on closed files
were never analysed, so the in-editor score was non-deterministically lower
than the authoritative CLI batch score. Displaying a misleading score violated
the Determinism architectural invariant.

Changes:
- server.py: remove zenzic/dqsUpdate notification emission. The authoritative
  DQS is produced exclusively by `zenzic check all --strict` in CI/CD.
- incremental.py: filter INFO-level findings at the transport boundary in
  _findings_to_diagnostics. INFO findings (e.g. Z106) carry no actionable
  remediation and pollute the VS Code PROBLEMS panel.
- tests/test_lsp.py: update two DQS tests to assert the Determinism invariant
  (zenzic/dqsUpdate is NOT emitted) and rename accordingly.

Architectural invariants preserved:
- Determinism: a score that cannot be proven to match the CLI is not shown.
- Thin Client: simplified, honest Status Bar (Zenzic: Running only).

Fixes: LSP-FIX-014-DETERMINISM-AND-UX
Signed-off-by: PythonWoods <gianluca.catalano@gmail.com>
Signed-off-by: PythonWoods <gianluca.catalano@gmail.com>
@PythonWoods-Dev
PythonWoods-Dev merged commit 35c75e9 into main Jul 26, 2026
8 checks passed
@PythonWoods-Dev
PythonWoods-Dev deleted the release/v0.25.4 branch July 26, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant