devcontour-harness 0.1.0-alpha.44 → 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 (49) hide show
  1. package/README.md +11 -2
  2. package/docs/contracts.md +107 -1
  3. package/docs/release-notes/0.1.0-alpha.45.md +77 -0
  4. package/docs/upgrade.md +60 -18
  5. package/lib/contracts/cli.d.ts +67 -0
  6. package/lib/contracts/cli.js +6 -1
  7. package/lib/contracts/events.d.ts +5 -0
  8. package/lib/contracts/events.js +2 -0
  9. package/lib/contracts/execution.d.ts +39 -0
  10. package/lib/contracts/execution.js +15 -2
  11. package/lib/contracts/policy.d.ts +39 -0
  12. package/lib/contracts/policy.js +64 -0
  13. package/lib/contracts/profiles.d.ts +6 -0
  14. package/lib/contracts/published.d.ts +69 -0
  15. package/lib/contracts/result.d.ts +91 -0
  16. package/lib/contracts/result.js +31 -1
  17. package/lib/contracts/review.d.ts +1 -1
  18. package/lib/control/harness.d.ts +24 -2
  19. package/lib/engine/engine.d.ts +18 -3
  20. package/lib/engine/engine.js +74 -8
  21. package/lib/engine/result.js +7 -3
  22. package/lib/engine/runner.d.ts +8 -0
  23. package/lib/engine/runner.js +91 -3
  24. package/lib/environment/git-trust.js +3 -0
  25. package/lib/environment/process.d.ts +2 -0
  26. package/lib/environment/process.js +7 -1
  27. package/lib/explain/state.js +1 -1
  28. package/lib/index.d.ts +1 -0
  29. package/lib/index.js +1 -0
  30. package/lib/integrations/connector/history.js +1 -1
  31. package/lib/integrations/connector/summary.js +2 -1
  32. package/lib/profiles/resolve.d.ts +6 -0
  33. package/lib/projections/attempt.d.ts +4 -2
  34. package/lib/projections/attempt.js +14 -1
  35. package/lib/report/compute.js +4 -3
  36. package/lib/storage/document.d.ts +26 -2
  37. package/lib/verification/acceptance.d.ts +12 -0
  38. package/lib/verification/acceptance.js +62 -7
  39. package/lib/verification/applicability.d.ts +134 -0
  40. package/lib/verification/applicability.js +373 -0
  41. package/lib/verification/gates.d.ts +6 -0
  42. package/lib/verification/proof.d.ts +18 -4
  43. package/lib/verification/proof.js +52 -9
  44. package/package.json +1 -1
  45. package/schemas/execution-document.schema.json +73 -1
  46. package/schemas/execution-policy.schema.json +38 -0
  47. package/schemas/result-envelope.schema.json +138 -2
  48. package/schemas/run-event.schema.json +4 -0
  49. package/schemas/run-result.schema.json +138 -2
@@ -2403,7 +2403,8 @@
2403
2403
  "type": "string",
2404
2404
  "enum": [
2405
2405
  "test",
2406
- "review"
2406
+ "review",
2407
+ "not-applicable"
2407
2408
  ]
2408
2409
  },
2409
2410
  "phase": {
@@ -3316,6 +3317,77 @@
3316
3317
  "type": "string",
3317
3318
  "pattern": "^[a-f0-9]{64}$"
3318
3319
  },
3320
+ "gateBasis": {
3321
+ "type": "string",
3322
+ "pattern": "^[a-f0-9]{64}$"
3323
+ },
3324
+ "notApplicable": {
3325
+ "type": "object",
3326
+ "properties": {
3327
+ "gateDigest": {
3328
+ "type": "string",
3329
+ "pattern": "^[a-f0-9]{64}$"
3330
+ },
3331
+ "patterns": {
3332
+ "maxItems": 64,
3333
+ "type": "array",
3334
+ "items": {
3335
+ "type": "string",
3336
+ "minLength": 1,
3337
+ "maxLength": 200
3338
+ }
3339
+ },
3340
+ "ranges": {
3341
+ "maxItems": 4,
3342
+ "type": "array",
3343
+ "items": {
3344
+ "type": "object",
3345
+ "properties": {
3346
+ "from": {
3347
+ "type": "string",
3348
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
3349
+ },
3350
+ "to": {
3351
+ "type": "string",
3352
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
3353
+ }
3354
+ },
3355
+ "required": [
3356
+ "from",
3357
+ "to"
3358
+ ],
3359
+ "additionalProperties": false
3360
+ }
3361
+ },
3362
+ "count": {
3363
+ "type": "integer",
3364
+ "minimum": 0,
3365
+ "maximum": 5000
3366
+ },
3367
+ "files": {
3368
+ "maxItems": 50,
3369
+ "type": "array",
3370
+ "items": {
3371
+ "type": "string",
3372
+ "minLength": 1,
3373
+ "maxLength": 1000
3374
+ }
3375
+ },
3376
+ "pathsDigest": {
3377
+ "type": "string",
3378
+ "pattern": "^[a-f0-9]{64}$"
3379
+ }
3380
+ },
3381
+ "required": [
3382
+ "gateDigest",
3383
+ "patterns",
3384
+ "ranges",
3385
+ "count",
3386
+ "files",
3387
+ "pathsDigest"
3388
+ ],
3389
+ "additionalProperties": false
3390
+ },
3319
3391
  "alreadySatisfied": {
3320
3392
  "type": "object",
3321
3393
  "properties": {
@@ -379,6 +379,25 @@
379
379
  "maxLength": 500,
380
380
  "pattern": "^(?!\\/)(?!.*[\\\\:*?\\[\\]\\x00])(?!(?:.*\\/)?\\.{1,2}(?:\\/|$))(?=.{1,500}$).+$"
381
381
  }
382
+ },
383
+ "when": {
384
+ "type": "object",
385
+ "properties": {
386
+ "paths": {
387
+ "minItems": 1,
388
+ "maxItems": 64,
389
+ "type": "array",
390
+ "items": {
391
+ "type": "string",
392
+ "minLength": 1,
393
+ "maxLength": 200
394
+ }
395
+ }
396
+ },
397
+ "required": [
398
+ "paths"
399
+ ],
400
+ "additionalProperties": false
382
401
  }
383
402
  },
384
403
  "required": [
@@ -475,6 +494,25 @@
475
494
  "maxLength": 500,
476
495
  "pattern": "^(?!\\/)(?!.*[\\\\:*?\\[\\]\\x00])(?!(?:.*\\/)?\\.{1,2}(?:\\/|$))(?=.{1,500}$).+$"
477
496
  }
497
+ },
498
+ "when": {
499
+ "type": "object",
500
+ "properties": {
501
+ "paths": {
502
+ "minItems": 1,
503
+ "maxItems": 64,
504
+ "type": "array",
505
+ "items": {
506
+ "type": "string",
507
+ "minLength": 1,
508
+ "maxLength": 200
509
+ }
510
+ }
511
+ },
512
+ "required": [
513
+ "paths"
514
+ ],
515
+ "additionalProperties": false
478
516
  }
479
517
  },
480
518
  "required": [
@@ -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": {
@@ -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": {