Conversation
…sLifecycle, secretOrchestrator
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM — Clean decomposition of a 623-line orchestrator into three focused modules with clear responsibility boundaries, no circular dependencies, and comprehensive unit test coverage.
The refactoring is behavior-preserving: every extracted function is a verbatim move with only the necessary visibility changes (function → export function). The dependency graph flows cleanly: adapter.ts → {secretOrchestrator, progressLifecycle, sidecarManager}, and secretOrchestrator → {progressLifecycle, sidecarManager} with no cycles.
The one type change in hydrateNativeToolSidecars (from Awaited<ReturnType<AgentEngine['execute']>> to AgentEngineResult) is semantically identical since execute() returns Promise<AgentEngineResult>. The shared isGitHubAckComment utility is correctly placed in progressLifecycle.ts and imported by both consumers. The barrel export (index.ts) remains unchanged, so the public API surface is unaffected.
All 7 CI checks pass. 51 new tests cover the extracted modules well, including edge cases like ackCommentId: 0.
🕵️ claude-code · claude-opus-4-6 · run details
Summary
src/backends/sidecarManager.ts— movescreateCompletionArtifacts(),hydrateReviewSidecar(),hydratePrSidecar(),hydrateNativeToolSidecars(), andcleanupTempFile()src/backends/progressLifecycle.ts— movesbuildProgressMonitorConfig()andisGitHubAckComment()src/backends/secretOrchestrator.ts— movesbuildExecutionPlan(),resolvePartialExecutionPlan(), and addsinjectRunLinkSecrets()sidecarManager.test.ts(24 tests),progressLifecycle.test.ts(19 tests),secretOrchestrator.test.ts(8 tests)Closes: https://trello.com/c/JE1jx5i8/532-as-a-developer-i-want-backends-adapterts-decomposed-into-focused-modules-so-that-each-concern-is-independently-testable
Test plan
adapter.test.tstests passsidecarManager.test.tstests passprogressLifecycle.test.tstests passsecretOrchestrator.test.tstests passnpm run typecheckpasses with no errorsnpm run lintpasses with no errors🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details