Skip to content

feat(integrations): add unified integration bootstrap#1041

Merged
aaight merged 1 commit intodevfrom
feature/unified-integration-bootstrap
Mar 24, 2026
Merged

feat(integrations): add unified integration bootstrap#1041
aaight merged 1 commit intodevfrom
feature/unified-integration-bootstrap

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 24, 2026

Summary

  • Creates src/integrations/bootstrap.ts as the canonical registration point for all 4 integrations (Trello, JIRA, GitHub, Sentry) into integrationRegistry
  • Updates src/router/index.ts to import the unified bootstrap instead of ../pm/bootstrap.js
  • Updates src/worker-entry.ts to import the unified bootstrap (previously had no integration bootstrap)
  • Registration is idempotent — all 4 registration blocks use getOrNull() guards before calling register()
  • src/pm/bootstrap.ts is unchanged and continues to work for backward compatibility

Closes card: https://trello.com/c/29Oiq2iN/547-as-a-developer-i-want-unified-integration-bootstrap-so-that-all-providers-register-in-one-place

Test plan

  • New tests/unit/integrations/bootstrap.test.ts verifies all 4 integrations are registered after importing bootstrap
  • Tests verify trello + jira are registered in both integrationRegistry and pmRegistry (backward compat)
  • Idempotency test confirms re-importing does not throw
  • All 357 unit test files pass (6863 tests)
  • Lint passes with zero errors
  • TypeScript type check passes with zero errors

🤖 Generated with Claude Code

🕵️ claude-code · claude-sonnet-4-6 · run details

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/router/index.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Clean, well-structured change that consolidates integration bootstrap into a single canonical module. The implementation is correct, idempotent, tests are thorough, and CI is fully green. Ready to merge.

Code Issues

Should Fix

  • src/integrations/bootstrap.ts:28 — The import '../integrations/registry.js' resolves correctly but is a redundant traversal since the file is already inside src/integrations/. Should be './registry.js' for clarity and consistency with how other local imports work.

Observations (non-blocking)

  • src/pm/bootstrap.ts is no longer imported by any production source file (only referenced as a stale mock in tests/unit/router/webhook-signature.test.ts:77). Consider removing it in a follow-up to avoid confusion about which bootstrap is canonical, or update the stale mock to reference the new path.
  • src/pm/index.ts still performs its own registration of Trello/Jira integrations at import time (without idempotency guards on pmRegistry). When pm/index.ts is eventually imported at runtime (via trigger handlers, gadgets, etc.), it creates new instances that overwrite the ones placed in pmRegistry by the bootstrap. The integrationRegistry guards prevent double registration there, so integrationRegistry and pmRegistry end up holding different object instances for the same providers. This is pre-existing and not introduced by this PR, but worth noting for future cleanup.

🕵️ claude-code · claude-opus-4-6 · run details

@aaight aaight merged commit 4a1397a into dev Mar 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants