Delete the old git wrappers after all references are updated #1607

Closed
opened 2026-11-06 16:54:18 +00:00 by jared · 1 comment
Owner

Problem

After the migrations, nine old wrappers have no callers (section E of the checklist): OsSdlc::Git::Repo and Diff, Worktree::Git, GitContext::Git, CommitContext::Git, the Handoff::Repository git helper, OsMe::Store, RealGit and RealGitState, and RealGitStateProvider. The plugin cc-plugins/git-context and the gem ruby-gems/git-context have no users either. Settled by the user: an old wrapper is removed only after every reference is updated and nothing breaks.

Design: docs/os-git/use-cases-and-domain.md (design) and docs/os-git/call-site-checklist.md (call sites).

Reproduce

n/a: deletion.

Approach

For each wrapper, run a search for its constant and its file path across ~/dev (cc-os, ruby-gems, cc-plugins, delta-refinery, llf-schema, hyperthrive_dev, remetrics). Delete the wrapper only when the search finds no reference outside its own file and its own tests. Delete its tests with it. Rows E-08 and E-09 (Python) stay if the Q7 ruling (#1597) defers the port: mark them deferred. Remove plugins/os worktree code, the cc-plugins/git-context plugin, and ruby-gems/git-context (a commit in each repository, explicit paths). Remove the old names from bin/refresh-plugins and from the plugin registry. Update ADR affected-paths that name removed files only through /os-adr:create rules; do not edit ADRs by hand.

Required work:

  1. Delete plugins/os-sdlc/lib/os_sdlc/git/repo.rb — check: absent class Repo in plugins/os-sdlc/lib/os_sdlc/git/repo.rb
  2. Delete plugins/os/lib/worktree/git.rb — check: absent class Git in plugins/os/lib/worktree/git.rb

Acceptance criteria

  1. Given each wrapper in rows E-01 to E-07, when the repositories are searched for its constant, then no file references it, and the wrapper file and its tests are gone.
  2. Given the touched plugins and projects, when their suites run, then they pass.
  3. Given plugins/, when it is searched for Open3, system(, %x, and backticks that start git, then no call remains outside OsGit adapters and rows marked out of scope with a reason.
  4. Given section E, when the ticket closes, then rows E-01 to E-07 are marked - [x], and rows E-08 and E-09 are marked - [x] or deferred with a reason.
  5. Given the old names git-context and os:worktree, when a new session starts after bin/refresh-plugins, then the old plugin entries are absent and the os-git entries load.

Blocking edges

Blocked by every migration ticket and by the test sweep (#1606), the prompt-text ticket (#1605), and the git-context ticket (#1591).

Origin

  • Trigger: User request in session 1a5b2630-09c9-46cb-aee4-a5a98e2e7d24 on 2026-11-06: one os-git gem for all local git work in cc-os and the user's projects.
  • Improvised this session: none
  • Chain: old wrappers stay after migration ← callers not yet updated ← DESIGN (docs/os-git/call-site-checklist.md section E, design section 7.2)
  • Root candidate: none found; searched open issues for git, worktree, octokit, ruby port, python, statusline, reset --hard. Related but not a match: #845, #853, #857, #1527, #1554.
  • Where: docs/os-git/call-site-checklist.md section E
  • Session: 1a5b2630-09c9-46cb-aee4-a5a98e2e7d24
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/1a5b2630-09c9-46cb-aee4-a5a98e2e7d24.jsonl
## Problem After the migrations, nine old wrappers have no callers (section E of the checklist): `OsSdlc::Git::Repo` and `Diff`, `Worktree::Git`, `GitContext::Git`, `CommitContext::Git`, the `Handoff::Repository` git helper, `OsMe::Store`, `RealGit` and `RealGitState`, and `RealGitStateProvider`. The plugin `cc-plugins/git-context` and the gem `ruby-gems/git-context` have no users either. Settled by the user: an old wrapper is removed only after every reference is updated and nothing breaks. Design: `docs/os-git/use-cases-and-domain.md` (design) and `docs/os-git/call-site-checklist.md` (call sites). ## Reproduce n/a: deletion. ## Approach For each wrapper, run a search for its constant and its file path across `~/dev` (cc-os, ruby-gems, cc-plugins, delta-refinery, llf-schema, hyperthrive_dev, remetrics). Delete the wrapper only when the search finds no reference outside its own file and its own tests. Delete its tests with it. Rows E-08 and E-09 (Python) stay if the Q7 ruling (#1597) defers the port: mark them deferred. Remove `plugins/os` worktree code, the `cc-plugins/git-context` plugin, and `ruby-gems/git-context` (a commit in each repository, explicit paths). Remove the old names from `bin/refresh-plugins` and from the plugin registry. Update ADR affected-paths that name removed files only through `/os-adr:create` rules; do not edit ADRs by hand. Required work: 1. Delete `plugins/os-sdlc/lib/os_sdlc/git/repo.rb` — check: absent `class Repo` in `plugins/os-sdlc/lib/os_sdlc/git/repo.rb` 2. Delete `plugins/os/lib/worktree/git.rb` — check: absent `class Git` in `plugins/os/lib/worktree/git.rb` ## Acceptance criteria 1. Given each wrapper in rows E-01 to E-07, when the repositories are searched for its constant, then no file references it, and the wrapper file and its tests are gone. 2. Given the touched plugins and projects, when their suites run, then they pass. 3. Given `plugins/`, when it is searched for `Open3`, `system(`, `%x`, and backticks that start `git`, then no call remains outside `OsGit` adapters and rows marked out of scope with a reason. 4. Given section E, when the ticket closes, then rows E-01 to E-07 are marked `- [x]`, and rows E-08 and E-09 are marked `- [x]` or deferred with a reason. 5. Given the old names `git-context` and `os:worktree`, when a new session starts after `bin/refresh-plugins`, then the old plugin entries are absent and the `os-git` entries load. ## Blocking edges Blocked by every migration ticket and by the test sweep (#1606), the prompt-text ticket (#1605), and the git-context ticket (#1591). ## Origin - Trigger: User request in session 1a5b2630-09c9-46cb-aee4-a5a98e2e7d24 on 2026-11-06: one os-git gem for all local git work in cc-os and the user's projects. - Improvised this session: none - Chain: old wrappers stay after migration ← callers not yet updated ← DESIGN (docs/os-git/call-site-checklist.md section E, design section 7.2) - Root candidate: none found; searched open issues for git, worktree, octokit, ruby port, python, statusline, reset --hard. Related but not a match: #845, #853, #857, #1527, #1554. - Where: docs/os-git/call-site-checklist.md section E - Session: 1a5b2630-09c9-46cb-aee4-a5a98e2e7d24 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/1a5b2630-09c9-46cb-aee4-a5a98e2e7d24.jsonl
Author
Owner

Resolution

Done: Deleted OsSdlc::Git (E-01, E-03), plugins/os/lib/worktree (E-02), and the commit_context fork (E-05, in #1591). No raw git remains in production Ruby except row G-057, deferred. By ruling 1 the git-context plugin, the gem, plugins/os/bin/worktree, and the os:worktree skill stay, so AC 5 is not met here; #1631 owns it. E-08 and E-09 are deferred.

Evidence: main 9cd21db7 (b6670cc2, 01ba7487). os-sdlc 3502 runs, os 241, os-git 363, os-backlog 497, os-me 438, takedown 623, all 0 failures; rubocop on os-git clean; worktree CLI runs. Two stranger reviews; rulings in docs/crc/os-sdlc/fast-batch-os-git-final/rulings.tsv.

Follow-ups: #1631 (skeptic VERDICT: CREATE). plugins/*/design/generated still name deleted classes until the next generation run.

## Resolution **Done:** Deleted OsSdlc::Git (E-01, E-03), plugins/os/lib/worktree (E-02), and the commit_context fork (E-05, in #1591). No raw git remains in production Ruby except row G-057, deferred. By ruling 1 the git-context plugin, the gem, plugins/os/bin/worktree, and the os:worktree skill stay, so AC 5 is not met here; #1631 owns it. E-08 and E-09 are deferred. **Evidence:** main 9cd21db7 (b6670cc2, 01ba7487). os-sdlc 3502 runs, os 241, os-git 363, os-backlog 497, os-me 438, takedown 623, all 0 failures; rubocop on os-git clean; worktree CLI runs. Two stranger reviews; rulings in docs/crc/os-sdlc/fast-batch-os-git-final/rulings.tsv. **Follow-ups:** #1631 (skeptic VERDICT: CREATE). plugins/*/design/generated still name deleted classes until the next generation run.
jared closed this issue 2026-11-07 07:08:49 +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#1607
No description provided.