Conversation
…te legacy functions
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
nhopeatall
approved these changes
Apr 3, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM — clean migration from hardcoded standalone functions to the existing integrationRegistry pattern. All deleted functions are fully covered by their class-method equivalents, no remaining consumers of the removed exports, and the new createIntegrationChecker implementation correctly uses integrationRegistry.getByCategory() with OR semantics across registered providers.
Verified:
hasAlertingIntegration()inlined intoSentryAlertingIntegration.hasIntegration()is logically identical (both callgetSentryIntegrationConfigand check!== null)hasPmIntegration()andhasScmIntegration()logic already lived inTrelloIntegration/JiraIntegrationandGitHubSCMIntegrationrespectively — no behavioral change- No dangling imports of deleted
src/github/integration.ts,hasPmIntegration, orhasAlertingIntegrationin production code - The
IntegrationCategorytype ('pm' | 'scm' | 'alerting') exactly matches the hardcoded categories array increateIntegrationChecker - Integration test helper functions correctly replicate the registry-based pattern
- Unit tests for
createIntegrationCheckercover all key scenarios (per-category, empty registry, OR logic, projectId passthrough) - All CI checks pass
🕵️ claude-code · claude-opus-4-6 · run details
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
createIntegrationCheckerto useintegrationRegistry— Replaces three hardcoded dynamicimport()calls for legacy functions with a registry-based loop overintegrationRegistry.getByCategory(cat).hasIntegration(projectId)SentryAlertingIntegration.hasIntegration()self-contained — Inlines logic by callinggetSentryIntegrationConfigdirectly instead of delegating to the now-deletedhasAlertingIntegration()hasScmIntegration(),hasScmPersonaToken(),hasAlertingIntegration(),hasPmIntegration()and their test files; deletessrc/github/integration.tsentirelyChanges
Source
src/agents/capabilities/resolver.ts— Replaces dynamic imports + 3 hardcoded function calls with static import ofintegrationRegistryand a loop over categoriessrc/sentry/alerting-integration.ts— InlineshasIntegration()to callgetSentryIntegrationConfig()directlysrc/sentry/integration.ts— RemoveshasAlertingIntegration()standalone functionsrc/pm/integration.ts— RemoveshasPmIntegration()standalone function + cleans up unused importssrc/pm/index.ts— RemoveshasPmIntegrationre-exportsrc/github/integration.ts— Deleted (all logic already present inGitHubSCMIntegration)src/github/scm-integration.ts— Updates file-level commentdocs/architecture/04-agent-system.md— Updates mermaid diagram to reference registry patternTests
tests/unit/agents/capabilities/resolver.test.ts— Addsdescribe('createIntegrationChecker')with 8 tests mockingintegrationRegistry.getByCategory()tests/unit/sentry/integration.test.ts— RemoveshasAlertingIntegrationtests (function deleted)tests/unit/sentry/alerting-integration.test.ts— UpdateshasIntegrationtests for inlined logictests/unit/github/integration.test.ts— Deleted (functions deleted)tests/unit/pm/integration.test.ts— Deleted (function deleted)tests/integration/integration-validation.test.ts— Replaces direct legacy function imports with registry-based helpersTest plan
npm test— all 7241 unit tests passnpm run typecheck— no errorsnpm run lint— no errors (2 pre-existing warnings unrelated to this PR)Notes
integrationRegistryis a lightweight Map singletongetSentryIntegrationConfig()is preserved (still used by trigger handlers)Trello: https://trello.com/c/69ce1c0bed6950f676d4cc39
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details