devcontour-harness 0.1.0-alpha.42 → 0.1.0-alpha.45

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 (65) hide show
  1. package/README.md +25 -2
  2. package/docs/architecture.md +38 -3
  3. package/docs/contracts.md +117 -3
  4. package/docs/release-notes/0.1.0-alpha.43.md +40 -0
  5. package/docs/release-notes/0.1.0-alpha.44.md +44 -0
  6. package/docs/release-notes/0.1.0-alpha.45.md +77 -0
  7. package/docs/upgrade.md +107 -17
  8. package/lib/contracts/cli.d.ts +115 -4
  9. package/lib/contracts/cli.js +6 -1
  10. package/lib/contracts/events.d.ts +65 -5
  11. package/lib/contracts/events.js +18 -1
  12. package/lib/contracts/execution.d.ts +76 -0
  13. package/lib/contracts/execution.js +35 -2
  14. package/lib/contracts/policy.d.ts +39 -0
  15. package/lib/contracts/policy.js +64 -0
  16. package/lib/contracts/profiles.d.ts +6 -0
  17. package/lib/contracts/published.d.ts +97 -2
  18. package/lib/contracts/report.d.ts +8 -0
  19. package/lib/contracts/report.js +7 -1
  20. package/lib/contracts/result.d.ts +93 -0
  21. package/lib/contracts/result.js +37 -1
  22. package/lib/contracts/review.d.ts +1 -1
  23. package/lib/control/harness.d.ts +29 -2
  24. package/lib/engine/engine.d.ts +54 -6
  25. package/lib/engine/engine.js +191 -24
  26. package/lib/engine/joint-runner.d.ts +2 -0
  27. package/lib/engine/joint-runner.js +13 -3
  28. package/lib/engine/result.js +7 -3
  29. package/lib/engine/runner.d.ts +8 -0
  30. package/lib/engine/runner.js +91 -3
  31. package/lib/environment/git-trust.js +3 -0
  32. package/lib/environment/isolation.d.ts +1 -1
  33. package/lib/environment/isolation.js +38 -4
  34. package/lib/environment/process.d.ts +2 -0
  35. package/lib/environment/process.js +7 -1
  36. package/lib/explain/state.js +1 -1
  37. package/lib/index.d.ts +1 -0
  38. package/lib/index.js +1 -0
  39. package/lib/integrations/connector/history.js +1 -1
  40. package/lib/integrations/connector/summary.js +2 -1
  41. package/lib/profiles/resolve.d.ts +6 -0
  42. package/lib/projections/attempt.d.ts +4 -2
  43. package/lib/projections/attempt.js +14 -1
  44. package/lib/report/compute.js +7 -3
  45. package/lib/report/document.js +1 -1
  46. package/lib/storage/document.d.ts +28 -2
  47. package/lib/testing/store-contract.d.ts +8 -2
  48. package/lib/testing/store-contract.js +56 -1
  49. package/lib/verification/acceptance.d.ts +12 -0
  50. package/lib/verification/acceptance.js +62 -7
  51. package/lib/verification/applicability.d.ts +134 -0
  52. package/lib/verification/applicability.js +373 -0
  53. package/lib/verification/gates.d.ts +6 -0
  54. package/lib/verification/joint.d.ts +179 -1
  55. package/lib/verification/joint.js +23 -3
  56. package/lib/verification/proof.d.ts +18 -4
  57. package/lib/verification/proof.js +52 -9
  58. package/package.json +1 -1
  59. package/schemas/execution-document.schema.json +77 -1
  60. package/schemas/execution-policy.schema.json +38 -0
  61. package/schemas/joint-verification.schema.json +4 -0
  62. package/schemas/result-envelope.schema.json +138 -2
  63. package/schemas/run-event.schema.json +100 -0
  64. package/schemas/run-result.schema.json +138 -2
  65. package/schemas/value-report.schema.json +20 -0
@@ -386,7 +386,8 @@
386
386
  "check",
387
387
  "review",
388
388
  "property",
389
- "consumer"
389
+ "consumer",
390
+ "not-applicable"
390
391
  ]
391
392
  },
392
393
  "phase": {
@@ -510,6 +511,73 @@
510
511
  },
511
512
  "additionalProperties": false
512
513
  },
514
+ "notApplicable": {
515
+ "type": "object",
516
+ "properties": {
517
+ "gateDigest": {
518
+ "type": "string",
519
+ "pattern": "^[a-f0-9]{64}$"
520
+ },
521
+ "patterns": {
522
+ "maxItems": 64,
523
+ "type": "array",
524
+ "items": {
525
+ "type": "string",
526
+ "minLength": 1,
527
+ "maxLength": 200
528
+ }
529
+ },
530
+ "ranges": {
531
+ "maxItems": 4,
532
+ "type": "array",
533
+ "items": {
534
+ "type": "object",
535
+ "properties": {
536
+ "from": {
537
+ "type": "string",
538
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
539
+ },
540
+ "to": {
541
+ "type": "string",
542
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
543
+ }
544
+ },
545
+ "required": [
546
+ "from",
547
+ "to"
548
+ ],
549
+ "additionalProperties": false
550
+ }
551
+ },
552
+ "count": {
553
+ "type": "integer",
554
+ "minimum": 0,
555
+ "maximum": 5000
556
+ },
557
+ "files": {
558
+ "maxItems": 50,
559
+ "type": "array",
560
+ "items": {
561
+ "type": "string",
562
+ "minLength": 1,
563
+ "maxLength": 1000
564
+ }
565
+ },
566
+ "pathsDigest": {
567
+ "type": "string",
568
+ "pattern": "^[a-f0-9]{64}$"
569
+ }
570
+ },
571
+ "required": [
572
+ "gateDigest",
573
+ "patterns",
574
+ "ranges",
575
+ "count",
576
+ "files",
577
+ "pathsDigest"
578
+ ],
579
+ "additionalProperties": false
580
+ },
513
581
  "reviewer": {
514
582
  "type": "object",
515
583
  "properties": {
@@ -1143,7 +1211,8 @@
1143
1211
  "check",
1144
1212
  "review",
1145
1213
  "property",
1146
- "consumer"
1214
+ "consumer",
1215
+ "not-applicable"
1147
1216
  ]
1148
1217
  },
1149
1218
  "phase": {
@@ -1267,6 +1336,73 @@
1267
1336
  },
1268
1337
  "additionalProperties": false
1269
1338
  },
1339
+ "notApplicable": {
1340
+ "type": "object",
1341
+ "properties": {
1342
+ "gateDigest": {
1343
+ "type": "string",
1344
+ "pattern": "^[a-f0-9]{64}$"
1345
+ },
1346
+ "patterns": {
1347
+ "maxItems": 64,
1348
+ "type": "array",
1349
+ "items": {
1350
+ "type": "string",
1351
+ "minLength": 1,
1352
+ "maxLength": 200
1353
+ }
1354
+ },
1355
+ "ranges": {
1356
+ "maxItems": 4,
1357
+ "type": "array",
1358
+ "items": {
1359
+ "type": "object",
1360
+ "properties": {
1361
+ "from": {
1362
+ "type": "string",
1363
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
1364
+ },
1365
+ "to": {
1366
+ "type": "string",
1367
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
1368
+ }
1369
+ },
1370
+ "required": [
1371
+ "from",
1372
+ "to"
1373
+ ],
1374
+ "additionalProperties": false
1375
+ }
1376
+ },
1377
+ "count": {
1378
+ "type": "integer",
1379
+ "minimum": 0,
1380
+ "maximum": 5000
1381
+ },
1382
+ "files": {
1383
+ "maxItems": 50,
1384
+ "type": "array",
1385
+ "items": {
1386
+ "type": "string",
1387
+ "minLength": 1,
1388
+ "maxLength": 1000
1389
+ }
1390
+ },
1391
+ "pathsDigest": {
1392
+ "type": "string",
1393
+ "pattern": "^[a-f0-9]{64}$"
1394
+ }
1395
+ },
1396
+ "required": [
1397
+ "gateDigest",
1398
+ "patterns",
1399
+ "ranges",
1400
+ "count",
1401
+ "files",
1402
+ "pathsDigest"
1403
+ ],
1404
+ "additionalProperties": false
1405
+ },
1270
1406
  "reviewer": {
1271
1407
  "type": "object",
1272
1408
  "properties": {
@@ -628,6 +628,10 @@
628
628
  "type": "string",
629
629
  "pattern": "^[A-Za-z0-9_-]{1,80}$"
630
630
  },
631
+ "notApplicable": {
632
+ "type": "boolean",
633
+ "const": true
634
+ },
631
635
  "recheck": {
632
636
  "type": "object",
633
637
  "properties": {
@@ -2656,6 +2660,10 @@
2656
2660
  "error": {
2657
2661
  "type": "string",
2658
2662
  "maxLength": 4000
2663
+ },
2664
+ "interrupted": {
2665
+ "type": "boolean",
2666
+ "const": true
2659
2667
  }
2660
2668
  },
2661
2669
  "required": [
@@ -2674,6 +2682,98 @@
2674
2682
  ],
2675
2683
  "additionalProperties": false
2676
2684
  },
2685
+ {
2686
+ "type": "object",
2687
+ "properties": {
2688
+ "apiVersion": {
2689
+ "type": "string",
2690
+ "const": "devcontour-harness/v1alpha1"
2691
+ },
2692
+ "seq": {
2693
+ "type": "integer",
2694
+ "exclusiveMinimum": 0,
2695
+ "maximum": 9007199254740991
2696
+ },
2697
+ "at": {
2698
+ "type": "string",
2699
+ "format": "date-time",
2700
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
2701
+ },
2702
+ "graphId": {
2703
+ "type": "string",
2704
+ "pattern": "^[A-Za-z0-9_-]{1,80}$"
2705
+ },
2706
+ "workId": {
2707
+ "type": "string",
2708
+ "pattern": "^[A-Za-z0-9_-]{1,80}$"
2709
+ },
2710
+ "runId": {
2711
+ "type": "string",
2712
+ "minLength": 1,
2713
+ "maxLength": 200
2714
+ },
2715
+ "attempt": {
2716
+ "type": "integer",
2717
+ "exclusiveMinimum": 0,
2718
+ "maximum": 9007199254740991
2719
+ },
2720
+ "type": {
2721
+ "type": "string",
2722
+ "const": "joint.budget-reset"
2723
+ },
2724
+ "payload": {
2725
+ "type": "object",
2726
+ "properties": {
2727
+ "resetId": {
2728
+ "type": "string",
2729
+ "minLength": 1,
2730
+ "maxLength": 200
2731
+ },
2732
+ "workIds": {
2733
+ "maxItems": 500,
2734
+ "type": "array",
2735
+ "items": {
2736
+ "type": "string",
2737
+ "pattern": "^[A-Za-z0-9_-]{1,80}$"
2738
+ }
2739
+ },
2740
+ "by": {
2741
+ "type": "string",
2742
+ "enum": [
2743
+ "operator",
2744
+ "host"
2745
+ ]
2746
+ },
2747
+ "settled": {
2748
+ "type": "integer",
2749
+ "minimum": 0,
2750
+ "maximum": 9007199254740991
2751
+ },
2752
+ "reasonLength": {
2753
+ "type": "integer",
2754
+ "minimum": 0,
2755
+ "maximum": 9007199254740991
2756
+ }
2757
+ },
2758
+ "required": [
2759
+ "resetId",
2760
+ "workIds",
2761
+ "by",
2762
+ "settled",
2763
+ "reasonLength"
2764
+ ],
2765
+ "additionalProperties": false
2766
+ }
2767
+ },
2768
+ "required": [
2769
+ "apiVersion",
2770
+ "seq",
2771
+ "at",
2772
+ "type",
2773
+ "payload"
2774
+ ],
2775
+ "additionalProperties": false
2776
+ },
2677
2777
  {
2678
2778
  "type": "object",
2679
2779
  "properties": {
@@ -379,7 +379,8 @@
379
379
  "check",
380
380
  "review",
381
381
  "property",
382
- "consumer"
382
+ "consumer",
383
+ "not-applicable"
383
384
  ]
384
385
  },
385
386
  "phase": {
@@ -503,6 +504,73 @@
503
504
  },
504
505
  "additionalProperties": false
505
506
  },
507
+ "notApplicable": {
508
+ "type": "object",
509
+ "properties": {
510
+ "gateDigest": {
511
+ "type": "string",
512
+ "pattern": "^[a-f0-9]{64}$"
513
+ },
514
+ "patterns": {
515
+ "maxItems": 64,
516
+ "type": "array",
517
+ "items": {
518
+ "type": "string",
519
+ "minLength": 1,
520
+ "maxLength": 200
521
+ }
522
+ },
523
+ "ranges": {
524
+ "maxItems": 4,
525
+ "type": "array",
526
+ "items": {
527
+ "type": "object",
528
+ "properties": {
529
+ "from": {
530
+ "type": "string",
531
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
532
+ },
533
+ "to": {
534
+ "type": "string",
535
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
536
+ }
537
+ },
538
+ "required": [
539
+ "from",
540
+ "to"
541
+ ],
542
+ "additionalProperties": false
543
+ }
544
+ },
545
+ "count": {
546
+ "type": "integer",
547
+ "minimum": 0,
548
+ "maximum": 5000
549
+ },
550
+ "files": {
551
+ "maxItems": 50,
552
+ "type": "array",
553
+ "items": {
554
+ "type": "string",
555
+ "minLength": 1,
556
+ "maxLength": 1000
557
+ }
558
+ },
559
+ "pathsDigest": {
560
+ "type": "string",
561
+ "pattern": "^[a-f0-9]{64}$"
562
+ }
563
+ },
564
+ "required": [
565
+ "gateDigest",
566
+ "patterns",
567
+ "ranges",
568
+ "count",
569
+ "files",
570
+ "pathsDigest"
571
+ ],
572
+ "additionalProperties": false
573
+ },
506
574
  "reviewer": {
507
575
  "type": "object",
508
576
  "properties": {
@@ -1136,7 +1204,8 @@
1136
1204
  "check",
1137
1205
  "review",
1138
1206
  "property",
1139
- "consumer"
1207
+ "consumer",
1208
+ "not-applicable"
1140
1209
  ]
1141
1210
  },
1142
1211
  "phase": {
@@ -1260,6 +1329,73 @@
1260
1329
  },
1261
1330
  "additionalProperties": false
1262
1331
  },
1332
+ "notApplicable": {
1333
+ "type": "object",
1334
+ "properties": {
1335
+ "gateDigest": {
1336
+ "type": "string",
1337
+ "pattern": "^[a-f0-9]{64}$"
1338
+ },
1339
+ "patterns": {
1340
+ "maxItems": 64,
1341
+ "type": "array",
1342
+ "items": {
1343
+ "type": "string",
1344
+ "minLength": 1,
1345
+ "maxLength": 200
1346
+ }
1347
+ },
1348
+ "ranges": {
1349
+ "maxItems": 4,
1350
+ "type": "array",
1351
+ "items": {
1352
+ "type": "object",
1353
+ "properties": {
1354
+ "from": {
1355
+ "type": "string",
1356
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
1357
+ },
1358
+ "to": {
1359
+ "type": "string",
1360
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
1361
+ }
1362
+ },
1363
+ "required": [
1364
+ "from",
1365
+ "to"
1366
+ ],
1367
+ "additionalProperties": false
1368
+ }
1369
+ },
1370
+ "count": {
1371
+ "type": "integer",
1372
+ "minimum": 0,
1373
+ "maximum": 5000
1374
+ },
1375
+ "files": {
1376
+ "maxItems": 50,
1377
+ "type": "array",
1378
+ "items": {
1379
+ "type": "string",
1380
+ "minLength": 1,
1381
+ "maxLength": 1000
1382
+ }
1383
+ },
1384
+ "pathsDigest": {
1385
+ "type": "string",
1386
+ "pattern": "^[a-f0-9]{64}$"
1387
+ }
1388
+ },
1389
+ "required": [
1390
+ "gateDigest",
1391
+ "patterns",
1392
+ "ranges",
1393
+ "count",
1394
+ "files",
1395
+ "pathsDigest"
1396
+ ],
1397
+ "additionalProperties": false
1398
+ },
1263
1399
  "reviewer": {
1264
1400
  "type": "object",
1265
1401
  "properties": {
@@ -1065,6 +1065,26 @@
1065
1065
  ],
1066
1066
  "additionalProperties": false
1067
1067
  },
1068
+ "jointResets": {
1069
+ "type": "object",
1070
+ "properties": {
1071
+ "operator": {
1072
+ "type": "integer",
1073
+ "minimum": 0,
1074
+ "maximum": 9007199254740991
1075
+ },
1076
+ "host": {
1077
+ "type": "integer",
1078
+ "minimum": 0,
1079
+ "maximum": 9007199254740991
1080
+ }
1081
+ },
1082
+ "required": [
1083
+ "operator",
1084
+ "host"
1085
+ ],
1086
+ "additionalProperties": false
1087
+ },
1068
1088
  "baseMovesBound": {
1069
1089
  "type": "string",
1070
1090
  "const": "lower"