Delete the dead code the CRC census found in os-sdlc #1141

Closed
opened 2026-10-18 23:30:36 +00:00 by jared · 2 comments
Owner

Problem

21 Ruby files have no production caller.
The census grepped lib, bin, hooks, agents, skills, tests, and .rubocop*.yml.
Group 1: lib/os_sdlc/flay_check.rb and flay_check/{finding,snippet,sweep,target}.rb. FlayCheck duplicates CollaboratorPass::Duplication, which calls the Flay gem directly.
Group 2: lib/os_sdlc/lint/autocorrect_prepass.rb and autocorrect_prepass/{capture_runner,pass,residual_output}.rb, with tests/lint/autocorrect_prepass_test.rb, tests/lint/autocorrect_prepass_runner_contract_test.rb, and tests/support/{autocorrect_prepass_scenario,fake_split_capture_runner,fake_two_call_runner}.rb.
Group 3: lib/os_sdlc/git/branch.rb and git/worktree.rb. Only tests/git/branch_test.rb and worktree_test.rb call them. tests/support/fake_git.rb serves only those tests.
Group 4: tests/support/{dispatch_240_fixture,fake_implementation_with_project,flay_fixture_dir,procman_runtime_dir,recording_dispatch_sink,recording_shell,source_line}.rb. The test_helper support loader loads them. Nothing uses them.
Deletion is outside the CRC run's rename, move, and extract scope.

Reproduce

n/a: cleanup.

Approach

Required work:

  1. Delete each group with its tests.
  2. Run the suite (2129 runs today; the count drops by the deleted tests) and the eager load.
  3. Run plugins/os-sdlc/bin/crc-records --target os-sdlc docs/crc/os-sdlc and write gone: <sha> <subject> notes into the deleted rows' evidence cells.

Acceptance criteria

  1. None of the 21 files exists.
  2. The suite reports 0 failures and 0 errors.
  3. The eager load is silent.
  4. crc-records exits 0.

Origin

  • Session: ca7a7686-22a8-4463-86d5-c542e7d9f215
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/ca7a7686-22a8-4463-86d5-c542e7d9f215.jsonl
  • Where: the 21 paths named under Problem (plugins/os-sdlc/lib/os_sdlc/flay_check*, lint/autocorrect_prepass*, git/branch.rb, git/worktree.rb, and the listed tests/support files)
  • Root candidate: none found; searched dead code, FlayCheck, autocorrect prepass, Git::Branch, Git::Worktree, unused support
  • Run: CRC refactor run 2, docs/crc/os-sdlc (HANDOFF.md, deviations.md)
    VERDICT: CREATE
## Problem 21 Ruby files have no production caller. The census grepped lib, bin, hooks, agents, skills, tests, and .rubocop*.yml. Group 1: lib/os_sdlc/flay_check.rb and flay_check/{finding,snippet,sweep,target}.rb. FlayCheck duplicates CollaboratorPass::Duplication, which calls the Flay gem directly. Group 2: lib/os_sdlc/lint/autocorrect_prepass.rb and autocorrect_prepass/{capture_runner,pass,residual_output}.rb, with tests/lint/autocorrect_prepass_test.rb, tests/lint/autocorrect_prepass_runner_contract_test.rb, and tests/support/{autocorrect_prepass_scenario,fake_split_capture_runner,fake_two_call_runner}.rb. Group 3: lib/os_sdlc/git/branch.rb and git/worktree.rb. Only tests/git/branch_test.rb and worktree_test.rb call them. tests/support/fake_git.rb serves only those tests. Group 4: tests/support/{dispatch_240_fixture,fake_implementation_with_project,flay_fixture_dir,procman_runtime_dir,recording_dispatch_sink,recording_shell,source_line}.rb. The test_helper support loader loads them. Nothing uses them. Deletion is outside the CRC run's rename, move, and extract scope. ## Reproduce n/a: cleanup. ## Approach Required work: 1. Delete each group with its tests. 2. Run the suite (2129 runs today; the count drops by the deleted tests) and the eager load. 3. Run `plugins/os-sdlc/bin/crc-records --target os-sdlc docs/crc/os-sdlc` and write `gone: <sha> <subject>` notes into the deleted rows' evidence cells. ## Acceptance criteria 1. None of the 21 files exists. 2. The suite reports 0 failures and 0 errors. 3. The eager load is silent. 4. `crc-records` exits 0. ## Origin - Session: ca7a7686-22a8-4463-86d5-c542e7d9f215 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/ca7a7686-22a8-4463-86d5-c542e7d9f215.jsonl - Where: the 21 paths named under Problem (plugins/os-sdlc/lib/os_sdlc/flay_check*, lint/autocorrect_prepass*, git/branch.rb, git/worktree.rb, and the listed tests/support files) - Root candidate: none found; searched dead code, FlayCheck, autocorrect prepass, Git::Branch, Git::Worktree, unused support - Run: CRC refactor run 2, docs/crc/os-sdlc (HANDOFF.md, deviations.md) VERDICT: CREATE
Author
Owner

Work started on branch cleanup-dead-files-adr-paths (worktree).

Work started on branch cleanup-dead-files-adr-paths (worktree).
Author
Owner

Resolution

Done: Deleted the 26 files in groups 1-4 (21 named lib/support files plus their 4 tests and fake_git.rb support) after rg/ast-grep showed no lib, test, bin, hook, agent, skill, or rubocop reference; FakeLintShell kept. Fixed crc-records so a gone: row does not resolve through the basename fallback (two deleted constants matched unrelated files). Dropped git/worktree.rb from ADR-0253 affected-paths via adr-new amend. Wrote gone: e3b083bf notes into the 22 deleted rows of docs/crc/os-sdlc/ledger.tsv (a6fbfd5a).

Evidence: Commits e3b083bf and a6fbfd5a on branch cleanup-dead-files-adr-paths. Suite: 2103 runs, 4730 assertions, 0 failures, 0 errors (was 2129; deleted tests removed, one new crc-records test). Eager load silent, exit 0. crc-records: stale 0, missing 0, gone 22, stale_adr_paths 0; it still exits 1 only for the 9 false ambiguous rows tracked by open #1072 (HEAD before this work had 10 and also exited 1), so AC4 waits on #1072.

Follow-ups: none new; the remaining crc-records exit 1 is already #1072

## Resolution **Done:** Deleted the 26 files in groups 1-4 (21 named lib/support files plus their 4 tests and fake_git.rb support) after rg/ast-grep showed no lib, test, bin, hook, agent, skill, or rubocop reference; FakeLintShell kept. Fixed crc-records so a gone: row does not resolve through the basename fallback (two deleted constants matched unrelated files). Dropped git/worktree.rb from ADR-0253 affected-paths via adr-new amend. Wrote gone: e3b083bf notes into the 22 deleted rows of docs/crc/os-sdlc/ledger.tsv (a6fbfd5a). **Evidence:** Commits e3b083bf and a6fbfd5a on branch cleanup-dead-files-adr-paths. Suite: 2103 runs, 4730 assertions, 0 failures, 0 errors (was 2129; deleted tests removed, one new crc-records test). Eager load silent, exit 0. crc-records: stale 0, missing 0, gone 22, stale_adr_paths 0; it still exits 1 only for the 9 false ambiguous rows tracked by open #1072 (HEAD before this work had 10 and also exited 1), so AC4 waits on #1072. **Follow-ups:** none new; the remaining crc-records exit 1 is already #1072
jared closed this issue 2026-10-19 12:11:22 +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#1141
No description provided.