Route the ruby-lsp daemon lifecycle through the procman gem (ADR-0219 slice 1) #712
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#712
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Every ticket against the lsp-probe daemon since 2026-09-16 (#606 review, #619, #651, #648, and the 2026-09-24 overnight hang) was a process-lifecycle defect. Five spawn sites each key and stop servers differently. ADR-0219 moves ownership to the procman gem at ~/dev/ruby-gems/procman.
Reproduce
n/a: design slice from ADR-0219
Approach
Required work:
OsSdlc::LspProbe::ProcmanKindinside os-sdlc against procman's pluggable Kind seam (command(root:, dir:),endpoint(dir:),ready?(dir:)): command isbin/lsp-probe serve --root R, endpoint is<dir>/daemon.sock. The procman gem stays generic and is not edited by this ticket.bin/lsp-probe servebut loses its Idle self-exit; on TERM it stops its ruby-lsp session (OpenSession and Stopper stay, server-internal) and exits. shared_runner.rb and open_session.rb are unchanged:SharedRunner#sessioncalls@spawner.open(root:)at shared_runner.rb:27 andOpenSession.open/@stdin.closeat open_session.rb:13,82 are OpenSession's own ruby-lsp session, not LspDaemonLifecycle, and neither file references LspDaemonLifecycle.OsSdlc::Pipeline::LspDaemonLifecycle.opendouble with its comment block in tests/test_helper.rb (lines 40-52 at HEAD)Acceptance criteria
Owner sketch
OsSdlc::LspProbe::ProcmanKind(new, lib/os_sdlc/lsp_probe/procman_kind.rb) owns the argv, endpoint path, and readiness check for a ruby-lsp server under procman.OsSdlc::LspProbe::Daemonkeeps its public.connect,.open, and#connectnames but delegates toProcman.ensure(ProcmanKind.new, root:, config:)andProcman.with;Spawner,Paths,Idle,SpawnTimeoutunder lib/os_sdlc/lsp_probe/daemon/ are deleted.Serverstays as theservebody without Idle;StopperandOpenSessionstay for the server's own ruby-lsp child.Pipeline::LspDaemonLifecycleis deleted;OpenImplementation#call,Implementation#complete!and#close_lsp!,SharedRunner, andOpenSessionlose their open/close calls.Gemfile in plugins/os-sdlc gains
gem "procman", path: File.expand_path("~/dev/ruby-gems/procman").Tests: tests/lsp_probe_bin_test.rb and tests/evidence/probe/lsp_integration_test.rb skip unless ENV["PROCMAN_REAL"] == "1" and register
Procman.stop_allinMinitest.after_run; unit tests of the deleted classes go with them, and a fake Kind covers Daemon's delegation.Retired tests
plugins/os-sdlc/tests/lsp_probe/daemon/server_test.rb
plugins/os-sdlc/tests/lsp_probe/daemon_test.rb
plugins/os-sdlc/tests/lsp_probe/daemon/fresh_by_connect_only_test.rb
plugins/os-sdlc/tests/lsp_probe/daemon/paths_test.rb
plugins/os-sdlc/tests/lsp_probe/daemon/paths_cleanup_removes_hash_dir_test.rb
plugins/os-sdlc/tests/pipeline/lsp_daemon_lifecycle_test.rb
plugins/os-sdlc/tests/pipeline/open_implementation_warms_lsp_daemon_test.rb
plugins/os-sdlc/tests/model/implementation_stops_lsp_daemon_on_terminal_stamp_test.rb
Follow-through outside the diff
On close, the orchestrator closes #619, #651, #648 against this ticket. Branch batch-lsp is abandoned, not merged. ADR-0216 is already marked superseded by ADR-0219. The rubocop --server gate in gate_commands.rb is #713, not this ticket.
Origin
Session: ecfe6e11-0810-4431-88e5-8e24d34a239e
Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/ecfe6e11-0810-4431-88e5-8e24d34a239e.jsonl
Where: plugins/os-sdlc/lib/os_sdlc/lsp_probe/daemon.rb
ADR: 0219
jared referenced this issue2026-09-25 15:01:03 +00:00
Work started on branch ticket-712 (os-sdlc pipeline, session ecfe6e11).
Resolution
Done: lsp-probe daemon lifecycle moved to the procman gem per ADR-0219: OsSdlc::LspProbe::ProcmanKind added; Daemon.connect/.open/#connect delegate to Procman.ensure and Procman.with; Spawner, Paths, Idle, SpawnTimeout and Pipeline::LspDaemonLifecycle deleted with their call sites; real-server tests gated behind PROCMAN_REAL=1 with Procman.stop_all in Minitest.after_run; eight retired tests removed.
Evidence: Commit
cd265726(branch ticket-712, merged to main by worktree finish). Suite: 1423 runs, 3239 assertions, 0 failures, 0 errors, 33.8s wall. pgrep -f 'lsp-probe serve' matched no server after the run. grep -rl LspDaemonLifecycle plugins/os-sdlc/lib returned nothing. Closes #619, #651, #648. Hand-finished after behavior-verifier could not see staged deletions (implementation 47, 11 dispatches).Follow-ups: #713 rubocop through procman; #714 SessionStart cleanup hook; #726 runner diff facts omit deletions; routing case logged on #665; procman gem open questions (per-thread lease files, pid-reuse guard) tracked in the procman repo, not here.