AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-349
  5. changes
  6. pr_description.md
pr_description.md(1.3 KB)· Apr 8, 2026· 1 min read
  • Title
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

Title#

MT-5: Migrate PhaseHooksService from GitHubService to PlatformProvider

Problem#

PhaseHooksService was directly injected with GitHubService, coupling phase lifecycle hooks to GitHub-specific infrastructure. This blocks multi-platform support in the multi-tenant initiative.

Task / Link#

Closes #349 — Wave 2 consumer migration (depends on #345 PlatformProvider interface)

Changes#

  • Replace GitHubService injection in PhaseHooksService with @Inject(PLATFORM_PROVIDER) platform: PlatformProvider
  • Replace all this.github.* call sites with this.platform.*
  • Use optional chaining on setProjectItemStatus?.() for platforms without project boards
  • Replace GitHubModule import in PhaseHooksModule with PlatformModule
  • Add PlatformProvider interface, PlatformModule, and GitHubPlatformProvider implementation
  • Update spec to mock PLATFORM_PROVIDER token instead of GitHubService

Notes#

  • setProjectItemStatus is typed as optional on PlatformProvider — optional chaining is intentional and correct
  • PR should not merge until #345 lands on rc/multi-tenant (or base branch contains PlatformProvider)

Testing#

  • Unit tests: npm run test -- --testPathPatterns=phase-hooks — 36/36 passing
  • Lint: npm run lint — zero warnings
PrdAgent-runner