Integration tests stop at the seams: rewrite the widest and slowest os-sdlc tests #1665
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#1665
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
In matrix mode, Mutineer runs every covering test for each mutant. Pipeline tests reach most of
lib/, so one mutant in a shared file runs many wide tests. Four tests that scan the reallib/also run about 10 s or more each. The 10 s limit then stops the mutant before its other tests run. The second pass shows the result: 220 of the 235 timeouts, and 1,449 incomplete matrix rows. The incomplete matrix makes every redundant-test candidate unreliable.Observed
The four slow tests, each run alone:
InlineDatasetQueryTest#test_passes_the_lib_sources: 9.8 s.RegistryOutsideEntryPointTest#test_flags_a_model_lookup_outside_initialize_and_passes_the_look_alikes: 12.0 s.CollaboratorPassAcceptanceTest#test_the_clump_check_has_clumps_to_inspect: 11.9 s.test/collaborator_pass/command/measure_test.rb: 11.8 s for 6 tests.Slow covering sets, which together run 5 s to 28 s unmutated:
system_model/extractor/*(SystemModelClassNewDeclarationTesthas one 3.6 s test),cops/structural/precedence_in_edge/*(8 files, 145 tests, 12.1 s),cops/structural/edge_scope.rb,project/config/document.rb(138 files, 26.6 s), andboot.rb(107 files, 27.9 s).docs/research/mutation-testing/2026-11-09-second-pass/coverage_width.tsvranks the 619 test files by the number oflib/files each covers. The widest test,test/system_model_opportunities_cli_test.rb, covers 181 files. The ranking uses the pass 1 coverage map, because a reproduction run overwrote the pass 2 map.Reproduce
n/a: the data comes from a whole pass. See
docs/research/mutation-testing/2026-11-09-second-pass/README.md, sections "Timeouts" and "Coverage width".Approach
Jared ruled on 2026-11-09: an integration test checks only the wiring. It checks that the entry builds the right objects, and that each message crosses each seam with the right arguments. Below the first layer it uses doubles or minimal data. Branch logic moves to paired unit tests.
Required work:
coverage_width.tsv, and rewrite the four slow tests first, then the widest tests, as wiring-only tests. Move each branch they covered to a paired unit test attest/os_sdlc/<lib path>_test.rb(ruling 100)./os-sdlc:smell-analysison the shape "wide integration test", and keep its decision memo.plugins/os-sdlc/skills/lens-testing/SKILL.md— check: presentintegration testinplugins/os-sdlc/skills/lens-testing/SKILL.mdVerify each rewrite with a targeted
--no-matrixrun of the files it covers. Run no whole pass.Acceptance criteria
Owner sketch
n/a: test and skill changes only.
Non-goals
The redundant-test review is ticket B. This ticket runs no whole pass.
Origin
docs/research/mutation-testing/2026-11-09-second-pass/)lib/code below the first seam ← DESIGN (no integration-test rule in lens-testing)plugins/os-sdlc/test/,plugins/os-sdlc/skills/lens-testing/SKILL.mdVERDICT: CREATE (ticket-skeptic, 2026-11-09): no open ticket has the same mechanism; #1341 and #1644 are different faults.
Work started in session 720a7477, branch ticket-1665. Order: the 4 slow tests first (delete the two cop lib scans; fixture codebase for measure_test and CollaboratorPassAcceptanceTest), then the wide tests.
Resolution
Done: The four slow tests and one more (name_collision_findings_test) no longer read real lib/: the two cop scans are deleted and three collaborator-pass tests run over fixture codebases. The widest tests keep one journey for each entry (cli_next_instruction 25 to 1, cli_subagent_stop 22 to 1, crc_boot_entry 29 to 9, five pipeline journey files deleted, system-model CLI tests stop at Run); their branch checks are paired unit tests. lens-testing has T10 (integration test checks the wiring once for each entry) and T11 (real code is not test input). Smell analysis and decision memo are in the record. No cop: the probe over the tree gave false positives, recorded in the memo. No production code changed.
Evidence: Branch ticket-1665, commits
040e3a975fca6611957ee0bbaac3ca1be08bdada64d096ae29f12339f16222fd0b358eb1f8ee982365be10430f; not merged yet. Record: docs/research/mutation-testing/2026-11-10-integration-tests/README.md. Suite 3,909 runs, 0 failures, 6.5 s. AC1: slow test files run in 0.11 to 0.46 s test time (about 1.0 to 1.4 s wall with start-up). AC2: each top-10 file keeps one journey for each entry or none. AC3: targeted --no-matrix runs for each new unit test, e.g. failure_directive 7/7, terminal_payload 9/9, escalation_reason 12/12, gate/run 31/31, hook_reading 7/7, project_bind 7/7, next_step 36/39. Targeted run on the 79 files with pass 2 timeouts: 226 timeouts become 42; 38 of the 42 come from worker load (0 of 9 sampled at --jobs 3).Follow-ups: #1670 filed (CopSource makes a ConfigStore for each file). gdiff under the process guard: occurrence posted on #1669. Worker-load timeouts and the 4 covering-set timeouts (boot.rb:18, project config): evidence posted on #1666; decision memo option A recommends no more narrowing. Mutineer makes no mutants for a lambda held in a constant: reported to Jared, not filed (Mutineer is another project). Unit-test layout (test/implementation vs test/os_sdlc): owned by #1644, none new.