{
"issueNumber": 556,
"branchName": "feat/556-atlassian-mock-server",
"generatedAt": "2026-04-23T17:13:31Z",
"stories": [
{
"id": "S1",
"title": "Implement AtlassianMockServer class with lifecycle and request recording",
"priority": 1,
"dependsOn": [],
"acceptanceCriteria": [
"start() binds port 0 and returns a URL",
"stop() closes the server cleanly",
"Each request is recorded with method, path, query, headers, body",
"resetRequests() clears the in-memory log",
"Unknown routes return 404 with a 'unmocked route' marker and log the request"
],
"passes": false,
"completedAt": null
},
{
"id": "S2",
"title": "Add OAuth token stub endpoints",
"priority": 2,
"dependsOn": [
"S1"
],
"acceptanceCriteria": [
"POST /site/oauth2/access_token returns 200 with {access_token, token_type, expires_in, refresh_token}",
"POST /oauth/token returns the same canned shape",
"Responses do not expire within a test run"
],
"passes": false,
"completedAt": null
},
{
"id": "S3",
"title": "Add Bitbucket /2.0/* happy-path handlers",
"priority": 3,
"dependsOn": [
"S1"
],
"acceptanceCriteria": [
"Create/list/merge/close PR, updatePRBranch, postComment, editComment, label add/remove routes return 200 canned JSON",
"File get/put, branch create/delete/default-sha, commit-status, review-status routes return 200 canned JSON",
"Response shapes match Bitbucket Cloud v2 envelope conventions",
"Requests are recorded via the S1 recorder"
],
"passes": false,
"completedAt": null
},
{
"id": "S4",
"title": "Add Jira /ex/jira/{cloudId}/* happy-path handlers",
"priority": 4,
"dependsOn": [
"S1"
],
"acceptanceCriteria": [
"getIssue, comment post/edit, transitions list + POST, labels, assignee, priority, issueLink, JQL search all return 200 canned JSON",
"Response shapes match Jira Cloud REST v3 conventions",
"Requests are recorded via the S1 recorder"
],
"passes": false,
"completedAt": null
},
{
"id": "S5",
"title": "Wire globalSetup/globalTeardown into jest.e2e.config.js",
"priority": 5,
"dependsOn": [
"S1",
"S2",
"S3",
"S4"
],
"acceptanceCriteria": [
"globalSetup boots a singleton mock and stores it on globalThis",
"BITBUCKET_BASE_URL, JIRA_BASE_URL, BITBUCKET_OAUTH_URL, ATLASSIAN_OAUTH_URL env vars are set to the mock URL",
"globalTeardown stops the mock without leaking handles",
"jest.e2e.config.js references both files"
],
"passes": false,
"completedAt": null
},
{
"id": "S6",
"title": "Add unit spec for AtlassianMockServer",
"priority": 6,
"dependsOn": [
"S1",
"S2",
"S3",
"S4"
],
"acceptanceCriteria": [
"Spec passes under npm run test",
"Covers start/stop, at least one Bitbucket and one Jira route, OAuth stub, 404 path, resetRequests(), getRequests() shape"
],
"passes": false,
"completedAt": null
}
]
}