Write the missing tests for 67 os-sdlc survivors in system_model/pattern_site #1656

Closed
opened 2026-11-09 22:13:09 +00:00 by jared · 1 comment
Owner

Problem

The second mutation pass (2026-11-09) left 67 survivors in 7 files under lib/os_sdlc/system_model/pattern_site/. No test kills them. A survivor means a changed behavior that the suite does not see. Ruling 100 puts a unit test for lib/os_sdlc/<path>.rb at test/os_sdlc/<path>_test.rb.

Observed

The pass ran bin/os-sdlc-mutation-pass run . on main at 38b3284d0. docs/research/mutation-testing/2026-11-09-second-pass/survivors.md lists each survivor with its original and mutated text. This ticket takes the groups that survivors.md classes as missing test. Each line below gives the file, its survivor count, and the mutation kinds.

  • lib/os_sdlc/system_model/pattern_site/diagram/route.rb (25): return_nil 7, arithmetic 6, condition_false 5, condition_true 5, comparison 2
  • lib/os_sdlc/system_model/pattern_site/page.rb (15): return_nil 15
  • lib/os_sdlc/system_model/pattern_site/diagram/layout.rb (11): arithmetic 9, return_nil 2
  • lib/os_sdlc/system_model/pattern_site/diagram/box.rb (10): arithmetic 10
  • lib/os_sdlc/system_model/pattern_site/diagram/columns.rb (4): arithmetic 1, condition_false 1, condition_true 1, return_nil 1
  • lib/os_sdlc/system_model/pattern_site/diagram.rb (1): return_nil 1
  • lib/os_sdlc/system_model/pattern_site/entry.rb (1): return_nil 1

Reproduce

n/a: the survivors come from a whole pass. Verify with a targeted run: bin/os-sdlc-mutation-pass run <files> --no-matrix.

Approach

For each file listed, write the missing paired test at test/os_sdlc/<lib path>_test.rb (ruling 100). The test must kill each survivor of that file. When a survivor shows dead code (a branch no caller reaches), delete the code if no caller needs it, and write no test for it. When a survivor is equivalent (the mutant has the same behavior), rule it equivalent in a comment on this ticket with the reason. Then verify with a targeted --no-matrix run over the files of this ticket. Do not run a whole pass.

Required work: none beyond the acceptance criteria.

Acceptance criteria

  1. Given a targeted --no-matrix Mutineer run on the files listed in this ticket, when the run ends, then no survivor remains except ones that this ticket rules equivalent with a reason.
  2. Given a file that has a deleted dead-code candidate, when the suite runs, then it is green and no caller of the deleted code remains.

Origin

  • Trigger: second whole-codebase mutation pass, 2026-11-09 (docs/research/mutation-testing/2026-11-09-second-pass/)
  • Improvised this session: none
  • Chain: survivors ← no paired unit test for the file ← tests were written at the pipeline level, and the unit test per file (ruling 100) was never added ← DESIGN (ruling 100)
  • Root candidate: none found; searched survivor, mutation, mutineer, pattern-site, missing tests
  • Where: lib/os_sdlc/system_model/pattern_site/
  • Session: bc5ad309-36b7-4fe5-a67f-1d90187242eb
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os-plugins-os-sdlc/bc5ad309-36b7-4fe5-a67f-1d90187242eb.jsonl

VERDICT: CREATE (ticket-skeptic, 2026-11-09): no open ticket covers these survivors.

## Problem The second mutation pass (2026-11-09) left 67 survivors in 7 files under lib/os_sdlc/system_model/pattern_site/. No test kills them. A survivor means a changed behavior that the suite does not see. Ruling 100 puts a unit test for `lib/os_sdlc/<path>.rb` at `test/os_sdlc/<path>_test.rb`. ## Observed The pass ran `bin/os-sdlc-mutation-pass run .` on main at 38b3284d0. `docs/research/mutation-testing/2026-11-09-second-pass/survivors.md` lists each survivor with its original and mutated text. This ticket takes the groups that `survivors.md` classes as `missing test`. Each line below gives the file, its survivor count, and the mutation kinds. - `lib/os_sdlc/system_model/pattern_site/diagram/route.rb` (25): return_nil 7, arithmetic 6, condition_false 5, condition_true 5, comparison 2 - `lib/os_sdlc/system_model/pattern_site/page.rb` (15): return_nil 15 - `lib/os_sdlc/system_model/pattern_site/diagram/layout.rb` (11): arithmetic 9, return_nil 2 - `lib/os_sdlc/system_model/pattern_site/diagram/box.rb` (10): arithmetic 10 - `lib/os_sdlc/system_model/pattern_site/diagram/columns.rb` (4): arithmetic 1, condition_false 1, condition_true 1, return_nil 1 - `lib/os_sdlc/system_model/pattern_site/diagram.rb` (1): return_nil 1 - `lib/os_sdlc/system_model/pattern_site/entry.rb` (1): return_nil 1 ## Reproduce n/a: the survivors come from a whole pass. Verify with a targeted run: `bin/os-sdlc-mutation-pass run <files> --no-matrix`. ## Approach For each file listed, write the missing paired test at `test/os_sdlc/<lib path>_test.rb` (ruling 100). The test must kill each survivor of that file. When a survivor shows dead code (a branch no caller reaches), delete the code if no caller needs it, and write no test for it. When a survivor is equivalent (the mutant has the same behavior), rule it equivalent in a comment on this ticket with the reason. Then verify with a targeted `--no-matrix` run over the files of this ticket. Do not run a whole pass. Required work: none beyond the acceptance criteria. ## Acceptance criteria 1. Given a targeted `--no-matrix` Mutineer run on the files listed in this ticket, when the run ends, then no survivor remains except ones that this ticket rules equivalent with a reason. 2. Given a file that has a deleted dead-code candidate, when the suite runs, then it is green and no caller of the deleted code remains. ## Origin - Trigger: second whole-codebase mutation pass, 2026-11-09 (`docs/research/mutation-testing/2026-11-09-second-pass/`) - Improvised this session: none - Chain: survivors ← no paired unit test for the file ← tests were written at the pipeline level, and the unit test per file (ruling 100) was never added ← DESIGN (ruling 100) - Root candidate: none found; searched survivor, mutation, mutineer, pattern-site, missing tests - Where: lib/os_sdlc/system_model/pattern_site/ - Session: bc5ad309-36b7-4fe5-a67f-1d90187242eb - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os-plugins-os-sdlc/bc5ad309-36b7-4fe5-a67f-1d90187242eb.jsonl VERDICT: CREATE (ticket-skeptic, 2026-11-09): no open ticket covers these survivors.
Author
Owner

Resolution

Done: Paired unit tests kill every pattern_site survivor but one; entry.rb:54 (return [] => return nil in Entry#difference) is ruled equivalent: the only caller, Entry#problems, splats the result, so nil and [] give the same list

Evidence: Targeted packet run over the 7 files: 145 mutants, 1 survivor (the ruled one), score 99.3; suite 4006 runs, 0 failures; commit 912d99993 on ticket-1656

Follow-ups: #1679 (brief test command loads only the first test file), filed with a ticket-skeptic CREATE verdict

## Resolution **Done:** Paired unit tests kill every pattern_site survivor but one; entry.rb:54 (return [] => return nil in Entry#difference) is ruled equivalent: the only caller, Entry#problems, splats the result, so nil and [] give the same list **Evidence:** Targeted packet run over the 7 files: 145 mutants, 1 survivor (the ruled one), score 99.3; suite 4006 runs, 0 failures; commit 912d99993 on ticket-1656 **Follow-ups:** #1679 (brief test command loads only the first test file), filed with a ticket-skeptic CREATE verdict <!-- os-backlog kind: resolution -->
jared closed this issue 2026-11-10 21:02:33 +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#1656
No description provided.