Plan — BJ-18: E2E tier 2d-jira#
Summary#
Add a Jira E2E module to AgentSDE/agent-core-e2e on branch rc/atlassian-integration that drives the full jira:issue_created → comment → transition → jira:issue_updated cycle against the mock Jira server (from #556) using the webhook client (from #555), and asserts postComment and transitionIssue were called in order.
Files#
Path (in agent-core-e2e) | Action | Purpose |
|---|---|---|
test/jira/jira.intake-comment-transition.e2e-spec.ts | create | Scenario spec: webhook → agent run → mock assertions |
test/jira/fixtures/issue-created.json | create | jira:issue_created webhook payload fixture |
test/jira/fixtures/issue-updated.json | create | jira:issue_updated webhook payload fixture (user response) |
package.json | modify | Add test:module:jira and legacy alias test:tier2d-jira |
TEST_MODULES.md | modify | Register jira module row + mark as @integration |
test/README.md | modify | Add JIRA-01 entry under Tier 2 feature coverage |
Steps#
- Register
jiramodule: addtest:module:jiranpm script andtest:tier2d-jiraalias inpackage.json; add module row and agent-core path mapping (src/jira-adapter/**,src/atlassian/jira.service.ts) toTEST_MODULES.md. - Author fixtures in
test/jira/fixtures/matching theJiraAdapterwebhook schema delivered by #555/#556. - Implement scenario spec using
test/helpers/webhook-client.tsto POST Jira webhooks toAGENT_CORE_URL, and the mock-server assertion API from #556 to read recorded calls. - Assert: mock received
postComment(issueKey, body)thentransitionIssue(issueKey, transitionId)in that sequence; task state reaches a completed phase after theissue_updatedevent. - Tag the describe block
@integration @jiraand set timeout to 12 min (matchintake.happy-path); ensure scenario is skipped with a clear message if mock-server base URL env is unset. - Run
npm run test:module:jiraagainst the testing instance (port 8777) and confirm green.
Verification#
npm run test:module:jirapasses againsthttp://localhost:8777with mock server running.- Mock assertions confirm
postComment+transitionIssuecall order; failure messages identify which call was missed. - No regression:
npm run test:module:intakeandnpm run test:smokestill green.
Risks#
- Dependencies not yet landed: #550, #551, #555, #556 are all OPEN. This scenario depends on the mock server (#556) and webhook client/fixtures (#555); implementation is blocked until they merge to
rc/atlassian-integration. - Repo mismatch: issue is filed in
agent-corebut code lands inagent-core-e2e. Worktree at/home/agent/repos/agent-coreis wrong target; delivery must operate onagent-core-e2eat branchrc/atlassian-integration(branch not yet present in the e2e repo remote).
Assumptions#
- The repo's module-based convention (
test/<module>/<module>.<scenario>.e2e-spec.ts) supersedes the issue's legacytest/tiers/2d-jira/path; atest:tier2d-jirascript alias preserves the naming used by EPIC #539. - Mock server from #556 exposes an assertion API (recorded-calls endpoint) callable from the spec; if it only logs, the spec will poll the log endpoint.
- Single basic flow is sufficient for BJ-18; additional variants are tracked separately.
Open Questions#
- Does
rc/atlassian-integrationexist inagent-core-e2e, or should the first dependency PR create it? Plan assumes prior wave PRs create it.