feat(006/4): linear migrated — all PM providers now on manifest#1128
Merged
zbigniewsobiecki merged 2 commits intodevfrom Apr 16, 2026
Merged
feat(006/4): linear migrated — all PM providers now on manifest#1128zbigniewsobiecki merged 2 commits intodevfrom
zbigniewsobiecki merged 2 commits intodevfrom
Conversation
Completes the third and final PM-provider migration of spec 006. All three providers (Trello, JIRA, Linear) are now on the manifest pattern. Backend: - src/integrations/pm/linear/manifest.ts — wires LinearIntegration, LinearRouterAdapter, 3 Linear trigger handlers, LinearPlatformClient. verifyWebhookSignature uses the shared makeHmacSha256Verifier factory with header 'linear-signature' (no prefix). - src/integrations/pm/linear/index.ts — side-effect registration. - src/integrations/pm/index.ts — appends the linear barrel import. - src/triggers/builtins.ts — registerLinearTriggers call gone; every PM provider now contributes triggers via the manifest registry. SCM + alerting stay on legacy per spec scope. - src/router/worker-env.ts — Linear branch of extractProjectIdFromJob removed; the function now has zero PM-specific branches. Shared-helper adoption (collapses divergent copies that caused the session's production incidents): - src/router/platformClients/linear.ts — switched to linearAuthHeader from _shared/auth-headers. In-file Authorization construction deleted. - src/router/bot-identity-resolvers.ts — same adoption. - src/pm/linear/adapter.ts::resolveLabelId — delegates to _shared/label-id-resolver. Private helper + UUID_PATTERN constant deleted. Single source of truth for the UUID-validation rule. Frontend: - web/src/components/projects/pm-providers/linear/wizard.ts — linearProviderWizard composes useLinearDiscovery + useLinearLabelCreation inside useProviderHooks, plus the creatingSlot state + onCreateLabel / onCreateAllMissingLabels handlers using LINEAR_LABEL_DEFAULTS. - web/src/components/projects/pm-wizard.tsx — with all 3 providers on the manifest, the non-manifest fallback path is deleted entirely. Every PM provider renders via ManifestProviderWizardSection. The parent wizard no longer owns provider-specific hooks, state, or handlers. Tests: 7808/7808 pass. 15 new Linear manifest tests. Conformance harness runs 44 assertions (11 × TestProvider + Trello + JIRA + Linear). Build (backend + web), typecheck, lint all clean. Same deferrals as 006/2 and 006/3 (documented in .done plan): - bootstrap.ts Linear block stays until plan 006/5 migrates the ~dozen pmRegistry.get(...) callers. - createLinearLabel / createLinearLabels tRPC endpoints kept (additive consolidation only, not behavior-changing). Docs: README migration status updated. CHANGELOG entry added. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Plan 006/4 of spec 006: Linear is the third and final PM provider migrated onto the manifest pattern. All three providers (Trello, JIRA, Linear) are now on the manifest.
No operator-visible changes. Every PM wizard, webhook flow, trigger dispatch, and ack-comment path is byte-for-byte identical to
dev.What's landed
Backend
src/integrations/pm/linear/manifest.ts— wiresLinearIntegration,LinearRouterAdapter, 3 Linear trigger handlers,LinearPlatformClient. Uses the sharedmakeHmacSha256Verifier({ headerName: 'linear-signature' })factory — no prefix.src/integrations/pm/index.ts— appends the Linear barrel import.src/triggers/builtins.ts—registerLinearTriggerscall gone. Every PM provider contributes triggers via manifest iteration. SCM (GitHub) + alerting (Sentry) stay on legacy per spec scope.src/router/worker-env.ts::extractProjectIdFromJob— Linear branch removed. The function now has zero PM-specific branches — everything flows throughextractProjectIdFromJobViaRegistry.Shared-helper adoption (collapses the divergent copies that shipped production incidents)
src/router/platformClients/linear.ts— switched tolinearAuthHeaderfrom_shared/auth-headers. In-fileAuthorizationconstruction deleted.src/router/bot-identity-resolvers.ts— same adoption. Both call sites now impossible to diverge from the canonical helper.src/pm/linear/adapter.ts::resolveLabelId— delegates to_shared/label-id-resolver.resolveLabelId. Private helper +UUID_PATTERNconstant deleted. Single source of truth for the UUID-validation rule that lostcascade-processinglabels.Frontend
web/src/components/projects/pm-providers/linear/wizard.ts—linearProviderWizardcomposesuseLinearDiscovery+useLinearLabelCreationinsideuseProviderHooks, plus thecreatingSlotstate +onCreateLabel/onCreateAllMissingLabelshandlers usingLINEAR_LABEL_DEFAULTS.web/src/components/projects/pm-wizard.tsx— With all 3 providers on the manifest, the non-manifest fallback path is deleted entirely. Every PM provider renders via<ManifestProviderWizardSection>. The parent wizard no longer owns any provider-specific React hooks, ephemeral state, or handlers. Threestate.provider === '...'branches collapse to clean single-path renders.Tests
Lint + typecheck + backend build + web build all clean.
Deferred to plan 006/5 (same pattern as 006/2, 006/3)
src/integrations/bootstrap.ts. The ~dozenpmRegistry.get('trello' | 'jira' | 'linear')call sites (webhook handlers, manual runners, credential scoping, lifecycle) need migration topmProviderRegistry.get(id)?.pmIntegration. Plan 006/5 does this atomically.createLinearLabel/createLinearLabels(and Trello/JIRA equivalents) intopm.discovery.createLabel. Additive, not behavior-changing.After this PR merges
Spec AC coverage:
makeHmacSha256Verifierconsumed by JIRA + Linear + TestProvider)Post-merge verification
npm testgreen; lint + typecheck + backend build + web build all clean🤖 Generated with Claude Code