@jsb188/schedule 1.1.2

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.
Files changed (60) hide show
  1. package/package.json +62 -0
  2. package/src/constants/schedule.ts +549 -0
  3. package/src/css.d.ts +7 -0
  4. package/src/libs/gantt-geometry.ts +771 -0
  5. package/src/libs/gantt-histogram.ts +124 -0
  6. package/src/libs/gantt-keyboard.ts +113 -0
  7. package/src/libs/gantt-state.ts +57 -0
  8. package/src/libs/gantt-url.ts +63 -0
  9. package/src/modules/Gantt.helpers.ts +119 -0
  10. package/src/modules/Gantt.tsx +584 -0
  11. package/src/types/schedule.d.ts +1149 -0
  12. package/src/ui/ActivityFormUI.tsx +133 -0
  13. package/src/ui/GanttEditorsUI.tsx +102 -0
  14. package/src/ui/GanttHistogramUI.tsx +236 -0
  15. package/src/ui/GanttUI.tsx +792 -0
  16. package/src/ui/ProjectFormUI.tsx +250 -0
  17. package/src/ui/ProjectMobileListUI.tsx +80 -0
  18. package/src/ui/ProjectToolbarUI.tsx +54 -0
  19. package/src/ui/RelationshipListUI.tsx +176 -0
  20. package/src/ui/ScheduleRunUI.tsx +173 -0
  21. package/src/ui/ScheduleSettingsUI.tsx +420 -0
  22. package/src/utils/coverage.helpers.ts +679 -0
  23. package/src/utils/coverage.ts +630 -0
  24. package/src/utils/cpm.helpers.ts +674 -0
  25. package/src/utils/cpm.ts +907 -0
  26. package/src/utils/cpmLeveling.helpers.ts +564 -0
  27. package/src/utils/cpmLeveling.ts +367 -0
  28. package/src/utils/defaults.ts +8 -0
  29. package/src/utils/eligibility.ts +457 -0
  30. package/src/utils/planCsv.ts +344 -0
  31. package/src/utils/predecessorText.ts +96 -0
  32. package/src/utils/recurrence.ts +616 -0
  33. package/src/utils/request.ts +153 -0
  34. package/src/utils/resource.ts +182 -0
  35. package/src/utils/rule.ts +216 -0
  36. package/src/utils/run.ts +43 -0
  37. package/src/utils/series.ts +161 -0
  38. package/src/utils/slot.ts +208 -0
  39. package/src/utils/workTime.ts +1382 -0
  40. package/tests/coverage.fixtures.ts +111 -0
  41. package/tests/coverage.test.ts +503 -0
  42. package/tests/cpm.bench.test.ts +154 -0
  43. package/tests/cpm.test.ts +354 -0
  44. package/tests/cpmCorrectness.test.ts +327 -0
  45. package/tests/cpmLeveling.test.ts +471 -0
  46. package/tests/eligibility.test.ts +320 -0
  47. package/tests/gantt-geometry.test.ts +367 -0
  48. package/tests/gantt-histogram.test.ts +78 -0
  49. package/tests/gantt-keyboard.test.ts +69 -0
  50. package/tests/helpers/cpmFixtures.ts +101 -0
  51. package/tests/projectInputs.test.ts +165 -0
  52. package/tests/recurrence.test.ts +68 -0
  53. package/tests/request.test.ts +99 -0
  54. package/tests/resource.test.ts +95 -0
  55. package/tests/rule.test.ts +98 -0
  56. package/tests/series.test.ts +120 -0
  57. package/tests/workTime.test.ts +1007 -0
  58. package/tests/workTimeContracts.test.ts +111 -0
  59. package/tsconfig.json +13 -0
  60. package/vitest.config.ts +8 -0
@@ -0,0 +1,154 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import type {
3
+ CpmActivityInput,
4
+ CpmRelationshipInput,
5
+ } from '../src/types/schedule.d.ts';
6
+ import {
7
+ buildWorkCalendarTable,
8
+ getStandardWorkCalendarDef,
9
+ } from '../src/utils/workTime.ts';
10
+ import {
11
+ assignment,
12
+ fs,
13
+ level,
14
+ resource,
15
+ schedule,
16
+ task,
17
+ } from './helpers/cpmFixtures.ts';
18
+
19
+ /* Build seeded construction DAG components, keeping the generated project inside its forty-year horizon. */
20
+ function network(count: number, edgeCount: number) {
21
+ let seed = 42;
22
+ /* Produce stable pseudo-random values independently of the host runtime. */
23
+ const random = () => {
24
+ seed = (Math.imul(seed, 1664525) + 1013904223) >>> 0;
25
+ return seed / 4294967296;
26
+ };
27
+ const activities: CpmActivityInput[] = Array.from({ length: count }, (_, i) =>
28
+ task(String(i), 1 + Math.floor(random() * 30), {
29
+ type:
30
+ i % 50 === 0
31
+ ? 'LEVEL_OF_EFFORT'
32
+ : i % 20 === 0
33
+ ? 'FINISH_MILESTONE'
34
+ : 'TASK',
35
+ wbsId: String(i % 100),
36
+ }),
37
+ );
38
+ const relationships: CpmRelationshipInput[] = [];
39
+ const seen = new Set<string>();
40
+ while (relationships.length < edgeCount) {
41
+ const from = Math.floor(random() * (count - 20));
42
+ const to = from + 1 + Math.floor(random() * 19);
43
+ if (Math.floor(from / 200) !== Math.floor(to / 200)) continue;
44
+ const key = `${from}:${to}`;
45
+ if (seen.has(key)) continue;
46
+ seen.add(key);
47
+ relationships.push(
48
+ fs(
49
+ String(from),
50
+ String(to),
51
+ (Math.floor(random() * 3) - 1) * 480,
52
+ (['FS', 'SS', 'FF', 'SF'] as const)[Math.floor(random() * 4)],
53
+ ),
54
+ );
55
+ }
56
+ return { activities, relationships };
57
+ }
58
+
59
+ /* Run opt-in timing gates separately from correctness suites to avoid machine contention. */
60
+ describe.skipIf(process.env.SCHEDULE_BENCH !== '1')(
61
+ 'CPM performance gates',
62
+ () => {
63
+ it.each([
64
+ [5000, 10000, 1000],
65
+ [20000, 60000, 6000],
66
+ ])(
67
+ 'schedules %i activities and %i relationships under %i ms',
68
+ (count, edges, limit) => {
69
+ const input = network(count, edges);
70
+ const start = performance.now();
71
+ const result = schedule(input.activities, input.relationships);
72
+ const elapsed = performance.now() - start;
73
+ console.log(`CPM ${count}/${edges}: ${elapsed.toFixed(1)} ms`);
74
+ expect(result.ok).toBe(true);
75
+ expect(elapsed).toBeLessThan(limit);
76
+ },
77
+ 15000,
78
+ );
79
+ it('levels 5000 activities on 50 resources over two years under four seconds', () => {
80
+ const input = network(5000, 10000);
81
+ const resources = Array.from({ length: 50 }, (_, i) =>
82
+ resource(String(i)),
83
+ );
84
+ const assignments = input.activities
85
+ .filter((a) => a.type === 'TASK')
86
+ .flatMap((a, i) =>
87
+ i % 2
88
+ ? [assignment(a.id, String(i % 50), 240)]
89
+ : [
90
+ assignment(a.id, String(i % 50), 240),
91
+ assignment(a.id, String((i + 1) % 50), 240),
92
+ ],
93
+ );
94
+ const externalUsage = resources
95
+ .filter((_, i) => i % 5 === 0)
96
+ .map((r) => ({
97
+ resourceId: r.id,
98
+ startAt: new Date('2026-01-05T16:00:00Z'),
99
+ finishAt: new Date('2026-06-01T00:00:00Z'),
100
+ unitsPerDay: 48,
101
+ }));
102
+ const start = performance.now();
103
+ const result = level(input.activities, {
104
+ relationships: input.relationships,
105
+ assignments,
106
+ resources,
107
+ externalUsage,
108
+ });
109
+ const elapsed = performance.now() - start;
110
+ console.log(`Leveling 5000×50×730: ${elapsed.toFixed(1)} ms`);
111
+ expect(result.ok).toBe(true);
112
+ expect(result.stats.leveled).toBe(true);
113
+ expect(elapsed).toBeLessThan(4000);
114
+ }, 15000);
115
+ it('reports a 20000-node loop without recursion under one second', () => {
116
+ const activities = Array.from({ length: 20000 }, (_, i) =>
117
+ task(String(i)),
118
+ );
119
+ const relationships = activities.map((a, i) =>
120
+ fs(a.id, String((i + 1) % activities.length)),
121
+ );
122
+ const start = performance.now();
123
+ const result = schedule(activities, relationships);
124
+ const elapsed = performance.now() - start;
125
+ console.log(`Cycle 20000: ${elapsed.toFixed(1)} ms`);
126
+ expect(result.stats.cycleCount).toBe(1);
127
+ expect(elapsed).toBeLessThan(1000);
128
+ });
129
+ it('schedules 20000 unlinked activities with bounded diagnostics under 500 ms', () => {
130
+ const activities = Array.from({ length: 20000 }, (_, i) =>
131
+ task(String(i)),
132
+ );
133
+ const start = performance.now();
134
+ const result = schedule(activities);
135
+ const elapsed = performance.now() - start;
136
+ console.log(`Unlinked 20000: ${elapsed.toFixed(1)} ms`);
137
+ expect(result.diagnostics.length).toBe(400);
138
+ expect(result.stats.openStartCount).toBe(19999);
139
+ expect(elapsed).toBeLessThan(500);
140
+ });
141
+ it('builds ten-year tables for three calendars under 300 ms', () => {
142
+ const start = performance.now();
143
+ for (const zone of ['UTC', 'America/New_York', 'Europe/London'])
144
+ buildWorkCalendarTable(
145
+ getStandardWorkCalendarDef(zone),
146
+ new Date('2026-01-01T00:00:00Z'),
147
+ new Date('2036-01-01T00:00:00Z'),
148
+ );
149
+ const elapsed = performance.now() - start;
150
+ console.log(`Calendar tables 3×10 years: ${elapsed.toFixed(1)} ms`);
151
+ expect(elapsed).toBeLessThan(300);
152
+ });
153
+ },
154
+ );
@@ -0,0 +1,354 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import type {
3
+ CpmActivityInput,
4
+ CpmRelationshipInput,
5
+ CpmScheduleInput,
6
+ } from '../src/types/schedule.d.ts';
7
+ import { runCriticalPathSchedule } from '../src/utils/cpm.ts';
8
+ import { getStandardWorkCalendarDef } from '../src/utils/workTime.ts';
9
+
10
+ const ZONE = 'America/Los_Angeles';
11
+ const calendars = { STANDARD: getStandardWorkCalendarDef(ZONE) };
12
+
13
+ /*
14
+ * Local LA time (PST) to UTC instant.
15
+ */
16
+ function la(date: string, time: string): Date {
17
+ return new Date(`${date}T${time}:00-08:00`);
18
+ }
19
+
20
+ /*
21
+ * One working day is 480 minutes on the standard calendar.
22
+ */
23
+ const DAY = 480;
24
+
25
+ function task(
26
+ id: string,
27
+ days: number,
28
+ extra: Partial<CpmActivityInput> = {},
29
+ ): CpmActivityInput {
30
+ return { id, type: 'TASK', plannedDurationMinutes: days * DAY, ...extra };
31
+ }
32
+
33
+ function fs(
34
+ predecessorId: string,
35
+ successorId: string,
36
+ lagMinutes = 0,
37
+ type: CpmRelationshipInput['type'] = 'FS',
38
+ ): CpmRelationshipInput {
39
+ return { predecessorId, successorId, type, lagMinutes };
40
+ }
41
+
42
+ function schedule(
43
+ activities: CpmActivityInput[],
44
+ relationships: CpmRelationshipInput[],
45
+ extra: Partial<CpmScheduleInput> = {},
46
+ ) {
47
+ return runCriticalPathSchedule({
48
+ activities,
49
+ relationships,
50
+ calendars,
51
+ defaultCalendarId: 'STANDARD',
52
+ projectStartAt: la('2026-01-05', '08:00'),
53
+ dataDateAt: la('2026-01-05', '08:00'),
54
+ ...extra,
55
+ });
56
+ }
57
+
58
+ function byId(result: ReturnType<typeof runCriticalPathSchedule>, id: string) {
59
+ return result.activities.find((activity) => activity.id === id)!;
60
+ }
61
+
62
+ describe('cpm', () => {
63
+ it('schedules a finish-to-start chain on working time', () => {
64
+ const result = schedule(
65
+ [task('A', 3), task('B', 2), task('C', 1)],
66
+ [fs('A', 'B'), fs('B', 'C')],
67
+ );
68
+
69
+ expect(result.ok).toBe(true);
70
+ expect(byId(result, 'A').earlyStartAt.toISOString()).toBe(
71
+ la('2026-01-05', '08:00').toISOString(),
72
+ );
73
+ expect(byId(result, 'A').earlyFinishAt.toISOString()).toBe(
74
+ la('2026-01-07', '17:00').toISOString(),
75
+ );
76
+ expect(byId(result, 'B').earlyStartAt.toISOString()).toBe(
77
+ la('2026-01-08', '08:00').toISOString(),
78
+ );
79
+ expect(byId(result, 'B').earlyFinishAt.toISOString()).toBe(
80
+ la('2026-01-09', '17:00').toISOString(),
81
+ );
82
+ expect(byId(result, 'C').earlyStartAt.toISOString()).toBe(
83
+ la('2026-01-12', '08:00').toISOString(),
84
+ );
85
+ expect(byId(result, 'C').earlyFinishAt.toISOString()).toBe(
86
+ la('2026-01-12', '17:00').toISOString(),
87
+ );
88
+ expect(result.scheduledFinishAt?.toISOString()).toBe(
89
+ la('2026-01-12', '17:00').toISOString(),
90
+ );
91
+
92
+ for (const id of ['A', 'B', 'C']) {
93
+ expect(byId(result, id).totalFloatMinutes).toBe(0);
94
+ expect(byId(result, id).isCritical).toBe(true);
95
+ }
96
+ expect(result.stats.criticalCount).toBe(3);
97
+ });
98
+
99
+ it('gives a parallel branch float and leaves it off the critical path', () => {
100
+ const result = schedule(
101
+ [task('A', 3), task('B', 2), task('C', 1), task('D', 1)],
102
+ [fs('A', 'B'), fs('B', 'C'), fs('D', 'C')],
103
+ );
104
+
105
+ const d = byId(result, 'D');
106
+ expect(d.earlyFinishAt.toISOString()).toBe(
107
+ la('2026-01-05', '17:00').toISOString(),
108
+ );
109
+ expect(d.lateFinishAt.toISOString()).toBe(
110
+ la('2026-01-09', '17:00').toISOString(),
111
+ );
112
+ expect(d.lateStartAt.toISOString()).toBe(
113
+ la('2026-01-09', '08:00').toISOString(),
114
+ );
115
+ expect(d.totalFloatMinutes).toBe(4 * DAY);
116
+ expect(d.freeFloatMinutes).toBe(4 * DAY);
117
+ expect(d.isCritical).toBe(false);
118
+ expect(
119
+ result.diagnostics.some(
120
+ (diagnostic) =>
121
+ diagnostic.code === 'OPEN_START' && diagnostic.activityId === 'D',
122
+ ),
123
+ ).toBe(true);
124
+ });
125
+
126
+ it('applies start-to-start lag and finish-to-finish logic', () => {
127
+ const result = schedule(
128
+ [task('A', 3), task('B', 2), task('C', 1)],
129
+ [fs('A', 'B', DAY, 'SS'), fs('A', 'C', 0, 'FF')],
130
+ );
131
+
132
+ expect(byId(result, 'B').earlyStartAt.toISOString()).toBe(
133
+ la('2026-01-06', '08:00').toISOString(),
134
+ );
135
+ // C must finish when A finishes (Wednesday 17:00) and keeps its one-day duration
136
+ expect(byId(result, 'C').earlyFinishAt.toISOString()).toBe(
137
+ la('2026-01-07', '17:00').toISOString(),
138
+ );
139
+ expect(byId(result, 'C').earlyStartAt.toISOString()).toBe(
140
+ la('2026-01-07', '08:00').toISOString(),
141
+ );
142
+ });
143
+
144
+ it('honours a start-on-or-after constraint and pushes float upstream', () => {
145
+ const result = schedule(
146
+ [
147
+ task('A', 3),
148
+ task('B', 2),
149
+ task('C', 1, {
150
+ primaryConstraint: {
151
+ type: 'START_ON_OR_AFTER',
152
+ at: la('2026-01-14', '00:00'),
153
+ },
154
+ }),
155
+ ],
156
+ [fs('A', 'B'), fs('B', 'C')],
157
+ );
158
+
159
+ expect(byId(result, 'C').earlyStartAt.toISOString()).toBe(
160
+ la('2026-01-14', '08:00').toISOString(),
161
+ );
162
+ expect(byId(result, 'A').totalFloatMinutes).toBe(2 * DAY);
163
+ expect(byId(result, 'B').totalFloatMinutes).toBe(2 * DAY);
164
+ expect(byId(result, 'C').totalFloatMinutes).toBe(0);
165
+ });
166
+
167
+ it('reports negative float against a must-finish date', () => {
168
+ const result = schedule([task('A', 3), task('B', 2)], [fs('A', 'B')], {
169
+ mustFinishByAt: la('2026-01-08', '17:00'),
170
+ });
171
+
172
+ expect(byId(result, 'B').totalFloatMinutes).toBe(-DAY);
173
+ expect(byId(result, 'A').totalFloatMinutes).toBe(-DAY);
174
+ expect(result.stats.negativeFloatCount).toBe(2);
175
+ expect(
176
+ result.diagnostics.some(
177
+ (diagnostic) => diagnostic.code === 'NEGATIVE_FLOAT',
178
+ ),
179
+ ).toBe(true);
180
+ });
181
+
182
+ it('refuses a relationship loop', () => {
183
+ const result = schedule(
184
+ [task('A', 1), task('B', 1)],
185
+ [fs('A', 'B'), fs('B', 'A')],
186
+ );
187
+
188
+ expect(result.ok).toBe(false);
189
+ expect(
190
+ result.diagnostics.filter((diagnostic) => diagnostic.code === 'CYCLE'),
191
+ ).toHaveLength(1);
192
+ });
193
+
194
+ it('schedules remaining work from the data date with retained logic', () => {
195
+ const result = schedule(
196
+ [
197
+ task('A', 3, {
198
+ actualStartAt: la('2026-01-05', '08:00'),
199
+ remainingDurationMinutes: DAY,
200
+ }),
201
+ task('B', 2),
202
+ ],
203
+ [fs('A', 'B')],
204
+ { dataDateAt: la('2026-01-08', '08:00') },
205
+ );
206
+
207
+ const a = byId(result, 'A');
208
+ expect(a.status).toBe('IN_PROGRESS');
209
+ expect(a.earlyStartAt.toISOString()).toBe(
210
+ la('2026-01-05', '08:00').toISOString(),
211
+ );
212
+ expect(a.earlyFinishAt.toISOString()).toBe(
213
+ la('2026-01-08', '17:00').toISOString(),
214
+ );
215
+ expect(byId(result, 'B').earlyStartAt.toISOString()).toBe(
216
+ la('2026-01-09', '08:00').toISOString(),
217
+ );
218
+ });
219
+
220
+ it('keeps actual dates on completed work and flags out-of-sequence progress', () => {
221
+ const result = schedule(
222
+ [
223
+ task('A', 2, {
224
+ actualStartAt: la('2026-01-05', '08:00'),
225
+ actualFinishAt: la('2026-01-06', '17:00'),
226
+ }),
227
+ task('B', 2, { actualStartAt: la('2026-01-06', '08:00') }),
228
+ task('C', 1),
229
+ ],
230
+ [fs('A', 'B'), fs('C', 'B')],
231
+ { dataDateAt: la('2026-01-07', '08:00') },
232
+ );
233
+
234
+ expect(byId(result, 'A').status).toBe('COMPLETE');
235
+ expect(byId(result, 'A').totalFloatMinutes).toBeNull();
236
+ expect(byId(result, 'B').status).toBe('IN_PROGRESS');
237
+ expect(
238
+ result.diagnostics.some(
239
+ (diagnostic) =>
240
+ diagnostic.code === 'OUT_OF_SEQUENCE' &&
241
+ diagnostic.activityId === 'B',
242
+ ),
243
+ ).toBe(true);
244
+ // C has not started, so retained logic holds B's remaining work behind it
245
+ expect(byId(result, 'B').earlyFinishAt.getTime()).toBeGreaterThan(
246
+ byId(result, 'C').earlyFinishAt.getTime(),
247
+ );
248
+ });
249
+
250
+ it('places milestones and spans level-of-effort and WBS summary activities', () => {
251
+ const result = schedule(
252
+ [
253
+ {
254
+ id: 'START',
255
+ type: 'START_MILESTONE',
256
+ plannedDurationMinutes: 0,
257
+ wbsId: 'w1',
258
+ },
259
+ task('A', 2, { wbsId: 'w1' }),
260
+ task('B', 3, { wbsId: 'w2' }),
261
+ {
262
+ id: 'END',
263
+ type: 'FINISH_MILESTONE',
264
+ plannedDurationMinutes: 0,
265
+ wbsId: 'w2',
266
+ },
267
+ { id: 'LOE', type: 'LEVEL_OF_EFFORT', plannedDurationMinutes: 0 },
268
+ {
269
+ id: 'SUM',
270
+ type: 'WBS_SUMMARY',
271
+ plannedDurationMinutes: 0,
272
+ wbsId: 'root',
273
+ },
274
+ ],
275
+ [
276
+ fs('START', 'A'),
277
+ fs('A', 'B'),
278
+ fs('B', 'END'),
279
+ fs('A', 'LOE', 0, 'SS'),
280
+ fs('LOE', 'B', 0, 'FF'),
281
+ ],
282
+ { wbsPaths: { root: '/root/', w1: '/root/w1/', w2: '/root/w2/' } },
283
+ );
284
+
285
+ expect(result.ok).toBe(true);
286
+ expect(byId(result, 'START').earlyStartAt.toISOString()).toBe(
287
+ la('2026-01-05', '08:00').toISOString(),
288
+ );
289
+ expect(byId(result, 'END').earlyFinishAt.toISOString()).toBe(
290
+ la('2026-01-09', '17:00').toISOString(),
291
+ );
292
+
293
+ const loe = byId(result, 'LOE');
294
+ expect(loe.earlyStartAt.toISOString()).toBe(
295
+ la('2026-01-05', '08:00').toISOString(),
296
+ );
297
+ expect(loe.earlyFinishAt.toISOString()).toBe(
298
+ la('2026-01-09', '17:00').toISOString(),
299
+ );
300
+ expect(loe.remainingDurationMinutes).toBe(5 * DAY);
301
+ expect(loe.isCritical).toBe(false);
302
+
303
+ const summary = byId(result, 'SUM');
304
+ expect(summary.earlyStartAt.toISOString()).toBe(
305
+ la('2026-01-05', '08:00').toISOString(),
306
+ );
307
+ expect(summary.earlyFinishAt.toISOString()).toBe(
308
+ la('2026-01-09', '17:00').toISOString(),
309
+ );
310
+ });
311
+
312
+ it('delays an as-late-as-possible activity into its free float', () => {
313
+ const result = schedule(
314
+ [
315
+ task('A', 3),
316
+ task('B', 2),
317
+ task('C', 1),
318
+ task('D', 1, {
319
+ primaryConstraint: { type: 'AS_LATE_AS_POSSIBLE', at: null },
320
+ }),
321
+ ],
322
+ [fs('A', 'B'), fs('B', 'C'), fs('D', 'C')],
323
+ );
324
+
325
+ const d = byId(result, 'D');
326
+ expect(d.earlyStartAt.toISOString()).toBe(
327
+ la('2026-01-09', '08:00').toISOString(),
328
+ );
329
+ expect(d.earlyFinishAt.toISOString()).toBe(
330
+ la('2026-01-09', '17:00').toISOString(),
331
+ );
332
+ expect(d.totalFloatMinutes).toBe(0);
333
+ });
334
+
335
+ it('warns when a mandatory constraint overrides the logic', () => {
336
+ const result = schedule(
337
+ [
338
+ task('A', 3),
339
+ task('B', 2, {
340
+ primaryConstraint: {
341
+ type: 'MANDATORY_START',
342
+ at: la('2026-01-06', '08:00'),
343
+ },
344
+ }),
345
+ ],
346
+ [fs('A', 'B')],
347
+ );
348
+
349
+ expect(byId(result, 'B').earlyStartAt.toISOString()).toBe(
350
+ la('2026-01-06', '08:00').toISOString(),
351
+ );
352
+ expect(result.stats.constraintOverrideCount).toBe(1);
353
+ });
354
+ });