Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The new registry-driven validateIntegrations() calls integrationRegistry.getByCategory() which requires integrations to be registered first. Without importing the bootstrap module, the registry is empty and all validations report "none is registered" instead of actually checking project credentials against the database. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI Failures ResolvedFixes Applied
Verification
🕵️ claude-code · claude-sonnet-4-6 · run details |
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
Clean refactor that replaces hardcoded switch-case validation with registry-driven lookup. The change correctly closes the gap where the alerting category silently passed validation via default: return null, and makes the system extensible to new integration categories without code changes.
All CI checks pass. The implementation correctly uses the existing integrationRegistry.getByCategory() API, the SCMIntegration type guard is sound, and the two-tier error messaging ("none is registered" vs "none is configured") gives clearer diagnostics than before.
LGTM — no blocking issues found.
🕵️ claude-code · claude-opus-4-6 · run details
Summary
src/triggers/shared/integration-validation.ts— usesintegrationRegistry.getByCategory()instead of hardcoded category branchesalertingagent now properly validates that Sentry is configured before running (was silently passing viadefault: return null)SCMIntegrationto callhasPersonaToken()as beforeTechnical Details
Key changes in
src/triggers/shared/integration-validation.tsvalidatePmIntegration()andvalidateScmIntegration()helper functions (category-specific switch branches)isScmIntegration()type guard to narrow registry results toSCMIntegrationfor persona token checkingnotConfiguredError()helper for building user-friendly error messages per categoryvalidateScmPersonaToken()helper to reduce cognitive complexityvalidateCategory()helper that centralizes per-category validation logicvalidateIntegrations()now simply maps required categories throughvalidateCategory()and awaits in parallelhasScmIntegration,hasScmPersonaToken, andhasPmIntegration— validation now goes through the registryKey changes in
tests/unit/triggers/shared/integration-validation.test.tsintegrationRegistry.getByCategoryinstead of individualhasPmIntegration/hasScmIntegration/hasScmPersonaTokenfunctionsmockIntegration()helper for building typed mock integration objectsTest plan
npx vitest run tests/unit/triggers/shared/integration-validation.test.ts— 17 tests passnpm test— 6876 tests pass across 357 filesnpx tsc --noEmit— zero errorsnpm run lint— zero warnings/errorsCard: https://trello.com/c/Ij85dvbs/548-as-a-developer-i-want-integration-validationts-to-use-the-unified-registry-so-that-alerting-validation-is-supported
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details