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
Background
Raised during review of PR #75 (refresh stale Cargo lockfiles before publish preflight).
Problem
BumpOptionsis a public domain dataclass but now exposesrunner: _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
runnerfromBumpOptions; pass it at the call site or via a dedicated infrastructure port.LockfileRepositoryprotocol) to separate git-tracked file discovery and cargo lockfile operations from domain logic inbump.pyandlockfile.py.References
CommandRunnerport #62