Skip to content

Remove infrastructure _CommandRunner from public BumpOptions and abstract VCS/filesystem behind a repository port #82

Description

@coderabbitai

Background

Raised during review of PR #75 (refresh stale Cargo lockfiles before publish preflight).

Problem

BumpOptions is a public domain dataclass but now exposes runner: _CommandRunner | None = None, an infrastructure protocol. This leaks execution infrastructure into the domain boundary. Lockfile discovery also mixes git VCS calls and filesystem operations in a single function without an abstraction layer.

Resolution

  • Remove runner from BumpOptions; pass it at the call site or via a dedicated infrastructure port.
  • Introduce a repository/VCS port (e.g. a LockfileRepository protocol) to separate git-tracked file discovery and cargo lockfile operations from domain logic in bump.py and lockfile.py.
  • Update callers and tests accordingly.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions