assertledger 1.0.0 → 1.1.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 (67) hide show
  1. package/README.fr.md +3 -3
  2. package/README.md +3 -3
  3. package/SECURITY.md +11 -6
  4. package/conformance/schema-extensions.json +36 -0
  5. package/dist/build-info.d.ts +16 -0
  6. package/dist/build-info.d.ts.map +1 -0
  7. package/dist/build-info.js +18 -0
  8. package/dist/build-info.js.map +1 -0
  9. package/dist/build-info.json +7 -0
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +117 -19
  12. package/dist/cli.js.map +1 -1
  13. package/dist/contracts/index.d.ts +943 -0
  14. package/dist/contracts/index.d.ts.map +1 -1
  15. package/dist/contracts/index.js +561 -21
  16. package/dist/contracts/index.js.map +1 -1
  17. package/dist/core/index.d.ts +10 -1
  18. package/dist/core/index.d.ts.map +1 -1
  19. package/dist/core/index.js +473 -4
  20. package/dist/core/index.js.map +1 -1
  21. package/dist/diagnostics.d.ts.map +1 -1
  22. package/dist/diagnostics.js +42 -2
  23. package/dist/diagnostics.js.map +1 -1
  24. package/dist/engine/adapters/node-test-runtime.d.ts +17 -0
  25. package/dist/engine/adapters/node-test-runtime.d.ts.map +1 -1
  26. package/dist/engine/adapters/node-test-runtime.js +45 -23
  27. package/dist/engine/adapters/node-test-runtime.js.map +1 -1
  28. package/dist/engine/container.d.ts +54 -0
  29. package/dist/engine/container.d.ts.map +1 -0
  30. package/dist/engine/container.js +464 -0
  31. package/dist/engine/container.js.map +1 -0
  32. package/dist/engine/git-regression.d.ts +12 -2
  33. package/dist/engine/git-regression.d.ts.map +1 -1
  34. package/dist/engine/git-regression.js +63 -16
  35. package/dist/engine/git-regression.js.map +1 -1
  36. package/dist/engine/index.d.ts +7 -1
  37. package/dist/engine/index.d.ts.map +1 -1
  38. package/dist/engine/index.js +300 -74
  39. package/dist/engine/index.js.map +1 -1
  40. package/dist/mcp/index.d.ts.map +1 -1
  41. package/dist/mcp/index.js +53 -1
  42. package/dist/mcp/index.js.map +1 -1
  43. package/dist/sdk/index.d.ts +16 -6
  44. package/dist/sdk/index.d.ts.map +1 -1
  45. package/dist/sdk/index.js +63 -5
  46. package/dist/sdk/index.js.map +1 -1
  47. package/docs/agentic-test-profile.md +5 -0
  48. package/docs/architecture.md +8 -3
  49. package/docs/ci.md +7 -1
  50. package/docs/conformance-v1.md +11 -2
  51. package/docs/container-isolation.md +156 -0
  52. package/docs/evidence-export.md +146 -0
  53. package/docs/git-regression.md +7 -3
  54. package/docs/migration-verification-v2.md +55 -0
  55. package/docs/project-intent.md +3 -2
  56. package/docs/proof-model.md +8 -4
  57. package/docs/reference.md +56 -11
  58. package/docs/roadmap.md +12 -4
  59. package/examples/agentic-profile/profile-manifest.mjs +5 -1
  60. package/examples/evidence-export/consumer.mjs +35 -0
  61. package/package.json +2 -2
  62. package/schemas/evidence-export-replay-result.v1.json +49 -0
  63. package/schemas/evidence-export-request.v1.json +681 -0
  64. package/schemas/evidence-export.v1.json +1479 -0
  65. package/schemas/evidence-manifest.v2.json +886 -0
  66. package/schemas/evidence-provider-manifest.v1.json +269 -0
  67. package/schemas/verification-request.v2.json +457 -0
@@ -0,0 +1,1479 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "$ref": "#/$defs/__schema0"
7
+ },
8
+ "sourceManifest": {
9
+ "$ref": "#/$defs/__schema1"
10
+ },
11
+ "sourceArtifactDigest": {
12
+ "$ref": "#/$defs/__schema2"
13
+ },
14
+ "consumerRequest": {
15
+ "$ref": "#/$defs/__schema12"
16
+ },
17
+ "result": {
18
+ "$ref": "#/$defs/__schema14"
19
+ },
20
+ "integrity": {
21
+ "$ref": "#/$defs/__schema16"
22
+ },
23
+ "authenticity": {
24
+ "$ref": "#/$defs/__schema17"
25
+ },
26
+ "environment": {
27
+ "$ref": "#/$defs/__schema18"
28
+ },
29
+ "confidence": {
30
+ "$ref": "#/$defs/__schema20"
31
+ },
32
+ "scope": {
33
+ "$ref": "#/$defs/__schema21"
34
+ },
35
+ "controls": {
36
+ "$ref": "#/$defs/__schema23"
37
+ },
38
+ "profile": {
39
+ "$ref": "#/$defs/__schema24"
40
+ },
41
+ "policy": {
42
+ "$ref": "#/$defs/__schema25"
43
+ },
44
+ "cost": {
45
+ "$ref": "#/$defs/__schema26"
46
+ },
47
+ "limitations": {
48
+ "$ref": "#/$defs/__schema27"
49
+ },
50
+ "exportDigest": {
51
+ "$ref": "#/$defs/__schema2"
52
+ }
53
+ },
54
+ "required": [
55
+ "schemaVersion",
56
+ "sourceManifest",
57
+ "sourceArtifactDigest",
58
+ "consumerRequest",
59
+ "result",
60
+ "integrity",
61
+ "authenticity",
62
+ "environment",
63
+ "confidence",
64
+ "scope",
65
+ "controls",
66
+ "profile",
67
+ "policy",
68
+ "cost",
69
+ "limitations",
70
+ "exportDigest"
71
+ ],
72
+ "additionalProperties": false,
73
+ "title": "AssertLedger evidence export",
74
+ "description": "A self-contained, replayable projection of replay-valid evidence that separates result, integrity, authenticity, environment, confidence, controls, and cost.",
75
+ "$defs": {
76
+ "__schema0": {
77
+ "type": "string",
78
+ "const": "1.0.0"
79
+ },
80
+ "__schema1": {
81
+ "type": "object",
82
+ "properties": {
83
+ "schemaVersion": {
84
+ "type": "string",
85
+ "const": "1.0.0"
86
+ },
87
+ "repositoryDigest": {
88
+ "anyOf": [
89
+ {
90
+ "$ref": "#/$defs/__schema2"
91
+ },
92
+ {
93
+ "type": "string",
94
+ "const": "invalid"
95
+ }
96
+ ]
97
+ },
98
+ "evidenceContext": {
99
+ "type": "object",
100
+ "properties": {
101
+ "engine": {
102
+ "type": "object",
103
+ "properties": {
104
+ "name": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "maxLength": 128
108
+ },
109
+ "version": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "maxLength": 128
113
+ }
114
+ },
115
+ "required": ["name", "version"],
116
+ "additionalProperties": false
117
+ },
118
+ "adapter": {
119
+ "type": "object",
120
+ "properties": {
121
+ "name": {
122
+ "type": "string",
123
+ "minLength": 1,
124
+ "maxLength": 128
125
+ },
126
+ "version": {
127
+ "type": "string",
128
+ "minLength": 1,
129
+ "maxLength": 128
130
+ },
131
+ "configuration": {
132
+ "$ref": "#/$defs/__schema3"
133
+ }
134
+ },
135
+ "required": ["name", "version", "configuration"],
136
+ "additionalProperties": false
137
+ },
138
+ "execution": {
139
+ "type": "object",
140
+ "properties": {
141
+ "isolation": {
142
+ "type": "string",
143
+ "minLength": 1,
144
+ "maxLength": 128
145
+ },
146
+ "environmentAllowlist": {
147
+ "maxItems": 100,
148
+ "type": "array",
149
+ "items": {
150
+ "$ref": "#/$defs/__schema4"
151
+ }
152
+ },
153
+ "budgets": {
154
+ "$ref": "#/$defs/__schema5"
155
+ },
156
+ "candidateRoots": {
157
+ "maxItems": 100,
158
+ "type": "array",
159
+ "items": {
160
+ "$ref": "#/$defs/__schema6"
161
+ }
162
+ }
163
+ },
164
+ "required": ["isolation", "environmentAllowlist", "budgets", "candidateRoots"],
165
+ "additionalProperties": false
166
+ },
167
+ "worlds": {
168
+ "type": "array",
169
+ "items": {
170
+ "type": "object",
171
+ "properties": {
172
+ "id": {
173
+ "$ref": "#/$defs/__schema7"
174
+ },
175
+ "provenance": {
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "maxLength": 1024
179
+ },
180
+ "digest": {
181
+ "$ref": "#/$defs/__schema2"
182
+ }
183
+ },
184
+ "required": ["id", "provenance", "digest"],
185
+ "additionalProperties": false
186
+ }
187
+ }
188
+ },
189
+ "required": ["engine", "adapter", "execution", "worlds"],
190
+ "additionalProperties": false
191
+ },
192
+ "policy": {
193
+ "anyOf": [
194
+ {
195
+ "type": "object",
196
+ "properties": {
197
+ "policyVersion": {
198
+ "type": "string",
199
+ "const": "1.0.0"
200
+ },
201
+ "requiredAttempts": {
202
+ "type": "integer",
203
+ "minimum": 1,
204
+ "maximum": 1000
205
+ },
206
+ "minimumTargetWeightPermille": {
207
+ "type": "integer",
208
+ "minimum": 1,
209
+ "maximum": 1000
210
+ },
211
+ "maximumSelectedCandidates": {
212
+ "type": "integer",
213
+ "minimum": 1,
214
+ "maximum": 1000
215
+ },
216
+ "acceptedTargetOutcomes": {
217
+ "minItems": 1,
218
+ "maxItems": 1,
219
+ "type": "array",
220
+ "items": {
221
+ "$ref": "#/$defs/__schema8"
222
+ }
223
+ }
224
+ },
225
+ "required": [
226
+ "policyVersion",
227
+ "requiredAttempts",
228
+ "minimumTargetWeightPermille",
229
+ "maximumSelectedCandidates",
230
+ "acceptedTargetOutcomes"
231
+ ],
232
+ "additionalProperties": false
233
+ },
234
+ {
235
+ "type": "object",
236
+ "properties": {
237
+ "policyVersion": {
238
+ "type": "string",
239
+ "const": "invalid"
240
+ },
241
+ "requiredAttempts": {
242
+ "type": "number",
243
+ "const": 1
244
+ },
245
+ "minimumTargetWeightPermille": {
246
+ "type": "number",
247
+ "const": 1000
248
+ },
249
+ "maximumSelectedCandidates": {
250
+ "type": "number",
251
+ "const": 0
252
+ },
253
+ "acceptedTargetOutcomes": {
254
+ "maxItems": 0,
255
+ "type": "array",
256
+ "items": {
257
+ "$ref": "#/$defs/__schema9"
258
+ }
259
+ }
260
+ },
261
+ "required": [
262
+ "policyVersion",
263
+ "requiredAttempts",
264
+ "minimumTargetWeightPermille",
265
+ "maximumSelectedCandidates",
266
+ "acceptedTargetOutcomes"
267
+ ],
268
+ "additionalProperties": false
269
+ }
270
+ ]
271
+ },
272
+ "worlds": {
273
+ "type": "array",
274
+ "items": {
275
+ "type": "object",
276
+ "properties": {
277
+ "id": {
278
+ "$ref": "#/$defs/__schema7"
279
+ },
280
+ "kind": {
281
+ "type": "string",
282
+ "enum": ["REFERENCE", "TARGET", "NEUTRAL"]
283
+ },
284
+ "required": {
285
+ "type": "boolean"
286
+ },
287
+ "weight": {
288
+ "type": "integer",
289
+ "minimum": 0,
290
+ "maximum": 1000000
291
+ }
292
+ },
293
+ "required": ["id", "kind", "required", "weight"],
294
+ "additionalProperties": false
295
+ }
296
+ },
297
+ "candidates": {
298
+ "type": "array",
299
+ "items": {
300
+ "type": "object",
301
+ "properties": {
302
+ "id": {
303
+ "$ref": "#/$defs/__schema7"
304
+ },
305
+ "digest": {
306
+ "$ref": "#/$defs/__schema2"
307
+ },
308
+ "sizeBytes": {
309
+ "type": "integer",
310
+ "minimum": 0,
311
+ "maximum": 9007199254740991
312
+ },
313
+ "status": {
314
+ "type": "string",
315
+ "enum": ["ELIGIBLE", "UNSTABLE", "INCONCLUSIVE", "INVALID", "WEAK_ORACLE"]
316
+ },
317
+ "killedTargetIds": {
318
+ "type": "array",
319
+ "items": {
320
+ "$ref": "#/$defs/__schema7"
321
+ }
322
+ },
323
+ "targetWeightKilled": {
324
+ "type": "integer",
325
+ "minimum": 0,
326
+ "maximum": 9007199254740991
327
+ },
328
+ "gates": {
329
+ "type": "array",
330
+ "items": {
331
+ "type": "object",
332
+ "properties": {
333
+ "name": {
334
+ "$ref": "#/$defs/__schema10"
335
+ },
336
+ "status": {
337
+ "type": "string",
338
+ "enum": ["PASSED", "FAILED", "NOT_RUN"]
339
+ },
340
+ "evidenceRunIds": {
341
+ "type": "array",
342
+ "items": {
343
+ "type": "string",
344
+ "minLength": 1,
345
+ "maxLength": 512
346
+ }
347
+ },
348
+ "reasonCodes": {
349
+ "type": "array",
350
+ "items": {
351
+ "$ref": "#/$defs/__schema11"
352
+ }
353
+ }
354
+ },
355
+ "required": ["name", "status", "evidenceRunIds", "reasonCodes"],
356
+ "additionalProperties": false
357
+ }
358
+ },
359
+ "reasonCodes": {
360
+ "type": "array",
361
+ "items": {
362
+ "$ref": "#/$defs/__schema11"
363
+ }
364
+ }
365
+ },
366
+ "required": [
367
+ "id",
368
+ "digest",
369
+ "sizeBytes",
370
+ "status",
371
+ "killedTargetIds",
372
+ "targetWeightKilled",
373
+ "gates",
374
+ "reasonCodes"
375
+ ],
376
+ "additionalProperties": false
377
+ }
378
+ },
379
+ "observations": {
380
+ "type": "array",
381
+ "items": {
382
+ "type": "object",
383
+ "properties": {
384
+ "runId": {
385
+ "type": "string",
386
+ "minLength": 1,
387
+ "maxLength": 512
388
+ },
389
+ "candidateId": {
390
+ "anyOf": [
391
+ {
392
+ "$ref": "#/$defs/__schema7"
393
+ },
394
+ {
395
+ "type": "null"
396
+ }
397
+ ]
398
+ },
399
+ "worldId": {
400
+ "$ref": "#/$defs/__schema7"
401
+ },
402
+ "attempt": {
403
+ "type": "integer",
404
+ "minimum": 1,
405
+ "maximum": 9007199254740991
406
+ },
407
+ "outcome": {
408
+ "type": "string",
409
+ "enum": [
410
+ "PASS",
411
+ "ASSERTION_FAILURE",
412
+ "COLLECTION_FAILURE",
413
+ "COMPILE_FAILURE",
414
+ "PROCESS_CRASH",
415
+ "TIMEOUT",
416
+ "INFRA_ERROR",
417
+ "NO_TEST_DISCOVERED"
418
+ ]
419
+ },
420
+ "testsDiscovered": {
421
+ "type": "integer",
422
+ "minimum": 0,
423
+ "maximum": 9007199254740991
424
+ },
425
+ "candidateTestsDiscovered": {
426
+ "type": "integer",
427
+ "minimum": 0,
428
+ "maximum": 9007199254740991
429
+ },
430
+ "attributed": {
431
+ "type": "boolean"
432
+ },
433
+ "durationMs": {
434
+ "type": "number",
435
+ "minimum": 0
436
+ },
437
+ "exitCode": {
438
+ "anyOf": [
439
+ {
440
+ "type": "integer",
441
+ "minimum": 0,
442
+ "maximum": 9007199254740991
443
+ },
444
+ {
445
+ "type": "null"
446
+ }
447
+ ]
448
+ },
449
+ "stdoutDigest": {
450
+ "$ref": "#/$defs/__schema2"
451
+ },
452
+ "stderrDigest": {
453
+ "$ref": "#/$defs/__schema2"
454
+ }
455
+ },
456
+ "required": [
457
+ "runId",
458
+ "candidateId",
459
+ "worldId",
460
+ "attempt",
461
+ "outcome",
462
+ "testsDiscovered",
463
+ "candidateTestsDiscovered",
464
+ "attributed"
465
+ ],
466
+ "additionalProperties": false
467
+ }
468
+ },
469
+ "decision": {
470
+ "type": "object",
471
+ "properties": {
472
+ "status": {
473
+ "type": "string",
474
+ "enum": ["VERIFIED", "REJECTED", "INCONCLUSIVE", "ENGINE_ERROR"]
475
+ },
476
+ "selectedCandidateIds": {
477
+ "type": "array",
478
+ "items": {
479
+ "$ref": "#/$defs/__schema7"
480
+ }
481
+ },
482
+ "reasonCodes": {
483
+ "type": "array",
484
+ "items": {
485
+ "$ref": "#/$defs/__schema11"
486
+ }
487
+ }
488
+ },
489
+ "required": ["status", "selectedCandidateIds", "reasonCodes"],
490
+ "additionalProperties": false
491
+ },
492
+ "decisionDigest": {
493
+ "$ref": "#/$defs/__schema2"
494
+ },
495
+ "artifactDigest": {
496
+ "$ref": "#/$defs/__schema2"
497
+ },
498
+ "adapter": {
499
+ "oneOf": [
500
+ {
501
+ "type": "object",
502
+ "properties": {
503
+ "kind": {
504
+ "type": "string",
505
+ "const": "node-test"
506
+ }
507
+ },
508
+ "required": ["kind"],
509
+ "additionalProperties": false
510
+ },
511
+ {
512
+ "type": "object",
513
+ "properties": {
514
+ "kind": {
515
+ "type": "string",
516
+ "const": "testforge-command"
517
+ },
518
+ "protocolVersion": {
519
+ "type": "string",
520
+ "const": "1.0.0"
521
+ }
522
+ },
523
+ "required": ["kind", "protocolVersion"],
524
+ "additionalProperties": false
525
+ }
526
+ ]
527
+ },
528
+ "isolation": {
529
+ "type": "object",
530
+ "properties": {
531
+ "kind": {
532
+ "type": "string",
533
+ "const": "trusted-local"
534
+ },
535
+ "level": {
536
+ "type": "string",
537
+ "const": "UNSANDBOXED"
538
+ },
539
+ "acknowledgedUnsafeExecution": {
540
+ "type": "boolean",
541
+ "const": true
542
+ }
543
+ },
544
+ "required": ["kind", "level", "acknowledgedUnsafeExecution"],
545
+ "additionalProperties": false
546
+ },
547
+ "limitations": {
548
+ "type": "array",
549
+ "items": {
550
+ "type": "string",
551
+ "minLength": 1,
552
+ "maxLength": 2048
553
+ }
554
+ }
555
+ },
556
+ "required": [
557
+ "schemaVersion",
558
+ "repositoryDigest",
559
+ "evidenceContext",
560
+ "policy",
561
+ "worlds",
562
+ "candidates",
563
+ "observations",
564
+ "decision",
565
+ "decisionDigest",
566
+ "artifactDigest",
567
+ "adapter",
568
+ "isolation",
569
+ "limitations"
570
+ ],
571
+ "additionalProperties": false
572
+ },
573
+ "__schema2": {
574
+ "type": "string",
575
+ "pattern": "^sha256:[a-f0-9]{64}$"
576
+ },
577
+ "__schema3": {
578
+ "anyOf": [
579
+ {
580
+ "type": "string"
581
+ },
582
+ {
583
+ "type": "number"
584
+ },
585
+ {
586
+ "type": "boolean"
587
+ },
588
+ {
589
+ "type": "null"
590
+ },
591
+ {
592
+ "type": "array",
593
+ "items": {
594
+ "$ref": "#/$defs/__schema3"
595
+ }
596
+ },
597
+ {
598
+ "type": "object",
599
+ "propertyNames": {
600
+ "type": "string"
601
+ },
602
+ "additionalProperties": {
603
+ "$ref": "#/$defs/__schema3"
604
+ }
605
+ }
606
+ ]
607
+ },
608
+ "__schema4": {
609
+ "type": "string",
610
+ "minLength": 1,
611
+ "maxLength": 128
612
+ },
613
+ "__schema5": {
614
+ "anyOf": [
615
+ {
616
+ "type": "string"
617
+ },
618
+ {
619
+ "type": "number"
620
+ },
621
+ {
622
+ "type": "boolean"
623
+ },
624
+ {
625
+ "type": "null"
626
+ },
627
+ {
628
+ "type": "array",
629
+ "items": {
630
+ "$ref": "#/$defs/__schema5"
631
+ }
632
+ },
633
+ {
634
+ "type": "object",
635
+ "propertyNames": {
636
+ "type": "string"
637
+ },
638
+ "additionalProperties": {
639
+ "$ref": "#/$defs/__schema5"
640
+ }
641
+ }
642
+ ]
643
+ },
644
+ "__schema6": {
645
+ "type": "string",
646
+ "minLength": 1,
647
+ "maxLength": 512
648
+ },
649
+ "__schema7": {
650
+ "type": "string",
651
+ "minLength": 1,
652
+ "maxLength": 128,
653
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
654
+ },
655
+ "__schema8": {
656
+ "type": "string",
657
+ "const": "ASSERTION_FAILURE"
658
+ },
659
+ "__schema9": {
660
+ "type": "string",
661
+ "const": "ASSERTION_FAILURE"
662
+ },
663
+ "__schema10": {
664
+ "type": "string",
665
+ "enum": ["COMPLETENESS", "STABILITY", "DISCOVERY", "REFERENCE", "NEUTRAL", "TARGET_STRENGTH"]
666
+ },
667
+ "__schema11": {
668
+ "type": "string",
669
+ "minLength": 1,
670
+ "maxLength": 128,
671
+ "pattern": "^[A-Z][A-Z0-9_]*$"
672
+ },
673
+ "__schema12": {
674
+ "anyOf": [
675
+ {
676
+ "type": "object",
677
+ "properties": {
678
+ "reference": {
679
+ "anyOf": [
680
+ {
681
+ "type": "string",
682
+ "minLength": 1,
683
+ "maxLength": 256
684
+ },
685
+ {
686
+ "type": "null"
687
+ }
688
+ ]
689
+ },
690
+ "profileId": {
691
+ "anyOf": [
692
+ {
693
+ "type": "string",
694
+ "minLength": 1,
695
+ "maxLength": 256
696
+ },
697
+ {
698
+ "type": "null"
699
+ }
700
+ ]
701
+ },
702
+ "obligations": {
703
+ "maxItems": 100,
704
+ "type": "array",
705
+ "items": {
706
+ "$ref": "#/$defs/__schema13"
707
+ }
708
+ }
709
+ },
710
+ "required": ["reference", "profileId", "obligations"],
711
+ "additionalProperties": false
712
+ },
713
+ {
714
+ "type": "null"
715
+ }
716
+ ]
717
+ },
718
+ "__schema13": {
719
+ "type": "object",
720
+ "properties": {
721
+ "id": {
722
+ "$ref": "#/$defs/__schema7"
723
+ },
724
+ "control": {
725
+ "$ref": "#/$defs/__schema11"
726
+ }
727
+ },
728
+ "required": ["id", "control"],
729
+ "additionalProperties": false
730
+ },
731
+ "__schema14": {
732
+ "type": "object",
733
+ "properties": {
734
+ "detection": {
735
+ "type": "string",
736
+ "enum": ["OBSERVED", "NOT_OBSERVED", "NOT_ESTABLISHED"]
737
+ },
738
+ "modality": {
739
+ "type": "string",
740
+ "enum": ["TEST_OBSERVED", "NONE"]
741
+ },
742
+ "reasonCode": {
743
+ "type": "string",
744
+ "enum": [
745
+ "REGRESSION_ASSERTION_OBSERVED",
746
+ "TARGET_PASSED_WITHOUT_DETECTION",
747
+ "ENGINE_ERROR",
748
+ "CONTROL_EVIDENCE_INVALID",
749
+ "CANDIDATE_EVIDENCE_INCONCLUSIVE",
750
+ "CANDIDATE_EVIDENCE_INVALID",
751
+ "TARGET_STRENGTH_INSUFFICIENT",
752
+ "OPERATIONAL_OUTCOME_NOT_DETECTION"
753
+ ]
754
+ },
755
+ "decision": {
756
+ "type": "object",
757
+ "properties": {
758
+ "status": {
759
+ "type": "string",
760
+ "enum": ["VERIFIED", "REJECTED", "INCONCLUSIVE", "ENGINE_ERROR"]
761
+ },
762
+ "selectedCandidateIds": {
763
+ "type": "array",
764
+ "items": {
765
+ "$ref": "#/$defs/__schema7"
766
+ }
767
+ },
768
+ "reasonCodes": {
769
+ "type": "array",
770
+ "items": {
771
+ "$ref": "#/$defs/__schema11"
772
+ }
773
+ }
774
+ },
775
+ "required": ["status", "selectedCandidateIds", "reasonCodes"],
776
+ "additionalProperties": false
777
+ },
778
+ "candidates": {
779
+ "type": "array",
780
+ "items": {
781
+ "type": "object",
782
+ "properties": {
783
+ "id": {
784
+ "$ref": "#/$defs/__schema7"
785
+ },
786
+ "digest": {
787
+ "$ref": "#/$defs/__schema2"
788
+ },
789
+ "status": {
790
+ "type": "string",
791
+ "enum": ["ELIGIBLE", "UNSTABLE", "INCONCLUSIVE", "INVALID", "WEAK_ORACLE"]
792
+ },
793
+ "selected": {
794
+ "type": "boolean"
795
+ },
796
+ "reasonCodes": {
797
+ "type": "array",
798
+ "items": {
799
+ "$ref": "#/$defs/__schema11"
800
+ }
801
+ },
802
+ "worlds": {
803
+ "type": "array",
804
+ "items": {
805
+ "type": "object",
806
+ "properties": {
807
+ "worldId": {
808
+ "$ref": "#/$defs/__schema7"
809
+ },
810
+ "kind": {
811
+ "$ref": "#/$defs/__schema15"
812
+ },
813
+ "required": {
814
+ "type": "boolean"
815
+ },
816
+ "weight": {
817
+ "type": "integer",
818
+ "minimum": 0,
819
+ "maximum": 1000000
820
+ },
821
+ "outcome": {
822
+ "type": "string",
823
+ "enum": [
824
+ "PASS",
825
+ "ASSERTION_FAILURE",
826
+ "COLLECTION_FAILURE",
827
+ "COMPILE_FAILURE",
828
+ "PROCESS_CRASH",
829
+ "TIMEOUT",
830
+ "INFRA_ERROR",
831
+ "NO_TEST_DISCOVERED",
832
+ "DIVERGENT",
833
+ "MISSING"
834
+ ]
835
+ },
836
+ "attempts": {
837
+ "type": "integer",
838
+ "minimum": 0,
839
+ "maximum": 9007199254740991
840
+ },
841
+ "signal": {
842
+ "type": "string",
843
+ "enum": ["RED", "GREEN", "NONE"]
844
+ },
845
+ "detection": {
846
+ "type": "string",
847
+ "enum": ["OBSERVED", "NOT_OBSERVED", "NOT_ESTABLISHED", "NOT_APPLICABLE"]
848
+ }
849
+ },
850
+ "required": [
851
+ "worldId",
852
+ "kind",
853
+ "required",
854
+ "weight",
855
+ "outcome",
856
+ "attempts",
857
+ "signal",
858
+ "detection"
859
+ ],
860
+ "additionalProperties": false
861
+ }
862
+ }
863
+ },
864
+ "required": ["id", "digest", "status", "selected", "reasonCodes", "worlds"],
865
+ "additionalProperties": false
866
+ }
867
+ }
868
+ },
869
+ "required": ["detection", "modality", "reasonCode", "decision", "candidates"],
870
+ "additionalProperties": false
871
+ },
872
+ "__schema15": {
873
+ "type": "string",
874
+ "enum": ["REFERENCE", "TARGET", "NEUTRAL"]
875
+ },
876
+ "__schema16": {
877
+ "type": "object",
878
+ "properties": {
879
+ "sourceReplay": {
880
+ "type": "string",
881
+ "const": "VALID"
882
+ },
883
+ "verifiedRails": {
884
+ "type": "array",
885
+ "prefixItems": [
886
+ {
887
+ "type": "string",
888
+ "const": "SCHEMA"
889
+ },
890
+ {
891
+ "type": "string",
892
+ "const": "DECISION_DIGEST"
893
+ },
894
+ {
895
+ "type": "string",
896
+ "const": "ARTIFACT_DIGEST"
897
+ },
898
+ {
899
+ "type": "string",
900
+ "const": "DECISION_SEMANTICS"
901
+ }
902
+ ]
903
+ },
904
+ "bindings": {
905
+ "type": "object",
906
+ "properties": {
907
+ "artifactDigest": {
908
+ "$ref": "#/$defs/__schema2"
909
+ },
910
+ "decisionDigest": {
911
+ "$ref": "#/$defs/__schema2"
912
+ },
913
+ "repositoryDigest": {
914
+ "anyOf": [
915
+ {
916
+ "$ref": "#/$defs/__schema2"
917
+ },
918
+ {
919
+ "type": "string",
920
+ "const": "invalid"
921
+ }
922
+ ]
923
+ },
924
+ "policyDigest": {
925
+ "$ref": "#/$defs/__schema2"
926
+ },
927
+ "worldDigests": {
928
+ "type": "array",
929
+ "items": {
930
+ "type": "object",
931
+ "properties": {
932
+ "worldId": {
933
+ "$ref": "#/$defs/__schema7"
934
+ },
935
+ "digest": {
936
+ "$ref": "#/$defs/__schema2"
937
+ }
938
+ },
939
+ "required": ["worldId", "digest"],
940
+ "additionalProperties": false
941
+ }
942
+ }
943
+ },
944
+ "required": [
945
+ "artifactDigest",
946
+ "decisionDigest",
947
+ "repositoryDigest",
948
+ "policyDigest",
949
+ "worldDigests"
950
+ ],
951
+ "additionalProperties": false
952
+ }
953
+ },
954
+ "required": ["sourceReplay", "verifiedRails", "bindings"],
955
+ "additionalProperties": false
956
+ },
957
+ "__schema17": {
958
+ "type": "object",
959
+ "properties": {
960
+ "status": {
961
+ "type": "string",
962
+ "const": "UNAUTHENTICATED"
963
+ },
964
+ "attestation": {
965
+ "type": "string",
966
+ "const": "NONE"
967
+ },
968
+ "declaredProducer": {
969
+ "type": "object",
970
+ "properties": {
971
+ "name": {
972
+ "type": "string",
973
+ "minLength": 1,
974
+ "maxLength": 128
975
+ },
976
+ "version": {
977
+ "type": "string",
978
+ "minLength": 1,
979
+ "maxLength": 128
980
+ }
981
+ },
982
+ "required": ["name", "version"],
983
+ "additionalProperties": false
984
+ }
985
+ },
986
+ "required": ["status", "attestation", "declaredProducer"],
987
+ "additionalProperties": false
988
+ },
989
+ "__schema18": {
990
+ "type": "object",
991
+ "properties": {
992
+ "isolation": {
993
+ "type": "object",
994
+ "properties": {
995
+ "kind": {
996
+ "type": "string",
997
+ "const": "trusted-local"
998
+ },
999
+ "level": {
1000
+ "type": "string",
1001
+ "const": "UNSANDBOXED"
1002
+ }
1003
+ },
1004
+ "required": ["kind", "level"],
1005
+ "additionalProperties": false
1006
+ },
1007
+ "environmentAllowlist": {
1008
+ "maxItems": 100,
1009
+ "type": "array",
1010
+ "items": {
1011
+ "$ref": "#/$defs/__schema19"
1012
+ }
1013
+ },
1014
+ "adapter": {
1015
+ "type": "object",
1016
+ "properties": {
1017
+ "kind": {
1018
+ "type": "string",
1019
+ "enum": ["node-test", "testforge-command"]
1020
+ },
1021
+ "name": {
1022
+ "type": "string",
1023
+ "minLength": 1,
1024
+ "maxLength": 128
1025
+ },
1026
+ "version": {
1027
+ "type": "string",
1028
+ "minLength": 1,
1029
+ "maxLength": 128
1030
+ },
1031
+ "framework": {
1032
+ "oneOf": [
1033
+ {
1034
+ "type": "object",
1035
+ "properties": {
1036
+ "status": {
1037
+ "type": "string",
1038
+ "const": "RECORDED"
1039
+ },
1040
+ "profileId": {
1041
+ "type": "string",
1042
+ "minLength": 1,
1043
+ "maxLength": 128
1044
+ },
1045
+ "profileVersion": {
1046
+ "type": "string",
1047
+ "minLength": 1,
1048
+ "maxLength": 128
1049
+ },
1050
+ "official": {
1051
+ "type": "boolean"
1052
+ },
1053
+ "nodeVersion": {
1054
+ "anyOf": [
1055
+ {
1056
+ "type": "string",
1057
+ "minLength": 1,
1058
+ "maxLength": 128
1059
+ },
1060
+ {
1061
+ "type": "null"
1062
+ }
1063
+ ]
1064
+ },
1065
+ "executableDigest": {
1066
+ "anyOf": [
1067
+ {
1068
+ "$ref": "#/$defs/__schema2"
1069
+ },
1070
+ {
1071
+ "type": "null"
1072
+ }
1073
+ ]
1074
+ }
1075
+ },
1076
+ "required": [
1077
+ "status",
1078
+ "profileId",
1079
+ "profileVersion",
1080
+ "official",
1081
+ "nodeVersion",
1082
+ "executableDigest"
1083
+ ],
1084
+ "additionalProperties": false
1085
+ },
1086
+ {
1087
+ "type": "object",
1088
+ "properties": {
1089
+ "status": {
1090
+ "type": "string",
1091
+ "const": "UNKNOWN"
1092
+ }
1093
+ },
1094
+ "required": ["status"],
1095
+ "additionalProperties": false
1096
+ }
1097
+ ]
1098
+ }
1099
+ },
1100
+ "required": ["kind", "name", "version", "framework"],
1101
+ "additionalProperties": false
1102
+ }
1103
+ },
1104
+ "required": ["isolation", "environmentAllowlist", "adapter"],
1105
+ "additionalProperties": false
1106
+ },
1107
+ "__schema19": {
1108
+ "type": "string",
1109
+ "minLength": 1,
1110
+ "maxLength": 128
1111
+ },
1112
+ "__schema20": {
1113
+ "type": "object",
1114
+ "properties": {
1115
+ "level": {
1116
+ "type": "string",
1117
+ "const": "REPLAY_CONSISTENT_UNAUTHENTICATED"
1118
+ },
1119
+ "established": {
1120
+ "type": "array",
1121
+ "items": {
1122
+ "type": "string",
1123
+ "enum": [
1124
+ "SOURCE_SCHEMA_VALID",
1125
+ "DECISION_DIGEST_RECOMPUTED",
1126
+ "ARTIFACT_DIGEST_RECOMPUTED",
1127
+ "DECISION_RECOMPUTED_FROM_RECORDED_OBSERVATIONS"
1128
+ ]
1129
+ }
1130
+ },
1131
+ "notEstablished": {
1132
+ "type": "array",
1133
+ "items": {
1134
+ "type": "string",
1135
+ "enum": [
1136
+ "PRODUCER_AUTHENTICITY",
1137
+ "OBSERVATION_TRUTHFULNESS",
1138
+ "EXECUTION_ISOLATION",
1139
+ "EXECUTION_FRESHNESS",
1140
+ "WORLD_SEMANTIC_RELEVANCE"
1141
+ ]
1142
+ }
1143
+ }
1144
+ },
1145
+ "required": ["level", "established", "notEstablished"],
1146
+ "additionalProperties": false
1147
+ },
1148
+ "__schema21": {
1149
+ "type": "object",
1150
+ "properties": {
1151
+ "requiredAttempts": {
1152
+ "type": "integer",
1153
+ "minimum": 1,
1154
+ "maximum": 1000
1155
+ },
1156
+ "candidates": {
1157
+ "type": "integer",
1158
+ "minimum": 0,
1159
+ "maximum": 9007199254740991
1160
+ },
1161
+ "observations": {
1162
+ "type": "integer",
1163
+ "minimum": 0,
1164
+ "maximum": 9007199254740991
1165
+ },
1166
+ "gitRevisions": {
1167
+ "type": "string",
1168
+ "enum": ["RECORDED", "PARTIAL", "NOT_RECORDED"]
1169
+ },
1170
+ "worlds": {
1171
+ "type": "array",
1172
+ "items": {
1173
+ "type": "object",
1174
+ "properties": {
1175
+ "id": {
1176
+ "$ref": "#/$defs/__schema7"
1177
+ },
1178
+ "kind": {
1179
+ "$ref": "#/$defs/__schema15"
1180
+ },
1181
+ "required": {
1182
+ "type": "boolean"
1183
+ },
1184
+ "weight": {
1185
+ "type": "integer",
1186
+ "minimum": 0,
1187
+ "maximum": 1000000
1188
+ },
1189
+ "digest": {
1190
+ "$ref": "#/$defs/__schema2"
1191
+ },
1192
+ "declaredProvenance": {
1193
+ "type": "string",
1194
+ "minLength": 1,
1195
+ "maxLength": 1024
1196
+ },
1197
+ "git": {
1198
+ "anyOf": [
1199
+ {
1200
+ "type": "object",
1201
+ "properties": {
1202
+ "role": {
1203
+ "type": "string",
1204
+ "enum": ["reference", "target", "neutral"]
1205
+ },
1206
+ "commit": {
1207
+ "$ref": "#/$defs/__schema22"
1208
+ },
1209
+ "tree": {
1210
+ "$ref": "#/$defs/__schema22"
1211
+ },
1212
+ "objectFormat": {
1213
+ "type": "string",
1214
+ "enum": ["sha1", "sha256"]
1215
+ }
1216
+ },
1217
+ "required": ["role", "commit", "tree", "objectFormat"],
1218
+ "additionalProperties": false
1219
+ },
1220
+ {
1221
+ "type": "null"
1222
+ }
1223
+ ]
1224
+ }
1225
+ },
1226
+ "required": ["id", "kind", "required", "weight", "digest", "declaredProvenance", "git"],
1227
+ "additionalProperties": false
1228
+ }
1229
+ }
1230
+ },
1231
+ "required": ["requiredAttempts", "candidates", "observations", "gitRevisions", "worlds"],
1232
+ "additionalProperties": false
1233
+ },
1234
+ "__schema22": {
1235
+ "type": "string",
1236
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
1237
+ },
1238
+ "__schema23": {
1239
+ "type": "object",
1240
+ "properties": {
1241
+ "executed": {
1242
+ "type": "array",
1243
+ "items": {
1244
+ "type": "object",
1245
+ "properties": {
1246
+ "control": {
1247
+ "type": "string",
1248
+ "enum": [
1249
+ "CONTROL_WITHOUT_CANDIDATE",
1250
+ "REFERENCE_PASS",
1251
+ "REGRESSION_DETECTION",
1252
+ "NEUTRAL_PASS",
1253
+ "STABILITY_REPETITION"
1254
+ ]
1255
+ },
1256
+ "status": {
1257
+ "type": "string",
1258
+ "enum": ["EXECUTED", "NOT_EXECUTED"]
1259
+ },
1260
+ "observations": {
1261
+ "type": "integer",
1262
+ "minimum": 0,
1263
+ "maximum": 9007199254740991
1264
+ }
1265
+ },
1266
+ "required": ["control", "status", "observations"],
1267
+ "additionalProperties": false
1268
+ }
1269
+ },
1270
+ "requested": {
1271
+ "anyOf": [
1272
+ {
1273
+ "type": "object",
1274
+ "properties": {
1275
+ "status": {
1276
+ "type": "string",
1277
+ "const": "NOT_SUPPLIED"
1278
+ }
1279
+ },
1280
+ "required": ["status"],
1281
+ "additionalProperties": false
1282
+ },
1283
+ {
1284
+ "type": "object",
1285
+ "properties": {
1286
+ "status": {
1287
+ "type": "string",
1288
+ "enum": ["NO_OBLIGATIONS", "COVERED", "PARTIAL", "NOT_COVERED"]
1289
+ },
1290
+ "obligations": {
1291
+ "type": "array",
1292
+ "items": {
1293
+ "type": "object",
1294
+ "properties": {
1295
+ "id": {
1296
+ "$ref": "#/$defs/__schema7"
1297
+ },
1298
+ "control": {
1299
+ "$ref": "#/$defs/__schema11"
1300
+ },
1301
+ "coverage": {
1302
+ "type": "string",
1303
+ "enum": ["EXECUTED", "NOT_EXECUTED", "UNSUPPORTED"]
1304
+ }
1305
+ },
1306
+ "required": ["id", "control", "coverage"],
1307
+ "additionalProperties": false
1308
+ }
1309
+ }
1310
+ },
1311
+ "required": ["status", "obligations"],
1312
+ "additionalProperties": false
1313
+ }
1314
+ ]
1315
+ },
1316
+ "omittedGates": {
1317
+ "type": "array",
1318
+ "items": {
1319
+ "type": "object",
1320
+ "properties": {
1321
+ "candidateId": {
1322
+ "$ref": "#/$defs/__schema7"
1323
+ },
1324
+ "gate": {
1325
+ "$ref": "#/$defs/__schema10"
1326
+ },
1327
+ "reasonCodes": {
1328
+ "type": "array",
1329
+ "items": {
1330
+ "$ref": "#/$defs/__schema11"
1331
+ }
1332
+ }
1333
+ },
1334
+ "required": ["candidateId", "gate", "reasonCodes"],
1335
+ "additionalProperties": false
1336
+ }
1337
+ }
1338
+ },
1339
+ "required": ["executed", "requested", "omittedGates"],
1340
+ "additionalProperties": false
1341
+ },
1342
+ "__schema24": {
1343
+ "anyOf": [
1344
+ {
1345
+ "type": "object",
1346
+ "properties": {
1347
+ "status": {
1348
+ "type": "string",
1349
+ "const": "NOT_REQUESTED"
1350
+ }
1351
+ },
1352
+ "required": ["status"],
1353
+ "additionalProperties": false
1354
+ },
1355
+ {
1356
+ "type": "object",
1357
+ "properties": {
1358
+ "status": {
1359
+ "type": "string",
1360
+ "const": "UNKNOWN_PROFILE"
1361
+ },
1362
+ "requestedProfileId": {
1363
+ "type": "string",
1364
+ "minLength": 1,
1365
+ "maxLength": 256
1366
+ }
1367
+ },
1368
+ "required": ["status", "requestedProfileId"],
1369
+ "additionalProperties": false
1370
+ }
1371
+ ]
1372
+ },
1373
+ "__schema25": {
1374
+ "type": "object",
1375
+ "properties": {
1376
+ "policyVersion": {
1377
+ "type": "string",
1378
+ "minLength": 1,
1379
+ "maxLength": 128
1380
+ },
1381
+ "digest": {
1382
+ "$ref": "#/$defs/__schema2"
1383
+ }
1384
+ },
1385
+ "required": ["policyVersion", "digest"],
1386
+ "additionalProperties": false
1387
+ },
1388
+ "__schema26": {
1389
+ "type": "object",
1390
+ "properties": {
1391
+ "estimated": {
1392
+ "type": "object",
1393
+ "properties": {
1394
+ "unit": {
1395
+ "type": "string",
1396
+ "const": "PROCESS_EXECUTIONS"
1397
+ },
1398
+ "value": {
1399
+ "type": "integer",
1400
+ "minimum": 0,
1401
+ "maximum": 9007199254740991
1402
+ },
1403
+ "basis": {
1404
+ "type": "string",
1405
+ "const": "RECORDED_CAMPAIGN_SHAPE"
1406
+ },
1407
+ "assumptions": {
1408
+ "type": "array",
1409
+ "items": {
1410
+ "type": "string",
1411
+ "minLength": 1,
1412
+ "maxLength": 2048
1413
+ }
1414
+ }
1415
+ },
1416
+ "required": ["unit", "value", "basis", "assumptions"],
1417
+ "additionalProperties": false
1418
+ },
1419
+ "observed": {
1420
+ "type": "object",
1421
+ "properties": {
1422
+ "unit": {
1423
+ "type": "string",
1424
+ "const": "PROCESS_EXECUTIONS"
1425
+ },
1426
+ "executions": {
1427
+ "type": "integer",
1428
+ "minimum": 0,
1429
+ "maximum": 9007199254740991
1430
+ },
1431
+ "recordedWallTimeMs": {
1432
+ "anyOf": [
1433
+ {
1434
+ "type": "number",
1435
+ "minimum": 0
1436
+ },
1437
+ {
1438
+ "type": "null"
1439
+ }
1440
+ ]
1441
+ },
1442
+ "wallTimeCoverage": {
1443
+ "type": "string",
1444
+ "enum": ["COMPLETE", "PARTIAL", "NOT_RECORDED"]
1445
+ }
1446
+ },
1447
+ "required": ["unit", "executions", "recordedWallTimeMs", "wallTimeCoverage"],
1448
+ "additionalProperties": false
1449
+ },
1450
+ "execution": {
1451
+ "type": "object",
1452
+ "properties": {
1453
+ "freshness": {
1454
+ "type": "string",
1455
+ "const": "UNKNOWN"
1456
+ },
1457
+ "cache": {
1458
+ "type": "string",
1459
+ "const": "NOT_RECORDED"
1460
+ }
1461
+ },
1462
+ "required": ["freshness", "cache"],
1463
+ "additionalProperties": false
1464
+ }
1465
+ },
1466
+ "required": ["estimated", "observed", "execution"],
1467
+ "additionalProperties": false
1468
+ },
1469
+ "__schema27": {
1470
+ "type": "array",
1471
+ "items": {
1472
+ "type": "string",
1473
+ "minLength": 1,
1474
+ "maxLength": 2048
1475
+ }
1476
+ }
1477
+ },
1478
+ "$id": "https://testforge.dev/schemas/evidence-export.v1.json"
1479
+ }