refactor: Split IPipelineHookContext for Interface Segregation Principle compliance#1463
Conversation
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…compliance Split the monolithic IPipelineHookContext (27+ members) into focused sub-interfaces to comply with the Interface Segregation Principle (ISP): - IPipelineServices: DI and configuration (ServiceProvider, Get<T>, Configuration, PipelineOptions) - IPipelineLogging: Logging functionality (Logger) - IPipelineTools: Command execution and tools (Command, Powershell, Bash, Http, Downloader, Installer) - IPipelineEncoding: Serialization and encoding (Json, Xml, Yaml, Hex, Base64, Hasher) - IPipelineFileSystem: File operations (FileSystem, Zip, Checksum) - IPipelineEnvironment: Environment and build detection (Environment, BuildSystemDetector) IPipelineHookContext now inherits from all sub-interfaces, maintaining full backwards compatibility while allowing consumers to depend on only the subset of functionality they need. Fixes #1454 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SummaryThis PR refactors Critical IssuesNone found ✅ SuggestionsTypos in XML Documentation (3 occurrences):
These are copy-paste errors from the original interface comments (which also had the same typo). Consider fixing all three occurrences across the new interfaces. Previous Review StatusNo previous comments found. Verdict✅ APPROVE - No critical issues The refactoring is clean and maintains backwards compatibility correctly. The |
Summary
IPipelineHookContext(27+ members) into 6 focused sub-interfaces to comply with the Interface Segregation Principle (ISP)IPipelineHookContextnow inherits from all sub-interfaces, maintaining full backwards compatibilityNew Interfaces
IPipelineServicesServiceProvider,Get<T>(),Configuration,PipelineOptionsIPipelineLoggingLoggerIPipelineToolsCommand,Powershell,Bash,Http,Downloader,InstallerIPipelineEncodingJson,Xml,Yaml,Hex,Base64,HasherIPipelineFileSystemFileSystem,Zip,ChecksumIPipelineEnvironmentEnvironment,BuildSystemDetectorTest plan
dotnet build src/ModularPipelines/ModularPipelines.csproj -c ReleaseIPipelineHookContextcontinues to workFixes #1454
🤖 Generated with Claude Code