@markjaquith/agency 2.23.0 → 2.24.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/README.md +13 -4
- package/cli.ts +24 -0
- package/package.json +1 -1
- package/skills/agency/SKILL.md +9 -1
- package/src/cli-parser.test.ts +32 -0
- package/src/cli-parser.ts +63 -10
- package/src/cli.test.ts +1 -0
- package/src/commands/archive.test.ts +21 -3
- package/src/commands/archive.ts +86 -18
- package/src/commands/restore.test.ts +98 -0
- package/src/commands/restore.ts +73 -0
- package/src/services/ArchiveService.test.ts +520 -1
- package/src/services/ArchiveService.ts +964 -84
- package/src/services/EpicService.ts +6 -0
- package/src/services/PhaseService.ts +6 -0
- package/src/services/TaskService.ts +6 -0
- package/src/services/WorktreeService.ts +35 -5
- package/src/workbase/archive.ts +18 -0
|
@@ -215,7 +215,7 @@ describe("ArchiveService", () => {
|
|
|
215
215
|
),
|
|
216
216
|
)
|
|
217
217
|
|
|
218
|
-
expect(result.
|
|
218
|
+
expect(result.affectedPaths).toEqual([
|
|
219
219
|
join(root, "archive/tasks/delivery"),
|
|
220
220
|
join(root, "archive/epics/initiative"),
|
|
221
221
|
])
|
|
@@ -331,4 +331,523 @@ describe("ArchiveService", () => {
|
|
|
331
331
|
false,
|
|
332
332
|
)
|
|
333
333
|
})
|
|
334
|
+
|
|
335
|
+
test("dry-runs archive and restores without mutating files", async () => {
|
|
336
|
+
await runTestEffect(
|
|
337
|
+
TaskService.pipe(
|
|
338
|
+
Effect.flatMap((service) =>
|
|
339
|
+
service.create(
|
|
340
|
+
{
|
|
341
|
+
id: "preview",
|
|
342
|
+
ticketUrl: null,
|
|
343
|
+
repo: "agency",
|
|
344
|
+
branch: "task/preview",
|
|
345
|
+
base: "main",
|
|
346
|
+
},
|
|
347
|
+
root,
|
|
348
|
+
),
|
|
349
|
+
),
|
|
350
|
+
),
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
const archivePreview = await runTestEffect(
|
|
354
|
+
ArchiveService.pipe(
|
|
355
|
+
Effect.flatMap((service) =>
|
|
356
|
+
service.archiveTask("preview", root, { dryRun: true }),
|
|
357
|
+
),
|
|
358
|
+
),
|
|
359
|
+
)
|
|
360
|
+
expect(archivePreview.dryRun).toBe(true)
|
|
361
|
+
expect(await Bun.file(join(root, "tasks/preview/TASK.md")).exists()).toBe(
|
|
362
|
+
true,
|
|
363
|
+
)
|
|
364
|
+
expect(
|
|
365
|
+
await Bun.file(join(root, "archive/tasks/preview/TASK.md")).exists(),
|
|
366
|
+
).toBe(false)
|
|
367
|
+
|
|
368
|
+
await runTestEffect(
|
|
369
|
+
ArchiveService.pipe(
|
|
370
|
+
Effect.flatMap((service) => service.archiveTask("preview", root)),
|
|
371
|
+
),
|
|
372
|
+
)
|
|
373
|
+
const restorePreview = await runTestEffect(
|
|
374
|
+
ArchiveService.pipe(
|
|
375
|
+
Effect.flatMap((service) =>
|
|
376
|
+
service.restoreTask("preview", root, { dryRun: true }),
|
|
377
|
+
),
|
|
378
|
+
),
|
|
379
|
+
)
|
|
380
|
+
expect(restorePreview.dryRun).toBe(true)
|
|
381
|
+
expect(await Bun.file(join(root, "tasks/preview/TASK.md")).exists()).toBe(
|
|
382
|
+
false,
|
|
383
|
+
)
|
|
384
|
+
expect(
|
|
385
|
+
await Bun.file(join(root, "archive/tasks/preview/TASK.md")).exists(),
|
|
386
|
+
).toBe(true)
|
|
387
|
+
})
|
|
388
|
+
|
|
389
|
+
test("lists, filters, shows, and restores a task with provenance", async () => {
|
|
390
|
+
await runTestEffect(
|
|
391
|
+
EpicService.pipe(
|
|
392
|
+
Effect.flatMap((service) =>
|
|
393
|
+
service.create(
|
|
394
|
+
"parent",
|
|
395
|
+
"https://example.com/epic",
|
|
396
|
+
[{ repo: "agency", ref: "main" }],
|
|
397
|
+
root,
|
|
398
|
+
),
|
|
399
|
+
),
|
|
400
|
+
),
|
|
401
|
+
)
|
|
402
|
+
await runTestEffect(
|
|
403
|
+
TaskService.pipe(
|
|
404
|
+
Effect.flatMap((service) =>
|
|
405
|
+
service.create(
|
|
406
|
+
{
|
|
407
|
+
id: "child",
|
|
408
|
+
ticketUrl: null,
|
|
409
|
+
epic: "parent",
|
|
410
|
+
repo: "agency",
|
|
411
|
+
branch: "task/child",
|
|
412
|
+
base: "main",
|
|
413
|
+
},
|
|
414
|
+
root,
|
|
415
|
+
),
|
|
416
|
+
),
|
|
417
|
+
),
|
|
418
|
+
)
|
|
419
|
+
await runTestEffect(
|
|
420
|
+
ArchiveService.pipe(
|
|
421
|
+
Effect.flatMap((service) => service.archiveTask("child", root)),
|
|
422
|
+
),
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
const records = await runTestEffect(
|
|
426
|
+
ArchiveService.pipe(
|
|
427
|
+
Effect.flatMap((service) =>
|
|
428
|
+
service.list(
|
|
429
|
+
{ kinds: ["task"], repositories: ["agency"], statuses: ["open"] },
|
|
430
|
+
root,
|
|
431
|
+
),
|
|
432
|
+
),
|
|
433
|
+
),
|
|
434
|
+
)
|
|
435
|
+
expect(records.map((record) => record.id)).toEqual(["child"])
|
|
436
|
+
const archived = await runTestEffect(
|
|
437
|
+
ArchiveService.pipe(
|
|
438
|
+
Effect.flatMap((service) =>
|
|
439
|
+
service.show("task", "child", undefined, root),
|
|
440
|
+
),
|
|
441
|
+
),
|
|
442
|
+
)
|
|
443
|
+
expect(archived.provenance?.parent).toEqual({
|
|
444
|
+
kind: "epic",
|
|
445
|
+
id: "parent",
|
|
446
|
+
declaration: { id: "child" },
|
|
447
|
+
})
|
|
448
|
+
expect(archived.provenance?.history[0]?.operation).toBe("archive")
|
|
449
|
+
|
|
450
|
+
await runTestEffect(
|
|
451
|
+
ArchiveService.pipe(
|
|
452
|
+
Effect.flatMap((service) => service.restoreTask("child", root)),
|
|
453
|
+
),
|
|
454
|
+
)
|
|
455
|
+
const epic = await runTestEffect(
|
|
456
|
+
EpicService.pipe(
|
|
457
|
+
Effect.flatMap((service) => service.show("parent", root)),
|
|
458
|
+
),
|
|
459
|
+
)
|
|
460
|
+
expect(epic.data.tasks).toEqual([{ id: "child" }])
|
|
461
|
+
const provenance = await Bun.file(
|
|
462
|
+
join(root, "tasks/child/.agency-lifecycle.json"),
|
|
463
|
+
).json()
|
|
464
|
+
expect(
|
|
465
|
+
provenance.history.map((item: { operation: string }) => item.operation),
|
|
466
|
+
).toEqual(["archive", "restore"])
|
|
467
|
+
})
|
|
468
|
+
|
|
469
|
+
test("preserves phase dependencies across archive and restore", async () => {
|
|
470
|
+
await runTestEffect(
|
|
471
|
+
TaskService.pipe(
|
|
472
|
+
Effect.flatMap((service) =>
|
|
473
|
+
service.create(
|
|
474
|
+
{ id: "multi", ticketUrl: null, multiPhase: true },
|
|
475
|
+
root,
|
|
476
|
+
),
|
|
477
|
+
),
|
|
478
|
+
),
|
|
479
|
+
)
|
|
480
|
+
for (const [id, dependsOn] of [
|
|
481
|
+
["first", undefined],
|
|
482
|
+
["second", ["first"]],
|
|
483
|
+
] as const) {
|
|
484
|
+
await runTestEffect(
|
|
485
|
+
PhaseService.pipe(
|
|
486
|
+
Effect.flatMap((service) =>
|
|
487
|
+
service.create(
|
|
488
|
+
{
|
|
489
|
+
taskId: "multi",
|
|
490
|
+
id,
|
|
491
|
+
repo: "agency",
|
|
492
|
+
branch: `task/${id}`,
|
|
493
|
+
base: "main",
|
|
494
|
+
...(dependsOn ? { dependsOn } : {}),
|
|
495
|
+
},
|
|
496
|
+
root,
|
|
497
|
+
),
|
|
498
|
+
),
|
|
499
|
+
),
|
|
500
|
+
)
|
|
501
|
+
}
|
|
502
|
+
await runTestEffect(
|
|
503
|
+
ArchiveService.pipe(
|
|
504
|
+
Effect.flatMap((service) =>
|
|
505
|
+
service.archivePhase("multi", "second", root),
|
|
506
|
+
),
|
|
507
|
+
),
|
|
508
|
+
)
|
|
509
|
+
await expect(
|
|
510
|
+
runTestEffect(
|
|
511
|
+
PhaseService.pipe(
|
|
512
|
+
Effect.flatMap((service) =>
|
|
513
|
+
service.create(
|
|
514
|
+
{
|
|
515
|
+
taskId: "multi",
|
|
516
|
+
id: "second",
|
|
517
|
+
repo: "agency",
|
|
518
|
+
branch: "task/recreated-second",
|
|
519
|
+
base: "main",
|
|
520
|
+
},
|
|
521
|
+
root,
|
|
522
|
+
),
|
|
523
|
+
),
|
|
524
|
+
),
|
|
525
|
+
),
|
|
526
|
+
).rejects.toThrow("is archived; restore it")
|
|
527
|
+
await runTestEffect(
|
|
528
|
+
ArchiveService.pipe(
|
|
529
|
+
Effect.flatMap((service) =>
|
|
530
|
+
service.restorePhase("multi", "second", root),
|
|
531
|
+
),
|
|
532
|
+
),
|
|
533
|
+
)
|
|
534
|
+
const task = await runTestEffect(
|
|
535
|
+
TaskService.pipe(
|
|
536
|
+
Effect.flatMap((service) => service.show("multi", root)),
|
|
537
|
+
),
|
|
538
|
+
)
|
|
539
|
+
expect("phases" in task.data && task.data.phases).toEqual([
|
|
540
|
+
{ id: "first" },
|
|
541
|
+
{ id: "second", dependsOn: ["first"] },
|
|
542
|
+
])
|
|
543
|
+
})
|
|
544
|
+
|
|
545
|
+
test("preflights missing dependencies before restoring", async () => {
|
|
546
|
+
await runTestEffect(
|
|
547
|
+
TaskService.pipe(
|
|
548
|
+
Effect.flatMap((service) =>
|
|
549
|
+
service.create(
|
|
550
|
+
{ id: "multi", ticketUrl: null, multiPhase: true },
|
|
551
|
+
root,
|
|
552
|
+
),
|
|
553
|
+
),
|
|
554
|
+
),
|
|
555
|
+
)
|
|
556
|
+
for (const [id, dependsOn] of [
|
|
557
|
+
["first", undefined],
|
|
558
|
+
["second", ["first"]],
|
|
559
|
+
] as const) {
|
|
560
|
+
await runTestEffect(
|
|
561
|
+
PhaseService.pipe(
|
|
562
|
+
Effect.flatMap((service) =>
|
|
563
|
+
service.create(
|
|
564
|
+
{
|
|
565
|
+
taskId: "multi",
|
|
566
|
+
id,
|
|
567
|
+
repo: "agency",
|
|
568
|
+
branch: `task/${id}`,
|
|
569
|
+
base: "main",
|
|
570
|
+
...(dependsOn ? { dependsOn } : {}),
|
|
571
|
+
},
|
|
572
|
+
root,
|
|
573
|
+
),
|
|
574
|
+
),
|
|
575
|
+
),
|
|
576
|
+
)
|
|
577
|
+
}
|
|
578
|
+
await runTestEffect(
|
|
579
|
+
ArchiveService.pipe(
|
|
580
|
+
Effect.flatMap((service) =>
|
|
581
|
+
service.archivePhase("multi", "second", root),
|
|
582
|
+
),
|
|
583
|
+
),
|
|
584
|
+
)
|
|
585
|
+
await runTestEffect(
|
|
586
|
+
ArchiveService.pipe(
|
|
587
|
+
Effect.flatMap((service) =>
|
|
588
|
+
service.archivePhase("multi", "first", root),
|
|
589
|
+
),
|
|
590
|
+
),
|
|
591
|
+
)
|
|
592
|
+
await expect(
|
|
593
|
+
runTestEffect(
|
|
594
|
+
ArchiveService.pipe(
|
|
595
|
+
Effect.flatMap((service) =>
|
|
596
|
+
service.restorePhase("multi", "second", root),
|
|
597
|
+
),
|
|
598
|
+
),
|
|
599
|
+
),
|
|
600
|
+
).rejects.toThrow("dependency 'first'")
|
|
601
|
+
expect(
|
|
602
|
+
await Bun.file(
|
|
603
|
+
join(root, "archive/tasks/multi/phases/second/PHASE.md"),
|
|
604
|
+
).exists(),
|
|
605
|
+
).toBe(true)
|
|
606
|
+
})
|
|
607
|
+
|
|
608
|
+
test("restores an epic and its task cohort", async () => {
|
|
609
|
+
await runTestEffect(
|
|
610
|
+
EpicService.pipe(
|
|
611
|
+
Effect.flatMap((service) =>
|
|
612
|
+
service.create(
|
|
613
|
+
"initiative",
|
|
614
|
+
"https://example.com/epic",
|
|
615
|
+
[{ repo: "agency", ref: "main" }],
|
|
616
|
+
root,
|
|
617
|
+
),
|
|
618
|
+
),
|
|
619
|
+
),
|
|
620
|
+
)
|
|
621
|
+
await runTestEffect(
|
|
622
|
+
TaskService.pipe(
|
|
623
|
+
Effect.flatMap((service) =>
|
|
624
|
+
service.create(
|
|
625
|
+
{
|
|
626
|
+
id: "delivery",
|
|
627
|
+
ticketUrl: null,
|
|
628
|
+
epic: "initiative",
|
|
629
|
+
repo: "agency",
|
|
630
|
+
branch: "task/delivery",
|
|
631
|
+
base: "main",
|
|
632
|
+
},
|
|
633
|
+
root,
|
|
634
|
+
),
|
|
635
|
+
),
|
|
636
|
+
),
|
|
637
|
+
)
|
|
638
|
+
await runTestEffect(
|
|
639
|
+
ArchiveService.pipe(
|
|
640
|
+
Effect.flatMap((service) => service.archiveEpic("initiative", root)),
|
|
641
|
+
),
|
|
642
|
+
)
|
|
643
|
+
await expect(
|
|
644
|
+
runTestEffect(
|
|
645
|
+
EpicService.pipe(
|
|
646
|
+
Effect.flatMap((service) =>
|
|
647
|
+
service.create(
|
|
648
|
+
"initiative",
|
|
649
|
+
"https://example.com/recreated",
|
|
650
|
+
[{ repo: "agency", ref: "main" }],
|
|
651
|
+
root,
|
|
652
|
+
),
|
|
653
|
+
),
|
|
654
|
+
),
|
|
655
|
+
),
|
|
656
|
+
).rejects.toThrow("is archived; restore it")
|
|
657
|
+
await runTestEffect(
|
|
658
|
+
ArchiveService.pipe(
|
|
659
|
+
Effect.flatMap((service) => service.restoreEpic("initiative", root)),
|
|
660
|
+
),
|
|
661
|
+
)
|
|
662
|
+
expect(
|
|
663
|
+
await Bun.file(join(root, "epics/initiative/EPIC.md")).exists(),
|
|
664
|
+
).toBe(true)
|
|
665
|
+
expect(await Bun.file(join(root, "tasks/delivery/TASK.md")).exists()).toBe(
|
|
666
|
+
true,
|
|
667
|
+
)
|
|
668
|
+
const report = await runTestEffect(
|
|
669
|
+
WorkbaseService.pipe(Effect.flatMap((service) => service.validate(root))),
|
|
670
|
+
)
|
|
671
|
+
expect(report.valid).toBe(true)
|
|
672
|
+
})
|
|
673
|
+
|
|
674
|
+
test("rejects recreating archived entity IDs", async () => {
|
|
675
|
+
await runTestEffect(
|
|
676
|
+
TaskService.pipe(
|
|
677
|
+
Effect.flatMap((service) =>
|
|
678
|
+
service.create(
|
|
679
|
+
{
|
|
680
|
+
id: "reserved",
|
|
681
|
+
ticketUrl: null,
|
|
682
|
+
repo: "agency",
|
|
683
|
+
branch: "task/reserved",
|
|
684
|
+
base: "main",
|
|
685
|
+
},
|
|
686
|
+
root,
|
|
687
|
+
),
|
|
688
|
+
),
|
|
689
|
+
),
|
|
690
|
+
)
|
|
691
|
+
await runTestEffect(
|
|
692
|
+
ArchiveService.pipe(
|
|
693
|
+
Effect.flatMap((service) => service.archiveTask("reserved", root)),
|
|
694
|
+
),
|
|
695
|
+
)
|
|
696
|
+
await expect(
|
|
697
|
+
runTestEffect(
|
|
698
|
+
TaskService.pipe(
|
|
699
|
+
Effect.flatMap((service) =>
|
|
700
|
+
service.create(
|
|
701
|
+
{
|
|
702
|
+
id: "reserved",
|
|
703
|
+
ticketUrl: null,
|
|
704
|
+
repo: "agency",
|
|
705
|
+
branch: "task/new-reserved",
|
|
706
|
+
base: "main",
|
|
707
|
+
},
|
|
708
|
+
root,
|
|
709
|
+
),
|
|
710
|
+
),
|
|
711
|
+
),
|
|
712
|
+
),
|
|
713
|
+
).rejects.toThrow("is archived; restore it")
|
|
714
|
+
})
|
|
715
|
+
|
|
716
|
+
test("does not remove worktrees when another lifecycle mutation holds the lock", async () => {
|
|
717
|
+
await runTestEffect(
|
|
718
|
+
TaskService.pipe(
|
|
719
|
+
Effect.flatMap((service) =>
|
|
720
|
+
service.create(
|
|
721
|
+
{
|
|
722
|
+
id: "locked",
|
|
723
|
+
ticketUrl: null,
|
|
724
|
+
repo: "agency",
|
|
725
|
+
branch: "task/locked",
|
|
726
|
+
base: "main",
|
|
727
|
+
},
|
|
728
|
+
root,
|
|
729
|
+
),
|
|
730
|
+
),
|
|
731
|
+
),
|
|
732
|
+
)
|
|
733
|
+
const workspace = await runTestEffect(
|
|
734
|
+
WorktreeService.pipe(
|
|
735
|
+
Effect.flatMap((service) =>
|
|
736
|
+
service.materialize("locked", undefined, root),
|
|
737
|
+
),
|
|
738
|
+
),
|
|
739
|
+
)
|
|
740
|
+
await Bun.write(join(root, ".agency-archive.lock"), "held\n")
|
|
741
|
+
|
|
742
|
+
await expect(
|
|
743
|
+
runTestEffect(
|
|
744
|
+
ArchiveService.pipe(
|
|
745
|
+
Effect.flatMap((service) => service.archiveTask("locked", root)),
|
|
746
|
+
),
|
|
747
|
+
),
|
|
748
|
+
).rejects.toThrow("Another archive or restore operation")
|
|
749
|
+
expect(
|
|
750
|
+
await Bun.file(join(workspace.writablePath, "README.md")).exists(),
|
|
751
|
+
).toBe(true)
|
|
752
|
+
expect(await Bun.file(join(root, "tasks/locked/TASK.md")).exists()).toBe(
|
|
753
|
+
true,
|
|
754
|
+
)
|
|
755
|
+
})
|
|
756
|
+
|
|
757
|
+
test("rejects conflicting provenance and restore destinations", async () => {
|
|
758
|
+
await runTestEffect(
|
|
759
|
+
EpicService.pipe(
|
|
760
|
+
Effect.flatMap((service) =>
|
|
761
|
+
service.create(
|
|
762
|
+
"parent",
|
|
763
|
+
"https://example.com/epic",
|
|
764
|
+
[{ repo: "agency", ref: "main" }],
|
|
765
|
+
root,
|
|
766
|
+
),
|
|
767
|
+
),
|
|
768
|
+
),
|
|
769
|
+
)
|
|
770
|
+
await runTestEffect(
|
|
771
|
+
TaskService.pipe(
|
|
772
|
+
Effect.flatMap((service) =>
|
|
773
|
+
service.create(
|
|
774
|
+
{
|
|
775
|
+
id: "child",
|
|
776
|
+
ticketUrl: null,
|
|
777
|
+
epic: "parent",
|
|
778
|
+
repo: "agency",
|
|
779
|
+
branch: "task/child",
|
|
780
|
+
base: "main",
|
|
781
|
+
},
|
|
782
|
+
root,
|
|
783
|
+
),
|
|
784
|
+
),
|
|
785
|
+
),
|
|
786
|
+
)
|
|
787
|
+
await runTestEffect(
|
|
788
|
+
ArchiveService.pipe(
|
|
789
|
+
Effect.flatMap((service) => service.archiveTask("child", root)),
|
|
790
|
+
),
|
|
791
|
+
)
|
|
792
|
+
const manifestPath = join(
|
|
793
|
+
root,
|
|
794
|
+
"archive/tasks/child/.agency-lifecycle.json",
|
|
795
|
+
)
|
|
796
|
+
const manifest = await Bun.file(manifestPath).json()
|
|
797
|
+
manifest.parent.declaration.id = "different"
|
|
798
|
+
await Bun.write(manifestPath, JSON.stringify(manifest, null, 2) + "\n")
|
|
799
|
+
await expect(
|
|
800
|
+
runTestEffect(
|
|
801
|
+
ArchiveService.pipe(
|
|
802
|
+
Effect.flatMap((service) => service.restoreTask("child", root)),
|
|
803
|
+
),
|
|
804
|
+
),
|
|
805
|
+
).rejects.toThrow("conflicting parent declaration ID")
|
|
806
|
+
|
|
807
|
+
manifest.parent.declaration.id = "child"
|
|
808
|
+
await Bun.write(manifestPath, JSON.stringify(manifest, null, 2) + "\n")
|
|
809
|
+
const archivedTaskPath = join(root, "archive/tasks/child/TASK.md")
|
|
810
|
+
const archivedTask = await Bun.file(archivedTaskPath).text()
|
|
811
|
+
await Bun.write(
|
|
812
|
+
archivedTaskPath,
|
|
813
|
+
archivedTask.replace("epic: parent\n", ""),
|
|
814
|
+
)
|
|
815
|
+
await expect(
|
|
816
|
+
runTestEffect(
|
|
817
|
+
ArchiveService.pipe(
|
|
818
|
+
Effect.flatMap((service) => service.restoreTask("child", root)),
|
|
819
|
+
),
|
|
820
|
+
),
|
|
821
|
+
).rejects.toThrow("missing its epic backlink")
|
|
822
|
+
await Bun.write(archivedTaskPath, archivedTask)
|
|
823
|
+
await mkdir(join(root, "tasks/child"), { recursive: true })
|
|
824
|
+
await expect(
|
|
825
|
+
runTestEffect(
|
|
826
|
+
ArchiveService.pipe(
|
|
827
|
+
Effect.flatMap((service) => service.restoreTask("child", root)),
|
|
828
|
+
),
|
|
829
|
+
),
|
|
830
|
+
).rejects.toThrow("Restore destination already exists")
|
|
831
|
+
expect(
|
|
832
|
+
await Bun.file(join(root, "archive/tasks/child/TASK.md")).exists(),
|
|
833
|
+
).toBe(true)
|
|
834
|
+
})
|
|
835
|
+
|
|
836
|
+
test("reserves IDs for incomplete archive directories", async () => {
|
|
837
|
+
await mkdir(join(root, "archive/epics/interrupted"), { recursive: true })
|
|
838
|
+
await expect(
|
|
839
|
+
runTestEffect(
|
|
840
|
+
EpicService.pipe(
|
|
841
|
+
Effect.flatMap((service) =>
|
|
842
|
+
service.create(
|
|
843
|
+
"interrupted",
|
|
844
|
+
"https://example.com/epic",
|
|
845
|
+
[{ repo: "agency", ref: "main" }],
|
|
846
|
+
root,
|
|
847
|
+
),
|
|
848
|
+
),
|
|
849
|
+
),
|
|
850
|
+
),
|
|
851
|
+
).rejects.toThrow("is archived; restore it")
|
|
852
|
+
})
|
|
334
853
|
})
|