require-explicit-service-contract
Require an explicit contract for a service that invokes a retained collaborator.
Why
A one-operation service can orchestrate other services without declaring the contract that callers consume and implementations and fakes satisfy.
Fix
Declare a focused ABC or Protocol covering the service operations and make that contract explicit on the implementation; reuse an existing contract instead of adding a nominal duplicate.
Examples
class OrchestratorService: def __init__(self, worker: Worker) -> None: self.worker = worker
def run(self) -> None: self.worker.run()from abc import ABC, abstractmethod
class Runner(ABC): @abstractmethod def run(self) -> None: ...
class OrchestratorService(Runner): def __init__(self, worker: Worker) -> None: self.worker = worker
def run(self) -> None: self.worker.run()