os_git ships a repository fake for consumer tests; os-sdlc moves its FakeGit into it #1652

Open
opened 2026-11-09 20:46:49 +00:00 by jared · 0 comments
Owner

Problem

Consumers of the os_git gem must test without starting git (ruling 88, .claude/rules/ruby-external-calls.md).
OsGit::Testing::ScratchRepo starts real git.
OsGit Backend::Fake answers by message name only, so it cannot model a history.
#1645 (merged 38b3284d) built an in-memory fake in os-sdlc test/support: FakeGit, FakeGitRepository, FreshGitRepository, and GitMarker.
Other consumers (os-me, os-backlog, delta-refinery) will need the same fake.

Reproduce

n/a: design ticket, nothing to reproduce.

Approach

Move the fake into the os_git gem under OsGit::Testing.
The os-git plugin owns and tests it.
os-sdlc uses it from the gem.
Decide whether ScratchRepo stays: os-git's own tests may start git, and consumers may not.

Required work:

  1. Add the repository fake under OsGit::Testing in the gem — check: present FakeGit in plugins/os-git/lib/os_git/testing/**/*.rb
  2. Remove the fake from os-sdlc test/support — check: absent FakeGit in plugins/os-sdlc/test/support/**/*.rb

Acceptance criteria

  1. Given os-sdlc test/support, when searched for FakeGit, then none is found and the tests use OsGit::Testing.
  2. Given the os_git gem, when its suite runs, then the fake has its own tests.

Owner sketch

module OsGit
  module Testing
    class FakeGit
    end
  end
end

VERDICT: CREATE

Origin

  • Trigger: #1645 agent report.
  • Improvised this session: none
  • Chain: each consumer builds its own fake ← OsGit ships no history-modelling fake (plugins/os-git/lib/os_git/testing/) ← DESIGN (ruling 88).
  • Root candidate: none found; searched FakeGit, ScratchRepo, Backend::Fake, OsGit::Testing, os_git fake, in-memory fake
  • Where: plugins/os-git/lib/os_git/testing/, plugins/os-sdlc/test/support/
  • 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
## Problem Consumers of the os_git gem must test without starting git (ruling 88, `.claude/rules/ruby-external-calls.md`). `OsGit::Testing::ScratchRepo` starts real git. `OsGit` `Backend::Fake` answers by message name only, so it cannot model a history. #1645 (merged 38b3284d) built an in-memory fake in os-sdlc `test/support`: `FakeGit`, `FakeGitRepository`, `FreshGitRepository`, and `GitMarker`. Other consumers (os-me, os-backlog, delta-refinery) will need the same fake. ## Reproduce n/a: design ticket, nothing to reproduce. ## Approach Move the fake into the os_git gem under `OsGit::Testing`. The os-git plugin owns and tests it. os-sdlc uses it from the gem. Decide whether `ScratchRepo` stays: os-git's own tests may start git, and consumers may not. Required work: 1. Add the repository fake under `OsGit::Testing` in the gem — check: present `FakeGit` in `plugins/os-git/lib/os_git/testing/**/*.rb` 2. Remove the fake from os-sdlc `test/support` — check: absent `FakeGit` in `plugins/os-sdlc/test/support/**/*.rb` ## Acceptance criteria 1. Given os-sdlc `test/support`, when searched for `FakeGit`, then none is found and the tests use `OsGit::Testing`. 2. Given the os_git gem, when its suite runs, then the fake has its own tests. ## Owner sketch ```ruby module OsGit module Testing class FakeGit end end end ``` VERDICT: CREATE ## Origin - Trigger: #1645 agent report. - Improvised this session: none - Chain: each consumer builds its own fake ← `OsGit` ships no history-modelling fake (`plugins/os-git/lib/os_git/testing/`) ← DESIGN (ruling 88). - Root candidate: none found; searched FakeGit, ScratchRepo, Backend::Fake, OsGit::Testing, os_git fake, in-memory fake - Where: plugins/os-git/lib/os_git/testing/, plugins/os-sdlc/test/support/ - 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
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#1652
No description provided.