os worktree start/finish stop managing the lsp-probe daemon; delete Worktree::LspWarmer #607

Closed
opened 2026-09-17 14:47:13 +00:00 by jared · 2 comments
Owner

Context

Child of #606. Since #606 (ADR-0201) the os-sdlc implementation lifecycle opens the lsp-probe daemon at OpenImplementation through Pipeline::LspDaemonLifecycle and stops it at implementation finish. The os worktree plugin still warms and stops the same daemon from Worktree::LspWarmer. Two owners now manage one daemon.

LspWarmer is also the only place the os plugin reaches into an os-sdlc binary, by a hard-coded path (plugins/os/lib/worktree/lsp_warmer.rb:38). If os-sdlc moves the binary, worktree start warns on every run. If the owners disagree, finish can stop a daemon a running implementation still uses.

Event os worktree plugin (today) os-sdlc (since #606)
Work begins start spawns lsp-probe warm --root <path> LspDaemonLifecycle.open connects, spawns on miss
Work ends finish runs lsp-probe stop --root <path> LspDaemonLifecycle stop

Change

Remove the lsp_warmer: keyword argument and the @lsp_warmer collaborator from Worktree::StartCommand and Worktree::FinishCommand. Remove the @lsp_warmer.warm(worktree_path) call from StartCommand#run and the @lsp_warmer.stop(worktree_path) call from FinishCommand#run. Delete Worktree::LspWarmer and its tests.

Before (plugins/os/lib/worktree/start_command.rb):

def initialize(name, root: RepoRoot.new.path, repo_root: RepoRoot.new, lsp_warmer: nil)
  ...
  @lsp_warmer = lsp_warmer || LspWarmer.new(root: root)
end

def run
  refuse_nested!
  FileUtils.mkdir_p(worktrees_dir)
  system('git', '-C', @root, 'worktree', 'add', '-b', @name, worktree_path, exception: true)
  symlink_owning_state
  @lsp_warmer.warm(worktree_path)
  report
end

After:

def initialize(name, root: RepoRoot.new.path, repo_root: RepoRoot.new)
  ...
end

def run
  refuse_nested!
  FileUtils.mkdir_p(worktrees_dir)
  system('git', '-C', @root, 'worktree', 'add', '-b', @name, worktree_path, exception: true)
  symlink_owning_state
  report
end

FinishCommand gets the same shape: drop lsp_warmer: from initialize, delete the stop line between stop_rubocop_server and remove_worktree.

Out of scope: the os-sdlc-runner implementation-report --sweep-only call in FinishCommand#sweep_usage is the usage sweep from #590 and stays.

Tasks

  • Remove lsp_warmer: and @lsp_warmer from plugins/os/lib/worktree/start_command.rb and plugins/os/lib/worktree/finish_command.rb, with their warm/stop calls.
  • Delete plugins/os/lib/worktree/lsp_warmer.rb.
  • Delete plugins/os/tests/worktree/lsp_warmer_test.rb, plugins/os/tests/worktree/start_command_warms_lsp_test.rb, plugins/os/tests/worktree/finish_command_stops_lsp_test.rb.
  • Run ruby plugins/os/tests/all.rb; green.

Retired tests

plugins/os/tests/worktree/lsp_warmer_test.rb
plugins/os/tests/worktree/start_command_warms_lsp_test.rb
plugins/os/tests/worktree/finish_command_stops_lsp_test.rb

Acceptance criteria

  • grep -r lsp plugins/os/lib plugins/os/tests prints nothing.
  • ruby plugins/os/tests/all.rb passes.

Owner sketch

module Worktree
  class StartCommand
    def initialize(name, root:, repo_root:)
    def run
  end
  class FinishCommand
    def initialize(branch, root:, implementation_id: nil)
    def run
  end
end

Cases

  1. Given a worktree start, when it runs, then no lsp-probe warm process is launched and StartCommand.new accepts no lsp_warmer: argument.
  2. Given a worktree finish, when it runs, then no lsp-probe stop process is launched and FinishCommand.new accepts no lsp_warmer: argument.

Blocking edges

Blocked by #606 (shipped 2026-09-17, main 418804d9).

Origin

  • Trigger: decomposition of #606 in session b224a5a7-84ca-4f47-a18e-abc50c9b5a77
  • Chain: #606 moves daemon ownership to os-sdlc → worktree warmer is dead code DESIGN (ADR-0198 amendment, ADR-0201)
  • Where: plugins/os/lib/worktree/lsp_warmer.rb
  • Clarified 2026-09-18 in session 4974deff-0140-4813-8cd1-e96c6356a214
## Context Child of #606. Since #606 (ADR-0201) the os-sdlc implementation lifecycle opens the lsp-probe daemon at `OpenImplementation` through `Pipeline::LspDaemonLifecycle` and stops it at implementation finish. The os worktree plugin still warms and stops the same daemon from `Worktree::LspWarmer`. Two owners now manage one daemon. `LspWarmer` is also the only place the `os` plugin reaches into an `os-sdlc` binary, by a hard-coded path (`plugins/os/lib/worktree/lsp_warmer.rb:38`). If os-sdlc moves the binary, worktree start warns on every run. If the owners disagree, finish can stop a daemon a running implementation still uses. | Event | os worktree plugin (today) | os-sdlc (since #606) | | --- | --- | --- | | Work begins | `start` spawns `lsp-probe warm --root <path>` | `LspDaemonLifecycle.open` connects, spawns on miss | | Work ends | `finish` runs `lsp-probe stop --root <path>` | `LspDaemonLifecycle` stop | ## Change Remove the `lsp_warmer:` keyword argument and the `@lsp_warmer` collaborator from `Worktree::StartCommand` and `Worktree::FinishCommand`. Remove the `@lsp_warmer.warm(worktree_path)` call from `StartCommand#run` and the `@lsp_warmer.stop(worktree_path)` call from `FinishCommand#run`. Delete `Worktree::LspWarmer` and its tests. Before (`plugins/os/lib/worktree/start_command.rb`): ```ruby def initialize(name, root: RepoRoot.new.path, repo_root: RepoRoot.new, lsp_warmer: nil) ... @lsp_warmer = lsp_warmer || LspWarmer.new(root: root) end def run refuse_nested! FileUtils.mkdir_p(worktrees_dir) system('git', '-C', @root, 'worktree', 'add', '-b', @name, worktree_path, exception: true) symlink_owning_state @lsp_warmer.warm(worktree_path) report end ``` After: ```ruby def initialize(name, root: RepoRoot.new.path, repo_root: RepoRoot.new) ... end def run refuse_nested! FileUtils.mkdir_p(worktrees_dir) system('git', '-C', @root, 'worktree', 'add', '-b', @name, worktree_path, exception: true) symlink_owning_state report end ``` `FinishCommand` gets the same shape: drop `lsp_warmer:` from `initialize`, delete the stop line between `stop_rubocop_server` and `remove_worktree`. Out of scope: the `os-sdlc-runner implementation-report --sweep-only` call in `FinishCommand#sweep_usage` is the usage sweep from #590 and stays. ## Tasks - [ ] Remove `lsp_warmer:` and `@lsp_warmer` from `plugins/os/lib/worktree/start_command.rb` and `plugins/os/lib/worktree/finish_command.rb`, with their warm/stop calls. - [ ] Delete `plugins/os/lib/worktree/lsp_warmer.rb`. - [ ] Delete `plugins/os/tests/worktree/lsp_warmer_test.rb`, `plugins/os/tests/worktree/start_command_warms_lsp_test.rb`, `plugins/os/tests/worktree/finish_command_stops_lsp_test.rb`. - [ ] Run `ruby plugins/os/tests/all.rb`; green. ## Retired tests plugins/os/tests/worktree/lsp_warmer_test.rb plugins/os/tests/worktree/start_command_warms_lsp_test.rb plugins/os/tests/worktree/finish_command_stops_lsp_test.rb ## Acceptance criteria - [ ] `grep -r lsp plugins/os/lib plugins/os/tests` prints nothing. - [ ] `ruby plugins/os/tests/all.rb` passes. ## Owner sketch ```ruby module Worktree class StartCommand def initialize(name, root:, repo_root:) def run end class FinishCommand def initialize(branch, root:, implementation_id: nil) def run end end ``` ## Cases 1. Given a worktree start, when it runs, then no lsp-probe warm process is launched and `StartCommand.new` accepts no `lsp_warmer:` argument. 2. Given a worktree finish, when it runs, then no lsp-probe stop process is launched and `FinishCommand.new` accepts no `lsp_warmer:` argument. ## Blocking edges Blocked by #606 (shipped 2026-09-17, main 418804d9). ## Origin - Trigger: decomposition of #606 in session b224a5a7-84ca-4f47-a18e-abc50c9b5a77 - Chain: #606 moves daemon ownership to os-sdlc → worktree warmer is dead code DESIGN (ADR-0198 amendment, ADR-0201) - Where: plugins/os/lib/worktree/lsp_warmer.rb - Clarified 2026-09-18 in session 4974deff-0140-4813-8cd1-e96c6356a214
Author
Owner

Work started via os-sdlc pipeline on branch ticket-607 (session 4974deff).

Work started via os-sdlc pipeline on branch ticket-607 (session 4974deff).
Author
Owner

Resolution

Done: Removed lsp_warmer: keyword and warm/stop calls from Worktree::StartCommand and Worktree::FinishCommand; deleted Worktree::LspWarmer and its three tests; dropped the require_relative from lib/worktree.rb. os-sdlc owns the daemon since ADR-0201.

Evidence: Branch ticket-607 commits fbba545f + 645f13e3. ruby plugins/os/tests/all.rb: 22 runs, 70 assertions, 0 failures. grep -r lsp plugins/os/lib plugins/os/tests prints nothing. rubocop clean on the 3 changed files. Pipeline impl 3 dispatches 18-25 all pass; hand-finished after refactorer round 2 could not obtain a dispatch.

Follow-ups: #613 test-writer rewrote retired tests instead of deleting them; #614 subagent-start brief composition raises on an unmapped code file.

## Resolution **Done:** Removed lsp_warmer: keyword and warm/stop calls from Worktree::StartCommand and Worktree::FinishCommand; deleted Worktree::LspWarmer and its three tests; dropped the require_relative from lib/worktree.rb. os-sdlc owns the daemon since ADR-0201. **Evidence:** Branch ticket-607 commits fbba545f + 645f13e3. ruby plugins/os/tests/all.rb: 22 runs, 70 assertions, 0 failures. grep -r lsp plugins/os/lib plugins/os/tests prints nothing. rubocop clean on the 3 changed files. Pipeline impl 3 dispatches 18-25 all pass; hand-finished after refactorer round 2 could not obtain a dispatch. **Follow-ups:** #613 test-writer rewrote retired tests instead of deleting them; #614 subagent-start brief composition raises on an unmapped code file.
jared closed this issue 2026-09-18 13:43:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#607
No description provided.