tasknotes-spec 0.2.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.
Files changed (53) hide show
  1. package/00-overview.md +172 -0
  2. package/01-terminology.md +156 -0
  3. package/02-model-and-mapping.md +288 -0
  4. package/03-temporal-semantics.md +290 -0
  5. package/04-recurrence.md +398 -0
  6. package/05-operations.md +968 -0
  7. package/06-validation.md +267 -0
  8. package/07-conformance.md +292 -0
  9. package/08-compatibility-and-migrations.md +188 -0
  10. package/09-configuration.md +837 -0
  11. package/10-dependencies-and-reminders.md +266 -0
  12. package/11-links.md +373 -0
  13. package/CHANGELOG.md +25 -0
  14. package/README.md +80 -0
  15. package/conformance/README.md +31 -0
  16. package/conformance/adapters/mdbase-tasknotes.adapter.mjs +141 -0
  17. package/conformance/adapters/tasknotes-core/conformance.ts +2498 -0
  18. package/conformance/adapters/tasknotes-core/create-compat.ts +1 -0
  19. package/conformance/adapters/tasknotes-core/date.ts +12 -0
  20. package/conformance/adapters/tasknotes-core/field-mapping.ts +14 -0
  21. package/conformance/adapters/tasknotes-core/recurrence.ts +10 -0
  22. package/conformance/adapters/tasknotes-date-bridge.ts +20 -0
  23. package/conformance/adapters/tasknotes-runtime-bridge.ts +1107 -0
  24. package/conformance/adapters/tasknotes-runtime-obsidian-shim.ts +84 -0
  25. package/conformance/adapters/tasknotes-templating-bridge.ts +13 -0
  26. package/conformance/adapters/tasknotes.adapter.mjs +485 -0
  27. package/conformance/docs/ADAPTER_CONTRACT.md +245 -0
  28. package/conformance/docs/FIXTURE_FORMAT.md +247 -0
  29. package/conformance/docs/RUNNER_GUIDE.md +393 -0
  30. package/conformance/fixtures/config-schema.json +634 -0
  31. package/conformance/fixtures/config.json +18984 -0
  32. package/conformance/fixtures/conformance.json +444 -0
  33. package/conformance/fixtures/create-compat.json +18639 -0
  34. package/conformance/fixtures/date.json +25612 -0
  35. package/conformance/fixtures/dependencies.json +8647 -0
  36. package/conformance/fixtures/field-mapping.json +5406 -0
  37. package/conformance/fixtures/links.json +1127 -0
  38. package/conformance/fixtures/migrations.json +668 -0
  39. package/conformance/fixtures/operations.json +2761 -0
  40. package/conformance/fixtures/recurrence.json +22958 -0
  41. package/conformance/fixtures/reminders.json +13333 -0
  42. package/conformance/fixtures/templating.json +497 -0
  43. package/conformance/fixtures/validation.json +5308 -0
  44. package/conformance/lib/adapter-loader.mjs +23 -0
  45. package/conformance/lib/load-fixtures.mjs +43 -0
  46. package/conformance/lib/matchers.mjs +200 -0
  47. package/conformance/manifest.json +232 -0
  48. package/conformance/scripts/generate-fixtures.mjs +5239 -0
  49. package/conformance/scripts/package-fixtures.mjs +101 -0
  50. package/conformance/tests/coverage.test.mjs +213 -0
  51. package/conformance/tests/runner.test.mjs +102 -0
  52. package/conformance/tests/tasknotes-runtime-routing.test.mjs +64 -0
  53. package/package.json +49 -0
@@ -0,0 +1,2761 @@
1
+ [
2
+ {
3
+ "id": "ops.0001",
4
+ "section": "§5.2",
5
+ "profile": "core-lite",
6
+ "operation": "op.mutate_with_validation",
7
+ "assertion": "envelope_error",
8
+ "input": {
9
+ "strict": true,
10
+ "frontmatter": {
11
+ "title": "X",
12
+ "status": 3
13
+ }
14
+ },
15
+ "expect": {
16
+ "error": {
17
+ "$regex": "validation|invalid_type"
18
+ }
19
+ }
20
+ },
21
+ {
22
+ "id": "ops.0002",
23
+ "section": "§5.2",
24
+ "profile": "core-lite",
25
+ "operation": "op.mutate_with_validation",
26
+ "assertion": "envelope_error",
27
+ "input": {
28
+ "strict": false,
29
+ "frontmatter": {
30
+ "title": "X",
31
+ "status": 3
32
+ }
33
+ },
34
+ "expect": {
35
+ "error": {
36
+ "$regex": "validation|missing_required|invalid_type"
37
+ }
38
+ }
39
+ },
40
+ {
41
+ "id": "ops.0003",
42
+ "section": "§5.2",
43
+ "profile": "core-lite",
44
+ "operation": "op.mutate_with_validation",
45
+ "assertion": "envelope_equals",
46
+ "input": {
47
+ "strict": true,
48
+ "frontmatter": {
49
+ "title": "Valid task",
50
+ "status": "open",
51
+ "dateCreated": "2026-02-20T10:00:00Z",
52
+ "dateModified": "2026-02-20T10:00:00Z"
53
+ }
54
+ },
55
+ "expect": {
56
+ "ok": true,
57
+ "result": {
58
+ "value": "accepted"
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "id": "ops.0004",
64
+ "section": "§5.2",
65
+ "profile": "core-lite",
66
+ "operation": "op.atomic_write",
67
+ "assertion": "envelope_equals",
68
+ "input": {
69
+ "original": {
70
+ "title": "X",
71
+ "status": "open",
72
+ "vendor": "ZX-42"
73
+ },
74
+ "patch": {
75
+ "status": "done"
76
+ },
77
+ "simulateFailureAfterWrite": true
78
+ },
79
+ "expect": {
80
+ "ok": true,
81
+ "result": {
82
+ "committed": false,
83
+ "persisted": {
84
+ "$contains": {
85
+ "title": "X",
86
+ "status": "open",
87
+ "vendor": "ZX-42"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ },
93
+ {
94
+ "id": "ops.0005",
95
+ "section": "§5.2",
96
+ "profile": "core-lite",
97
+ "operation": "op.atomic_write",
98
+ "assertion": "envelope_equals",
99
+ "input": {
100
+ "original": {
101
+ "title": "X",
102
+ "status": "open",
103
+ "vendor": "ZX-42"
104
+ },
105
+ "patch": {
106
+ "status": "done"
107
+ },
108
+ "simulateFailureAfterWrite": false
109
+ },
110
+ "expect": {
111
+ "ok": true,
112
+ "result": {
113
+ "committed": true,
114
+ "persisted": {
115
+ "$contains": {
116
+ "title": "X",
117
+ "status": "done",
118
+ "vendor": "ZX-42"
119
+ }
120
+ }
121
+ }
122
+ }
123
+ },
124
+ {
125
+ "id": "ops.0006",
126
+ "section": "§5.2",
127
+ "profile": "core-lite",
128
+ "operation": "op.idempotency_check",
129
+ "assertion": "envelope_equals",
130
+ "input": {
131
+ "operation": "complete_nonrecurring",
132
+ "first": {
133
+ "status": "open",
134
+ "completedDate": null
135
+ },
136
+ "second": {
137
+ "status": "done",
138
+ "completedDate": "2026-02-20"
139
+ }
140
+ },
141
+ "expect": {
142
+ "ok": true,
143
+ "result": {
144
+ "idempotent": true
145
+ }
146
+ }
147
+ },
148
+ {
149
+ "id": "ops.0007",
150
+ "section": "§5.21",
151
+ "profile": "core-lite",
152
+ "operation": "op.mutate_with_validation",
153
+ "assertion": "envelope_equals",
154
+ "input": {
155
+ "strict": true,
156
+ "frontmatter": {
157
+ "title": "Valid via interface",
158
+ "status": "open",
159
+ "dateCreated": "2026-02-20T10:00:00Z",
160
+ "dateModified": "2026-02-20T10:00:00Z"
161
+ }
162
+ },
163
+ "expect": {
164
+ "ok": true,
165
+ "result": {
166
+ "value": "accepted"
167
+ }
168
+ }
169
+ },
170
+ {
171
+ "id": "ops.0008",
172
+ "section": "§5.2",
173
+ "profile": "core-lite",
174
+ "operation": "op.idempotency_check",
175
+ "assertion": "envelope_equals",
176
+ "input": {
177
+ "operation": "create",
178
+ "first": null,
179
+ "second": {
180
+ "title": "New task",
181
+ "status": "open"
182
+ }
183
+ },
184
+ "expect": {
185
+ "ok": true,
186
+ "result": {
187
+ "idempotent": true
188
+ }
189
+ }
190
+ },
191
+ {
192
+ "id": "ops.0009",
193
+ "section": "§5.2.1",
194
+ "profile": "core-lite",
195
+ "operation": "date.resolve_operation_target",
196
+ "assertion": "envelope_equals",
197
+ "input": {
198
+ "explicitDate": "2026-02-20",
199
+ "scheduled": "2026-02-19",
200
+ "due": "2026-02-18"
201
+ },
202
+ "expect": {
203
+ "ok": true,
204
+ "result": {
205
+ "value": "2026-02-20"
206
+ }
207
+ }
208
+ },
209
+ {
210
+ "id": "ops.0010",
211
+ "section": "§5.2.1",
212
+ "profile": "core-lite",
213
+ "operation": "date.resolve_operation_target",
214
+ "assertion": "envelope_equals",
215
+ "input": {
216
+ "scheduled": "2026-02-19T09:00:00Z",
217
+ "due": "2026-02-18"
218
+ },
219
+ "expect": {
220
+ "ok": true,
221
+ "result": {
222
+ "value": "2026-02-19"
223
+ }
224
+ }
225
+ },
226
+ {
227
+ "id": "ops.0011",
228
+ "section": "§5.2.1",
229
+ "profile": "core-lite",
230
+ "operation": "date.resolve_operation_target",
231
+ "assertion": "envelope_equals",
232
+ "input": {
233
+ "due": "2026-02-18T10:00:00Z"
234
+ },
235
+ "expect": {
236
+ "ok": true,
237
+ "result": {
238
+ "value": "2026-02-18"
239
+ }
240
+ }
241
+ },
242
+ {
243
+ "id": "ops.0012",
244
+ "section": "§5.4",
245
+ "profile": "core-lite",
246
+ "operation": "op.update_patch",
247
+ "assertion": "envelope_equals",
248
+ "input": {
249
+ "original": {
250
+ "title": "Weekly review",
251
+ "status": "open",
252
+ "priority": "normal",
253
+ "scheduled": "2026-02-20",
254
+ "vendorTicket": "ZX-42"
255
+ },
256
+ "patch": {
257
+ "priority": "high"
258
+ },
259
+ "expectContains": {
260
+ "title": "Weekly review",
261
+ "priority": "high",
262
+ "vendorTicket": "ZX-42"
263
+ },
264
+ "changed": true
265
+ },
266
+ "expect": {
267
+ "ok": true,
268
+ "result": {
269
+ "changed": true,
270
+ "frontmatter": {
271
+ "$contains": {
272
+ "title": "Weekly review",
273
+ "priority": "high",
274
+ "vendorTicket": "ZX-42"
275
+ }
276
+ }
277
+ }
278
+ }
279
+ },
280
+ {
281
+ "id": "ops.0013",
282
+ "section": "§5.4",
283
+ "profile": "core-lite",
284
+ "operation": "op.update_patch",
285
+ "assertion": "envelope_equals",
286
+ "input": {
287
+ "original": {
288
+ "title": "Weekly review",
289
+ "status": "open",
290
+ "scheduled": "2026-02-20",
291
+ "due": "2026-02-22",
292
+ "vendorTicket": "ZX-42"
293
+ },
294
+ "patch": {
295
+ "status": "in-progress"
296
+ },
297
+ "expectContains": {
298
+ "status": "in-progress",
299
+ "scheduled": "2026-02-20",
300
+ "due": "2026-02-22",
301
+ "vendorTicket": "ZX-42"
302
+ },
303
+ "changed": true
304
+ },
305
+ "expect": {
306
+ "ok": true,
307
+ "result": {
308
+ "changed": true,
309
+ "frontmatter": {
310
+ "$contains": {
311
+ "status": "in-progress",
312
+ "scheduled": "2026-02-20",
313
+ "due": "2026-02-22",
314
+ "vendorTicket": "ZX-42"
315
+ }
316
+ }
317
+ }
318
+ }
319
+ },
320
+ {
321
+ "id": "ops.0014",
322
+ "section": "§5.4",
323
+ "profile": "core-lite",
324
+ "operation": "op.update_patch",
325
+ "assertion": "envelope_equals",
326
+ "input": {
327
+ "original": {
328
+ "title": "Weekly review",
329
+ "status": "open",
330
+ "priority": "normal",
331
+ "vendorTicket": "ZX-42"
332
+ },
333
+ "patch": {
334
+ "status": "open"
335
+ },
336
+ "expectContains": {
337
+ "status": "open",
338
+ "vendorTicket": "ZX-42"
339
+ },
340
+ "changed": false
341
+ },
342
+ "expect": {
343
+ "ok": true,
344
+ "result": {
345
+ "changed": false,
346
+ "frontmatter": {
347
+ "$contains": {
348
+ "status": "open",
349
+ "vendorTicket": "ZX-42"
350
+ }
351
+ }
352
+ }
353
+ }
354
+ },
355
+ {
356
+ "id": "ops.0015",
357
+ "section": "§5.4",
358
+ "profile": "core-lite",
359
+ "operation": "op.update_patch",
360
+ "assertion": "envelope_equals",
361
+ "input": {
362
+ "original": {
363
+ "title": "Weekly review",
364
+ "status": "open",
365
+ "due": "2026-02-20",
366
+ "customClient": "ACME"
367
+ },
368
+ "patch": {
369
+ "due": "2026-02-20T09:00:00Z"
370
+ },
371
+ "expectContains": {
372
+ "due": "2026-02-20T09:00:00Z",
373
+ "customClient": "ACME"
374
+ },
375
+ "changed": true
376
+ },
377
+ "expect": {
378
+ "ok": true,
379
+ "result": {
380
+ "changed": true,
381
+ "frontmatter": {
382
+ "$contains": {
383
+ "due": "2026-02-20T09:00:00Z",
384
+ "customClient": "ACME"
385
+ }
386
+ }
387
+ }
388
+ }
389
+ },
390
+ {
391
+ "id": "ops.0016",
392
+ "section": "§5.5",
393
+ "profile": "core-lite",
394
+ "operation": "op.complete_nonrecurring",
395
+ "assertion": "envelope_equals",
396
+ "input": {
397
+ "frontmatter": {
398
+ "title": "Buy groceries",
399
+ "status": "open"
400
+ },
401
+ "completedValues": [
402
+ "done",
403
+ "cancelled"
404
+ ],
405
+ "explicitDate": "2026-02-20",
406
+ "expectedStatus": "done",
407
+ "expectedCompletedDate": "2026-02-20"
408
+ },
409
+ "expect": {
410
+ "ok": true,
411
+ "result": {
412
+ "status": "done",
413
+ "completedDate": "2026-02-20"
414
+ }
415
+ }
416
+ },
417
+ {
418
+ "id": "ops.0017",
419
+ "section": "§5.5",
420
+ "profile": "core-lite",
421
+ "operation": "op.complete_nonrecurring",
422
+ "assertion": "envelope_equals",
423
+ "input": {
424
+ "frontmatter": {
425
+ "title": "Buy groceries",
426
+ "status": "open"
427
+ },
428
+ "completedValues": [
429
+ "cancelled",
430
+ "done"
431
+ ],
432
+ "explicitDate": "2026-02-20",
433
+ "expectedStatus": "cancelled",
434
+ "expectedCompletedDate": "2026-02-20"
435
+ },
436
+ "expect": {
437
+ "ok": true,
438
+ "result": {
439
+ "status": "cancelled",
440
+ "completedDate": "2026-02-20"
441
+ }
442
+ }
443
+ },
444
+ {
445
+ "id": "ops.0018",
446
+ "section": "§5.5",
447
+ "profile": "core-lite",
448
+ "operation": "op.complete_nonrecurring",
449
+ "assertion": "envelope_equals",
450
+ "input": {
451
+ "frontmatter": {
452
+ "title": "Buy groceries",
453
+ "status": "done",
454
+ "completedDate": "2026-02-19"
455
+ },
456
+ "completedValues": [
457
+ "done",
458
+ "cancelled"
459
+ ],
460
+ "expectedStatus": "done",
461
+ "expectedCompletedDateRegex": "^\\d{4}-\\d{2}-\\d{2}$"
462
+ },
463
+ "expect": {
464
+ "ok": true,
465
+ "result": {
466
+ "status": "done",
467
+ "completedDate": {
468
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}$"
469
+ }
470
+ }
471
+ }
472
+ },
473
+ {
474
+ "id": "ops.0019",
475
+ "section": "§5.5",
476
+ "profile": "core-lite",
477
+ "operation": "op.complete_nonrecurring",
478
+ "assertion": "envelope_equals",
479
+ "input": {
480
+ "frontmatter": {
481
+ "title": "Buy groceries",
482
+ "status": "open",
483
+ "completedDate": "2026-02-19"
484
+ },
485
+ "completedValues": [
486
+ "done",
487
+ "cancelled"
488
+ ],
489
+ "expectedStatus": "done",
490
+ "expectedCompletedDateRegex": "^\\d{4}-\\d{2}-\\d{2}$"
491
+ },
492
+ "expect": {
493
+ "ok": true,
494
+ "result": {
495
+ "status": "done",
496
+ "completedDate": {
497
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}$"
498
+ }
499
+ }
500
+ }
501
+ },
502
+ {
503
+ "id": "ops.0020",
504
+ "section": "§5.6",
505
+ "profile": "core-lite",
506
+ "operation": "op.uncomplete_nonrecurring",
507
+ "assertion": "envelope_equals",
508
+ "input": {
509
+ "frontmatter": {
510
+ "title": "Buy groceries",
511
+ "status": "done",
512
+ "completedDate": "2026-02-20"
513
+ },
514
+ "defaultStatus": "open",
515
+ "clearCompletedDate": true,
516
+ "expectedStatus": "open",
517
+ "expectedCompletedDate": null
518
+ },
519
+ "expect": {
520
+ "ok": true,
521
+ "result": {
522
+ "status": "open",
523
+ "completedDate": null
524
+ }
525
+ }
526
+ },
527
+ {
528
+ "id": "ops.0021",
529
+ "section": "§5.6",
530
+ "profile": "core-lite",
531
+ "operation": "op.uncomplete_nonrecurring",
532
+ "assertion": "envelope_equals",
533
+ "input": {
534
+ "frontmatter": {
535
+ "title": "Buy groceries",
536
+ "status": "cancelled",
537
+ "completedDate": "2026-02-20"
538
+ },
539
+ "defaultStatus": "open",
540
+ "clearCompletedDate": false,
541
+ "expectedStatus": "open",
542
+ "expectedCompletedDate": "2026-02-20"
543
+ },
544
+ "expect": {
545
+ "ok": true,
546
+ "result": {
547
+ "status": "open",
548
+ "completedDate": "2026-02-20"
549
+ }
550
+ }
551
+ },
552
+ {
553
+ "id": "ops.0022",
554
+ "section": "§5.6",
555
+ "profile": "core-lite",
556
+ "operation": "op.uncomplete_nonrecurring",
557
+ "assertion": "envelope_equals",
558
+ "input": {
559
+ "frontmatter": {
560
+ "title": "Buy groceries",
561
+ "status": "open"
562
+ },
563
+ "defaultStatus": "open",
564
+ "clearCompletedDate": true,
565
+ "expectedStatus": "open",
566
+ "expectedCompletedDate": null
567
+ },
568
+ "expect": {
569
+ "ok": true,
570
+ "result": {
571
+ "status": "open",
572
+ "completedDate": null
573
+ }
574
+ }
575
+ },
576
+ {
577
+ "id": "ops.0023",
578
+ "section": "§5.7",
579
+ "profile": "recurrence",
580
+ "operation": "recurrence.complete",
581
+ "assertion": "recurrence_complete_invariants",
582
+ "input": {
583
+ "recurrence": "FREQ=DAILY",
584
+ "recurrenceAnchor": "scheduled",
585
+ "scheduled": "2026-02-20",
586
+ "due": "2026-02-21",
587
+ "dateCreated": "2026-02-01",
588
+ "completionDate": "2026-02-20",
589
+ "completeInstances": [
590
+ "2026-02-19"
591
+ ],
592
+ "skippedInstances": [
593
+ "2026-02-22"
594
+ ]
595
+ }
596
+ },
597
+ {
598
+ "id": "ops.0024",
599
+ "section": "§5.8",
600
+ "profile": "recurrence",
601
+ "operation": "recurrence.uncomplete_instance",
602
+ "assertion": "envelope_equals",
603
+ "input": {
604
+ "targetDate": "2026-02-20",
605
+ "completeInstances": [
606
+ "2026-02-20",
607
+ "2026-02-21"
608
+ ],
609
+ "skippedInstances": [
610
+ "2026-02-23"
611
+ ]
612
+ },
613
+ "expect": {
614
+ "ok": true,
615
+ "result": {
616
+ "completeInstances": [
617
+ "2026-02-21"
618
+ ]
619
+ }
620
+ }
621
+ },
622
+ {
623
+ "id": "ops.0025",
624
+ "section": "§5.9",
625
+ "profile": "recurrence",
626
+ "operation": "recurrence.skip_instance",
627
+ "assertion": "envelope_equals",
628
+ "input": {
629
+ "targetDate": "2026-02-20",
630
+ "completeInstances": [
631
+ "2026-02-20"
632
+ ],
633
+ "skippedInstances": [
634
+ "2026-02-22"
635
+ ]
636
+ },
637
+ "expect": {
638
+ "ok": true,
639
+ "result": {
640
+ "skippedInstances": {
641
+ "$contains": [
642
+ "2026-02-20"
643
+ ]
644
+ }
645
+ }
646
+ }
647
+ },
648
+ {
649
+ "id": "ops.0026",
650
+ "section": "§5.9",
651
+ "profile": "recurrence",
652
+ "operation": "recurrence.unskip_instance",
653
+ "assertion": "envelope_equals",
654
+ "input": {
655
+ "targetDate": "2026-02-20",
656
+ "completeInstances": [
657
+ "2026-02-20"
658
+ ],
659
+ "skippedInstances": [
660
+ "2026-02-21",
661
+ "2026-02-22"
662
+ ]
663
+ },
664
+ "expect": {
665
+ "ok": true,
666
+ "result": {
667
+ "skippedInstances": [
668
+ "2026-02-21",
669
+ "2026-02-22"
670
+ ]
671
+ }
672
+ }
673
+ },
674
+ {
675
+ "id": "ops.0027",
676
+ "section": "§4.11",
677
+ "profile": "recurrence",
678
+ "operation": "recurrence.effective_state",
679
+ "assertion": "envelope_equals",
680
+ "input": {
681
+ "targetDate": "2026-02-20",
682
+ "completeInstances": [
683
+ "2026-02-20"
684
+ ],
685
+ "skippedInstances": [
686
+ "2026-02-21"
687
+ ]
688
+ },
689
+ "expect": {
690
+ "ok": true,
691
+ "result": {
692
+ "value": "completed"
693
+ }
694
+ }
695
+ },
696
+ {
697
+ "id": "ops.0028",
698
+ "section": "§5.7",
699
+ "profile": "recurrence",
700
+ "operation": "recurrence.complete",
701
+ "assertion": "recurrence_complete_invariants",
702
+ "input": {
703
+ "recurrence": "FREQ=DAILY",
704
+ "recurrenceAnchor": "scheduled",
705
+ "scheduled": "2026-02-20",
706
+ "due": "2026-02-21",
707
+ "dateCreated": "2026-02-01",
708
+ "completionDate": "2026-02-21",
709
+ "completeInstances": [
710
+ "2026-02-19"
711
+ ],
712
+ "skippedInstances": [
713
+ "2026-02-22"
714
+ ]
715
+ }
716
+ },
717
+ {
718
+ "id": "ops.0029",
719
+ "section": "§5.8",
720
+ "profile": "recurrence",
721
+ "operation": "recurrence.uncomplete_instance",
722
+ "assertion": "envelope_equals",
723
+ "input": {
724
+ "targetDate": "2026-02-21",
725
+ "completeInstances": [
726
+ "2026-02-20",
727
+ "2026-02-21"
728
+ ],
729
+ "skippedInstances": [
730
+ "2026-02-23"
731
+ ]
732
+ },
733
+ "expect": {
734
+ "ok": true,
735
+ "result": {
736
+ "completeInstances": [
737
+ "2026-02-20"
738
+ ]
739
+ }
740
+ }
741
+ },
742
+ {
743
+ "id": "ops.0030",
744
+ "section": "§5.8",
745
+ "profile": "recurrence",
746
+ "operation": "recurrence.uncomplete_instance",
747
+ "assertion": "envelope_equals",
748
+ "input": {
749
+ "targetDate": "2026-02-21",
750
+ "recurrenceAnchor": "completion",
751
+ "recurrence": "DTSTART:20260221;FREQ=DAILY",
752
+ "completeInstances": [
753
+ "2026-02-20",
754
+ "2026-02-21"
755
+ ],
756
+ "skippedInstances": []
757
+ },
758
+ "expect": {
759
+ "ok": true,
760
+ "result": {
761
+ "completeInstances": [
762
+ "2026-02-20"
763
+ ],
764
+ "updatedRecurrence": "DTSTART:20260221;FREQ=DAILY"
765
+ }
766
+ }
767
+ },
768
+ {
769
+ "id": "ops.0031",
770
+ "section": "§5.9",
771
+ "profile": "recurrence",
772
+ "operation": "recurrence.skip_instance",
773
+ "assertion": "envelope_equals",
774
+ "input": {
775
+ "targetDate": "2026-02-21",
776
+ "completeInstances": [
777
+ "2026-02-20"
778
+ ],
779
+ "skippedInstances": [
780
+ "2026-02-22"
781
+ ]
782
+ },
783
+ "expect": {
784
+ "ok": true,
785
+ "result": {
786
+ "skippedInstances": {
787
+ "$contains": [
788
+ "2026-02-21"
789
+ ]
790
+ }
791
+ }
792
+ }
793
+ },
794
+ {
795
+ "id": "ops.0032",
796
+ "section": "§5.9",
797
+ "profile": "recurrence",
798
+ "operation": "recurrence.unskip_instance",
799
+ "assertion": "envelope_equals",
800
+ "input": {
801
+ "targetDate": "2026-02-21",
802
+ "completeInstances": [
803
+ "2026-02-20"
804
+ ],
805
+ "skippedInstances": [
806
+ "2026-02-21",
807
+ "2026-02-22"
808
+ ]
809
+ },
810
+ "expect": {
811
+ "ok": true,
812
+ "result": {
813
+ "skippedInstances": [
814
+ "2026-02-22"
815
+ ]
816
+ }
817
+ }
818
+ },
819
+ {
820
+ "id": "ops.0033",
821
+ "section": "§4.11",
822
+ "profile": "recurrence",
823
+ "operation": "recurrence.effective_state",
824
+ "assertion": "envelope_equals",
825
+ "input": {
826
+ "targetDate": "2026-02-21",
827
+ "completeInstances": [
828
+ "2026-02-20"
829
+ ],
830
+ "skippedInstances": [
831
+ "2026-02-21"
832
+ ]
833
+ },
834
+ "expect": {
835
+ "ok": true,
836
+ "result": {
837
+ "value": "skipped"
838
+ }
839
+ }
840
+ },
841
+ {
842
+ "id": "ops.0034",
843
+ "section": "§5.7",
844
+ "profile": "recurrence",
845
+ "operation": "recurrence.complete",
846
+ "assertion": "recurrence_complete_invariants",
847
+ "input": {
848
+ "recurrence": "FREQ=DAILY",
849
+ "recurrenceAnchor": "scheduled",
850
+ "scheduled": "2026-02-20",
851
+ "due": "2026-02-21",
852
+ "dateCreated": "2026-02-01",
853
+ "completionDate": "2026-02-22",
854
+ "completeInstances": [
855
+ "2026-02-19"
856
+ ],
857
+ "skippedInstances": [
858
+ "2026-02-22"
859
+ ]
860
+ }
861
+ },
862
+ {
863
+ "id": "ops.0035",
864
+ "section": "§5.8",
865
+ "profile": "recurrence",
866
+ "operation": "recurrence.uncomplete_instance",
867
+ "assertion": "envelope_equals",
868
+ "input": {
869
+ "targetDate": "2026-02-22",
870
+ "completeInstances": [
871
+ "2026-02-20",
872
+ "2026-02-21"
873
+ ],
874
+ "skippedInstances": [
875
+ "2026-02-23"
876
+ ]
877
+ },
878
+ "expect": {
879
+ "ok": true,
880
+ "result": {
881
+ "completeInstances": [
882
+ "2026-02-20",
883
+ "2026-02-21"
884
+ ]
885
+ }
886
+ }
887
+ },
888
+ {
889
+ "id": "ops.0036",
890
+ "section": "§5.9",
891
+ "profile": "recurrence",
892
+ "operation": "recurrence.skip_instance",
893
+ "assertion": "envelope_equals",
894
+ "input": {
895
+ "targetDate": "2026-02-22",
896
+ "completeInstances": [
897
+ "2026-02-20"
898
+ ],
899
+ "skippedInstances": [
900
+ "2026-02-22"
901
+ ]
902
+ },
903
+ "expect": {
904
+ "ok": true,
905
+ "result": {
906
+ "skippedInstances": {
907
+ "$contains": [
908
+ "2026-02-22"
909
+ ]
910
+ }
911
+ }
912
+ }
913
+ },
914
+ {
915
+ "id": "ops.0037",
916
+ "section": "§5.9",
917
+ "profile": "recurrence",
918
+ "operation": "recurrence.unskip_instance",
919
+ "assertion": "envelope_equals",
920
+ "input": {
921
+ "targetDate": "2026-02-22",
922
+ "completeInstances": [
923
+ "2026-02-20"
924
+ ],
925
+ "skippedInstances": [
926
+ "2026-02-21",
927
+ "2026-02-22"
928
+ ]
929
+ },
930
+ "expect": {
931
+ "ok": true,
932
+ "result": {
933
+ "skippedInstances": [
934
+ "2026-02-21"
935
+ ]
936
+ }
937
+ }
938
+ },
939
+ {
940
+ "id": "ops.0038",
941
+ "section": "§4.11",
942
+ "profile": "recurrence",
943
+ "operation": "recurrence.effective_state",
944
+ "assertion": "envelope_equals",
945
+ "input": {
946
+ "targetDate": "2026-02-22",
947
+ "completeInstances": [
948
+ "2026-02-20"
949
+ ],
950
+ "skippedInstances": [
951
+ "2026-02-21"
952
+ ]
953
+ },
954
+ "expect": {
955
+ "ok": true,
956
+ "result": {
957
+ "value": "open"
958
+ }
959
+ }
960
+ },
961
+ {
962
+ "id": "ops.0039",
963
+ "section": "§5.7",
964
+ "profile": "recurrence",
965
+ "operation": "recurrence.complete",
966
+ "assertion": "recurrence_complete_invariants",
967
+ "input": {
968
+ "recurrence": "FREQ=DAILY",
969
+ "recurrenceAnchor": "scheduled",
970
+ "scheduled": "2026-02-20",
971
+ "due": "2026-02-21",
972
+ "dateCreated": "2026-02-01",
973
+ "completionDate": "2026-02-23",
974
+ "completeInstances": [
975
+ "2026-02-19"
976
+ ],
977
+ "skippedInstances": [
978
+ "2026-02-22"
979
+ ]
980
+ }
981
+ },
982
+ {
983
+ "id": "ops.0040",
984
+ "section": "§5.8",
985
+ "profile": "recurrence",
986
+ "operation": "recurrence.uncomplete_instance",
987
+ "assertion": "envelope_equals",
988
+ "input": {
989
+ "targetDate": "2026-02-23",
990
+ "completeInstances": [
991
+ "2026-02-20",
992
+ "2026-02-21"
993
+ ],
994
+ "skippedInstances": [
995
+ "2026-02-23"
996
+ ]
997
+ },
998
+ "expect": {
999
+ "ok": true,
1000
+ "result": {
1001
+ "completeInstances": [
1002
+ "2026-02-20",
1003
+ "2026-02-21"
1004
+ ]
1005
+ }
1006
+ }
1007
+ },
1008
+ {
1009
+ "id": "ops.0041",
1010
+ "section": "§5.9",
1011
+ "profile": "recurrence",
1012
+ "operation": "recurrence.skip_instance",
1013
+ "assertion": "envelope_equals",
1014
+ "input": {
1015
+ "targetDate": "2026-02-23",
1016
+ "completeInstances": [
1017
+ "2026-02-20"
1018
+ ],
1019
+ "skippedInstances": [
1020
+ "2026-02-22"
1021
+ ]
1022
+ },
1023
+ "expect": {
1024
+ "ok": true,
1025
+ "result": {
1026
+ "skippedInstances": {
1027
+ "$contains": [
1028
+ "2026-02-23"
1029
+ ]
1030
+ }
1031
+ }
1032
+ }
1033
+ },
1034
+ {
1035
+ "id": "ops.0042",
1036
+ "section": "§5.9",
1037
+ "profile": "recurrence",
1038
+ "operation": "recurrence.unskip_instance",
1039
+ "assertion": "envelope_equals",
1040
+ "input": {
1041
+ "targetDate": "2026-02-23",
1042
+ "completeInstances": [
1043
+ "2026-02-20"
1044
+ ],
1045
+ "skippedInstances": [
1046
+ "2026-02-21",
1047
+ "2026-02-22"
1048
+ ]
1049
+ },
1050
+ "expect": {
1051
+ "ok": true,
1052
+ "result": {
1053
+ "skippedInstances": [
1054
+ "2026-02-21",
1055
+ "2026-02-22"
1056
+ ]
1057
+ }
1058
+ }
1059
+ },
1060
+ {
1061
+ "id": "ops.0043",
1062
+ "section": "§4.11",
1063
+ "profile": "recurrence",
1064
+ "operation": "recurrence.effective_state",
1065
+ "assertion": "envelope_equals",
1066
+ "input": {
1067
+ "targetDate": "2026-02-23",
1068
+ "completeInstances": [
1069
+ "2026-02-20"
1070
+ ],
1071
+ "skippedInstances": [
1072
+ "2026-02-21"
1073
+ ]
1074
+ },
1075
+ "expect": {
1076
+ "ok": true,
1077
+ "result": {
1078
+ "value": "open"
1079
+ }
1080
+ }
1081
+ },
1082
+ {
1083
+ "id": "ops.0044",
1084
+ "section": "§5.10.1",
1085
+ "profile": "extended",
1086
+ "operation": "dependency.add",
1087
+ "assertion": "envelope_equals",
1088
+ "requires": [
1089
+ "dependencies"
1090
+ ],
1091
+ "input": {
1092
+ "current": [
1093
+ {
1094
+ "uid": "[[a]]",
1095
+ "reltype": "FINISHTOSTART"
1096
+ }
1097
+ ],
1098
+ "entry": {
1099
+ "uid": "[[b]]",
1100
+ "reltype": "STARTTOSTART"
1101
+ }
1102
+ },
1103
+ "expect": {
1104
+ "ok": true,
1105
+ "result": {
1106
+ "value": [
1107
+ {
1108
+ "uid": "[[a]]",
1109
+ "reltype": "FINISHTOSTART"
1110
+ },
1111
+ {
1112
+ "uid": "[[b]]",
1113
+ "reltype": "STARTTOSTART"
1114
+ }
1115
+ ]
1116
+ }
1117
+ }
1118
+ },
1119
+ {
1120
+ "id": "ops.0045",
1121
+ "section": "§5.10.2",
1122
+ "profile": "extended",
1123
+ "operation": "dependency.remove",
1124
+ "assertion": "envelope_equals",
1125
+ "requires": [
1126
+ "dependencies"
1127
+ ],
1128
+ "input": {
1129
+ "current": [
1130
+ {
1131
+ "uid": "[[a]]",
1132
+ "reltype": "FINISHTOSTART"
1133
+ },
1134
+ {
1135
+ "uid": "[[b]]",
1136
+ "reltype": "STARTTOSTART"
1137
+ }
1138
+ ],
1139
+ "uid": "[[a]]"
1140
+ },
1141
+ "expect": {
1142
+ "ok": true,
1143
+ "result": {
1144
+ "value": [
1145
+ {
1146
+ "uid": "[[b]]",
1147
+ "reltype": "STARTTOSTART"
1148
+ }
1149
+ ]
1150
+ }
1151
+ }
1152
+ },
1153
+ {
1154
+ "id": "ops.0046",
1155
+ "section": "§5.10.3",
1156
+ "profile": "extended",
1157
+ "operation": "dependency.replace",
1158
+ "assertion": "envelope_equals",
1159
+ "requires": [
1160
+ "dependencies"
1161
+ ],
1162
+ "input": {
1163
+ "current": [
1164
+ {
1165
+ "uid": "[[a]]",
1166
+ "reltype": "FINISHTOSTART"
1167
+ }
1168
+ ],
1169
+ "entries": [
1170
+ {
1171
+ "uid": "[[z]]",
1172
+ "reltype": "FINISHTOFINISH"
1173
+ }
1174
+ ]
1175
+ },
1176
+ "expect": {
1177
+ "ok": true,
1178
+ "result": {
1179
+ "value": [
1180
+ {
1181
+ "uid": "[[z]]",
1182
+ "reltype": "FINISHTOFINISH"
1183
+ }
1184
+ ]
1185
+ }
1186
+ }
1187
+ },
1188
+ {
1189
+ "id": "ops.0047",
1190
+ "section": "§5.10.1",
1191
+ "profile": "extended",
1192
+ "operation": "dependency.add",
1193
+ "assertion": "envelope_equals",
1194
+ "requires": [
1195
+ "dependencies"
1196
+ ],
1197
+ "input": {
1198
+ "current": [],
1199
+ "entry": {
1200
+ "uid": "[[a]]",
1201
+ "reltype": "FINISHTOSTART"
1202
+ }
1203
+ },
1204
+ "expect": {
1205
+ "ok": true,
1206
+ "result": {
1207
+ "value": [
1208
+ {
1209
+ "uid": "[[a]]",
1210
+ "reltype": "FINISHTOSTART"
1211
+ }
1212
+ ]
1213
+ }
1214
+ }
1215
+ },
1216
+ {
1217
+ "id": "ops.0048",
1218
+ "section": "§5.10.2",
1219
+ "profile": "extended",
1220
+ "operation": "dependency.remove",
1221
+ "assertion": "envelope_equals",
1222
+ "requires": [
1223
+ "dependencies"
1224
+ ],
1225
+ "input": {
1226
+ "current": [
1227
+ {
1228
+ "uid": "[[a]]",
1229
+ "reltype": "FINISHTOSTART"
1230
+ }
1231
+ ],
1232
+ "uid": "[[a]]"
1233
+ },
1234
+ "expect": {
1235
+ "ok": true,
1236
+ "result": {
1237
+ "value": []
1238
+ }
1239
+ }
1240
+ },
1241
+ {
1242
+ "id": "ops.0049",
1243
+ "section": "§5.10.3",
1244
+ "profile": "extended",
1245
+ "operation": "dependency.replace",
1246
+ "assertion": "envelope_equals",
1247
+ "requires": [
1248
+ "dependencies"
1249
+ ],
1250
+ "input": {
1251
+ "current": [
1252
+ {
1253
+ "uid": "[[a]]",
1254
+ "reltype": "FINISHTOSTART"
1255
+ },
1256
+ {
1257
+ "uid": "[[b]]",
1258
+ "reltype": "STARTTOSTART"
1259
+ }
1260
+ ],
1261
+ "entries": []
1262
+ },
1263
+ "expect": {
1264
+ "ok": true,
1265
+ "result": {
1266
+ "value": []
1267
+ }
1268
+ }
1269
+ },
1270
+ {
1271
+ "id": "ops.0050",
1272
+ "section": "§5.10.3",
1273
+ "profile": "extended",
1274
+ "operation": "dependency.replace",
1275
+ "assertion": "envelope_equals",
1276
+ "requires": [
1277
+ "dependencies"
1278
+ ],
1279
+ "input": {
1280
+ "current": [
1281
+ {
1282
+ "uid": "[[a]]",
1283
+ "reltype": "FINISHTOSTART"
1284
+ }
1285
+ ],
1286
+ "entries": [
1287
+ {
1288
+ "uid": "[[x]]",
1289
+ "reltype": "FINISHTOSTART"
1290
+ },
1291
+ {
1292
+ "uid": "[[y]]",
1293
+ "reltype": "STARTTOSTART"
1294
+ },
1295
+ {
1296
+ "uid": "[[z]]",
1297
+ "reltype": "FINISHTOFINISH"
1298
+ }
1299
+ ]
1300
+ },
1301
+ "expect": {
1302
+ "ok": true,
1303
+ "result": {
1304
+ "value": [
1305
+ {
1306
+ "uid": "[[x]]",
1307
+ "reltype": "FINISHTOSTART"
1308
+ },
1309
+ {
1310
+ "uid": "[[y]]",
1311
+ "reltype": "STARTTOSTART"
1312
+ },
1313
+ {
1314
+ "uid": "[[z]]",
1315
+ "reltype": "FINISHTOFINISH"
1316
+ }
1317
+ ]
1318
+ }
1319
+ }
1320
+ },
1321
+ {
1322
+ "id": "ops.0051",
1323
+ "section": "§5.11.1",
1324
+ "profile": "extended",
1325
+ "operation": "reminder.add",
1326
+ "assertion": "envelope_equals",
1327
+ "requires": [
1328
+ "reminders"
1329
+ ],
1330
+ "input": {
1331
+ "current": [
1332
+ {
1333
+ "id": "r1",
1334
+ "type": "absolute",
1335
+ "absoluteTime": "2026-02-20T09:00:00Z"
1336
+ }
1337
+ ],
1338
+ "entry": {
1339
+ "id": "r2",
1340
+ "type": "relative",
1341
+ "relatedTo": "due",
1342
+ "offset": "-PT1H"
1343
+ }
1344
+ },
1345
+ "expect": {
1346
+ "ok": true,
1347
+ "result": {
1348
+ "value": {
1349
+ "$contains": [
1350
+ {
1351
+ "id": "r1"
1352
+ },
1353
+ {
1354
+ "id": "r2",
1355
+ "type": "relative",
1356
+ "relatedTo": "due",
1357
+ "offset": "-PT1H"
1358
+ }
1359
+ ]
1360
+ }
1361
+ }
1362
+ }
1363
+ },
1364
+ {
1365
+ "id": "ops.0052",
1366
+ "section": "§5.11.2",
1367
+ "profile": "extended",
1368
+ "operation": "reminder.update",
1369
+ "assertion": "envelope_equals",
1370
+ "requires": [
1371
+ "reminders"
1372
+ ],
1373
+ "input": {
1374
+ "current": [
1375
+ {
1376
+ "id": "r1",
1377
+ "type": "relative",
1378
+ "relatedTo": "due",
1379
+ "offset": "-PT1H"
1380
+ }
1381
+ ],
1382
+ "id": "r1",
1383
+ "patch": {
1384
+ "offset": "-PT30M"
1385
+ }
1386
+ },
1387
+ "expect": {
1388
+ "ok": true,
1389
+ "result": {
1390
+ "value": [
1391
+ {
1392
+ "id": "r1",
1393
+ "type": "relative",
1394
+ "relatedTo": "due",
1395
+ "offset": "-PT30M"
1396
+ }
1397
+ ]
1398
+ }
1399
+ }
1400
+ },
1401
+ {
1402
+ "id": "ops.0053",
1403
+ "section": "§5.11.3",
1404
+ "profile": "extended",
1405
+ "operation": "reminder.remove",
1406
+ "assertion": "envelope_equals",
1407
+ "requires": [
1408
+ "reminders"
1409
+ ],
1410
+ "input": {
1411
+ "current": [
1412
+ {
1413
+ "id": "r1",
1414
+ "type": "relative",
1415
+ "relatedTo": "due",
1416
+ "offset": "-PT1H"
1417
+ },
1418
+ {
1419
+ "id": "r2",
1420
+ "type": "absolute",
1421
+ "absoluteTime": "2026-02-20T09:00:00Z"
1422
+ }
1423
+ ],
1424
+ "id": "r1"
1425
+ },
1426
+ "expect": {
1427
+ "ok": true,
1428
+ "result": {
1429
+ "value": [
1430
+ {
1431
+ "id": "r2",
1432
+ "type": "absolute",
1433
+ "absoluteTime": "2026-02-20T09:00:00Z"
1434
+ }
1435
+ ]
1436
+ }
1437
+ }
1438
+ },
1439
+ {
1440
+ "id": "ops.0054",
1441
+ "section": "§5.11.1",
1442
+ "profile": "extended",
1443
+ "operation": "reminder.add",
1444
+ "assertion": "envelope_equals",
1445
+ "requires": [
1446
+ "reminders"
1447
+ ],
1448
+ "input": {
1449
+ "current": [],
1450
+ "entry": {
1451
+ "id": "r1",
1452
+ "type": "absolute",
1453
+ "absoluteTime": "2026-02-20T09:00:00Z"
1454
+ }
1455
+ },
1456
+ "expect": {
1457
+ "ok": true,
1458
+ "result": {
1459
+ "value": [
1460
+ {
1461
+ "id": "r1",
1462
+ "type": "absolute",
1463
+ "absoluteTime": "2026-02-20T09:00:00Z"
1464
+ }
1465
+ ]
1466
+ }
1467
+ }
1468
+ },
1469
+ {
1470
+ "id": "ops.0055",
1471
+ "section": "§5.11.2",
1472
+ "profile": "extended",
1473
+ "operation": "reminder.update",
1474
+ "assertion": "envelope_equals",
1475
+ "requires": [
1476
+ "reminders"
1477
+ ],
1478
+ "input": {
1479
+ "current": [
1480
+ {
1481
+ "id": "r1",
1482
+ "type": "absolute",
1483
+ "absoluteTime": "2026-02-20T09:00:00Z"
1484
+ }
1485
+ ],
1486
+ "id": "r1",
1487
+ "patch": {
1488
+ "absoluteTime": "2026-02-21T10:00:00Z"
1489
+ }
1490
+ },
1491
+ "expect": {
1492
+ "ok": true,
1493
+ "result": {
1494
+ "value": [
1495
+ {
1496
+ "id": "r1",
1497
+ "type": "absolute",
1498
+ "absoluteTime": "2026-02-21T10:00:00Z"
1499
+ }
1500
+ ]
1501
+ }
1502
+ }
1503
+ },
1504
+ {
1505
+ "id": "ops.0056",
1506
+ "section": "§5.11.3",
1507
+ "profile": "extended",
1508
+ "operation": "reminder.remove",
1509
+ "assertion": "envelope_equals",
1510
+ "requires": [
1511
+ "reminders"
1512
+ ],
1513
+ "input": {
1514
+ "current": [
1515
+ {
1516
+ "id": "r1",
1517
+ "type": "relative",
1518
+ "relatedTo": "due",
1519
+ "offset": "-PT1H"
1520
+ }
1521
+ ],
1522
+ "id": "r1"
1523
+ },
1524
+ "expect": {
1525
+ "ok": true,
1526
+ "result": {
1527
+ "value": []
1528
+ }
1529
+ }
1530
+ },
1531
+ {
1532
+ "id": "ops.0057",
1533
+ "section": "§5.10.1",
1534
+ "profile": "extended",
1535
+ "operation": "dependency.add",
1536
+ "assertion": "envelope_equals",
1537
+ "requires": [
1538
+ "dependencies"
1539
+ ],
1540
+ "input": {
1541
+ "current": [
1542
+ {
1543
+ "uid": "[[a]]",
1544
+ "reltype": "FINISHTOSTART"
1545
+ }
1546
+ ],
1547
+ "entry": {
1548
+ "uid": "[[a]]",
1549
+ "reltype": "STARTTOSTART"
1550
+ }
1551
+ },
1552
+ "expect": {
1553
+ "ok": true,
1554
+ "result": {
1555
+ "value": [
1556
+ {
1557
+ "uid": "[[a]]",
1558
+ "reltype": "FINISHTOSTART"
1559
+ },
1560
+ {
1561
+ "uid": "[[a]]",
1562
+ "reltype": "STARTTOSTART"
1563
+ }
1564
+ ]
1565
+ }
1566
+ }
1567
+ },
1568
+ {
1569
+ "id": "ops.0058",
1570
+ "section": "§5.11.2",
1571
+ "profile": "extended",
1572
+ "operation": "reminder.update",
1573
+ "assertion": "envelope_error",
1574
+ "requires": [
1575
+ "reminders"
1576
+ ],
1577
+ "input": {
1578
+ "current": [
1579
+ {
1580
+ "id": "r1",
1581
+ "type": "relative",
1582
+ "relatedTo": "due",
1583
+ "offset": "-PT1H"
1584
+ }
1585
+ ],
1586
+ "id": "r99",
1587
+ "patch": {
1588
+ "offset": "-PT30M"
1589
+ }
1590
+ },
1591
+ "expect": {
1592
+ "error": {
1593
+ "$regex": "not_found|reminder|unknown"
1594
+ }
1595
+ }
1596
+ },
1597
+ {
1598
+ "id": "ops.0059",
1599
+ "section": "§5.12",
1600
+ "profile": "extended",
1601
+ "operation": "archive.apply",
1602
+ "assertion": "envelope_equals",
1603
+ "requires": [
1604
+ "archive"
1605
+ ],
1606
+ "input": {
1607
+ "frontmatter": {
1608
+ "title": "Archive me",
1609
+ "status": "open",
1610
+ "tags": [
1611
+ "task"
1612
+ ]
1613
+ },
1614
+ "mode": "tag"
1615
+ },
1616
+ "expect": {
1617
+ "ok": true,
1618
+ "result": {
1619
+ "deleted": false
1620
+ }
1621
+ }
1622
+ },
1623
+ {
1624
+ "id": "ops.0060",
1625
+ "section": "§5.13",
1626
+ "profile": "core-lite",
1627
+ "operation": "delete.remove",
1628
+ "assertion": "envelope_equals",
1629
+ "input": {
1630
+ "path": "tasks/demo.md",
1631
+ "checkBacklinks": true,
1632
+ "force": true
1633
+ },
1634
+ "expect": {
1635
+ "ok": true,
1636
+ "result": {
1637
+ "deleted": true
1638
+ }
1639
+ }
1640
+ },
1641
+ {
1642
+ "id": "ops.0061",
1643
+ "section": "§5.13",
1644
+ "profile": "core-lite",
1645
+ "operation": "delete.remove",
1646
+ "assertion": "envelope_error",
1647
+ "input": {
1648
+ "path": "tasks/demo.md",
1649
+ "checkBacklinks": true,
1650
+ "force": false,
1651
+ "brokenLinks": [
1652
+ "tasks/other.md"
1653
+ ]
1654
+ },
1655
+ "expect": {
1656
+ "error": {
1657
+ "$regex": "backlink|dependency|force"
1658
+ }
1659
+ }
1660
+ },
1661
+ {
1662
+ "id": "ops.0062",
1663
+ "section": "§5.14",
1664
+ "profile": "extended",
1665
+ "operation": "rename.apply",
1666
+ "assertion": "envelope_equals",
1667
+ "requires": [
1668
+ "rename"
1669
+ ],
1670
+ "input": {
1671
+ "fromPath": "tasks/Old.md",
1672
+ "toPath": "tasks/New.md",
1673
+ "titleStorage": "filename",
1674
+ "updateReferences": true
1675
+ },
1676
+ "expect": {
1677
+ "ok": true,
1678
+ "result": {
1679
+ "path": "tasks/New.md",
1680
+ "referencesUpdated": true
1681
+ }
1682
+ }
1683
+ },
1684
+ {
1685
+ "id": "ops.0063",
1686
+ "section": "§5.14",
1687
+ "profile": "extended",
1688
+ "operation": "rename.apply",
1689
+ "assertion": "envelope_equals",
1690
+ "requires": [
1691
+ "rename"
1692
+ ],
1693
+ "input": {
1694
+ "fromPath": "tasks/OldNoRef.md",
1695
+ "toPath": "tasks/NewNoRef.md",
1696
+ "titleStorage": "filename",
1697
+ "updateReferences": false
1698
+ },
1699
+ "expect": {
1700
+ "ok": true,
1701
+ "result": {
1702
+ "path": "tasks/NewNoRef.md",
1703
+ "referencesUpdated": false
1704
+ }
1705
+ }
1706
+ },
1707
+ {
1708
+ "id": "ops.0064",
1709
+ "section": "§5.14",
1710
+ "profile": "extended",
1711
+ "operation": "rename.apply",
1712
+ "assertion": "envelope_equals",
1713
+ "requires": [
1714
+ "rename"
1715
+ ],
1716
+ "input": {
1717
+ "fromPath": "tasks/sub/OldNested.md",
1718
+ "toPath": "tasks/sub/NewNested.md",
1719
+ "titleStorage": "filename",
1720
+ "updateReferences": true
1721
+ },
1722
+ "expect": {
1723
+ "ok": true,
1724
+ "result": {
1725
+ "path": "tasks/sub/NewNested.md",
1726
+ "referencesUpdated": true
1727
+ }
1728
+ }
1729
+ },
1730
+ {
1731
+ "id": "ops.0065",
1732
+ "section": "§5.14",
1733
+ "profile": "extended",
1734
+ "operation": "rename.apply",
1735
+ "assertion": "envelope_equals",
1736
+ "requires": [
1737
+ "rename"
1738
+ ],
1739
+ "input": {
1740
+ "fromPath": "tasks/FrontmatterMode.md",
1741
+ "toPath": "archive/FrontmatterModeRenamed.md",
1742
+ "titleStorage": "frontmatter",
1743
+ "updateReferences": false
1744
+ },
1745
+ "expect": {
1746
+ "ok": true,
1747
+ "result": {
1748
+ "path": "archive/FrontmatterModeRenamed.md",
1749
+ "referencesUpdated": false
1750
+ }
1751
+ }
1752
+ },
1753
+ {
1754
+ "id": "ops.0066",
1755
+ "section": "§5.4.4",
1756
+ "profile": "extended",
1757
+ "operation": "rename.title_storage_interaction",
1758
+ "assertion": "envelope_equals",
1759
+ "requires": [
1760
+ "rename"
1761
+ ],
1762
+ "input": {
1763
+ "titleStorage": "filename",
1764
+ "oldPath": "tasks/Old.md",
1765
+ "newTitle": "New Title",
1766
+ "expectedPathRegex": "^tasks/New(?:-| )Title\\.md$",
1767
+ "expectedFrontmatterTitle": "New Title",
1768
+ "expectedRenamed": true
1769
+ },
1770
+ "expect": {
1771
+ "ok": true,
1772
+ "result": {
1773
+ "path": {
1774
+ "$regex": "^tasks/New(?:-| )Title\\.md$"
1775
+ },
1776
+ "renamed": true,
1777
+ "frontmatter": {
1778
+ "$contains": {
1779
+ "title": "New Title"
1780
+ }
1781
+ }
1782
+ }
1783
+ }
1784
+ },
1785
+ {
1786
+ "id": "ops.0067",
1787
+ "section": "§5.4.4",
1788
+ "profile": "extended",
1789
+ "operation": "rename.title_storage_interaction",
1790
+ "assertion": "envelope_equals",
1791
+ "requires": [
1792
+ "rename"
1793
+ ],
1794
+ "input": {
1795
+ "titleStorage": "frontmatter",
1796
+ "oldPath": "tasks/Old.md",
1797
+ "newTitle": "New Title",
1798
+ "expectedPath": "tasks/Old.md",
1799
+ "expectedFrontmatterTitle": "New Title",
1800
+ "expectedRenamed": false
1801
+ },
1802
+ "expect": {
1803
+ "ok": true,
1804
+ "result": {
1805
+ "path": "tasks/Old.md",
1806
+ "renamed": false,
1807
+ "frontmatter": {
1808
+ "$contains": {
1809
+ "title": "New Title"
1810
+ }
1811
+ }
1812
+ }
1813
+ }
1814
+ },
1815
+ {
1816
+ "id": "ops.0068",
1817
+ "section": "§5.15",
1818
+ "profile": "extended",
1819
+ "operation": "batch.apply",
1820
+ "assertion": "envelope_equals",
1821
+ "requires": [
1822
+ "batch"
1823
+ ],
1824
+ "input": {
1825
+ "items": [
1826
+ {
1827
+ "id": "a"
1828
+ },
1829
+ {
1830
+ "id": "b"
1831
+ },
1832
+ {
1833
+ "id": "c"
1834
+ }
1835
+ ],
1836
+ "outcomes": [
1837
+ {
1838
+ "id": "a",
1839
+ "ok": true
1840
+ },
1841
+ {
1842
+ "id": "b",
1843
+ "ok": false
1844
+ },
1845
+ {
1846
+ "id": "c",
1847
+ "ok": true
1848
+ }
1849
+ ]
1850
+ },
1851
+ "expect": {
1852
+ "ok": true,
1853
+ "result": {
1854
+ "total": 3,
1855
+ "succeeded": 2,
1856
+ "failed": 1
1857
+ }
1858
+ }
1859
+ },
1860
+ {
1861
+ "id": "ops.0069",
1862
+ "section": "§5.15",
1863
+ "profile": "extended",
1864
+ "operation": "batch.apply",
1865
+ "assertion": "envelope_equals",
1866
+ "requires": [
1867
+ "batch"
1868
+ ],
1869
+ "input": {
1870
+ "items": [
1871
+ {
1872
+ "id": "a"
1873
+ },
1874
+ {
1875
+ "id": "b"
1876
+ }
1877
+ ],
1878
+ "outcomes": [
1879
+ {
1880
+ "id": "a",
1881
+ "ok": true
1882
+ },
1883
+ {
1884
+ "id": "b",
1885
+ "ok": true
1886
+ }
1887
+ ]
1888
+ },
1889
+ "expect": {
1890
+ "ok": true,
1891
+ "result": {
1892
+ "total": 2,
1893
+ "succeeded": 2,
1894
+ "failed": 0
1895
+ }
1896
+ }
1897
+ },
1898
+ {
1899
+ "id": "ops.0070",
1900
+ "section": "§5.15",
1901
+ "profile": "extended",
1902
+ "operation": "batch.apply",
1903
+ "assertion": "envelope_equals",
1904
+ "requires": [
1905
+ "batch"
1906
+ ],
1907
+ "input": {
1908
+ "items": [
1909
+ {
1910
+ "id": "a"
1911
+ },
1912
+ {
1913
+ "id": "b"
1914
+ }
1915
+ ],
1916
+ "outcomes": [
1917
+ {
1918
+ "id": "a",
1919
+ "ok": false
1920
+ },
1921
+ {
1922
+ "id": "b",
1923
+ "ok": false
1924
+ }
1925
+ ]
1926
+ },
1927
+ "expect": {
1928
+ "ok": true,
1929
+ "result": {
1930
+ "total": 2,
1931
+ "succeeded": 0,
1932
+ "failed": 2
1933
+ }
1934
+ }
1935
+ },
1936
+ {
1937
+ "id": "ops.0071",
1938
+ "section": "§5.15",
1939
+ "profile": "extended",
1940
+ "operation": "batch.apply",
1941
+ "assertion": "envelope_equals",
1942
+ "requires": [
1943
+ "batch"
1944
+ ],
1945
+ "input": {
1946
+ "items": [],
1947
+ "outcomes": []
1948
+ },
1949
+ "expect": {
1950
+ "ok": true,
1951
+ "result": {
1952
+ "total": 0,
1953
+ "succeeded": 0,
1954
+ "failed": 0
1955
+ }
1956
+ }
1957
+ },
1958
+ {
1959
+ "id": "ops.0072",
1960
+ "section": "§5.16",
1961
+ "profile": "extended",
1962
+ "operation": "op.detect_conflict",
1963
+ "assertion": "envelope_error",
1964
+ "requires": [
1965
+ "concurrency"
1966
+ ],
1967
+ "input": {
1968
+ "expectedVersion": "a",
1969
+ "actualVersion": "b",
1970
+ "overwrite": false
1971
+ },
1972
+ "expect": {
1973
+ "error": {
1974
+ "$regex": "conflict|write_conflict"
1975
+ }
1976
+ }
1977
+ },
1978
+ {
1979
+ "id": "ops.0073",
1980
+ "section": "§5.16",
1981
+ "profile": "extended",
1982
+ "operation": "op.detect_conflict",
1983
+ "assertion": "envelope_equals",
1984
+ "requires": [
1985
+ "concurrency"
1986
+ ],
1987
+ "input": {
1988
+ "expectedVersion": "abc",
1989
+ "actualVersion": "abc",
1990
+ "overwrite": false
1991
+ },
1992
+ "expect": {
1993
+ "ok": true,
1994
+ "result": {
1995
+ "conflict": false
1996
+ }
1997
+ }
1998
+ },
1999
+ {
2000
+ "id": "ops.0074",
2001
+ "section": "§5.16",
2002
+ "profile": "extended",
2003
+ "operation": "op.detect_conflict",
2004
+ "assertion": "envelope_equals",
2005
+ "requires": [
2006
+ "concurrency"
2007
+ ],
2008
+ "input": {
2009
+ "expectedVersion": "a",
2010
+ "actualVersion": "b",
2011
+ "overwrite": true
2012
+ },
2013
+ "expect": {
2014
+ "ok": true,
2015
+ "result": {
2016
+ "conflict": false
2017
+ }
2018
+ }
2019
+ },
2020
+ {
2021
+ "id": "ops.0075",
2022
+ "section": "§5.17",
2023
+ "profile": "extended",
2024
+ "operation": "op.dry_run",
2025
+ "assertion": "envelope_equals",
2026
+ "requires": [
2027
+ "dry-run"
2028
+ ],
2029
+ "input": {
2030
+ "operation": "update",
2031
+ "patch": {
2032
+ "status": "done"
2033
+ }
2034
+ },
2035
+ "expect": {
2036
+ "ok": true,
2037
+ "result": {
2038
+ "wrote": false,
2039
+ "plannedChanges": {
2040
+ "$contains": [
2041
+ "status"
2042
+ ]
2043
+ }
2044
+ }
2045
+ }
2046
+ },
2047
+ {
2048
+ "id": "ops.0076",
2049
+ "section": "§5.17",
2050
+ "profile": "extended",
2051
+ "operation": "op.dry_run",
2052
+ "assertion": "envelope_equals",
2053
+ "requires": [
2054
+ "dry-run"
2055
+ ],
2056
+ "input": {
2057
+ "operation": "create",
2058
+ "patch": {
2059
+ "title": "New task",
2060
+ "status": "open"
2061
+ }
2062
+ },
2063
+ "expect": {
2064
+ "ok": true,
2065
+ "result": {
2066
+ "wrote": false,
2067
+ "plannedChanges": {
2068
+ "$contains": [
2069
+ "title",
2070
+ "status"
2071
+ ]
2072
+ }
2073
+ }
2074
+ }
2075
+ },
2076
+ {
2077
+ "id": "ops.0077",
2078
+ "section": "§5.18",
2079
+ "profile": "core-lite",
2080
+ "operation": "op.error_shape",
2081
+ "assertion": "envelope_equals",
2082
+ "input": {
2083
+ "operation": "update",
2084
+ "code": "invalid_type",
2085
+ "message": "bad value",
2086
+ "field": "status"
2087
+ },
2088
+ "expect": {
2089
+ "ok": true,
2090
+ "result": {
2091
+ "operation": "update",
2092
+ "code": "invalid_type",
2093
+ "message": {
2094
+ "$regex": ".+"
2095
+ }
2096
+ }
2097
+ }
2098
+ },
2099
+ {
2100
+ "id": "ops.0078",
2101
+ "section": "§5.18",
2102
+ "profile": "core-lite",
2103
+ "operation": "op.error_shape",
2104
+ "assertion": "envelope_equals",
2105
+ "input": {
2106
+ "operation": "create",
2107
+ "code": "missing_required_field",
2108
+ "message": "title is required",
2109
+ "field": "title"
2110
+ },
2111
+ "expect": {
2112
+ "ok": true,
2113
+ "result": {
2114
+ "code": "missing_required_field",
2115
+ "message": {
2116
+ "$regex": ".+"
2117
+ }
2118
+ }
2119
+ }
2120
+ },
2121
+ {
2122
+ "id": "ops.0079",
2123
+ "section": "§5.18",
2124
+ "profile": "core-lite",
2125
+ "operation": "op.error_shape",
2126
+ "assertion": "envelope_equals",
2127
+ "input": {
2128
+ "operation": "delete",
2129
+ "code": "file_not_found",
2130
+ "message": "file does not exist"
2131
+ },
2132
+ "expect": {
2133
+ "ok": true,
2134
+ "result": {
2135
+ "code": "file_not_found",
2136
+ "message": {
2137
+ "$regex": ".+"
2138
+ }
2139
+ }
2140
+ }
2141
+ },
2142
+ {
2143
+ "id": "ops.0080",
2144
+ "section": "§5.19.1",
2145
+ "profile": "extended",
2146
+ "operation": "time.start",
2147
+ "assertion": "envelope_equals",
2148
+ "requires": [
2149
+ "time-tracking"
2150
+ ],
2151
+ "input": {
2152
+ "entries": [],
2153
+ "now": "2026-02-20T09:00:00Z",
2154
+ "dateModified": "2026-02-20T08:00:00Z"
2155
+ },
2156
+ "expect": {
2157
+ "ok": true,
2158
+ "result": {
2159
+ "value": [
2160
+ {
2161
+ "startTime": "2026-02-20T09:00:00Z"
2162
+ }
2163
+ ],
2164
+ "dateModified": {
2165
+ "$regex": "^2026-02-20T09:00:00Z$|^\\d{4}-\\d{2}-\\d{2}T"
2166
+ }
2167
+ }
2168
+ }
2169
+ },
2170
+ {
2171
+ "id": "ops.0081",
2172
+ "section": "§5.19.1",
2173
+ "profile": "extended",
2174
+ "operation": "time.start",
2175
+ "assertion": "envelope_error",
2176
+ "requires": [
2177
+ "time-tracking"
2178
+ ],
2179
+ "input": {
2180
+ "entries": [
2181
+ {
2182
+ "startTime": "2026-02-20T09:00:00Z"
2183
+ }
2184
+ ],
2185
+ "now": "2026-02-20T09:30:00Z"
2186
+ },
2187
+ "expect": {
2188
+ "error": {
2189
+ "$regex": "time_tracking_already_active|active"
2190
+ }
2191
+ }
2192
+ },
2193
+ {
2194
+ "id": "ops.0082",
2195
+ "section": "§5.19.2",
2196
+ "profile": "extended",
2197
+ "operation": "time.stop",
2198
+ "assertion": "envelope_equals",
2199
+ "requires": [
2200
+ "time-tracking"
2201
+ ],
2202
+ "input": {
2203
+ "entries": [
2204
+ {
2205
+ "startTime": "2026-02-20T09:00:00Z"
2206
+ }
2207
+ ],
2208
+ "now": "2026-02-20T10:00:00Z",
2209
+ "dateModified": "2026-02-20T09:00:00Z"
2210
+ },
2211
+ "expect": {
2212
+ "ok": true,
2213
+ "result": {
2214
+ "value": [
2215
+ {
2216
+ "startTime": "2026-02-20T09:00:00Z",
2217
+ "endTime": "2026-02-20T10:00:00Z"
2218
+ }
2219
+ ],
2220
+ "dateModified": {
2221
+ "$regex": "^2026-02-20T10:00:00Z$|^\\d{4}-\\d{2}-\\d{2}T"
2222
+ }
2223
+ }
2224
+ }
2225
+ },
2226
+ {
2227
+ "id": "ops.0083",
2228
+ "section": "§5.19.2",
2229
+ "profile": "extended",
2230
+ "operation": "time.stop",
2231
+ "assertion": "envelope_error",
2232
+ "requires": [
2233
+ "time-tracking"
2234
+ ],
2235
+ "input": {
2236
+ "entries": [],
2237
+ "now": "2026-02-20T10:00:00Z"
2238
+ },
2239
+ "expect": {
2240
+ "error": {
2241
+ "$regex": "no_active_time_entry|active"
2242
+ }
2243
+ }
2244
+ },
2245
+ {
2246
+ "id": "ops.0084",
2247
+ "section": "§5.19.3",
2248
+ "profile": "extended",
2249
+ "operation": "time.replace_entries",
2250
+ "assertion": "envelope_equals",
2251
+ "requires": [
2252
+ "time-tracking"
2253
+ ],
2254
+ "input": {
2255
+ "entries": [
2256
+ {
2257
+ "startTime": "2026-02-20T09:00:00Z",
2258
+ "endTime": "2026-02-20T10:00:00Z",
2259
+ "duration": 60
2260
+ }
2261
+ ],
2262
+ "dateModified": "2026-02-20T10:00:00Z"
2263
+ },
2264
+ "expect": {
2265
+ "ok": true,
2266
+ "result": {
2267
+ "value": [
2268
+ {
2269
+ "startTime": "2026-02-20T09:00:00Z",
2270
+ "endTime": "2026-02-20T10:00:00Z"
2271
+ }
2272
+ ],
2273
+ "dateModified": {
2274
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}T"
2275
+ }
2276
+ }
2277
+ }
2278
+ },
2279
+ {
2280
+ "id": "ops.0085",
2281
+ "section": "§5.19.4",
2282
+ "profile": "extended",
2283
+ "operation": "time.remove_entry",
2284
+ "assertion": "envelope_equals",
2285
+ "requires": [
2286
+ "time-tracking"
2287
+ ],
2288
+ "input": {
2289
+ "entries": [
2290
+ {
2291
+ "startTime": "2026-02-20T09:00:00Z",
2292
+ "endTime": "2026-02-20T10:00:00Z"
2293
+ },
2294
+ {
2295
+ "startTime": "2026-02-21T09:00:00Z"
2296
+ }
2297
+ ],
2298
+ "selector": {
2299
+ "index": 0
2300
+ },
2301
+ "dateModified": "2026-02-21T09:00:00Z"
2302
+ },
2303
+ "expect": {
2304
+ "ok": true,
2305
+ "result": {
2306
+ "value": [
2307
+ {
2308
+ "startTime": "2026-02-21T09:00:00Z"
2309
+ }
2310
+ ],
2311
+ "dateModified": {
2312
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}T"
2313
+ }
2314
+ }
2315
+ }
2316
+ },
2317
+ {
2318
+ "id": "ops.0086",
2319
+ "section": "§5.19.5",
2320
+ "profile": "extended",
2321
+ "operation": "time.auto_stop_on_complete",
2322
+ "assertion": "envelope_equals",
2323
+ "requires": [
2324
+ "time-tracking"
2325
+ ],
2326
+ "input": {
2327
+ "autoStopOnComplete": true,
2328
+ "isCompletionTransition": true,
2329
+ "taskEntries": [
2330
+ {
2331
+ "startTime": "2026-02-20T09:00:00Z"
2332
+ }
2333
+ ],
2334
+ "now": "2026-02-20T09:30:00Z"
2335
+ },
2336
+ "expect": {
2337
+ "ok": true,
2338
+ "result": {
2339
+ "stopped": true
2340
+ }
2341
+ }
2342
+ },
2343
+ {
2344
+ "id": "ops.0087",
2345
+ "section": "§5.19.6",
2346
+ "profile": "extended",
2347
+ "operation": "time.report_totals",
2348
+ "assertion": "envelope_equals",
2349
+ "requires": [
2350
+ "time-tracking"
2351
+ ],
2352
+ "input": {
2353
+ "entries": [
2354
+ {
2355
+ "startTime": "2026-02-20T09:00:00Z",
2356
+ "endTime": "2026-02-20T10:00:00Z"
2357
+ },
2358
+ {
2359
+ "startTime": "2026-02-20T10:30:00Z",
2360
+ "endTime": "2026-02-20T11:00:00Z"
2361
+ }
2362
+ ]
2363
+ },
2364
+ "expect": {
2365
+ "ok": true,
2366
+ "result": {
2367
+ "closed_minutes": 90
2368
+ }
2369
+ }
2370
+ },
2371
+ {
2372
+ "id": "ops.0088",
2373
+ "section": "§5.19.6",
2374
+ "profile": "extended",
2375
+ "operation": "time.report_totals",
2376
+ "assertion": "envelope_equals",
2377
+ "requires": [
2378
+ "time-tracking"
2379
+ ],
2380
+ "input": {
2381
+ "entries": [
2382
+ {
2383
+ "startTime": "2026-02-20T09:00:00Z",
2384
+ "endTime": "2026-02-20T10:00:00Z"
2385
+ },
2386
+ {
2387
+ "startTime": "2026-02-20T11:00:00Z"
2388
+ }
2389
+ ],
2390
+ "now": "2026-02-20T11:30:00Z"
2391
+ },
2392
+ "expect": {
2393
+ "ok": true,
2394
+ "result": {
2395
+ "closed_minutes": 60,
2396
+ "live_minutes": 90
2397
+ }
2398
+ }
2399
+ },
2400
+ {
2401
+ "id": "ops.0089",
2402
+ "section": "§5.19.1",
2403
+ "profile": "extended",
2404
+ "operation": "time.start",
2405
+ "assertion": "envelope_equals",
2406
+ "requires": [
2407
+ "time-tracking"
2408
+ ],
2409
+ "input": {
2410
+ "entries": [
2411
+ {
2412
+ "startTime": "2026-02-20T08:00:00Z",
2413
+ "endTime": "2026-02-20T09:00:00Z"
2414
+ },
2415
+ {
2416
+ "startTime": "2026-02-20T10:00:00Z",
2417
+ "endTime": "2026-02-20T11:00:00Z"
2418
+ }
2419
+ ],
2420
+ "now": "2026-02-20T14:00:00Z",
2421
+ "dateModified": "2026-02-20T11:00:00Z"
2422
+ },
2423
+ "expect": {
2424
+ "ok": true,
2425
+ "result": {
2426
+ "value": [
2427
+ {
2428
+ "startTime": "2026-02-20T08:00:00Z",
2429
+ "endTime": "2026-02-20T09:00:00Z"
2430
+ },
2431
+ {
2432
+ "startTime": "2026-02-20T10:00:00Z",
2433
+ "endTime": "2026-02-20T11:00:00Z"
2434
+ },
2435
+ {
2436
+ "startTime": "2026-02-20T14:00:00Z"
2437
+ }
2438
+ ],
2439
+ "dateModified": {
2440
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}T"
2441
+ }
2442
+ }
2443
+ }
2444
+ },
2445
+ {
2446
+ "id": "ops.0090",
2447
+ "section": "§5.19.2",
2448
+ "profile": "extended",
2449
+ "operation": "time.stop",
2450
+ "assertion": "envelope_equals",
2451
+ "requires": [
2452
+ "time-tracking"
2453
+ ],
2454
+ "input": {
2455
+ "entries": [
2456
+ {
2457
+ "startTime": "2026-02-20T08:00:00Z",
2458
+ "endTime": "2026-02-20T09:00:00Z"
2459
+ },
2460
+ {
2461
+ "startTime": "2026-02-20T10:00:00Z"
2462
+ }
2463
+ ],
2464
+ "now": "2026-02-20T11:00:00Z",
2465
+ "dateModified": "2026-02-20T10:00:00Z"
2466
+ },
2467
+ "expect": {
2468
+ "ok": true,
2469
+ "result": {
2470
+ "value": [
2471
+ {
2472
+ "startTime": "2026-02-20T08:00:00Z",
2473
+ "endTime": "2026-02-20T09:00:00Z"
2474
+ },
2475
+ {
2476
+ "startTime": "2026-02-20T10:00:00Z",
2477
+ "endTime": "2026-02-20T11:00:00Z"
2478
+ }
2479
+ ],
2480
+ "dateModified": {
2481
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}T"
2482
+ }
2483
+ }
2484
+ }
2485
+ },
2486
+ {
2487
+ "id": "ops.0091",
2488
+ "section": "§5.19.3",
2489
+ "profile": "extended",
2490
+ "operation": "time.replace_entries",
2491
+ "assertion": "envelope_equals",
2492
+ "requires": [
2493
+ "time-tracking"
2494
+ ],
2495
+ "input": {
2496
+ "entries": [],
2497
+ "dateModified": "2026-02-20T10:00:00Z"
2498
+ },
2499
+ "expect": {
2500
+ "ok": true,
2501
+ "result": {
2502
+ "value": [],
2503
+ "dateModified": {
2504
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}T"
2505
+ }
2506
+ }
2507
+ }
2508
+ },
2509
+ {
2510
+ "id": "ops.0092",
2511
+ "section": "§5.19.3",
2512
+ "profile": "extended",
2513
+ "operation": "time.replace_entries",
2514
+ "assertion": "envelope_equals",
2515
+ "requires": [
2516
+ "time-tracking"
2517
+ ],
2518
+ "input": {
2519
+ "entries": [
2520
+ {
2521
+ "startTime": "2026-02-20T09:00:00Z",
2522
+ "endTime": "2026-02-20T10:00:00Z"
2523
+ },
2524
+ {
2525
+ "startTime": "2026-02-20T11:00:00Z"
2526
+ }
2527
+ ],
2528
+ "dateModified": "2026-02-20T11:00:00Z"
2529
+ },
2530
+ "expect": {
2531
+ "ok": true,
2532
+ "result": {
2533
+ "value": [
2534
+ {
2535
+ "startTime": "2026-02-20T09:00:00Z",
2536
+ "endTime": "2026-02-20T10:00:00Z"
2537
+ },
2538
+ {
2539
+ "startTime": "2026-02-20T11:00:00Z"
2540
+ }
2541
+ ],
2542
+ "dateModified": {
2543
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}T"
2544
+ }
2545
+ }
2546
+ }
2547
+ },
2548
+ {
2549
+ "id": "ops.0093",
2550
+ "section": "§5.19.4",
2551
+ "profile": "extended",
2552
+ "operation": "time.remove_entry",
2553
+ "assertion": "envelope_equals",
2554
+ "requires": [
2555
+ "time-tracking"
2556
+ ],
2557
+ "input": {
2558
+ "entries": [
2559
+ {
2560
+ "startTime": "2026-02-20T09:00:00Z",
2561
+ "endTime": "2026-02-20T10:00:00Z"
2562
+ }
2563
+ ],
2564
+ "selector": {
2565
+ "index": 0
2566
+ },
2567
+ "dateModified": "2026-02-20T10:00:00Z"
2568
+ },
2569
+ "expect": {
2570
+ "ok": true,
2571
+ "result": {
2572
+ "value": [],
2573
+ "dateModified": {
2574
+ "$regex": "^\\d{4}-\\d{2}-\\d{2}T"
2575
+ }
2576
+ }
2577
+ }
2578
+ },
2579
+ {
2580
+ "id": "ops.0094",
2581
+ "section": "§5.19.4",
2582
+ "profile": "extended",
2583
+ "operation": "time.remove_entry",
2584
+ "assertion": "envelope_error",
2585
+ "requires": [
2586
+ "time-tracking"
2587
+ ],
2588
+ "input": {
2589
+ "entries": [
2590
+ {
2591
+ "startTime": "2026-02-20T09:00:00Z",
2592
+ "endTime": "2026-02-20T10:00:00Z"
2593
+ }
2594
+ ],
2595
+ "selector": {
2596
+ "index": 5
2597
+ },
2598
+ "dateModified": "2026-02-20T10:00:00Z"
2599
+ },
2600
+ "expect": {
2601
+ "error": {
2602
+ "$regex": "index_out_of_range|out_of_range|[Ii]nvalid|not_found"
2603
+ }
2604
+ }
2605
+ },
2606
+ {
2607
+ "id": "ops.0095",
2608
+ "section": "§5.19.5",
2609
+ "profile": "extended",
2610
+ "operation": "time.auto_stop_on_complete",
2611
+ "assertion": "envelope_equals",
2612
+ "requires": [
2613
+ "time-tracking"
2614
+ ],
2615
+ "input": {
2616
+ "autoStopOnComplete": false,
2617
+ "isCompletionTransition": true,
2618
+ "taskEntries": [
2619
+ {
2620
+ "startTime": "2026-02-20T09:00:00Z"
2621
+ }
2622
+ ],
2623
+ "now": "2026-02-20T09:30:00Z"
2624
+ },
2625
+ "expect": {
2626
+ "ok": true,
2627
+ "result": {
2628
+ "stopped": false
2629
+ }
2630
+ }
2631
+ },
2632
+ {
2633
+ "id": "ops.0096",
2634
+ "section": "§5.19.5",
2635
+ "profile": "extended",
2636
+ "operation": "time.auto_stop_on_complete",
2637
+ "assertion": "envelope_equals",
2638
+ "requires": [
2639
+ "time-tracking"
2640
+ ],
2641
+ "input": {
2642
+ "autoStopOnComplete": true,
2643
+ "isCompletionTransition": false,
2644
+ "taskEntries": [
2645
+ {
2646
+ "startTime": "2026-02-20T09:00:00Z"
2647
+ }
2648
+ ],
2649
+ "now": "2026-02-20T09:30:00Z"
2650
+ },
2651
+ "expect": {
2652
+ "ok": true,
2653
+ "result": {
2654
+ "stopped": false
2655
+ }
2656
+ }
2657
+ },
2658
+ {
2659
+ "id": "ops.0097",
2660
+ "section": "§5.19.5",
2661
+ "profile": "extended",
2662
+ "operation": "time.auto_stop_on_complete",
2663
+ "assertion": "envelope_equals",
2664
+ "requires": [
2665
+ "time-tracking"
2666
+ ],
2667
+ "input": {
2668
+ "autoStopOnComplete": true,
2669
+ "isCompletionTransition": true,
2670
+ "taskEntries": [
2671
+ {
2672
+ "startTime": "2026-02-20T08:00:00Z",
2673
+ "endTime": "2026-02-20T09:00:00Z"
2674
+ }
2675
+ ],
2676
+ "now": "2026-02-20T09:30:00Z"
2677
+ },
2678
+ "expect": {
2679
+ "ok": true,
2680
+ "result": {
2681
+ "stopped": false
2682
+ }
2683
+ }
2684
+ },
2685
+ {
2686
+ "id": "ops.0098",
2687
+ "section": "§5.19.6",
2688
+ "profile": "extended",
2689
+ "operation": "time.report_totals",
2690
+ "assertion": "envelope_equals",
2691
+ "requires": [
2692
+ "time-tracking"
2693
+ ],
2694
+ "input": {
2695
+ "entries": []
2696
+ },
2697
+ "expect": {
2698
+ "ok": true,
2699
+ "result": {
2700
+ "closed_minutes": 0
2701
+ }
2702
+ }
2703
+ },
2704
+ {
2705
+ "id": "ops.0099",
2706
+ "section": "§5.19.6",
2707
+ "profile": "extended",
2708
+ "operation": "time.report_totals",
2709
+ "assertion": "envelope_equals",
2710
+ "requires": [
2711
+ "time-tracking"
2712
+ ],
2713
+ "input": {
2714
+ "entries": [
2715
+ {
2716
+ "startTime": "2026-02-20T09:00:00Z"
2717
+ }
2718
+ ],
2719
+ "now": "2026-02-20T10:00:00Z"
2720
+ },
2721
+ "expect": {
2722
+ "ok": true,
2723
+ "result": {
2724
+ "closed_minutes": 0,
2725
+ "live_minutes": 60
2726
+ }
2727
+ }
2728
+ },
2729
+ {
2730
+ "id": "ops.0100",
2731
+ "section": "§5.19.6",
2732
+ "profile": "extended",
2733
+ "operation": "time.report_totals",
2734
+ "assertion": "envelope_equals",
2735
+ "requires": [
2736
+ "time-tracking"
2737
+ ],
2738
+ "input": {
2739
+ "entries": [
2740
+ {
2741
+ "startTime": "2026-02-20T09:00:00Z",
2742
+ "endTime": "2026-02-20T09:30:00Z"
2743
+ },
2744
+ {
2745
+ "startTime": "2026-02-20T10:00:00Z",
2746
+ "endTime": "2026-02-20T10:15:00Z"
2747
+ },
2748
+ {
2749
+ "startTime": "2026-02-20T11:00:00Z",
2750
+ "endTime": "2026-02-20T11:45:00Z"
2751
+ }
2752
+ ]
2753
+ },
2754
+ "expect": {
2755
+ "ok": true,
2756
+ "result": {
2757
+ "closed_minutes": 90
2758
+ }
2759
+ }
2760
+ }
2761
+ ]