Cover the uncovered daemon LSP session mutants with a recorded ruby-lsp fixture #1693
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#1693
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
The second mutation pass (2026-11-09) left 97 uncovered mutants in 11 files under lib/os_sdlc/daemon/ (lsp_session/, transport/, and the LSP request files). No test runs the code at these mutants. An uncovered mutant is code that the suite never executes, so a change there goes unseen. Ruling 100 puts a unit test for
lib/os_sdlc/<path>.rbattest/os_sdlc/<path>_test.rb.Observed
The second mutation pass ran
bin/os-sdlc-mutation-pass run .on 2026-11-09..mutineer/pass.jsonlists 97 mutants in this ticket underno_coverage. A no_coverage mutant is a changed behavior that no test runs. The survivor tickets #1656 to #1664 took only the survived mutants, so no ticket covers these. Each line below gives the file, its uncovered count, and the mutation kinds.lib/os_sdlc/daemon/lsp_session.rb(24): statement_removal 12, return_nil 8, boolean_literal 4lib/os_sdlc/daemon/lsp_session/transport/framing.rb(20): statement_removal 8, return_nil 6, boolean_literal 2, condition_false 2, condition_true 2lib/os_sdlc/daemon/navigation.rb(16): return_nil 10, statement_removal 3, boolean_literal 1, condition_false 1, condition_true 1lib/os_sdlc/daemon/lsp_session/transport.rb(11): return_nil 4, boolean_literal 3, statement_removal 2, condition_false 1, condition_true 1lib/os_sdlc/daemon/lsp_session/readiness.rb(7): return_nil 2, statement_removal 2, boolean_literal 1, condition_false 1, condition_true 1lib/os_sdlc/daemon/lsp_session/outline_request.rb(6): return_nil 4, statement_removal 2lib/os_sdlc/daemon/lsp_session/location_request.rb(5): boolean_literal 1, condition_false 1, condition_true 1, return_nil 1, statement_removal 1lib/os_sdlc/daemon/lsp_session/handshake.rb(4): boolean_literal 2, return_nil 1, statement_removal 1lib/os_sdlc/daemon/lsp_session/opener.rb(2): return_nil 2lib/os_sdlc/daemon/lsp_session/definition_request.rb(1): return_nil 1lib/os_sdlc/daemon/lsp_session/target.rb(1): return_nil 1Reproduce
n/a: the uncovered mutants come from a whole pass. Verify with a targeted run:
bin/os-sdlc-mutation-pass run <files> --no-matrix.Approach
For each listed file, write the paired unit test at
test/os_sdlc/<lib path>_test.rb(ruling 100). The test must run the uncovered code and kill its mutants. Check the older test locations first (test/cops/,test/daemon/,test/lint/,test/system_model_*). A test there may already cover the file and only need a move or an extension. Where the code calls a process, use an adapter and a recorded fixture (ruling 88). Reusetest/support/process_recording.rband therecorded_*doubles. No test starts a real process. No recorded ruby-lsp fixture exists intest/fixtures/process_recordings/. Add one through theprocess_recordingpattern. Refresh it only through a deliberate record command (ruling 88). The framing code is pure logic, so test it directly with no process.When a mutant shows dead code (code no caller reaches), delete the code and write no test for it (ruling 107). When a mutant is equivalent (the mutant has the same behavior), rule it equivalent in a comment on this ticket with the reason. Follow
plugins/os-sdlc/references/survivor-loop.md. Then verify with a targeted--no-matrixrun over the files of this ticket. Do not run a whole pass.Required work: none beyond the acceptance criteria.
Acceptance criteria
--no-matrixMutineer run on the files listed in this ticket, when the run ends, then it reports no uncovered mutant and no survivor, except ones that this ticket deletes or rules equivalent with a reason.Origin
survivorsinto tickets ← DESIGN (docs/research/mutation-testing/2026-11-09-second-pass/)VERDICT: CREATE (ticket-skeptic, 2026-11-11): child of the #1683 required split; no open ticket covers these files.
Work started on branch ticket-1693 (survivor loop, recorded ruby-lsp fixture).
Resolution
Done: Survivor loop over the 11 daemon LSP files in 2 packets; 22 tests (lsp_session 4, new opener 1, new transport 4, new transport/framing 4, handshake 2, navigation 7). The ruby-lsp start moved to the new adapter LspSession::ServerProcess (bin/lsp-probe -> Opener -> LspSession.open(server:)). A recorded ruby-lsp transcript (test/fixtures/process_recordings/ruby_lsp/, written by test/support/lsp_server_tap.rb over a small fixed tree; refresh entry ruby_lsp) replays through test/support/recorded_lsp_server.rb; no test starts ruby-lsp. Fix found on the way: the handshake now declares window.workDoneProgress; ruby-lsp 0.26.11 sends $/progress only then, so readiness had waited out its 3-second timeout on every session start. Ruling 107 deleted io.flush in Transport::Framing (every caller's stdin is sync). Equivalent rulings: a037167e8119 (add_line false vs nil, read only by break unless), 10272ebef7d0 (drain rescue value never read), 9c2ee027e224 (close discards the request_shutdown rescue value).
Evidence: main
d5ea53c8b(merged;e357262f3refactor,07e780513fix). Orchestrator re-ran both packets: group A 0 survivors of 117, 3 uncovered (before 0 of 65, 56 uncovered); navigation 0 of 26, 0 uncovered (before 13 uncovered). Suite run twice: 5046 runs, 0 failures. Rubocop clean on 19 files. Orchestrator smoke test against real ruby-lsp from the branch: lsp-probe symbols Opener and outline give the same result as main.Follow-ups: none. 3 ServerProcess#start mutants (6814b5f00d46, cfc15075e137, 79fe1bc39584) sit on the real Open3 call and stay visible per ruling 137; noted on #1683.