Skip to content

refactor(workspace): share semantic source updates across LSP and MCP - #418

Merged
itrous merged 7 commits into
itrous:developfrom
defin85:unify-lsp-mcp-workspace-analysis
Oct 15, 2026
Merged

itrous merged 7 commits into
itrous:developfrom
defin85:unify-lsp-mcp-workspace-analysis

Conversation

@defin85

@defin85 defin85 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

LSP and MCP resident updates duplicated file registration, FileSet changes and metadata invalidation. This change moves that ordering into ide-host-core and routes both adapters, CLI loading and bounded graph batches through the shared source-update code.

It preserves editor-overlay versus disk views, lazy readiness, cancellation/retry ownership, independent scopes/cache leases and existing protocol/configuration formats. It also delivers the existing compatibility-mode setting to MCP and fixes source exclusion/readmission and config reload feedback.

Validation on current head 2c5dbc62:

  • GitHub Linux Check: formatting, all-target/all-feature Clippy and the full cargo test --all --no-fail-fast passed.
  • Corpus contract and Windows MCP transports + secure broker passed. The Windows job runs its configured transport/cache/lease selection, not the full Windows workspace.
  • All 12 Python benchmark-client/controller tests passed locally. Earlier native changed-path suites also passed (114 tests, 1 ignored, plus final S6 2/2); those were run before integration onto current develop.
  • Independent code/plan review and final requirement-to-test verification completed without remaining mandatory correctness findings.

The first Linux CI run exposed a timing-dependent graph test setup: it prepared a snapshot after handing ownership away. The follow-up test-only correction prepares before each refusal condition and explicitly observes the takeover before installation. The old setup deterministically fails that control; the corrected exact test and the fresh full CI run pass, preserving all three refusal/debt assertions.

Performance remains advisory and unconfirmed. Previous LSP numeric failures are retained; the corrected G0-only calibration was inconclusive for 34/68 metrics, so the paired candidate run was not started. The final-binary core/MCP comparison is incomplete. This PR does not claim lower memory use or absence of startup/latency/RSS regression.

BA-067 graph metadata lookup is intentionally delivered in a separate PR.

Closes #384.

@itrous

itrous commented Oct 14, 2026

Copy link
Copy Markdown
Owner

🤖 Начата автоматическая приёмка — этот pull request взят в работу ИИ-агентом:
изменения переносятся на актуальную целевую ветку, проходят независимое ревью
и соответствующие тесты, очевидные замечания правятся по ходу. Обновления появятся
в этом треде; merge возможен только после завершения проверки.

defin85 and others added 4 commits October 14, 2026 13:18
The server numbers its own requests (window/workDoneProgress/create) from 1,
so a hover response awaited by bare id could match a server request with the
same id. The legacy-extension-scope test now waits through Lsp::request, which
requires a response shape, and a harness test pins that a same-id server
request is skipped.

wait_for_within dropped a message that arrived just past its deadline; it now
returns it to the pending queue for the next wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wait_for_within checked its deadline before reading the queue, so a wait
whose bound had already run out answered silence over a message that had
arrived, and one taken in just past the bound was set aside unjudged, which
wait_for_judging then reported as a silent server. The bound is now checked
after each message: unrelated traffic still cannot stretch a wait, and a
zero remainder polls once instead of seeing nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wait_for_judging checked its total ceiling before the predicate, so a
matching message delivered in time but taken in just past the ceiling, as a
late wake-up of the test thread leaves it, failed the wait instead of
answering it. The predicate now judges first; unrelated traffic still
cannot carry a wait past the ceiling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Елишев Кирилл added 2 commits October 15, 2026 01:23
…space-analysis

# Conflicts:
#	crates/mcp-server/src/lib.rs
#	crates/test-utils/src/walk_probe.rs
@itrous
itrous merged commit 44dd995 into itrous:develop Oct 15, 2026
4 checks passed
@itrous

itrous commented Oct 15, 2026

Copy link
Copy Markdown
Owner

🤖 Автоматическая приёмка завершена: изменения приняты, PR влит коммитом 44dd995.

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.

LSP/MCP: общий путь загрузки, обновления и семантического анализа workspace

2 participants