github-issue-tower-defence-management 1.170.1 → 1.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/bin/adapter/entry-points/console/ui-dist/assets/index-Bh2slMtk.css +2 -0
- package/bin/adapter/entry-points/console/ui-dist/assets/{index-Db4JRB24.js → index-ZYMkO0fm.js} +2 -2
- package/bin/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/bin/domain/usecases/ClearPastNextActionDateHourUseCase.js +2 -1
- package/bin/domain/usecases/ClearPastNextActionDateHourUseCase.js.map +1 -1
- package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js +4 -6
- package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js.map +1 -1
- package/bin/domain/usecases/StartPreparationUseCase.js +10 -10
- package/bin/domain/usecases/StartPreparationUseCase.js.map +1 -1
- package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js +1 -0
- package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js.map +1 -1
- package/bin/domain/usecases/issueReactivationTriggerIsPending.js +14 -0
- package/bin/domain/usecases/issueReactivationTriggerIsPending.js.map +1 -0
- package/package.json +1 -1
- package/src/adapter/entry-points/console/ui/e2e/consoleScenario.spec.ts +26 -0
- package/src/adapter/entry-points/console/ui/e2e/consoleTestHarness.ts +13 -7
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.stories.tsx +32 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.test.tsx +29 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.tsx +3 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleItemSummary.stories.tsx +4 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleItemSummary.test.tsx +49 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleItemSummary.tsx +7 -0
- package/src/adapter/entry-points/console/ui/src/features/console/hooks/useConsoleDetailPrefetch.test.ts +1 -0
- package/src/adapter/entry-points/console/ui/src/features/console/hooks/useConsoleItemDetailData.test.ts +1 -0
- package/src/adapter/entry-points/console/ui/src/features/console/logic/grouping.test.ts +1 -0
- package/src/adapter/entry-points/console/ui/src/features/console/logic/overlay.test.ts +1 -0
- package/src/adapter/entry-points/console/ui/src/features/console/logic/types.ts +1 -0
- package/src/adapter/entry-points/console/ui/src/features/console/testing/fixtures.ts +25 -0
- package/src/adapter/entry-points/console/ui/src/index.css +10 -0
- package/src/adapter/entry-points/console/ui-dist/assets/index-Bh2slMtk.css +2 -0
- package/src/adapter/entry-points/console/ui-dist/assets/{index-Db4JRB24.js → index-ZYMkO0fm.js} +2 -2
- package/src/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/src/adapter/entry-points/handlers/FileSystemConsoleTabsRepository.test.ts +1 -0
- package/src/domain/usecases/ClearPastNextActionDateHourUseCase.ts +2 -5
- package/src/domain/usecases/NotifyFinishedIssuePreparationUseCase.test.ts +1 -1
- package/src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts +4 -12
- package/src/domain/usecases/StartPreparationUseCase.ts +15 -20
- package/src/domain/usecases/console/GenerateConsoleListsUseCase.test.ts +20 -0
- package/src/domain/usecases/console/GenerateConsoleListsUseCase.ts +2 -0
- package/src/domain/usecases/issueReactivationTriggerIsPending.test.ts +530 -0
- package/src/domain/usecases/issueReactivationTriggerIsPending.ts +23 -0
- package/types/domain/usecases/ClearPastNextActionDateHourUseCase.d.ts.map +1 -1
- package/types/domain/usecases/NotifyFinishedIssuePreparationUseCase.d.ts.map +1 -1
- package/types/domain/usecases/StartPreparationUseCase.d.ts.map +1 -1
- package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts +1 -0
- package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts.map +1 -1
- package/types/domain/usecases/issueReactivationTriggerIsPending.d.ts +4 -0
- package/types/domain/usecases/issueReactivationTriggerIsPending.d.ts.map +1 -0
- package/bin/adapter/entry-points/console/ui-dist/assets/index-U8I8ESZj.css +0 -2
- package/src/adapter/entry-points/console/ui-dist/assets/index-U8I8ESZj.css +0 -2
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import {
|
|
2
|
+
issueReactivationTriggerIsPending,
|
|
3
|
+
issueReactivationTriggerStartOfTomorrow,
|
|
4
|
+
} from './issueReactivationTriggerIsPending';
|
|
5
|
+
import { StartPreparationUseCase } from './StartPreparationUseCase';
|
|
6
|
+
import { NotifyFinishedIssuePreparationUseCase } from './NotifyFinishedIssuePreparationUseCase';
|
|
7
|
+
import { Issue } from '../entities/Issue';
|
|
8
|
+
import { Project } from '../entities/Project';
|
|
9
|
+
import { StoryObjectMap } from '../entities/StoryObjectMap';
|
|
10
|
+
import { IssueRepository } from './adapter-interfaces/IssueRepository';
|
|
11
|
+
import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
|
|
12
|
+
import { LocalCommandRunner } from './adapter-interfaces/LocalCommandRunner';
|
|
13
|
+
import { ClaudeTokenUsageRepository } from './adapter-interfaces/ClaudeTokenUsageRepository';
|
|
14
|
+
import { TakeOwnershipSpawnRepository } from './adapter-interfaces/TakeOwnershipSpawnRepository';
|
|
15
|
+
import { IssueCommentRepository } from './adapter-interfaces/IssueCommentRepository';
|
|
16
|
+
import { WebhookRepository } from './adapter-interfaces/WebhookRepository';
|
|
17
|
+
|
|
18
|
+
const createMinimalIssue = (overrides: Partial<Issue> = {}): Issue => ({
|
|
19
|
+
nameWithOwner: 'user/repo',
|
|
20
|
+
number: 1,
|
|
21
|
+
title: 'Test Issue',
|
|
22
|
+
state: 'OPEN',
|
|
23
|
+
status: 'Awaiting Workspace',
|
|
24
|
+
story: 'Default Story',
|
|
25
|
+
nextActionDate: null,
|
|
26
|
+
nextActionHour: null,
|
|
27
|
+
estimationMinutes: null,
|
|
28
|
+
dependedIssueUrls: [],
|
|
29
|
+
completionDate50PercentConfidence: null,
|
|
30
|
+
url: 'https://github.com/user/repo/issues/1',
|
|
31
|
+
assignees: ['manager-user'],
|
|
32
|
+
labels: [],
|
|
33
|
+
org: 'user',
|
|
34
|
+
repo: 'repo',
|
|
35
|
+
body: '',
|
|
36
|
+
itemId: 'item-1',
|
|
37
|
+
isPr: false,
|
|
38
|
+
isInProgress: false,
|
|
39
|
+
isClosed: false,
|
|
40
|
+
createdAt: new Date(),
|
|
41
|
+
author: 'testuser',
|
|
42
|
+
closingIssueReferenceUrls: [],
|
|
43
|
+
agent: null,
|
|
44
|
+
...overrides,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const createSpawnMockProject = (): Project => ({
|
|
48
|
+
id: 'project-1',
|
|
49
|
+
url: 'https://github.com/users/user/projects/1',
|
|
50
|
+
databaseId: 1,
|
|
51
|
+
name: 'Test Project',
|
|
52
|
+
status: {
|
|
53
|
+
name: 'Status',
|
|
54
|
+
fieldId: 'status-field-id',
|
|
55
|
+
statuses: [
|
|
56
|
+
{
|
|
57
|
+
id: 'awaiting-ws-id',
|
|
58
|
+
name: 'Awaiting Workspace',
|
|
59
|
+
color: 'GRAY',
|
|
60
|
+
description: '',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'preparation-id',
|
|
64
|
+
name: 'Preparation',
|
|
65
|
+
color: 'YELLOW',
|
|
66
|
+
description: '',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
nextActionDate: null,
|
|
71
|
+
nextActionHour: null,
|
|
72
|
+
story: null,
|
|
73
|
+
remainingEstimationMinutes: null,
|
|
74
|
+
dependedIssueUrlSeparatedByComma: null,
|
|
75
|
+
completionDate50PercentConfidence: null,
|
|
76
|
+
agent: null,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const createNotifyMockProject = (): Project => ({
|
|
80
|
+
id: 'notify-project-1',
|
|
81
|
+
url: 'https://github.com/users/user/projects/2',
|
|
82
|
+
databaseId: 2,
|
|
83
|
+
name: 'Notify Project',
|
|
84
|
+
status: {
|
|
85
|
+
name: 'Status',
|
|
86
|
+
fieldId: 'status-field-id',
|
|
87
|
+
statuses: [
|
|
88
|
+
{
|
|
89
|
+
id: 'awaiting-ws-id',
|
|
90
|
+
name: 'Awaiting Workspace',
|
|
91
|
+
color: 'GRAY',
|
|
92
|
+
description: '',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 'preparation-id',
|
|
96
|
+
name: 'Preparation',
|
|
97
|
+
color: 'YELLOW',
|
|
98
|
+
description: '',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'failed-prep-id',
|
|
102
|
+
name: 'Failed Preparation',
|
|
103
|
+
color: 'RED',
|
|
104
|
+
description: '',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 'awaiting-qc-id',
|
|
108
|
+
name: 'Awaiting Quality Check',
|
|
109
|
+
color: 'BLUE',
|
|
110
|
+
description: '',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
nextActionDate: null,
|
|
115
|
+
nextActionHour: null,
|
|
116
|
+
story: null,
|
|
117
|
+
remainingEstimationMinutes: null,
|
|
118
|
+
dependedIssueUrlSeparatedByComma: null,
|
|
119
|
+
completionDate50PercentConfidence: null,
|
|
120
|
+
agent: null,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
const createStoryObjectMap = (issues: Issue[]): StoryObjectMap => {
|
|
124
|
+
const map: StoryObjectMap = new Map();
|
|
125
|
+
map.set('Default Story', {
|
|
126
|
+
story: {
|
|
127
|
+
id: 'story-1',
|
|
128
|
+
name: 'Default Story',
|
|
129
|
+
color: 'GRAY',
|
|
130
|
+
description: '',
|
|
131
|
+
},
|
|
132
|
+
storyIssue: null,
|
|
133
|
+
issues,
|
|
134
|
+
});
|
|
135
|
+
return map;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
describe('issueReactivationTriggerIsPending', () => {
|
|
139
|
+
it.each([
|
|
140
|
+
{
|
|
141
|
+
label: 'returns false when no trigger is set',
|
|
142
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
143
|
+
nextActionDate: null,
|
|
144
|
+
nextActionHour: null,
|
|
145
|
+
expected: false,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
label: 'returns true when nextActionDate is tomorrow',
|
|
149
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
150
|
+
nextActionDate: new Date(2026, 0, 16),
|
|
151
|
+
nextActionHour: null,
|
|
152
|
+
expected: true,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
label: 'returns false when nextActionDate is today',
|
|
156
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
157
|
+
nextActionDate: new Date(2026, 0, 15),
|
|
158
|
+
nextActionHour: null,
|
|
159
|
+
expected: false,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
label: 'returns false when nextActionDate is in the past',
|
|
163
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
164
|
+
nextActionDate: new Date(2026, 0, 14),
|
|
165
|
+
nextActionHour: null,
|
|
166
|
+
expected: false,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: 'returns true when nextActionHour is in the future',
|
|
170
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
171
|
+
nextActionDate: null,
|
|
172
|
+
nextActionHour: 11,
|
|
173
|
+
expected: true,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
label: 'returns false when nextActionHour exactly equals current hour',
|
|
177
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
178
|
+
nextActionDate: null,
|
|
179
|
+
nextActionHour: 10,
|
|
180
|
+
expected: false,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
label: 'returns false when nextActionHour is in the past',
|
|
184
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
185
|
+
nextActionDate: null,
|
|
186
|
+
nextActionHour: 9,
|
|
187
|
+
expected: false,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
label: 'returns true when date is future and hour has been reached',
|
|
191
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
192
|
+
nextActionDate: new Date(2026, 0, 16),
|
|
193
|
+
nextActionHour: 9,
|
|
194
|
+
expected: true,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
label:
|
|
198
|
+
'returns true when nextActionDate is future (production ISO form new Date("YYYY-MM-DD"))',
|
|
199
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
200
|
+
nextActionDate: new Date('2026-01-16'),
|
|
201
|
+
nextActionHour: null,
|
|
202
|
+
expected: true,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
label:
|
|
206
|
+
'returns false when nextActionDate is today (production ISO form new Date("YYYY-MM-DD"))',
|
|
207
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
208
|
+
nextActionDate: new Date('2026-01-15'),
|
|
209
|
+
nextActionHour: null,
|
|
210
|
+
expected: false,
|
|
211
|
+
},
|
|
212
|
+
])('$label', ({ now, nextActionDate, nextActionHour, expected }) => {
|
|
213
|
+
const result = issueReactivationTriggerIsPending(
|
|
214
|
+
{ nextActionDate, nextActionHour },
|
|
215
|
+
now,
|
|
216
|
+
);
|
|
217
|
+
expect(result).toBe(expected);
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
describe('issueReactivationTriggerStartOfTomorrow', () => {
|
|
222
|
+
it('returns midnight of the following day', () => {
|
|
223
|
+
const result = issueReactivationTriggerStartOfTomorrow(
|
|
224
|
+
new Date(2026, 0, 15, 10, 30, 0),
|
|
225
|
+
);
|
|
226
|
+
expect(result).toEqual(new Date(2026, 0, 16, 0, 0, 0));
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it('handles month-end rollover correctly', () => {
|
|
230
|
+
const result = issueReactivationTriggerStartOfTomorrow(
|
|
231
|
+
new Date(2026, 0, 31, 23, 59, 0),
|
|
232
|
+
);
|
|
233
|
+
expect(result).toEqual(new Date(2026, 1, 1, 0, 0, 0));
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
describe('spawn and finish sides agree on the reactivation trigger predicate', () => {
|
|
238
|
+
const agreementCases: Array<{
|
|
239
|
+
label: string;
|
|
240
|
+
now: Date;
|
|
241
|
+
nextActionDate: Date | null;
|
|
242
|
+
nextActionHour: number | null;
|
|
243
|
+
}> = [
|
|
244
|
+
{
|
|
245
|
+
label: 'no trigger set',
|
|
246
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
247
|
+
nextActionDate: null,
|
|
248
|
+
nextActionHour: null,
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
label: 'nextActionDate is tomorrow (future)',
|
|
252
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
253
|
+
nextActionDate: new Date(2026, 0, 16),
|
|
254
|
+
nextActionHour: null,
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
label: 'nextActionDate is today (trigger reached)',
|
|
258
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
259
|
+
nextActionDate: new Date(2026, 0, 15),
|
|
260
|
+
nextActionHour: null,
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
label: 'nextActionDate is in the past',
|
|
264
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
265
|
+
nextActionDate: new Date(2026, 0, 14),
|
|
266
|
+
nextActionHour: null,
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
label: 'nextActionHour is in the future',
|
|
270
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
271
|
+
nextActionDate: null,
|
|
272
|
+
nextActionHour: 11,
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
label: 'nextActionHour exactly equals current hour (boundary)',
|
|
276
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
277
|
+
nextActionDate: null,
|
|
278
|
+
nextActionHour: 10,
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
label: 'nextActionHour is in the past',
|
|
282
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
283
|
+
nextActionDate: null,
|
|
284
|
+
nextActionHour: 9,
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
label: 'date and hour together: future date with reached hour',
|
|
288
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
289
|
+
nextActionDate: new Date(2026, 0, 16),
|
|
290
|
+
nextActionHour: 9,
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
label: 'date and hour together: future date with unreached hour',
|
|
294
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
295
|
+
nextActionDate: new Date(2026, 0, 16),
|
|
296
|
+
nextActionHour: 11,
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
label: 'production ISO date form: nextActionDate is future',
|
|
300
|
+
now: new Date(2026, 0, 15, 10, 0, 0),
|
|
301
|
+
nextActionDate: new Date('2026-01-16'),
|
|
302
|
+
nextActionHour: null,
|
|
303
|
+
},
|
|
304
|
+
];
|
|
305
|
+
|
|
306
|
+
describe.each(agreementCases)(
|
|
307
|
+
'$label',
|
|
308
|
+
({ now, nextActionDate, nextActionHour }) => {
|
|
309
|
+
let spawnMockIssueRepository: jest.Mocked<
|
|
310
|
+
Pick<
|
|
311
|
+
IssueRepository,
|
|
312
|
+
| 'getStoryObjectMap'
|
|
313
|
+
| 'getAllOpened'
|
|
314
|
+
| 'updateStatus'
|
|
315
|
+
| 'findRelatedOpenPRs'
|
|
316
|
+
| 'getOpenPullRequest'
|
|
317
|
+
| 'closePullRequest'
|
|
318
|
+
| 'deletePullRequestBranch'
|
|
319
|
+
| 'createCommentByUrl'
|
|
320
|
+
| 'setIssueAgentField'
|
|
321
|
+
| 'removeLabel'
|
|
322
|
+
>
|
|
323
|
+
>;
|
|
324
|
+
let spawnMockProjectRepository: jest.Mocked<
|
|
325
|
+
Pick<ProjectRepository, 'getByUrl' | 'createField' | 'updateAgentList'>
|
|
326
|
+
>;
|
|
327
|
+
let spawnMockLocalCommandRunner: jest.Mocked<LocalCommandRunner>;
|
|
328
|
+
let spawnMockClaudeTokenUsageRepository: jest.Mocked<ClaudeTokenUsageRepository>;
|
|
329
|
+
let spawnMockTakeOwnershipSpawnRepository: jest.Mocked<TakeOwnershipSpawnRepository>;
|
|
330
|
+
let spawnUseCase: StartPreparationUseCase;
|
|
331
|
+
|
|
332
|
+
let notifyMockIssueRepository: jest.Mocked<
|
|
333
|
+
Pick<
|
|
334
|
+
IssueRepository,
|
|
335
|
+
| 'get'
|
|
336
|
+
| 'update'
|
|
337
|
+
| 'updateStatus'
|
|
338
|
+
| 'updateLabels'
|
|
339
|
+
| 'getOrCreateLabel'
|
|
340
|
+
| 'findRelatedOpenPRs'
|
|
341
|
+
| 'getStoryObjectMap'
|
|
342
|
+
| 'getOpenPullRequest'
|
|
343
|
+
| 'getPullRequestChangedFilePaths'
|
|
344
|
+
| 'approvePullRequest'
|
|
345
|
+
| 'requestChangesWithInlineComment'
|
|
346
|
+
| 'setDependedIssueUrl'
|
|
347
|
+
| 'setIssueAgentField'
|
|
348
|
+
| 'searchIssue'
|
|
349
|
+
| 'createNewIssue'
|
|
350
|
+
>
|
|
351
|
+
>;
|
|
352
|
+
let notifyMockIssueCommentRepository: jest.Mocked<
|
|
353
|
+
Pick<IssueCommentRepository, 'getCommentsFromIssue' | 'createComment'>
|
|
354
|
+
>;
|
|
355
|
+
let notifyMockProjectRepository: jest.Mocked<
|
|
356
|
+
Pick<ProjectRepository, 'getByUrl' | 'updateAgentList' | 'createField'>
|
|
357
|
+
>;
|
|
358
|
+
let notifyMockWebhookRepository: jest.Mocked<
|
|
359
|
+
Pick<WebhookRepository, 'sendGetRequest'>
|
|
360
|
+
>;
|
|
361
|
+
let notifyUseCase: NotifyFinishedIssuePreparationUseCase;
|
|
362
|
+
|
|
363
|
+
beforeEach(() => {
|
|
364
|
+
jest.resetAllMocks();
|
|
365
|
+
jest.useFakeTimers().setSystemTime(now);
|
|
366
|
+
|
|
367
|
+
const spawnProject = createSpawnMockProject();
|
|
368
|
+
spawnMockProjectRepository = {
|
|
369
|
+
getByUrl: jest.fn().mockResolvedValue(spawnProject),
|
|
370
|
+
createField: jest.fn().mockResolvedValue(undefined),
|
|
371
|
+
updateAgentList: jest.fn().mockResolvedValue([]),
|
|
372
|
+
};
|
|
373
|
+
spawnMockIssueRepository = {
|
|
374
|
+
getStoryObjectMap: jest
|
|
375
|
+
.fn()
|
|
376
|
+
.mockResolvedValue(
|
|
377
|
+
createStoryObjectMap([
|
|
378
|
+
createMinimalIssue({ nextActionDate, nextActionHour }),
|
|
379
|
+
]),
|
|
380
|
+
),
|
|
381
|
+
getAllOpened: jest.fn().mockResolvedValue([]),
|
|
382
|
+
updateStatus: jest.fn().mockResolvedValue(undefined),
|
|
383
|
+
findRelatedOpenPRs: jest.fn().mockResolvedValue([]),
|
|
384
|
+
getOpenPullRequest: jest.fn().mockResolvedValue(null),
|
|
385
|
+
closePullRequest: jest.fn().mockResolvedValue(undefined),
|
|
386
|
+
deletePullRequestBranch: jest.fn().mockResolvedValue(undefined),
|
|
387
|
+
createCommentByUrl: jest.fn().mockResolvedValue(undefined),
|
|
388
|
+
setIssueAgentField: jest.fn().mockResolvedValue(undefined),
|
|
389
|
+
removeLabel: jest.fn().mockResolvedValue(undefined),
|
|
390
|
+
};
|
|
391
|
+
spawnMockLocalCommandRunner = {
|
|
392
|
+
runCommand: jest
|
|
393
|
+
.fn()
|
|
394
|
+
.mockResolvedValue({ stdout: '', stderr: '', exitCode: 0 }),
|
|
395
|
+
};
|
|
396
|
+
spawnMockClaudeTokenUsageRepository = {
|
|
397
|
+
ensureObservable: jest.fn().mockResolvedValue(undefined),
|
|
398
|
+
getAvailableTokenUsages: jest.fn().mockResolvedValue([]),
|
|
399
|
+
getTokenInFlightCounts: jest.fn().mockResolvedValue({}),
|
|
400
|
+
proxyBaseUrl: jest.fn().mockReturnValue('http://127.0.0.1:8787'),
|
|
401
|
+
};
|
|
402
|
+
spawnMockTakeOwnershipSpawnRepository = {
|
|
403
|
+
listSpawns: jest.fn().mockReturnValue([]),
|
|
404
|
+
listRunningIssueUrls: jest.fn().mockReturnValue([]),
|
|
405
|
+
};
|
|
406
|
+
spawnUseCase = new StartPreparationUseCase(
|
|
407
|
+
spawnMockProjectRepository,
|
|
408
|
+
spawnMockIssueRepository,
|
|
409
|
+
spawnMockLocalCommandRunner,
|
|
410
|
+
spawnMockClaudeTokenUsageRepository,
|
|
411
|
+
spawnMockTakeOwnershipSpawnRepository,
|
|
412
|
+
);
|
|
413
|
+
|
|
414
|
+
const notifyProject = createNotifyMockProject();
|
|
415
|
+
notifyMockProjectRepository = {
|
|
416
|
+
getByUrl: jest.fn().mockResolvedValue(notifyProject),
|
|
417
|
+
updateAgentList: jest.fn().mockResolvedValue([]),
|
|
418
|
+
createField: jest.fn().mockResolvedValue(undefined),
|
|
419
|
+
};
|
|
420
|
+
notifyMockIssueRepository = {
|
|
421
|
+
get: jest.fn().mockResolvedValue(
|
|
422
|
+
createMinimalIssue({
|
|
423
|
+
status: 'Preparation',
|
|
424
|
+
nextActionDate,
|
|
425
|
+
nextActionHour,
|
|
426
|
+
}),
|
|
427
|
+
),
|
|
428
|
+
update: jest.fn().mockResolvedValue(undefined),
|
|
429
|
+
updateStatus: jest.fn().mockResolvedValue(undefined),
|
|
430
|
+
updateLabels: jest.fn().mockResolvedValue(undefined),
|
|
431
|
+
getOrCreateLabel: jest.fn().mockResolvedValue(undefined),
|
|
432
|
+
findRelatedOpenPRs: jest.fn().mockResolvedValue([
|
|
433
|
+
{
|
|
434
|
+
url: 'https://github.com/user/repo/pull/1',
|
|
435
|
+
isConflicted: false,
|
|
436
|
+
isPassedAllCiJob: true,
|
|
437
|
+
isCiStateSuccess: true,
|
|
438
|
+
isResolvedAllReviewComments: true,
|
|
439
|
+
isBranchOutOfDate: false,
|
|
440
|
+
missingRequiredCheckNames: [],
|
|
441
|
+
isDraft: false,
|
|
442
|
+
mergeable: 'MERGEABLE',
|
|
443
|
+
branchName: 'i1',
|
|
444
|
+
createdAt: new Date(),
|
|
445
|
+
},
|
|
446
|
+
]),
|
|
447
|
+
getStoryObjectMap: jest.fn().mockResolvedValue(new Map()),
|
|
448
|
+
getOpenPullRequest: jest.fn().mockResolvedValue(null),
|
|
449
|
+
getPullRequestChangedFilePaths: jest.fn().mockResolvedValue([]),
|
|
450
|
+
approvePullRequest: jest.fn().mockResolvedValue(undefined),
|
|
451
|
+
requestChangesWithInlineComment: jest
|
|
452
|
+
.fn()
|
|
453
|
+
.mockResolvedValue(undefined),
|
|
454
|
+
setDependedIssueUrl: jest.fn().mockResolvedValue(undefined),
|
|
455
|
+
setIssueAgentField: jest.fn().mockResolvedValue(undefined),
|
|
456
|
+
searchIssue: jest.fn().mockResolvedValue([]),
|
|
457
|
+
createNewIssue: jest.fn().mockResolvedValue(42),
|
|
458
|
+
};
|
|
459
|
+
notifyMockIssueCommentRepository = {
|
|
460
|
+
getCommentsFromIssue: jest.fn().mockResolvedValue([
|
|
461
|
+
{
|
|
462
|
+
author: 'bot',
|
|
463
|
+
content: 'From: :robot: developer (claude-opus-5)',
|
|
464
|
+
createdAt: new Date(),
|
|
465
|
+
},
|
|
466
|
+
]),
|
|
467
|
+
createComment: jest.fn().mockResolvedValue(undefined),
|
|
468
|
+
};
|
|
469
|
+
notifyMockWebhookRepository = {
|
|
470
|
+
sendGetRequest: jest.fn().mockResolvedValue(undefined),
|
|
471
|
+
};
|
|
472
|
+
notifyUseCase = new NotifyFinishedIssuePreparationUseCase(
|
|
473
|
+
notifyMockProjectRepository,
|
|
474
|
+
notifyMockIssueRepository,
|
|
475
|
+
notifyMockIssueCommentRepository,
|
|
476
|
+
notifyMockWebhookRepository,
|
|
477
|
+
);
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
afterEach(() => {
|
|
481
|
+
jest.useRealTimers();
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
it('spawn side starts the issue if and only if finish side does not send it back for the trigger', async () => {
|
|
485
|
+
const triggerIsPending = issueReactivationTriggerIsPending(
|
|
486
|
+
{ nextActionDate, nextActionHour },
|
|
487
|
+
now,
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
await spawnUseCase.run({
|
|
491
|
+
projectUrl: 'https://github.com/users/user/projects/1',
|
|
492
|
+
defaultAgentName: 'agent1',
|
|
493
|
+
defaultLlmModelName: 'claude-sonnet-4-6',
|
|
494
|
+
fallbackLlmModelName: null,
|
|
495
|
+
defaultLlmAgentName: null,
|
|
496
|
+
configFilePath: '/path/to/config.yml',
|
|
497
|
+
maximumPreparingIssuesCount: null,
|
|
498
|
+
utilizationPercentageThreshold: 90,
|
|
499
|
+
allowedIssueAuthors: ['testuser'],
|
|
500
|
+
manager: 'manager-user',
|
|
501
|
+
codexHomeCandidates: null,
|
|
502
|
+
labelsAsLlmAgentName: null,
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
const spawnStarted =
|
|
506
|
+
spawnMockIssueRepository.updateStatus.mock.calls.some(
|
|
507
|
+
(call) => call[2] === 'preparation-id',
|
|
508
|
+
);
|
|
509
|
+
|
|
510
|
+
await notifyUseCase.run({
|
|
511
|
+
projectUrl: 'https://github.com/users/user/projects/2',
|
|
512
|
+
issueUrl: 'https://github.com/user/repo/issues/1',
|
|
513
|
+
thresholdForAutoReject: 3,
|
|
514
|
+
workflowBlockerResolvedWebhookUrl: null,
|
|
515
|
+
allowedIssueAuthors: null,
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
const TRIGGER_MESSAGE = 'Reactivation trigger not yet reached';
|
|
519
|
+
const triggerSentBack =
|
|
520
|
+
notifyMockIssueCommentRepository.createComment.mock.calls.some(
|
|
521
|
+
(call) =>
|
|
522
|
+
typeof call[1] === 'string' && call[1].includes(TRIGGER_MESSAGE),
|
|
523
|
+
);
|
|
524
|
+
|
|
525
|
+
expect(spawnStarted).toBe(!triggerIsPending);
|
|
526
|
+
expect(triggerSentBack).toBe(triggerIsPending);
|
|
527
|
+
});
|
|
528
|
+
},
|
|
529
|
+
);
|
|
530
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Issue } from '../entities/Issue';
|
|
2
|
+
|
|
3
|
+
export const issueReactivationTriggerStartOfTomorrow = (
|
|
4
|
+
evaluatedAt: Date,
|
|
5
|
+
): Date =>
|
|
6
|
+
new Date(
|
|
7
|
+
evaluatedAt.getFullYear(),
|
|
8
|
+
evaluatedAt.getMonth(),
|
|
9
|
+
evaluatedAt.getDate() + 1,
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export const issueReactivationTriggerIsPending = (
|
|
13
|
+
issue: Pick<Issue, 'nextActionDate' | 'nextActionHour'>,
|
|
14
|
+
evaluatedAt: Date,
|
|
15
|
+
): boolean => {
|
|
16
|
+
const startOfTomorrow = issueReactivationTriggerStartOfTomorrow(evaluatedAt);
|
|
17
|
+
const hasFutureNextActionDate =
|
|
18
|
+
issue.nextActionDate !== null && issue.nextActionDate >= startOfTomorrow;
|
|
19
|
+
const hasUnreachedNextActionHour =
|
|
20
|
+
issue.nextActionHour !== null &&
|
|
21
|
+
evaluatedAt.getHours() < issue.nextActionHour;
|
|
22
|
+
return hasFutureNextActionDate || hasUnreachedNextActionHour;
|
|
23
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClearPastNextActionDateHourUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/ClearPastNextActionDateHourUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ClearPastNextActionDateHourUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/ClearPastNextActionDateHourUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,qBAAa,kCAAkC;IAE3C,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,mBAAmB,CAAC;gBAA3D,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAGtE,GAAG,GAAU,OAAO;QAClB,WAAW,EAAE,IAAI,EAAE,CAAC;QACpB,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;KACpB,KAAG,OAAO,CAAC,IAAI,CAAC,CA8Df;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotifyFinishedIssuePreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"NotifyFinishedIssuePreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CA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AAM,EAAE,GAAG,IAAI,CAAC;QACrC,oBAAoB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACtC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;KAC1B,KAAG,OAAO,CAAC;QAAE,aAAa,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAA;KAAE,CAAC,CAyWzD;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateConsoleListsUseCase.d.ts","sourceRoot":"","sources":["../../../../src/domain/usecases/console/GenerateConsoleListsUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAQ9D,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B,EAAE,MAAM,EAAE,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,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EF,MAAM,MAAM,YAAY,GAAG;IACzB,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,GAAG,EAAE,gBAAgB,CAAC;IACtB,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,gBAAgB,CAAC;IACzB,oBAAoB,EAAE,gBAAgB,CAAC;IACvC,eAAe,EAAE,gBAAgB,CAAC;IAClC,eAAe,EAAE,gBAAgB,CAAC;IAClC,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC,CAAC;AAIF,qBAAa,2BAA2B;IACtC,GAAG,GAAI,OAAO,yBAAyB,KAAG,YAAY,CAiJpD;IAEF,OAAO,CAAC,UAAU,CAIyD;IAE3E,OAAO,CAAC,YAAY,CAKY;IAEhC,OAAO,CAAC,uBAAuB,CAS7B;IAEF,OAAO,CAAC,yCAAyC,CAoB/C;IAEF,OAAO,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"GenerateConsoleListsUseCase.d.ts","sourceRoot":"","sources":["../../../../src/domain/usecases/console/GenerateConsoleListsUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAQ9D,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,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O,CAAC,YAAY,CAKY;IAEhC,OAAO,CAAC,uBAAuB,CAS7B;IAEF,OAAO,CAAC,yCAAyC,CAoB/C;IAEF,OAAO,CAAC,WAAW,CAsBhB;IAEH,OAAO,CAAC,iBAAiB,CAYjB;IAER,OAAO,CAAC,sBAAsB,CAQ5B;IAEF,OAAO,CAAC,sBAAsB,CAQ5B;IAEF,OAAO,CAAC,gBAAgB,CAoBtB;CACH"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Issue } from '../entities/Issue';
|
|
2
|
+
export declare const issueReactivationTriggerStartOfTomorrow: (evaluatedAt: Date) => Date;
|
|
3
|
+
export declare const issueReactivationTriggerIsPending: (issue: Pick<Issue, "nextActionDate" | "nextActionHour">, evaluatedAt: Date) => boolean;
|
|
4
|
+
//# sourceMappingURL=issueReactivationTriggerIsPending.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issueReactivationTriggerIsPending.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/issueReactivationTriggerIsPending.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,eAAO,MAAM,uCAAuC,GAClD,aAAa,IAAI,KAChB,IAKA,CAAC;AAEJ,eAAO,MAAM,iCAAiC,GAC5C,OAAO,IAAI,CAAC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,EACvD,aAAa,IAAI,KAChB,OAQF,CAAC"}
|