@consiliency/contract 0.6.5 → 0.7.1

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 (35) hide show
  1. package/README.md +39 -2
  2. package/conformance/registries/authority-key-registry.test.json +48 -0
  3. package/conformance/vectors/authority-algorithm-confusion.json +1 -1
  4. package/conformance/vectors/authority-bad-signature.json +1 -1
  5. package/conformance/vectors/authority-cert-digest-mismatch.json +1 -1
  6. package/conformance/vectors/authority-chain-appended-still-verifies.json +1 -1
  7. package/conformance/vectors/authority-core-validity-expired.json +1 -1
  8. package/conformance/vectors/authority-forged-self-minted.json +1 -1
  9. package/conformance/vectors/authority-key-expired.json +1 -1
  10. package/conformance/vectors/authority-key-revoked.json +1 -1
  11. package/conformance/vectors/authority-missing-signature.json +1 -1
  12. package/conformance/vectors/authority-signer-approver-mismatch.json +1 -1
  13. package/conformance/vectors/authority-unknown-key-id.json +1 -1
  14. package/conformance/vectors/authority-valid.json +1 -1
  15. package/conformance/vectors/authority-wrong-key-valid-id.json +1 -1
  16. package/core/authority-canon/provenance.json +1 -1
  17. package/core/contract.json +21 -3
  18. package/core/registries/authority-key-registry.json +3 -3
  19. package/core/schemas/git-discipline-protocol.schema.json +1 -1
  20. package/core/schemas/version-skew-protocol.schema.json +3 -3
  21. package/core/supervised-run/admitted-launch-envelope.schema.json +226 -0
  22. package/core/supervised-run/admitted-launch-envelope.v2.schema.json +880 -0
  23. package/core/supervised-run/conformance/README.md +55 -0
  24. package/core/supervised-run/conformance/README.v2.md +297 -0
  25. package/core/supervised-run/conformance/SHA256SUMS +10 -0
  26. package/core/supervised-run/conformance/envelope.v2.apply.vectors.json +1938 -0
  27. package/core/supervised-run/conformance/envelope.v2.canonical.vectors.json +2088 -0
  28. package/core/supervised-run/conformance/envelope.v2.vectors.json +16359 -0
  29. package/core/supervised-run/conformance/envelope.vectors.json +557 -0
  30. package/core/supervised-run/conformance/run-status.vectors.json +2150 -0
  31. package/core/supervised-run/provenance.json +116 -0
  32. package/core/supervised-run/run-status.schema.json +768 -0
  33. package/package.json +1 -1
  34. package/src/index.d.ts +3 -1
  35. package/src/index.js +8 -1
@@ -0,0 +1,557 @@
1
+ {
2
+ "contract": "admitted_launch_envelope.v1",
3
+ "status": "provisional",
4
+ "note": "Golden valid and negative conformance vectors. Each negative is a JSON Patch (RFC 6902 add/remove/replace) applied to its paired valid control; when rehash is true, envelope_digest is recomputed afterwards, so the authority self-verifies. Expected diagnostics are exact sets.",
5
+ "cases": [
6
+ {
7
+ "id": "E-admitted",
8
+ "kind": "admission",
9
+ "role": "control",
10
+ "input": {
11
+ "envelope": {
12
+ "schema": "admitted_launch_envelope.v1",
13
+ "envelope_digest": "f2d174dec3b15f8d812f1c366e3d6a4788a1f5ca51054ae692aee252ed09bbf5",
14
+ "assignment_digest": "4db77511ca854b659c5886fdb3638130b0fa0cb44ac8cde9d2dfdf119ba820ff",
15
+ "units": {
16
+ "target_unit_ids": [
17
+ "unit:target"
18
+ ],
19
+ "readonly_neighbor_unit_ids": [
20
+ "unit:neighbor"
21
+ ],
22
+ "snapshot_ref": "34e6443f11e4328e716685e41d0182403df44a76f53d9b94f6dba4fe158a6b44",
23
+ "crosswalk_ref": "265f36f6c47cbcc46a314f2910feaa7704023198b384f3468b9cf3515efdf66d"
24
+ },
25
+ "workspace": {
26
+ "kind": "separate_clone",
27
+ "repo_relative_locators": [
28
+ "src/module/target.ts"
29
+ ]
30
+ },
31
+ "enforcement": {
32
+ "tier": "provider_readonly_patch_return_audit",
33
+ "required_constraints": [
34
+ "write_scope"
35
+ ]
36
+ },
37
+ "obligations": {
38
+ "definition_digests": [
39
+ "7327e7658f4b4a5b072b5e9543e5e5139abf685bd64fc85c1e99768ae3b93d98"
40
+ ]
41
+ },
42
+ "executable_dependencies": {
43
+ "declared": false,
44
+ "admitted_dependency_digest": null
45
+ },
46
+ "caller_context": {
47
+ "ticket": "opaque-123",
48
+ "nested": {
49
+ "k": [
50
+ 1,
51
+ 2
52
+ ]
53
+ }
54
+ },
55
+ "redaction_posture": "digests_and_repo_relative_locators_only"
56
+ },
57
+ "validator_context": {
58
+ "expected_assignment_digest": "4db77511ca854b659c5886fdb3638130b0fa0cb44ac8cde9d2dfdf119ba820ff",
59
+ "expected_snapshot_ref": "34e6443f11e4328e716685e41d0182403df44a76f53d9b94f6dba4fe158a6b44",
60
+ "expected_crosswalk_ref": "265f36f6c47cbcc46a314f2910feaa7704023198b384f3468b9cf3515efdf66d"
61
+ }
62
+ },
63
+ "expected": [],
64
+ "expected_effect": {
65
+ "attempt": {
66
+ "state": "queued",
67
+ "worker_invocations": 0
68
+ }
69
+ }
70
+ },
71
+ {
72
+ "id": "E-post-write-honest",
73
+ "kind": "admission",
74
+ "role": "control",
75
+ "input": {
76
+ "envelope": {
77
+ "schema": "admitted_launch_envelope.v1",
78
+ "envelope_digest": "a71e2e2b982cabc11cb067818a142c11c37b0a61a552bc39a65e6466bf3da1f8",
79
+ "assignment_digest": "4db77511ca854b659c5886fdb3638130b0fa0cb44ac8cde9d2dfdf119ba820ff",
80
+ "units": {
81
+ "target_unit_ids": [
82
+ "unit:target"
83
+ ],
84
+ "readonly_neighbor_unit_ids": [
85
+ "unit:neighbor"
86
+ ],
87
+ "snapshot_ref": "34e6443f11e4328e716685e41d0182403df44a76f53d9b94f6dba4fe158a6b44",
88
+ "crosswalk_ref": "265f36f6c47cbcc46a314f2910feaa7704023198b384f3468b9cf3515efdf66d"
89
+ },
90
+ "workspace": {
91
+ "kind": "git_worktree_of_protected",
92
+ "repo_relative_locators": [
93
+ "src/module/target.ts"
94
+ ]
95
+ },
96
+ "enforcement": {
97
+ "tier": "post_write_audit_only",
98
+ "required_constraints": []
99
+ },
100
+ "obligations": {
101
+ "definition_digests": [
102
+ "7327e7658f4b4a5b072b5e9543e5e5139abf685bd64fc85c1e99768ae3b93d98"
103
+ ]
104
+ },
105
+ "executable_dependencies": {
106
+ "declared": false,
107
+ "admitted_dependency_digest": null
108
+ },
109
+ "caller_context": {
110
+ "ticket": "opaque-123",
111
+ "nested": {
112
+ "k": [
113
+ 1,
114
+ 2
115
+ ]
116
+ }
117
+ },
118
+ "redaction_posture": "digests_and_repo_relative_locators_only"
119
+ },
120
+ "validator_context": {
121
+ "expected_assignment_digest": "4db77511ca854b659c5886fdb3638130b0fa0cb44ac8cde9d2dfdf119ba820ff",
122
+ "expected_snapshot_ref": "34e6443f11e4328e716685e41d0182403df44a76f53d9b94f6dba4fe158a6b44",
123
+ "expected_crosswalk_ref": "265f36f6c47cbcc46a314f2910feaa7704023198b384f3468b9cf3515efdf66d"
124
+ }
125
+ },
126
+ "expected": [],
127
+ "expected_effect": {
128
+ "attempt": {
129
+ "state": "queued",
130
+ "worker_invocations": 0
131
+ }
132
+ }
133
+ },
134
+ {
135
+ "id": "E-dependency-declared",
136
+ "kind": "admission",
137
+ "role": "control",
138
+ "input": {
139
+ "envelope": {
140
+ "schema": "admitted_launch_envelope.v1",
141
+ "envelope_digest": "6378b08d6a7a9fbc302a45b87c55bee0864505de54dee868bc7ccc6fd4421759",
142
+ "assignment_digest": "4db77511ca854b659c5886fdb3638130b0fa0cb44ac8cde9d2dfdf119ba820ff",
143
+ "units": {
144
+ "target_unit_ids": [
145
+ "unit:target"
146
+ ],
147
+ "readonly_neighbor_unit_ids": [
148
+ "unit:neighbor"
149
+ ],
150
+ "snapshot_ref": "34e6443f11e4328e716685e41d0182403df44a76f53d9b94f6dba4fe158a6b44",
151
+ "crosswalk_ref": "265f36f6c47cbcc46a314f2910feaa7704023198b384f3468b9cf3515efdf66d"
152
+ },
153
+ "workspace": {
154
+ "kind": "separate_clone",
155
+ "repo_relative_locators": [
156
+ "src/module/target.ts"
157
+ ]
158
+ },
159
+ "enforcement": {
160
+ "tier": "provider_readonly_patch_return_audit",
161
+ "required_constraints": [
162
+ "write_scope"
163
+ ]
164
+ },
165
+ "obligations": {
166
+ "definition_digests": [
167
+ "7327e7658f4b4a5b072b5e9543e5e5139abf685bd64fc85c1e99768ae3b93d98"
168
+ ]
169
+ },
170
+ "executable_dependencies": {
171
+ "declared": true,
172
+ "admitted_dependency_digest": "4394ff3564177ae0998d98e16e065024a77daef6c5d6d6edcd94cd70d97bb2b6"
173
+ },
174
+ "caller_context": {
175
+ "ticket": "opaque-123",
176
+ "nested": {
177
+ "k": [
178
+ 1,
179
+ 2
180
+ ]
181
+ }
182
+ },
183
+ "redaction_posture": "digests_and_repo_relative_locators_only"
184
+ },
185
+ "validator_context": {
186
+ "expected_assignment_digest": "4db77511ca854b659c5886fdb3638130b0fa0cb44ac8cde9d2dfdf119ba820ff",
187
+ "expected_snapshot_ref": "34e6443f11e4328e716685e41d0182403df44a76f53d9b94f6dba4fe158a6b44",
188
+ "expected_crosswalk_ref": "265f36f6c47cbcc46a314f2910feaa7704023198b384f3468b9cf3515efdf66d"
189
+ }
190
+ },
191
+ "expected": [],
192
+ "expected_effect": {
193
+ "attempt": {
194
+ "state": "queued",
195
+ "worker_invocations": 0
196
+ }
197
+ }
198
+ },
199
+ {
200
+ "id": "RC16-stale-rehashed",
201
+ "kind": "admission",
202
+ "role": "negative",
203
+ "control": "E-admitted",
204
+ "patch": [
205
+ {
206
+ "op": "replace",
207
+ "path": "/envelope/units/snapshot_ref",
208
+ "value": "0b2a09cd78659f97e9ed5a76f1863d0b48858ae9e9f1c2cb2f8c66fd5e217257"
209
+ }
210
+ ],
211
+ "expected": [
212
+ "authority_baseline_stale"
213
+ ],
214
+ "rehash": true,
215
+ "expected_effect": {
216
+ "attempt": {
217
+ "state": "refused",
218
+ "worker_invocations": 0
219
+ }
220
+ }
221
+ },
222
+ {
223
+ "id": "RC17-foreign-assignment-rehashed",
224
+ "kind": "admission",
225
+ "role": "negative",
226
+ "control": "E-admitted",
227
+ "patch": [
228
+ {
229
+ "op": "replace",
230
+ "path": "/envelope/assignment_digest",
231
+ "value": "86149a7c91d471964f27fbe7201cefe4264463e61268eb86e7b3df2cfc6bce3e"
232
+ }
233
+ ],
234
+ "expected": [
235
+ "authority_foreign"
236
+ ],
237
+ "rehash": true,
238
+ "expected_effect": {
239
+ "attempt": {
240
+ "state": "refused",
241
+ "worker_invocations": 0
242
+ }
243
+ }
244
+ },
245
+ {
246
+ "id": "RC17-foreign-project-rehashed",
247
+ "kind": "admission",
248
+ "role": "negative",
249
+ "control": "E-admitted",
250
+ "patch": [
251
+ {
252
+ "op": "replace",
253
+ "path": "/envelope/units/crosswalk_ref",
254
+ "value": "324656e25bb2ce845b335cde1d2cde65d84ac92fa1620f5a32dc20baa3a900a9"
255
+ },
256
+ {
257
+ "op": "replace",
258
+ "path": "/envelope/units/snapshot_ref",
259
+ "value": "050b2a137faa4e7dfdcf73f2d06f05c52149374f8a7d4fc7ef1b9161dc190518"
260
+ }
261
+ ],
262
+ "expected": [
263
+ "authority_foreign"
264
+ ],
265
+ "rehash": true,
266
+ "expected_effect": {
267
+ "attempt": {
268
+ "state": "refused",
269
+ "worker_invocations": 0
270
+ }
271
+ }
272
+ },
273
+ {
274
+ "id": "S-digest-not-rehashed",
275
+ "kind": "admission",
276
+ "role": "negative",
277
+ "control": "E-admitted",
278
+ "patch": [
279
+ {
280
+ "op": "replace",
281
+ "path": "/envelope/obligations/definition_digests/0",
282
+ "value": "4d1e953c0703027bee047c3adb79e5f5414c2e9b4e8cec82b62f2eedaa78d66e"
283
+ }
284
+ ],
285
+ "expected": [
286
+ "envelope_digest_mismatch"
287
+ ],
288
+ "expected_effect": {
289
+ "attempt": {
290
+ "state": "refused",
291
+ "worker_invocations": 0
292
+ }
293
+ }
294
+ },
295
+ {
296
+ "id": "N21-network-required",
297
+ "kind": "admission",
298
+ "role": "negative",
299
+ "control": "E-admitted",
300
+ "patch": [
301
+ {
302
+ "op": "add",
303
+ "path": "/envelope/enforcement/required_constraints/-",
304
+ "value": "network_denial"
305
+ }
306
+ ],
307
+ "expected": [
308
+ "constraint_unsupported"
309
+ ],
310
+ "rehash": true,
311
+ "expected_effect": {
312
+ "attempt": {
313
+ "state": "refused",
314
+ "worker_invocations": 0,
315
+ "refusal": {
316
+ "reason": "constraint_unsupported",
317
+ "constraint": "network_denial",
318
+ "tier": "provider_readonly_patch_return_audit"
319
+ }
320
+ }
321
+ }
322
+ },
323
+ {
324
+ "id": "N21-command-required",
325
+ "kind": "admission",
326
+ "role": "negative",
327
+ "control": "E-admitted",
328
+ "patch": [
329
+ {
330
+ "op": "add",
331
+ "path": "/envelope/enforcement/required_constraints/-",
332
+ "value": "command_denial"
333
+ }
334
+ ],
335
+ "expected": [
336
+ "constraint_unsupported"
337
+ ],
338
+ "rehash": true,
339
+ "expected_effect": {
340
+ "attempt": {
341
+ "state": "refused",
342
+ "worker_invocations": 0,
343
+ "refusal": {
344
+ "reason": "constraint_unsupported",
345
+ "constraint": "command_denial",
346
+ "tier": "provider_readonly_patch_return_audit"
347
+ }
348
+ }
349
+ }
350
+ },
351
+ {
352
+ "id": "N21-worktree-under-patch-return",
353
+ "kind": "admission",
354
+ "role": "negative",
355
+ "control": "E-admitted",
356
+ "patch": [
357
+ {
358
+ "op": "replace",
359
+ "path": "/envelope/workspace/kind",
360
+ "value": "git_worktree_of_protected"
361
+ }
362
+ ],
363
+ "expected": [
364
+ "workspace_not_separate_copy"
365
+ ],
366
+ "rehash": true,
367
+ "expected_effect": {
368
+ "attempt": {
369
+ "state": "refused",
370
+ "worker_invocations": 0
371
+ }
372
+ }
373
+ },
374
+ {
375
+ "id": "S-os-enforced-unqualified",
376
+ "kind": "admission",
377
+ "role": "negative",
378
+ "control": "E-admitted",
379
+ "patch": [
380
+ {
381
+ "op": "replace",
382
+ "path": "/envelope/enforcement/tier",
383
+ "value": "os_enforced"
384
+ }
385
+ ],
386
+ "expected": [
387
+ "tier_unqualified"
388
+ ],
389
+ "rehash": true,
390
+ "expected_effect": {
391
+ "attempt": {
392
+ "state": "refused",
393
+ "worker_invocations": 0
394
+ }
395
+ }
396
+ },
397
+ {
398
+ "id": "S-dependency-without-digest",
399
+ "kind": "admission",
400
+ "role": "negative",
401
+ "control": "E-dependency-declared",
402
+ "patch": [
403
+ {
404
+ "op": "replace",
405
+ "path": "/envelope/executable_dependencies/admitted_dependency_digest",
406
+ "value": null
407
+ }
408
+ ],
409
+ "expected": [
410
+ "dependency_digest_required"
411
+ ],
412
+ "rehash": true,
413
+ "expected_effect": {
414
+ "attempt": {
415
+ "state": "refused",
416
+ "worker_invocations": 0
417
+ }
418
+ }
419
+ },
420
+ {
421
+ "id": "S-envelope-absolute-locator",
422
+ "kind": "admission",
423
+ "role": "negative",
424
+ "control": "E-admitted",
425
+ "patch": [
426
+ {
427
+ "op": "replace",
428
+ "path": "/envelope/workspace/repo_relative_locators/0",
429
+ "value": "/x"
430
+ }
431
+ ],
432
+ "expected": [
433
+ "locator_not_repo_relative"
434
+ ],
435
+ "rehash": true,
436
+ "expected_effect": {
437
+ "attempt": {
438
+ "state": "refused",
439
+ "worker_invocations": 0
440
+ }
441
+ }
442
+ },
443
+ {
444
+ "id": "S-envelope-raw-output",
445
+ "kind": "admission",
446
+ "role": "negative",
447
+ "control": "E-admitted",
448
+ "patch": [
449
+ {
450
+ "op": "replace",
451
+ "path": "/envelope/workspace/repo_relative_locators/0",
452
+ "value": "src/module/target.ts\nTraceback (most recent call last)"
453
+ }
454
+ ],
455
+ "expected": [
456
+ "raw_output_in_record"
457
+ ],
458
+ "rehash": true,
459
+ "expected_effect": {
460
+ "attempt": {
461
+ "state": "refused",
462
+ "worker_invocations": 0
463
+ }
464
+ }
465
+ },
466
+ {
467
+ "id": "E-echo",
468
+ "kind": "echo",
469
+ "role": "control",
470
+ "input": {
471
+ "envelope": {
472
+ "schema": "admitted_launch_envelope.v1",
473
+ "envelope_digest": "f2d174dec3b15f8d812f1c366e3d6a4788a1f5ca51054ae692aee252ed09bbf5",
474
+ "assignment_digest": "4db77511ca854b659c5886fdb3638130b0fa0cb44ac8cde9d2dfdf119ba820ff",
475
+ "units": {
476
+ "target_unit_ids": [
477
+ "unit:target"
478
+ ],
479
+ "readonly_neighbor_unit_ids": [
480
+ "unit:neighbor"
481
+ ],
482
+ "snapshot_ref": "34e6443f11e4328e716685e41d0182403df44a76f53d9b94f6dba4fe158a6b44",
483
+ "crosswalk_ref": "265f36f6c47cbcc46a314f2910feaa7704023198b384f3468b9cf3515efdf66d"
484
+ },
485
+ "workspace": {
486
+ "kind": "separate_clone",
487
+ "repo_relative_locators": [
488
+ "src/module/target.ts"
489
+ ]
490
+ },
491
+ "enforcement": {
492
+ "tier": "provider_readonly_patch_return_audit",
493
+ "required_constraints": [
494
+ "write_scope"
495
+ ]
496
+ },
497
+ "obligations": {
498
+ "definition_digests": [
499
+ "7327e7658f4b4a5b072b5e9543e5e5139abf685bd64fc85c1e99768ae3b93d98"
500
+ ]
501
+ },
502
+ "executable_dependencies": {
503
+ "declared": false,
504
+ "admitted_dependency_digest": null
505
+ },
506
+ "caller_context": {
507
+ "ticket": "opaque-123",
508
+ "nested": {
509
+ "k": [
510
+ 1,
511
+ 2
512
+ ]
513
+ }
514
+ },
515
+ "redaction_posture": "digests_and_repo_relative_locators_only"
516
+ },
517
+ "validator_context": {
518
+ "expected_assignment_digest": "4db77511ca854b659c5886fdb3638130b0fa0cb44ac8cde9d2dfdf119ba820ff",
519
+ "expected_snapshot_ref": "34e6443f11e4328e716685e41d0182403df44a76f53d9b94f6dba4fe158a6b44",
520
+ "expected_crosswalk_ref": "265f36f6c47cbcc46a314f2910feaa7704023198b384f3468b9cf3515efdf66d"
521
+ },
522
+ "echoed_caller_context": {
523
+ "ticket": "opaque-123",
524
+ "nested": {
525
+ "k": [
526
+ 1,
527
+ 2
528
+ ]
529
+ }
530
+ }
531
+ },
532
+ "expected": []
533
+ },
534
+ {
535
+ "id": "S-caller-context-interpreted",
536
+ "kind": "echo",
537
+ "role": "negative",
538
+ "control": "E-echo",
539
+ "patch": [
540
+ {
541
+ "op": "replace",
542
+ "path": "/echoed_caller_context/nested",
543
+ "value": {
544
+ "k": [
545
+ 1,
546
+ 2
547
+ ],
548
+ "parsed_by_harness": true
549
+ }
550
+ }
551
+ ],
552
+ "expected": [
553
+ "caller_context_interpreted"
554
+ ]
555
+ }
556
+ ]
557
+ }