Skip to content

feat(006/3): jira migrated onto PM provider manifest#1127

Merged
zbigniewsobiecki merged 2 commits intodevfrom
feat/006-migrate-jira
Apr 16, 2026
Merged

feat(006/3): jira migrated onto PM provider manifest#1127
zbigniewsobiecki merged 2 commits intodevfrom
feat/006-migrate-jira

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

Plan 006/3 of spec 006: JIRA joins Trello on the manifest pattern.

No operator-visible changes. JIRA wizard UX, webhook flow, trigger dispatch, and ack-comment behavior are byte-for-byte identical to dev.

What's landed

Backend

  • src/integrations/pm/jira/manifest.ts — wires JiraIntegration, JiraRouterAdapter, all 3 JIRA trigger handlers, JiraPlatformClient. First consumer of the shared makeHmacSha256Verifier factory (landed in 006/1). JIRA signs HMAC-SHA256 of the body with sha256=<hex> in X-Hub-Signature — maps cleanly.
  • src/integrations/pm/index.ts — appends the JIRA barrel import.
  • src/triggers/builtins.tsregisterJiraTriggers call removed; manifest iteration handles JIRA triggers.
  • src/router/worker-env.ts::extractProjectIdFromJob — JIRA branch removed.

Frontend

  • web/src/components/projects/pm-providers/jira/wizard.tsjiraProviderWizard composes useJiraDiscovery + useJiraCustomFieldCreation inside useProviderHooks. Three step adapters bridge the generic renderer shape to the existing JIRA step components — which stay unchanged.
  • web/src/components/projects/pm-wizard.tsxuseJiraDiscovery, useJiraCustomFieldCreation, handleCreateJiraCostField, and creatingJiraCostField state are gone from the parent wizard. With both Trello (006/2) and JIRA (006/3) on the manifest, the three per-step render branches collapse — the non-manifest fallback is now Linear-only (006/4 migrates it).

Plan drift note

Plan 006/3 task 1's test list claimed credentialRoles includes email + api_token + base_url (required). Corrected at implementation time: base_url is an integration-config field, not a credential role. The credential roles are email + api_token (required) + webhook_secret (optional), per src/config/integrationRoles.ts. Documented in the .done plan.

Tests

  • 7782 / 7782 tests pass
  • 16 new JIRA manifest tests (identity, credentialRoles — including an explicit assertion that base_url is NOT a credential role, HMAC-SHA256 happy/tamper/missing-header/opt-out, extractProjectIdFromJob, platform client, routerAdapter/pmIntegration wiring, triggerHandlers list)
  • Conformance harness now runs 33 tests (11 × TestProvider + Trello + JIRA)
  • Existing JIRA unit + integration + SSR tests all green

Build (backend + web), typecheck, lint all clean.

Deferred to plan 006/5 (same as 006/2)

  • Removing JIRA from src/integrations/bootstrap.ts — multiple pmRegistry.get('jira') call sites still depend on the legacy registration.
  • Consolidating createJiraCustomField tRPC endpoint into pm.discovery.createCustomField — additive, not behavior-changing.

Post-merge verification

  • Local: full npm test green; lint + typecheck + backend build + web build all clean
  • After deploy-dev: exercise the JIRA wizard end-to-end — project selection, status mappings, create cost custom field, save. Byte-for-byte identical expected.
  • Trigger a JIRA webhook (status change, comment mention, label added) and confirm agent dispatch fires via the manifest path.

🤖 Generated with Claude Code

zbigniewsobiecki and others added 2 commits April 16, 2026 13:03
Mirror of 006/2 for JIRA.

Backend:
- src/integrations/pm/jira/manifest.ts — wires JiraIntegration,
  JiraRouterAdapter, all 3 JIRA trigger handlers, JiraPlatformClient.
  verifyWebhookSignature uses the shared makeHmacSha256Verifier factory
  from 006/1 — JIRA is the first consumer since Trello's scheme is
  bespoke. Header: 'x-hub-signature' with 'sha256=' prefix, hex.
- src/integrations/pm/jira/index.ts — registers via side effect.
- src/integrations/pm/index.ts — appends the jira barrel import.
- src/triggers/builtins.ts — registerJiraTriggers removed; manifest
  iteration handles it.
- src/router/worker-env.ts — jira branch of extractProjectIdFromJob
  removed (registry handles it via manifest.extractProjectIdFromJob).

Frontend:
- web/src/components/projects/pm-providers/jira/wizard.ts —
  jiraProviderWizard composes useJiraDiscovery +
  useJiraCustomFieldCreation inside useProviderHooks. Three step adapters
  in adapters.tsx destructure providerHooks into the existing JIRA step
  component prop shape — implementations unchanged.
- pm-wizard.tsx — removed useJiraDiscovery +
  useJiraCustomFieldCreation + handleCreateJiraCostField +
  creatingJiraCostField state. The three per-step render branches
  collapse: with both Trello and JIRA on manifest, the non-manifest
  fallback is now Linear-only.

Credential roles for JIRA: email + api_token (required) +
webhook_secret (optional). Plan had a drift (claimed base_url was a
credential role) — corrected: base_url is an integration-config field,
not a credential.

Tests: 7782/7782 pass. 16 new JIRA manifest tests. Conformance harness
now runs 33 assertions (11 × TestProvider + Trello + JIRA).

Tests that exercise JIRA-typed jobs (worker-env, container-manager) and
the builtins-triggers mock all picked up with JIRA manifest side-effect
imports.

Same deferrals as 006/2 (documented in .done plan):
- bootstrap.ts JIRA block stays until plan 006/5 migrates pmRegistry.get('jira') callers.
- createJiraCustomField tRPC endpoint kept (additive consolidation).

Docs: README migration status note updated. CHANGELOG entry added.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zbigniewsobiecki zbigniewsobiecki merged commit 0ed056f into dev Apr 16, 2026
9 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the feat/006-migrate-jira branch April 16, 2026 13:16
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.

1 participant