land: lsp-exit-sweep

Merged
AF
4d ago
+216-9

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Fixes a race where the daemon's exit phase could report zero or too few language servers stopped because per-root background reap threads shut them down first.

  • Connection teardown now closes start admission but leaves running servers in their managers, so the exit phase stops them all under its single shared shutdown budget and reports the true count.
  • Route goodbyes that a process outlives (no exit phase behind them) keep the background reap behavior.
  • The drain test now requires the exit summary to count every server exactly, instead of at least three.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

The PR keeps running language servers in their managers when the SUBC connection ends. The exit phase then collects them under one shared shutdown budget.

  • The daemon’s exit sweep now owns every running language server.

Reviewed the code without running tests.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Route closes] --> B[Close start admission]
  B --> C[Take clients and stop them in background]
  D[SUBC connection ends] --> E[Close start admission and retain clients]
  E --> F[Module loop returns]
  F --> G[Collect clients from all actors]
  G --> H[Stop clients under one shared budget]

Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile