Skip to content

[BUG] [v0.0.7] \ multi-root mode: \, \, \, and \ all bypass \ — silent no-ops and resource leaks #187

@anticsdecoded

Description

@anticsdecoded

Description

\ supports two operating modes: single-root (legacy) and multi-root (enabled via \ or ). In multi-root mode, \ delegates all client creation and storage to the internal \ instance. However, four other methods on \ still only operate on the legacy \ map, completely ignoring the :

Method Effect in multi-root mode
\ Updates \ — but multi-root \ calls \ which checks its own \ (always empty) → server stays enabled
\ Only shuts down legacy \ — never calls \ → workspace clients leak as zombie processes
\ Iterates \ only — returns empty \ in multi-root mode where all clients live in \
\ Returns \ — empty in multi-root mode, gives incorrect list of running servers

The root cause is that \ maintains its own parallel copies of \ and \ that are never synchronized with 's fields.

Critical Bug: \ Bypass


But in multi-root mode, \ immediately delegates to workspace:


And \ checks only its own state:


Result: calling \ has zero effect when multi-root is enabled. The TypeScript LSP server continues to be started and serve requests as if it were never disabled.

Bug: \ Resource Leak


\ has its own \ method (workspace.rs line 403) that correctly shuts down all workspace clients. It is never invoked from .

Bug: \ Returns Empty in Multi-Root Mode

\

System Information

  • Cortex version: v0.0.7
  • OS: All platforms
  • File: - Functions: \ (line 96), \ (line 255), \ (line 204), \ (line 265)
  • Related file:

Steps to Reproduce

\

Expected Behavior

  • \ should prevent that server from being started in both single-root and multi-root modes
  • \ should call \ when in multi-root mode
  • \ should aggregate diagnostics from workspace manager clients in multi-root mode
  • \ should report workspace manager clients in multi-root mode

Actual Behavior

  • \ silently has no effect in multi-root mode (writes to a list that is never read)
  • \ does nothing in multi-root mode (iterates empty legacy map), leaving LSP server processes running
  • \ always returns an empty \ in multi-root mode
  • \ always returns an empty \ in multi-root mode

Additional Context

The \ correctly implements all these operations internally (, , /), but \ never forwards to them. The fix would require \ to also call , and \ to also call .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions