Delete the os-sdlc code that has no callers #1216

Open
opened 2026-10-20 14:05:50 +00:00 by jared · 1 comment
Owner

Problem

Three Ruby files in os-sdlc have no caller. They are IssueSource.for with its helpers, LintResultAssertions, and RecordingRubocopRunner.
CRC run 3 found them. A second search confirmed it. The search covered plugins/ and bin/. It used the constant names, because Zeitwerk loads constants without require lines.
The run 2 dead-code ticket was #1141. It is closed. These files are new to the list, or they lost their last caller after run 2.
lib/os_sdlc/lint.rb is not on the list. It defines OsSdlc::Lint, and the files under lib/os_sdlc/lint/ reopen that namespace. Zeitwerk needs it.

Evidence:

  1. IssueSource.for has no caller in lib, bin, or hooks. Only tests/tracker/issue_source_test.rb calls it (8 calls). tests/cops/query_method_reaches_write_test.rb:37 holds the name inside a message string. Its private helpers build, tracker_required_error, and unsupported_tracker_error, and the constant TRACKER_CLASSES, serve only for.
  2. LintResultAssertions has no include and no other mention outside its own file.
  3. RecordingRubocopRunner has no new call and no other mention outside its own file.

The IssueSource module itself stays. Forgejo, Github, Shell, TicketText, and TrackerLookup live under it. tracker/forgejo.rb:11 calls TrackerLookup, and tracker/backlog.rb:32 calls Shell.

Reproduce

grep -rn "IssueSource\.for" plugins bin
grep -rnE "LintResultAssertions|lint_result_assertions" plugins bin
grep -rnE "RecordingRubocopRunner|recording_rubocop_runner" plugins bin

Only tests, the files themselves, and fixture history files match.

Approach

Delete the code. Delete the tests that cover only the deleted code.

Required work:

  1. Remove self.for, its three private helpers, TRACKER_CLASSES, and the private_class_method line from lib/os_sdlc/tracker/issue_source.rb. Keep the empty module. — check: absent def self.for in plugins/os-sdlc/lib/os_sdlc/tracker/issue_source.rb
  2. Delete tests/tracker/issue_source_test.rb. It tests only for. Keep issue_source_api_test.rb, issue_source_forgejo_test.rb, issue_source_forgejo_host_test.rb, and issue_source_github_test.rb. If a case in the deleted file is the only test of TrackerLookup behavior, move that case into issue_source_forgejo_host_test.rb.
  3. Delete plugins/os-sdlc/tests/support/lint_result_assertions.rb. — check: absent module LintResultAssertions in plugins/os-sdlc/tests/**/*.rb
  4. Delete plugins/os-sdlc/tests/support/recording_rubocop_runner.rb. — check: absent class RecordingRubocopRunner in plugins/os-sdlc/tests/**/*.rb

Orchestrator work: write gone: <sha> <subject> notes into the evidence cells of the deleted rows. Use plugins/os-sdlc/bin/crc-records.

Acceptance criteria

  1. Given the lib tree, when grep -rn "IssueSource\.for" plugins/os-sdlc/lib plugins/os-sdlc/tests runs, then no line matches except the message string in tests/cops/query_method_reaches_write_test.rb.
  2. Given the tests tree, when ls plugins/os-sdlc/tests/support runs, then lint_result_assertions.rb and recording_rubocop_runner.rb are absent.
  3. Given the change, when the os-sdlc suite runs, then it passes.
  4. Given the change, when eager load runs, then it passes.
  5. Given lib/os_sdlc/lint.rb, when the change is complete, then the file still exists.

Owner sketch

OsSdlc::Tracker::IssueSource stays as a namespace module for the adapters. It has no methods.

Origin

  • Trigger: the CRC run 3 dead-code census, and a second caller search
  • Improvised this session: none
  • Chain: dead code ← the last caller was removed or never existed ← DESIGN (the run 3 ledger rows list no live callers)
  • Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-3/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl
  • Where: plugins/os-sdlc/tests/support/lint_result_assertions.rb, plugins/os-sdlc/tests/support/recording_rubocop_runner.rb, plugins/os-sdlc/lib/os_sdlc/tracker/issue_source.rb (the method IssueSource.for)
  • Root candidate: none found

VERDICT: CREATE

## Problem Three Ruby files in os-sdlc have no caller. They are `IssueSource.for` with its helpers, `LintResultAssertions`, and `RecordingRubocopRunner`. CRC run 3 found them. A second search confirmed it. The search covered `plugins/` and `bin/`. It used the constant names, because Zeitwerk loads constants without `require` lines. The run 2 dead-code ticket was #1141. It is closed. These files are new to the list, or they lost their last caller after run 2. `lib/os_sdlc/lint.rb` is not on the list. It defines `OsSdlc::Lint`, and the files under `lib/os_sdlc/lint/` reopen that namespace. Zeitwerk needs it. Evidence: 1. `IssueSource.for` has no caller in `lib`, `bin`, or `hooks`. Only `tests/tracker/issue_source_test.rb` calls it (8 calls). `tests/cops/query_method_reaches_write_test.rb:37` holds the name inside a message string. Its private helpers `build`, `tracker_required_error`, and `unsupported_tracker_error`, and the constant `TRACKER_CLASSES`, serve only `for`. 2. `LintResultAssertions` has no `include` and no other mention outside its own file. 3. `RecordingRubocopRunner` has no `new` call and no other mention outside its own file. The `IssueSource` module itself stays. `Forgejo`, `Github`, `Shell`, `TicketText`, and `TrackerLookup` live under it. `tracker/forgejo.rb:11` calls `TrackerLookup`, and `tracker/backlog.rb:32` calls `Shell`. ## Reproduce ``` grep -rn "IssueSource\.for" plugins bin grep -rnE "LintResultAssertions|lint_result_assertions" plugins bin grep -rnE "RecordingRubocopRunner|recording_rubocop_runner" plugins bin ``` Only tests, the files themselves, and fixture history files match. ## Approach Delete the code. Delete the tests that cover only the deleted code. Required work: 1. Remove `self.for`, its three private helpers, `TRACKER_CLASSES`, and the `private_class_method` line from `lib/os_sdlc/tracker/issue_source.rb`. Keep the empty module. — check: absent `def self.for` in `plugins/os-sdlc/lib/os_sdlc/tracker/issue_source.rb` 2. Delete `tests/tracker/issue_source_test.rb`. It tests only `for`. Keep `issue_source_api_test.rb`, `issue_source_forgejo_test.rb`, `issue_source_forgejo_host_test.rb`, and `issue_source_github_test.rb`. If a case in the deleted file is the only test of `TrackerLookup` behavior, move that case into `issue_source_forgejo_host_test.rb`. 3. Delete `plugins/os-sdlc/tests/support/lint_result_assertions.rb`. — check: absent `module LintResultAssertions` in `plugins/os-sdlc/tests/**/*.rb` 4. Delete `plugins/os-sdlc/tests/support/recording_rubocop_runner.rb`. — check: absent `class RecordingRubocopRunner` in `plugins/os-sdlc/tests/**/*.rb` Orchestrator work: write `gone: <sha> <subject>` notes into the evidence cells of the deleted rows. Use `plugins/os-sdlc/bin/crc-records`. ## Acceptance criteria 1. Given the lib tree, when `grep -rn "IssueSource\.for" plugins/os-sdlc/lib plugins/os-sdlc/tests` runs, then no line matches except the message string in `tests/cops/query_method_reaches_write_test.rb`. 2. Given the tests tree, when `ls plugins/os-sdlc/tests/support` runs, then `lint_result_assertions.rb` and `recording_rubocop_runner.rb` are absent. 3. Given the change, when the os-sdlc suite runs, then it passes. 4. Given the change, when eager load runs, then it passes. 5. Given `lib/os_sdlc/lint.rb`, when the change is complete, then the file still exists. ## Owner sketch `OsSdlc::Tracker::IssueSource` stays as a namespace module for the adapters. It has no methods. ## Origin - Trigger: the CRC run 3 dead-code census, and a second caller search - Improvised this session: none - Chain: dead code ← the last caller was removed or never existed ← DESIGN (the run 3 ledger rows list no live callers) - Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-3/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl - Where: plugins/os-sdlc/tests/support/lint_result_assertions.rb, plugins/os-sdlc/tests/support/recording_rubocop_runner.rb, plugins/os-sdlc/lib/os_sdlc/tracker/issue_source.rb (the method `IssueSource.for`) - Root candidate: none found VERDICT: CREATE
Author
Owner

Occurrence: Delete the dead Lint class body, Tracker::IssueSource.for chain, and three dead test support files
Seen: plugins/os-sdlc/lib/os_sdlc/lint.rb, plugins/os-sdlc/lib/os_sdlc/tracker/issue_source.rb, plugins/os-sdlc/tests/support/recording_rubocop_runner.rb
Run: CRC run 4 over os-sdlc, session c1bedec6-7e01-45ab-b9db-22d63652c19f
Adds: CRC run 4 final judgment round predicted delete (85-90%) for the three files here and for more dead code: the OsSdlc::Lint class body (namespace stays), IssueSource::Forgejo, IssueSource::Github, IssueSource::TicketText, and tests/support/fake_rubocop_runner.rb (only RecordingRubocopRunner uses it).

Occurrence: Delete the dead Lint class body, Tracker::IssueSource.for chain, and three dead test support files Seen: plugins/os-sdlc/lib/os_sdlc/lint.rb, plugins/os-sdlc/lib/os_sdlc/tracker/issue_source.rb, plugins/os-sdlc/tests/support/recording_rubocop_runner.rb Run: CRC run 4 over os-sdlc, session c1bedec6-7e01-45ab-b9db-22d63652c19f Adds: CRC run 4 final judgment round predicted delete (85-90%) for the three files here and for more dead code: the OsSdlc::Lint class body (namespace stays), IssueSource::Forgejo, IssueSource::Github, IssueSource::TicketText, and tests/support/fake_rubocop_runner.rb (only RecordingRubocopRunner uses it).
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#1216
No description provided.