@nanobpm/nano-workforce 0.101.0 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/app/github.test.ts +36 -1
- package/app/github.ts +35 -2
- package/app/mergesPerDay.test.ts +173 -0
- package/app/mergesPerDay.ts +150 -0
- package/app/queuedVerdict.test.ts +1 -0
- package/app/reviewReadinessGate.test.ts +15 -3
- package/app/service.ts +20 -1
- package/db/migrations/051_merges_per_day.sql +33 -0
- package/package.json +1 -1
- package/pages/_nav.json +2 -1
- package/pages/board.page.json +4 -0
- package/pages/cockpit.page.json +4 -0
- package/pages/epic-detail.page.json +4 -0
- package/pages/epic.page.json +4 -0
- package/pages/feature.page.json +4 -0
- package/pages/home.page.json +4 -0
- package/pages/lineage.page.json +4 -0
- package/pages/overview.page.json +4 -0
- package/pages/tasks.page.json +4 -0
- package/pages/velocity.page.json +92 -0
- package/resources/processes/merge-loop.bpmn +174 -148
- package/scripts/check-migrations.ts +12 -1
- package/workers/merge/worker.test.ts +45 -0
- package/workers/merge/worker.ts +32 -4
|
@@ -140,6 +140,7 @@
|
|
|
140
140
|
<bpmn:outgoing>f_m_gMerged</bpmn:outgoing>
|
|
141
141
|
<bpmn:outgoing>f_m_gQueued</bpmn:outgoing>
|
|
142
142
|
<bpmn:outgoing>f_m_gRetry</bpmn:outgoing>
|
|
143
|
+
<bpmn:outgoing>f_m_gAbandoned</bpmn:outgoing>
|
|
143
144
|
<bpmn:outgoing>f_m_gBlocked</bpmn:outgoing>
|
|
144
145
|
</bpmn:exclusiveGateway>
|
|
145
146
|
<bpmn:exclusiveGateway id="gw-merge-retry" name="retry within budget?" default="f_mr_giveup">
|
|
@@ -176,6 +177,10 @@
|
|
|
176
177
|
<bpmn:endEvent id="MergeEnd" name="Merged">
|
|
177
178
|
<bpmn:incoming>f_m_done</bpmn:incoming>
|
|
178
179
|
</bpmn:endEvent>
|
|
180
|
+
<bpmn:endEvent id="MergeAbandoned" name="Abandoned (PR closed)">
|
|
181
|
+
<bpmn:incoming>f_m_gAbandoned</bpmn:incoming>
|
|
182
|
+
<bpmn:terminateEventDefinition id="ted_merge_abandoned" />
|
|
183
|
+
</bpmn:endEvent>
|
|
179
184
|
<bpmn:serviceTask id="merge-esc-conflict" name="Escalate: not mergeable">
|
|
180
185
|
<bpmn:extensionElements>
|
|
181
186
|
<zeebe:taskDefinition type="pr.persist-escalation" />
|
|
@@ -392,6 +397,9 @@
|
|
|
392
397
|
<bpmn:sequenceFlow id="f_eg_evicted" sourceRef="eg-landed" targetRef="wait-evicted" />
|
|
393
398
|
<bpmn:sequenceFlow id="f_m_evicted" sourceRef="wait-evicted" targetRef="arm-merge" />
|
|
394
399
|
<bpmn:sequenceFlow id="f_m_gBlocked" name="blocked" sourceRef="gw-merge" targetRef="merge-esc-attempt" />
|
|
400
|
+
<bpmn:sequenceFlow id="f_m_gAbandoned" name="abandoned (PR closed)" sourceRef="gw-merge" targetRef="MergeAbandoned">
|
|
401
|
+
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=mergeStatus = "abandoned"</bpmn:conditionExpression>
|
|
402
|
+
</bpmn:sequenceFlow>
|
|
395
403
|
<bpmn:sequenceFlow id="f_m_landed" sourceRef="wait-landed" targetRef="mark-merged" />
|
|
396
404
|
<bpmn:sequenceFlow id="f_m_done" sourceRef="mark-merged" targetRef="MergeEnd" />
|
|
397
405
|
<bpmn:sequenceFlow id="f_m_escC" sourceRef="merge-esc-conflict" targetRef="wait-merge-answer" />
|
|
@@ -440,13 +448,13 @@
|
|
|
440
448
|
<bpmndi:BPMNShape id="BPMNShape_gw-merge" bpmnElement="gw-merge" isMarkerVisible="true">
|
|
441
449
|
<dc:Bounds x="1063" y="95" width="50" height="50" />
|
|
442
450
|
<bpmndi:BPMNLabel>
|
|
443
|
-
<dc:Bounds x="
|
|
451
|
+
<dc:Bounds x="1102" y="150" width="53" height="28" />
|
|
444
452
|
</bpmndi:BPMNLabel>
|
|
445
453
|
</bpmndi:BPMNShape>
|
|
446
454
|
<bpmndi:BPMNShape id="BPMNShape_gw-merge-retry" bpmnElement="gw-merge-retry" isMarkerVisible="true">
|
|
447
|
-
<dc:Bounds x="1263" y="
|
|
455
|
+
<dc:Bounds x="1263" y="1375" width="50" height="50" />
|
|
448
456
|
<bpmndi:BPMNLabel>
|
|
449
|
-
<dc:Bounds x="1344" y="
|
|
457
|
+
<dc:Bounds x="1344" y="1410" width="88" height="28" />
|
|
450
458
|
</bpmndi:BPMNLabel>
|
|
451
459
|
</bpmndi:BPMNShape>
|
|
452
460
|
<bpmndi:BPMNShape id="BPMNShape_eg-landed" bpmnElement="eg-landed" isMarkerVisible="true">
|
|
@@ -476,37 +484,43 @@
|
|
|
476
484
|
<dc:Bounds x="1863" y="143" width="50" height="14" />
|
|
477
485
|
</bpmndi:BPMNLabel>
|
|
478
486
|
</bpmndi:BPMNShape>
|
|
487
|
+
<bpmndi:BPMNShape id="BPMNShape_MergeAbandoned" bpmnElement="MergeAbandoned">
|
|
488
|
+
<dc:Bounds x="1270" y="582" width="36" height="36" />
|
|
489
|
+
<bpmndi:BPMNLabel>
|
|
490
|
+
<dc:Bounds x="1227" y="623" width="82" height="28" />
|
|
491
|
+
</bpmndi:BPMNLabel>
|
|
492
|
+
</bpmndi:BPMNShape>
|
|
479
493
|
<bpmndi:BPMNShape id="BPMNShape_merge-esc-conflict" bpmnElement="merge-esc-conflict">
|
|
480
|
-
<dc:Bounds x="1238" y="
|
|
494
|
+
<dc:Bounds x="1238" y="1840" width="100" height="80" />
|
|
481
495
|
</bpmndi:BPMNShape>
|
|
482
496
|
<bpmndi:BPMNShape id="BPMNShape_merge-esc-attempt" bpmnElement="merge-esc-attempt">
|
|
483
|
-
<dc:Bounds x="1438" y="
|
|
497
|
+
<dc:Bounds x="1438" y="1360" width="100" height="80" />
|
|
484
498
|
</bpmndi:BPMNShape>
|
|
485
499
|
<bpmndi:BPMNShape id="BPMNShape_gw-merge-escalated" bpmnElement="gw-merge-escalated" isMarkerVisible="true">
|
|
486
|
-
<dc:Bounds x="1663" y="
|
|
500
|
+
<dc:Bounds x="1663" y="1375" width="50" height="50" />
|
|
487
501
|
<bpmndi:BPMNLabel>
|
|
488
|
-
<dc:Bounds x="1651" y="
|
|
502
|
+
<dc:Bounds x="1651" y="1342" width="74" height="28" />
|
|
489
503
|
</bpmndi:BPMNLabel>
|
|
490
504
|
</bpmndi:BPMNShape>
|
|
491
505
|
<bpmndi:BPMNShape id="BPMNShape_wait-merge-answer" bpmnElement="wait-merge-answer">
|
|
492
|
-
<dc:Bounds x="1838" y="
|
|
506
|
+
<dc:Bounds x="1838" y="1360" width="100" height="80" />
|
|
493
507
|
</bpmndi:BPMNShape>
|
|
494
508
|
<bpmndi:BPMNShape id="BPMNShape_record-merge-answer" bpmnElement="record-merge-answer">
|
|
495
|
-
<dc:Bounds x="2038" y="
|
|
509
|
+
<dc:Bounds x="2038" y="1360" width="100" height="80" />
|
|
496
510
|
</bpmndi:BPMNShape>
|
|
497
511
|
<bpmndi:BPMNShape id="BPMNShape_gw-ci-fix" bpmnElement="gw-ci-fix" isMarkerVisible="true">
|
|
498
|
-
<dc:Bounds x="863" y="
|
|
512
|
+
<dc:Bounds x="863" y="1855" width="50" height="50" />
|
|
499
513
|
<bpmndi:BPMNLabel>
|
|
500
|
-
<dc:Bounds x="769" y="
|
|
514
|
+
<dc:Bounds x="769" y="1873" width="89" height="14" />
|
|
501
515
|
</bpmndi:BPMNLabel>
|
|
502
516
|
</bpmndi:BPMNShape>
|
|
503
517
|
<bpmndi:BPMNShape id="BPMNShape_fix-ci" bpmnElement="fix-ci">
|
|
504
|
-
<dc:Bounds x="1038" y="
|
|
518
|
+
<dc:Bounds x="1038" y="720" width="100" height="80" />
|
|
505
519
|
</bpmndi:BPMNShape>
|
|
506
520
|
<bpmndi:BPMNShape id="BPMNShape_gw-ci-result" bpmnElement="gw-ci-result" isMarkerVisible="true">
|
|
507
|
-
<dc:Bounds x="1263" y="
|
|
521
|
+
<dc:Bounds x="1263" y="735" width="50" height="50" />
|
|
508
522
|
<bpmndi:BPMNLabel>
|
|
509
|
-
<dc:Bounds x="1225" y="
|
|
523
|
+
<dc:Bounds x="1225" y="790" width="46" height="14" />
|
|
510
524
|
</bpmndi:BPMNLabel>
|
|
511
525
|
</bpmndi:BPMNShape>
|
|
512
526
|
<bpmndi:BPMNShape id="BPMNShape_gw-rebase" bpmnElement="gw-rebase" isMarkerVisible="true">
|
|
@@ -516,27 +530,27 @@
|
|
|
516
530
|
</bpmndi:BPMNLabel>
|
|
517
531
|
</bpmndi:BPMNShape>
|
|
518
532
|
<bpmndi:BPMNShape id="BPMNShape_rebase" bpmnElement="rebase">
|
|
519
|
-
<dc:Bounds x="1038" y="
|
|
533
|
+
<dc:Bounds x="1038" y="1040" width="100" height="80" />
|
|
520
534
|
</bpmndi:BPMNShape>
|
|
521
535
|
<bpmndi:BPMNShape id="BPMNShape_gw-rebase-result" bpmnElement="gw-rebase-result" isMarkerVisible="true">
|
|
522
|
-
<dc:Bounds x="1263" y="
|
|
536
|
+
<dc:Bounds x="1263" y="1055" width="50" height="50" />
|
|
523
537
|
<bpmndi:BPMNLabel>
|
|
524
|
-
<dc:Bounds x="1218" y="
|
|
538
|
+
<dc:Bounds x="1218" y="1110" width="60" height="14" />
|
|
525
539
|
</bpmndi:BPMNLabel>
|
|
526
540
|
</bpmndi:BPMNShape>
|
|
527
541
|
<bpmndi:BPMNShape id="BPMNShape_record-merge-dep" bpmnElement="record-merge-dep">
|
|
528
|
-
<dc:Bounds x="1438" y="
|
|
542
|
+
<dc:Bounds x="1438" y="880" width="100" height="80" />
|
|
529
543
|
</bpmndi:BPMNShape>
|
|
530
544
|
<bpmndi:BPMNShape id="BPMNShape_be_fixci_sla" bpmnElement="be_fixci_sla">
|
|
531
|
-
<dc:Bounds x="1070" y="
|
|
545
|
+
<dc:Bounds x="1070" y="782" width="36" height="36" />
|
|
532
546
|
<bpmndi:BPMNLabel>
|
|
533
|
-
<dc:Bounds x="1046" y="
|
|
547
|
+
<dc:Bounds x="1046" y="863" width="84" height="14" />
|
|
534
548
|
</bpmndi:BPMNLabel>
|
|
535
549
|
</bpmndi:BPMNShape>
|
|
536
550
|
<bpmndi:BPMNShape id="BPMNShape_be_rebase_sla" bpmnElement="be_rebase_sla">
|
|
537
|
-
<dc:Bounds x="1070" y="
|
|
551
|
+
<dc:Bounds x="1070" y="1102" width="36" height="36" />
|
|
538
552
|
<bpmndi:BPMNLabel>
|
|
539
|
-
<dc:Bounds x="1046" y="
|
|
553
|
+
<dc:Bounds x="1046" y="1183" width="84" height="14" />
|
|
540
554
|
</bpmndi:BPMNLabel>
|
|
541
555
|
</bpmndi:BPMNShape>
|
|
542
556
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_start" bpmnElement="f_m_start">
|
|
@@ -578,47 +592,47 @@
|
|
|
578
592
|
<di:waypoint x="1870" y="120" />
|
|
579
593
|
</bpmndi:BPMNEdge>
|
|
580
594
|
<bpmndi:BPMNEdge id="BPMNEdge_f_ci_giveup" bpmnElement="f_ci_giveup">
|
|
581
|
-
<di:waypoint x="913" y="
|
|
582
|
-
<di:waypoint x="1238" y="
|
|
595
|
+
<di:waypoint x="913" y="1880" />
|
|
596
|
+
<di:waypoint x="1238" y="1880" />
|
|
583
597
|
<bpmndi:BPMNLabel>
|
|
584
|
-
<dc:Bounds x="1032" y="
|
|
598
|
+
<dc:Bounds x="1032" y="1847" width="67" height="28" />
|
|
585
599
|
</bpmndi:BPMNLabel>
|
|
586
600
|
</bpmndi:BPMNEdge>
|
|
587
601
|
<bpmndi:BPMNEdge id="BPMNEdge_f_ci_reconcile" bpmnElement="f_ci_reconcile">
|
|
588
|
-
<di:waypoint x="1288" y="
|
|
589
|
-
<di:waypoint x="1288" y="
|
|
590
|
-
<di:waypoint x="402" y="
|
|
602
|
+
<di:waypoint x="1288" y="785" />
|
|
603
|
+
<di:waypoint x="1288" y="840" />
|
|
604
|
+
<di:waypoint x="402" y="840" />
|
|
591
605
|
<di:waypoint x="402" y="160" />
|
|
592
606
|
<bpmndi:BPMNLabel>
|
|
593
|
-
<dc:Bounds x="804" y="
|
|
607
|
+
<dc:Bounds x="804" y="779" width="82" height="56" />
|
|
594
608
|
</bpmndi:BPMNLabel>
|
|
595
609
|
</bpmndi:BPMNEdge>
|
|
596
610
|
<bpmndi:BPMNEdge id="BPMNEdge_f_reb_giveup" bpmnElement="f_reb_giveup">
|
|
597
611
|
<di:waypoint x="913" y="280" />
|
|
598
612
|
<di:waypoint x="933" y="280" />
|
|
599
613
|
<di:waypoint x="933" y="305" />
|
|
600
|
-
<di:waypoint x="
|
|
601
|
-
<di:waypoint x="
|
|
602
|
-
<di:waypoint x="1288" y="
|
|
603
|
-
<di:waypoint x="1288" y="
|
|
614
|
+
<di:waypoint x="1326" y="305" />
|
|
615
|
+
<di:waypoint x="1326" y="1820" />
|
|
616
|
+
<di:waypoint x="1288" y="1820" />
|
|
617
|
+
<di:waypoint x="1288" y="1840" />
|
|
604
618
|
<bpmndi:BPMNLabel>
|
|
605
|
-
<dc:Bounds x="
|
|
619
|
+
<dc:Bounds x="1331" y="1566" width="67" height="28" />
|
|
606
620
|
</bpmndi:BPMNLabel>
|
|
607
621
|
</bpmndi:BPMNEdge>
|
|
608
622
|
<bpmndi:BPMNEdge id="BPMNEdge_f_reb_reconcile" bpmnElement="f_reb_reconcile">
|
|
609
|
-
<di:waypoint x="1288" y="
|
|
610
|
-
<di:waypoint x="1288" y="
|
|
611
|
-
<di:waypoint x="402" y="
|
|
623
|
+
<di:waypoint x="1288" y="1105" />
|
|
624
|
+
<di:waypoint x="1288" y="1160" />
|
|
625
|
+
<di:waypoint x="402" y="1160" />
|
|
612
626
|
<di:waypoint x="402" y="160" />
|
|
613
627
|
<bpmndi:BPMNLabel>
|
|
614
|
-
<dc:Bounds x="804" y="
|
|
628
|
+
<dc:Bounds x="804" y="1099" width="82" height="56" />
|
|
615
629
|
</bpmndi:BPMNLabel>
|
|
616
630
|
</bpmndi:BPMNEdge>
|
|
617
631
|
<bpmndi:BPMNEdge id="BPMNEdge_f_mr_giveup" bpmnElement="f_mr_giveup">
|
|
618
|
-
<di:waypoint x="1313" y="
|
|
619
|
-
<di:waypoint x="1438" y="
|
|
632
|
+
<di:waypoint x="1313" y="1400" />
|
|
633
|
+
<di:waypoint x="1438" y="1400" />
|
|
620
634
|
<bpmndi:BPMNLabel>
|
|
621
|
-
<dc:Bounds x="
|
|
635
|
+
<dc:Bounds x="1332" y="1367" width="67" height="28" />
|
|
622
636
|
</bpmndi:BPMNLabel>
|
|
623
637
|
</bpmndi:BPMNEdge>
|
|
624
638
|
<bpmndi:BPMNEdge id="BPMNEdge_f_eg_landed" bpmnElement="f_eg_landed">
|
|
@@ -631,44 +645,44 @@
|
|
|
631
645
|
<di:waypoint x="1688" y="160" />
|
|
632
646
|
</bpmndi:BPMNEdge>
|
|
633
647
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_escC" bpmnElement="f_m_escC">
|
|
634
|
-
<di:waypoint x="1338" y="
|
|
635
|
-
<di:waypoint x="1888" y="
|
|
636
|
-
<di:waypoint x="1888" y="
|
|
648
|
+
<di:waypoint x="1338" y="1880" />
|
|
649
|
+
<di:waypoint x="1888" y="1880" />
|
|
650
|
+
<di:waypoint x="1888" y="1440" />
|
|
637
651
|
</bpmndi:BPMNEdge>
|
|
638
652
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_escA" bpmnElement="f_m_escA">
|
|
639
|
-
<di:waypoint x="1538" y="
|
|
640
|
-
<di:waypoint x="1663" y="
|
|
653
|
+
<di:waypoint x="1538" y="1400" />
|
|
654
|
+
<di:waypoint x="1663" y="1400" />
|
|
641
655
|
</bpmndi:BPMNEdge>
|
|
642
656
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_escReenter" bpmnElement="f_m_escReenter">
|
|
643
|
-
<di:waypoint x="1688" y="
|
|
644
|
-
<di:waypoint x="1688" y="
|
|
645
|
-
<di:waypoint x="402" y="
|
|
657
|
+
<di:waypoint x="1688" y="1425" />
|
|
658
|
+
<di:waypoint x="1688" y="1460" />
|
|
659
|
+
<di:waypoint x="402" y="1460" />
|
|
646
660
|
<di:waypoint x="402" y="160" />
|
|
647
661
|
<bpmndi:BPMNLabel>
|
|
648
|
-
<dc:Bounds x="1008" y="
|
|
662
|
+
<dc:Bounds x="1008" y="1465" width="74" height="42" />
|
|
649
663
|
</bpmndi:BPMNLabel>
|
|
650
664
|
</bpmndi:BPMNEdge>
|
|
651
665
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_answerRecord" bpmnElement="f_m_answerRecord">
|
|
652
|
-
<di:waypoint x="1938" y="
|
|
653
|
-
<di:waypoint x="2038" y="
|
|
666
|
+
<di:waypoint x="1938" y="1400" />
|
|
667
|
+
<di:waypoint x="2038" y="1400" />
|
|
654
668
|
</bpmndi:BPMNEdge>
|
|
655
669
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_answer" bpmnElement="f_m_answer">
|
|
656
|
-
<di:waypoint x="2088" y="
|
|
657
|
-
<di:waypoint x="2088" y="
|
|
658
|
-
<di:waypoint x="402" y="
|
|
670
|
+
<di:waypoint x="2088" y="1440" />
|
|
671
|
+
<di:waypoint x="2088" y="1460" />
|
|
672
|
+
<di:waypoint x="402" y="1460" />
|
|
659
673
|
<di:waypoint x="402" y="160" />
|
|
660
674
|
</bpmndi:BPMNEdge>
|
|
661
675
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_mCiFix" bpmnElement="f_m_mCiFix">
|
|
662
676
|
<di:waypoint x="713" y="145" />
|
|
663
677
|
<di:waypoint x="713" y="318" />
|
|
664
|
-
<di:waypoint x="
|
|
665
|
-
<di:waypoint x="
|
|
666
|
-
<di:waypoint x="863" y="
|
|
667
|
-
<di:waypoint x="863" y="
|
|
668
|
-
<di:waypoint x="888" y="
|
|
669
|
-
<di:waypoint x="888" y="
|
|
678
|
+
<di:waypoint x="1333" y="318" />
|
|
679
|
+
<di:waypoint x="1333" y="1340" />
|
|
680
|
+
<di:waypoint x="863" y="1340" />
|
|
681
|
+
<di:waypoint x="863" y="1835" />
|
|
682
|
+
<di:waypoint x="888" y="1835" />
|
|
683
|
+
<di:waypoint x="888" y="1855" />
|
|
670
684
|
<bpmndi:BPMNLabel>
|
|
671
|
-
<dc:Bounds x="1011" y="
|
|
685
|
+
<dc:Bounds x="1011" y="1293" width="60" height="42" />
|
|
672
686
|
</bpmndi:BPMNLabel>
|
|
673
687
|
</bpmndi:BPMNEdge>
|
|
674
688
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_mRebase" bpmnElement="f_m_mRebase">
|
|
@@ -682,42 +696,42 @@
|
|
|
682
696
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_mBlocked" bpmnElement="f_m_mBlocked">
|
|
683
697
|
<di:waypoint x="713" y="145" />
|
|
684
698
|
<di:waypoint x="713" y="318" />
|
|
685
|
-
<di:waypoint x="
|
|
686
|
-
<di:waypoint x="
|
|
687
|
-
<di:waypoint x="1218" y="
|
|
688
|
-
<di:waypoint x="1218" y="
|
|
689
|
-
<di:waypoint x="1238" y="
|
|
699
|
+
<di:waypoint x="1326" y="318" />
|
|
700
|
+
<di:waypoint x="1326" y="1340" />
|
|
701
|
+
<di:waypoint x="1218" y="1340" />
|
|
702
|
+
<di:waypoint x="1218" y="1860" />
|
|
703
|
+
<di:waypoint x="1238" y="1860" />
|
|
690
704
|
<bpmndi:BPMNLabel>
|
|
691
|
-
<dc:Bounds x="
|
|
705
|
+
<dc:Bounds x="1236" y="862" width="85" height="14" />
|
|
692
706
|
</bpmndi:BPMNLabel>
|
|
693
707
|
</bpmndi:BPMNEdge>
|
|
694
708
|
<bpmndi:BPMNEdge id="BPMNEdge_f_ci_go" bpmnElement="f_ci_go">
|
|
695
|
-
<di:waypoint x="888" y="
|
|
696
|
-
<di:waypoint x="888" y="
|
|
697
|
-
<di:waypoint x="2158" y="
|
|
698
|
-
<di:waypoint x="2158" y="
|
|
699
|
-
<di:waypoint x="1018" y="
|
|
700
|
-
<di:waypoint x="1018" y="
|
|
701
|
-
<di:waypoint x="1038" y="
|
|
709
|
+
<di:waypoint x="888" y="1905" />
|
|
710
|
+
<di:waypoint x="888" y="1925" />
|
|
711
|
+
<di:waypoint x="2158" y="1925" />
|
|
712
|
+
<di:waypoint x="2158" y="715" />
|
|
713
|
+
<di:waypoint x="1018" y="715" />
|
|
714
|
+
<di:waypoint x="1018" y="740" />
|
|
715
|
+
<di:waypoint x="1038" y="740" />
|
|
702
716
|
<bpmndi:BPMNLabel>
|
|
703
|
-
<dc:Bounds x="2163" y="
|
|
717
|
+
<dc:Bounds x="2163" y="1306" width="49" height="28" />
|
|
704
718
|
</bpmndi:BPMNLabel>
|
|
705
719
|
</bpmndi:BPMNEdge>
|
|
706
720
|
<bpmndi:BPMNEdge id="BPMNEdge_f_ci_blocked" bpmnElement="f_ci_blocked">
|
|
707
|
-
<di:waypoint x="1313" y="
|
|
708
|
-
<di:waypoint x="1418" y="
|
|
709
|
-
<di:waypoint x="1418" y="
|
|
710
|
-
<di:waypoint x="1438" y="
|
|
721
|
+
<di:waypoint x="1313" y="760" />
|
|
722
|
+
<di:waypoint x="1418" y="760" />
|
|
723
|
+
<di:waypoint x="1418" y="1400" />
|
|
724
|
+
<di:waypoint x="1438" y="1400" />
|
|
711
725
|
<bpmndi:BPMNLabel>
|
|
712
|
-
<dc:Bounds x="1423" y="
|
|
726
|
+
<dc:Bounds x="1423" y="1013" width="89" height="14" />
|
|
713
727
|
</bpmndi:BPMNLabel>
|
|
714
728
|
</bpmndi:BPMNEdge>
|
|
715
729
|
<bpmndi:BPMNEdge id="BPMNEdge_f_ci_wait" bpmnElement="f_ci_wait">
|
|
716
|
-
<di:waypoint x="1313" y="
|
|
717
|
-
<di:waypoint x="1488" y="
|
|
718
|
-
<di:waypoint x="1488" y="
|
|
730
|
+
<di:waypoint x="1313" y="760" />
|
|
731
|
+
<di:waypoint x="1488" y="760" />
|
|
732
|
+
<di:waypoint x="1488" y="880" />
|
|
719
733
|
<bpmndi:BPMNLabel>
|
|
720
|
-
<dc:Bounds x="1416" y="
|
|
734
|
+
<dc:Bounds x="1416" y="727" width="75" height="28" />
|
|
721
735
|
</bpmndi:BPMNLabel>
|
|
722
736
|
</bpmndi:BPMNEdge>
|
|
723
737
|
<bpmndi:BPMNEdge id="BPMNEdge_f_reb_go" bpmnElement="f_reb_go">
|
|
@@ -725,32 +739,32 @@
|
|
|
725
739
|
<di:waypoint x="933" y="280" />
|
|
726
740
|
<di:waypoint x="933" y="305" />
|
|
727
741
|
<di:waypoint x="1733" y="305" />
|
|
728
|
-
<di:waypoint x="1733" y="
|
|
729
|
-
<di:waypoint x="
|
|
730
|
-
<di:waypoint x="
|
|
731
|
-
<di:waypoint x="
|
|
732
|
-
<di:waypoint x="
|
|
733
|
-
<di:waypoint x="1018" y="
|
|
734
|
-
<di:waypoint x="1018" y="
|
|
735
|
-
<di:waypoint x="1038" y="
|
|
742
|
+
<di:waypoint x="1733" y="1820" />
|
|
743
|
+
<di:waypoint x="1250" y="1820" />
|
|
744
|
+
<di:waypoint x="1250" y="1355" />
|
|
745
|
+
<di:waypoint x="1358" y="1355" />
|
|
746
|
+
<di:waypoint x="1358" y="1035" />
|
|
747
|
+
<di:waypoint x="1018" y="1035" />
|
|
748
|
+
<di:waypoint x="1018" y="1060" />
|
|
749
|
+
<di:waypoint x="1038" y="1060" />
|
|
736
750
|
<bpmndi:BPMNLabel>
|
|
737
|
-
<dc:Bounds x="
|
|
751
|
+
<dc:Bounds x="1255" y="1574" width="49" height="28" />
|
|
738
752
|
</bpmndi:BPMNLabel>
|
|
739
753
|
</bpmndi:BPMNEdge>
|
|
740
754
|
<bpmndi:BPMNEdge id="BPMNEdge_f_reb_blocked" bpmnElement="f_reb_blocked">
|
|
741
|
-
<di:waypoint x="1313" y="
|
|
742
|
-
<di:waypoint x="1488" y="
|
|
743
|
-
<di:waypoint x="1488" y="
|
|
755
|
+
<di:waypoint x="1313" y="1080" />
|
|
756
|
+
<di:waypoint x="1488" y="1080" />
|
|
757
|
+
<di:waypoint x="1488" y="1360" />
|
|
744
758
|
<bpmndi:BPMNLabel>
|
|
745
|
-
<dc:Bounds x="1429" y="
|
|
759
|
+
<dc:Bounds x="1429" y="1047" width="64" height="28" />
|
|
746
760
|
</bpmndi:BPMNLabel>
|
|
747
761
|
</bpmndi:BPMNEdge>
|
|
748
762
|
<bpmndi:BPMNEdge id="BPMNEdge_f_reb_wait" bpmnElement="f_reb_wait">
|
|
749
|
-
<di:waypoint x="1288" y="
|
|
750
|
-
<di:waypoint x="1288" y="
|
|
751
|
-
<di:waypoint x="1438" y="
|
|
763
|
+
<di:waypoint x="1288" y="1055" />
|
|
764
|
+
<di:waypoint x="1288" y="920" />
|
|
765
|
+
<di:waypoint x="1438" y="920" />
|
|
752
766
|
<bpmndi:BPMNLabel>
|
|
753
|
-
<dc:Bounds x="1208" y="
|
|
767
|
+
<dc:Bounds x="1208" y="994" width="75" height="28" />
|
|
754
768
|
</bpmndi:BPMNLabel>
|
|
755
769
|
</bpmndi:BPMNEdge>
|
|
756
770
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_gQueued" bpmnElement="f_m_gQueued">
|
|
@@ -758,7 +772,7 @@
|
|
|
758
772
|
<di:waypoint x="1088" y="280" />
|
|
759
773
|
<di:waypoint x="1263" y="280" />
|
|
760
774
|
<bpmndi:BPMNLabel>
|
|
761
|
-
<dc:Bounds x="1093" y="
|
|
775
|
+
<dc:Bounds x="1093" y="216" width="46" height="14" />
|
|
762
776
|
</bpmndi:BPMNLabel>
|
|
763
777
|
</bpmndi:BPMNEdge>
|
|
764
778
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_gRetry" bpmnElement="f_m_gRetry">
|
|
@@ -767,10 +781,10 @@
|
|
|
767
781
|
<di:waypoint x="1926" y="75" />
|
|
768
782
|
<di:waypoint x="1926" y="318" />
|
|
769
783
|
<di:waypoint x="1643" y="318" />
|
|
770
|
-
<di:waypoint x="1643" y="
|
|
771
|
-
<di:waypoint x="1263" y="
|
|
772
|
-
<di:waypoint x="1288" y="
|
|
773
|
-
<di:waypoint x="1288" y="
|
|
784
|
+
<di:waypoint x="1643" y="1445" />
|
|
785
|
+
<di:waypoint x="1263" y="1445" />
|
|
786
|
+
<di:waypoint x="1288" y="1445" />
|
|
787
|
+
<di:waypoint x="1288" y="1425" />
|
|
774
788
|
<bpmndi:BPMNLabel>
|
|
775
789
|
<dc:Bounds x="1746" y="285" width="78" height="28" />
|
|
776
790
|
</bpmndi:BPMNLabel>
|
|
@@ -784,80 +798,92 @@
|
|
|
784
798
|
<di:waypoint x="1088" y="95" />
|
|
785
799
|
<di:waypoint x="1088" y="75" />
|
|
786
800
|
<di:waypoint x="1926" y="75" />
|
|
787
|
-
<di:waypoint x="1926" y="
|
|
788
|
-
<di:waypoint x="1418" y="
|
|
789
|
-
<di:waypoint x="1418" y="
|
|
790
|
-
<di:waypoint x="1438" y="
|
|
801
|
+
<di:waypoint x="1926" y="980" />
|
|
802
|
+
<di:waypoint x="1418" y="980" />
|
|
803
|
+
<di:waypoint x="1418" y="1380" />
|
|
804
|
+
<di:waypoint x="1438" y="1380" />
|
|
805
|
+
<bpmndi:BPMNLabel>
|
|
806
|
+
<dc:Bounds x="1931" y="642" width="53" height="14" />
|
|
807
|
+
</bpmndi:BPMNLabel>
|
|
808
|
+
</bpmndi:BPMNEdge>
|
|
809
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_m_gAbandoned" bpmnElement="f_m_gAbandoned">
|
|
810
|
+
<di:waypoint x="1088" y="145" />
|
|
811
|
+
<di:waypoint x="1088" y="165" />
|
|
812
|
+
<di:waypoint x="818" y="165" />
|
|
813
|
+
<di:waypoint x="818" y="145" />
|
|
814
|
+
<di:waypoint x="668" y="145" />
|
|
815
|
+
<di:waypoint x="668" y="600" />
|
|
816
|
+
<di:waypoint x="1270" y="600" />
|
|
791
817
|
<bpmndi:BPMNLabel>
|
|
792
|
-
<dc:Bounds x="
|
|
818
|
+
<dc:Bounds x="722" y="150" width="82" height="28" />
|
|
793
819
|
</bpmndi:BPMNLabel>
|
|
794
820
|
</bpmndi:BPMNEdge>
|
|
795
821
|
<bpmndi:BPMNEdge id="BPMNEdge_f_ci_done" bpmnElement="f_ci_done">
|
|
796
|
-
<di:waypoint x="1138" y="
|
|
797
|
-
<di:waypoint x="1263" y="
|
|
822
|
+
<di:waypoint x="1138" y="760" />
|
|
823
|
+
<di:waypoint x="1263" y="760" />
|
|
798
824
|
</bpmndi:BPMNEdge>
|
|
799
825
|
<bpmndi:BPMNEdge id="BPMNEdge_f_reb_done" bpmnElement="f_reb_done">
|
|
800
|
-
<di:waypoint x="1138" y="
|
|
801
|
-
<di:waypoint x="1263" y="
|
|
826
|
+
<di:waypoint x="1138" y="1080" />
|
|
827
|
+
<di:waypoint x="1263" y="1080" />
|
|
802
828
|
</bpmndi:BPMNEdge>
|
|
803
829
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_escWait" bpmnElement="f_m_escWait">
|
|
804
|
-
<di:waypoint x="1713" y="
|
|
805
|
-
<di:waypoint x="1838" y="
|
|
830
|
+
<di:waypoint x="1713" y="1400" />
|
|
831
|
+
<di:waypoint x="1838" y="1400" />
|
|
806
832
|
</bpmndi:BPMNEdge>
|
|
807
833
|
<bpmndi:BPMNEdge id="BPMNEdge_f_reb_sla" bpmnElement="f_reb_sla">
|
|
808
|
-
<di:waypoint x="1088" y="
|
|
809
|
-
<di:waypoint x="1088" y="
|
|
810
|
-
<di:waypoint x="1218" y="
|
|
811
|
-
<di:waypoint x="1218" y="
|
|
812
|
-
<di:waypoint x="1238" y="
|
|
834
|
+
<di:waypoint x="1088" y="1138" />
|
|
835
|
+
<di:waypoint x="1088" y="1158" />
|
|
836
|
+
<di:waypoint x="1218" y="1158" />
|
|
837
|
+
<di:waypoint x="1218" y="1880" />
|
|
838
|
+
<di:waypoint x="1238" y="1880" />
|
|
813
839
|
<bpmndi:BPMNLabel>
|
|
814
|
-
<dc:Bounds x="1118" y="
|
|
840
|
+
<dc:Bounds x="1118" y="1125" width="70" height="28" />
|
|
815
841
|
</bpmndi:BPMNLabel>
|
|
816
842
|
</bpmndi:BPMNEdge>
|
|
817
843
|
<bpmndi:BPMNEdge id="BPMNEdge_f_ci_sla" bpmnElement="f_ci_sla">
|
|
818
|
-
<di:waypoint x="1088" y="
|
|
819
|
-
<di:waypoint x="1088" y="
|
|
820
|
-
<di:waypoint x="1018" y="
|
|
821
|
-
<di:waypoint x="1018" y="
|
|
822
|
-
<di:waypoint x="1558" y="
|
|
823
|
-
<di:waypoint x="1558" y="
|
|
824
|
-
<di:waypoint x="1526" y="
|
|
825
|
-
<di:waypoint x="1526" y="
|
|
844
|
+
<di:waypoint x="1088" y="818" />
|
|
845
|
+
<di:waypoint x="1088" y="838" />
|
|
846
|
+
<di:waypoint x="1018" y="838" />
|
|
847
|
+
<di:waypoint x="1018" y="700" />
|
|
848
|
+
<di:waypoint x="1558" y="700" />
|
|
849
|
+
<di:waypoint x="1558" y="980" />
|
|
850
|
+
<di:waypoint x="1526" y="980" />
|
|
851
|
+
<di:waypoint x="1526" y="1360" />
|
|
826
852
|
<bpmndi:BPMNLabel>
|
|
827
|
-
<dc:Bounds x="
|
|
853
|
+
<dc:Bounds x="1233" y="667" width="70" height="28" />
|
|
828
854
|
</bpmndi:BPMNLabel>
|
|
829
855
|
</bpmndi:BPMNEdge>
|
|
830
856
|
<bpmndi:BPMNEdge id="BPMNEdge_f_ci_fixed" bpmnElement="f_ci_fixed">
|
|
831
|
-
<di:waypoint x="1288" y="
|
|
832
|
-
<di:waypoint x="1288" y="
|
|
833
|
-
<di:waypoint x="402" y="
|
|
857
|
+
<di:waypoint x="1288" y="785" />
|
|
858
|
+
<di:waypoint x="1288" y="840" />
|
|
859
|
+
<di:waypoint x="402" y="840" />
|
|
834
860
|
<di:waypoint x="402" y="160" />
|
|
835
861
|
<bpmndi:BPMNLabel>
|
|
836
|
-
<dc:Bounds x="826" y="
|
|
862
|
+
<dc:Bounds x="826" y="848" width="39" height="14" />
|
|
837
863
|
</bpmndi:BPMNLabel>
|
|
838
864
|
</bpmndi:BPMNEdge>
|
|
839
865
|
<bpmndi:BPMNEdge id="BPMNEdge_f_reb_rebased" bpmnElement="f_reb_rebased">
|
|
840
|
-
<di:waypoint x="1288" y="
|
|
841
|
-
<di:waypoint x="1288" y="
|
|
842
|
-
<di:waypoint x="402" y="
|
|
866
|
+
<di:waypoint x="1288" y="1105" />
|
|
867
|
+
<di:waypoint x="1288" y="1160" />
|
|
868
|
+
<di:waypoint x="402" y="1160" />
|
|
843
869
|
<di:waypoint x="402" y="160" />
|
|
844
870
|
<bpmndi:BPMNLabel>
|
|
845
|
-
<dc:Bounds x="819" y="
|
|
871
|
+
<dc:Bounds x="819" y="1168" width="53" height="14" />
|
|
846
872
|
</bpmndi:BPMNLabel>
|
|
847
873
|
</bpmndi:BPMNEdge>
|
|
848
874
|
<bpmndi:BPMNEdge id="BPMNEdge_f_dep_rewait" bpmnElement="f_dep_rewait">
|
|
849
|
-
<di:waypoint x="1488" y="
|
|
850
|
-
<di:waypoint x="1488" y="
|
|
851
|
-
<di:waypoint x="234" y="
|
|
875
|
+
<di:waypoint x="1488" y="960" />
|
|
876
|
+
<di:waypoint x="1488" y="980" />
|
|
877
|
+
<di:waypoint x="234" y="980" />
|
|
852
878
|
<di:waypoint x="234" y="138" />
|
|
853
879
|
</bpmndi:BPMNEdge>
|
|
854
880
|
<bpmndi:BPMNEdge id="BPMNEdge_f_mr_go" bpmnElement="f_mr_go">
|
|
855
|
-
<di:waypoint x="1288" y="
|
|
856
|
-
<di:waypoint x="1288" y="
|
|
857
|
-
<di:waypoint x="402" y="
|
|
881
|
+
<di:waypoint x="1288" y="1425" />
|
|
882
|
+
<di:waypoint x="1288" y="1445" />
|
|
883
|
+
<di:waypoint x="402" y="1445" />
|
|
858
884
|
<di:waypoint x="402" y="160" />
|
|
859
885
|
<bpmndi:BPMNLabel>
|
|
860
|
-
<dc:Bounds x="808" y="
|
|
886
|
+
<dc:Bounds x="808" y="1412" width="49" height="28" />
|
|
861
887
|
</bpmndi:BPMNLabel>
|
|
862
888
|
</bpmndi:BPMNEdge>
|
|
863
889
|
<bpmndi:BPMNEdge id="BPMNEdge_f_m_evicted" bpmnElement="f_m_evicted">
|
|
@@ -21,7 +21,18 @@ const MIGRATIONS_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "db",
|
|
|
21
21
|
|
|
22
22
|
// Historical collisions that predate this gate. Forward-only + already applied ⇒ cannot be
|
|
23
23
|
// renumbered. New duplicates are NOT allowed here — fix them before merge.
|
|
24
|
-
|
|
24
|
+
//
|
|
25
|
+
// 049 is a grandfathered post-hoc collision: three independently-merged PRs each took the then-next
|
|
26
|
+
// free prefix on their own branch and landed a `049_*.sql` (#290 `049_plan_task_needs`, #337
|
|
27
|
+
// `049_world_checkpoint`, #339 `049_drop_feature_escalation_surface`). Because a per-branch prefix is
|
|
28
|
+
// computed without visibility of sibling branches, the collision was SILENT at each PR's green CI and
|
|
29
|
+
// only surfaced once all three were on main — exactly the merge-time failure mode this gate warns
|
|
30
|
+
// about, realised across three PRs that never saw each other. By the time it was caught the three
|
|
31
|
+
// migrations were already applied forward-only on main and production, so — like 004–007 — they
|
|
32
|
+
// cannot be renumbered (a rename re-runs `CREATE TABLE`/`ALTER TABLE DROP COLUMN` on migrated DBs and
|
|
33
|
+
// fails). They create three disjoint schema objects, so their relative apply order is irrelevant.
|
|
34
|
+
// Grandfather 049; any NEW duplicate prefix still fails the build.
|
|
35
|
+
const GRANDFATHERED_DUPES: ReadonlySet<string> = new Set(["004", "005", "006", "007", "049"]);
|
|
25
36
|
|
|
26
37
|
const PREFIX = /^(\d{3})_[^/]*\.sql$/;
|
|
27
38
|
|
|
@@ -245,3 +245,48 @@ test("pr.merge routes a transient base-moved race through the retry branch (no e
|
|
|
245
245
|
},
|
|
246
246
|
);
|
|
247
247
|
});
|
|
248
|
+
|
|
249
|
+
test("pr.merge abandons a closed-not-merged PR without escalating (terminal abandon, #342)", async () => {
|
|
250
|
+
// #342/#350: a PR CLOSED on GitHub without merging (e.g. superseded by a newer PR) can never
|
|
251
|
+
// land. The worker must NOT fall through to the land protocol — that returns blocked/conflict and
|
|
252
|
+
// escalates a merge no human can complete, orphaning the process on a dead PR. Instead it records
|
|
253
|
+
// a terminal `abandoned` audit row and returns `mergeStatus:"abandoned"` (the model's
|
|
254
|
+
// terminate/abandon end event), opening NO escalation. Symmetric with the already-merged
|
|
255
|
+
// short-circuit; both are decided from the same single live-state read.
|
|
256
|
+
await withGithub(
|
|
257
|
+
(url) => {
|
|
258
|
+
// Single-PR GET → PR is closed (state="closed") and NOT merged.
|
|
259
|
+
if (/\/pulls\/\d+$/.test(url))
|
|
260
|
+
return new Response(JSON.stringify({ merged: false, state: "closed", mergeable_state: "dirty" }));
|
|
261
|
+
return null; // no AGENTS.md / merge-protocol.json → DEFAULT gh-merge protocol
|
|
262
|
+
},
|
|
263
|
+
async (calls) => {
|
|
264
|
+
const { app, stores } = fakeApp();
|
|
265
|
+
const out = (await handler(
|
|
266
|
+
{ variables: { prKey: "acme/widgets#13", repo: "acme/widgets", prNumber: 13 } } as any,
|
|
267
|
+
app,
|
|
268
|
+
)) as Record<string, unknown>;
|
|
269
|
+
|
|
270
|
+
// Abandon short-circuit: loop-terminal `mergeStatus` only, NO escalation payload.
|
|
271
|
+
assertEquals(out, { mergeStatus: "abandoned" });
|
|
272
|
+
assertEquals(out.status, undefined);
|
|
273
|
+
assertEquals(out.question, undefined);
|
|
274
|
+
|
|
275
|
+
// Records exactly one terminal audit row tagged as the closed-PR abandon path.
|
|
276
|
+
assertEquals(stores.merges.length, 1);
|
|
277
|
+
assertEquals(stores.merges[0].outcome, "abandoned");
|
|
278
|
+
assertEquals(stores.merges[0].method, "pr-closed");
|
|
279
|
+
|
|
280
|
+
// Flips the PR row to the terminal `abandoned` status. This path drives a terminate end event
|
|
281
|
+
// that runs NO mark-merged/mark-abandoned worker, so the worker must set the terminal status
|
|
282
|
+
// itself — otherwise the row stays in a non-terminal in-flight status (e.g. `merging`) and is
|
|
283
|
+
// tracked/scanned forever even though the merge loop is done (#342 review).
|
|
284
|
+
const prRow = stores.pull_requests.find((r) => r.pr_key === "acme/widgets#13");
|
|
285
|
+
assertEquals(prRow?.status, "abandoned");
|
|
286
|
+
|
|
287
|
+
// Never attempts a merge PUT or posts an enqueue comment on the dead PR (only the read GET).
|
|
288
|
+
assertEquals(calls.some((c) => /\/merge$/.test(c.url)), false);
|
|
289
|
+
assertEquals(calls.some((c) => /\/comments$/.test(c.url)), false);
|
|
290
|
+
},
|
|
291
|
+
);
|
|
292
|
+
});
|