@reviewsensei/cli-linux-x64-gnu 0.8.15 → 0.8.17

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 (26) hide show
  1. package/README.md +1 -1
  2. package/bin/_internal/base_library.zip +0 -0
  3. package/bin/_internal/review_sensei/schemas/api-run-accounting.schema.json +92 -6
  4. package/bin/_internal/review_sensei/schemas/eligibility-v4.schema.json +30 -2
  5. package/bin/_internal/review_sensei/schemas/eligibility-v5.schema.json +30 -2
  6. package/bin/_internal/review_sensei/schemas/eligibility-v6.schema.json +76 -0
  7. package/bin/_internal/review_sensei/schemas/eligibility-v7.schema.json +37 -0
  8. package/bin/_internal/review_sensei/schemas/eligibility-v8.schema.json +126 -0
  9. package/bin/_internal/review_sensei/schemas/historical-assessment-hold.schema.json +123 -0
  10. package/bin/_internal/review_sensei/schemas/historical-publication-completion.schema.json +209 -0
  11. package/bin/_internal/review_sensei/schemas/publication-selection.schema.json +192 -0
  12. package/bin/_internal/review_sensei/schemas/quarantine-assessment-cursor.schema.json +36 -0
  13. package/bin/_internal/review_sensei/schemas/quarantine-assessment-event.schema.json +40 -0
  14. package/bin/_internal/review_sensei/schemas/quarantine-assessment-inventory.schema.json +37 -0
  15. package/bin/_internal/review_sensei/schemas/quarantine-assessment-origins.schema.json +92 -0
  16. package/bin/_internal/review_sensei/schemas/quarantine-assessment-state.schema.json +94 -0
  17. package/bin/_internal/review_sensei/schemas/quarantine-assessment-view.schema.json +89 -0
  18. package/bin/_internal/review_sensei/schemas/quarantine-lineage.schema.json +101 -0
  19. package/bin/_internal/review_sensei/schemas/review-convergence-policy.schema.json +1 -0
  20. package/bin/_internal/review_sensei/schemas/review-result.schema.json +2 -0
  21. package/bin/_internal/review_sensei/schemas/review-verdict.schema.json +41 -0
  22. package/bin/_internal/review_sensei/schemas/session-record.schema.json +706 -120
  23. package/bin/_internal/review_sensei.egg-info/PKG-INFO +17 -3
  24. package/bin/_internal/review_sensei.egg-info/SOURCES.txt +78 -0
  25. package/bin/review-sensei +0 -0
  26. package/package.json +1 -1
@@ -22,6 +22,9 @@
22
22
  "record_sha256"
23
23
  ],
24
24
  "properties": {
25
+ "historical_assessments": {
26
+ "$ref": "https://reviewsensei.dev/schemas/v1/historical-assessment-hold.schema.json"
27
+ },
25
28
  "api_run_accounting": {
26
29
  "$ref": "https://reviewsensei.dev/schemas/v1/api-run-accounting.schema.json"
27
30
  },
@@ -35,7 +38,7 @@
35
38
  ],
36
39
  "properties": {
37
40
  "schema_version": {
38
- "const": "1.0"
41
+ "enum": ["1.0", "2.0"]
39
42
  },
40
43
  "result_digest": {
41
44
  "type": "string",
@@ -104,44 +107,108 @@
104
107
  }
105
108
  }
106
109
  },
107
- "rescan_state": {"$ref": "https://reviewsensei.dev/schemas/v1/rescan-state.schema.json"},
108
- "schema_version": {"const": "1.0"},
109
- "repository": {"type": "string", "minLength": 1, "maxLength": 256},
110
- "pull_request": {"type": "integer", "minimum": 1, "maximum": 2147483647},
110
+ "rescan_state": {
111
+ "$ref": "https://reviewsensei.dev/schemas/v1/rescan-state.schema.json"
112
+ },
113
+ "schema_version": {
114
+ "const": "1.0"
115
+ },
116
+ "repository": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 256
120
+ },
121
+ "pull_request": {
122
+ "type": "integer",
123
+ "minimum": 1,
124
+ "maximum": 2147483647
125
+ },
111
126
  "repository_id": {
112
- "type": ["integer", "null"],
127
+ "type": [
128
+ "integer",
129
+ "null"
130
+ ],
113
131
  "minimum": 1,
114
132
  "maximum": 2147483647
115
133
  },
116
- "completed_initial_reviews": {"type": "integer", "minimum": 0, "maximum": 1000000},
117
- "completed_verification_rounds": {"type": "integer", "minimum": 0, "maximum": 1000000},
118
- "failed_attempts": {"type": "integer", "minimum": 0, "maximum": 32},
119
- "failed_attempts_head_sha": {"type": ["string", "null"], "pattern": "^[a-f0-9]{40,64}$"},
120
- "generation": {"type": "integer", "minimum": 0, "maximum": 2147483647},
134
+ "completed_initial_reviews": {
135
+ "type": "integer",
136
+ "minimum": 0,
137
+ "maximum": 1000000
138
+ },
139
+ "completed_verification_rounds": {
140
+ "type": "integer",
141
+ "minimum": 0,
142
+ "maximum": 1000000
143
+ },
144
+ "failed_attempts": {
145
+ "type": "integer",
146
+ "minimum": 0,
147
+ "maximum": 32
148
+ },
149
+ "failed_attempts_head_sha": {
150
+ "type": [
151
+ "string",
152
+ "null"
153
+ ],
154
+ "pattern": "^[a-f0-9]{40,64}$"
155
+ },
156
+ "generation": {
157
+ "type": "integer",
158
+ "minimum": 0,
159
+ "maximum": 2147483647
160
+ },
121
161
  "reservation_id": {
122
162
  "anyOf": [
123
- {"type": "null"},
124
- {"type": "string", "pattern": "^[a-f0-9]{8,64}$"}
163
+ {
164
+ "type": "null"
165
+ },
166
+ {
167
+ "type": "string",
168
+ "pattern": "^[a-f0-9]{8,64}$"
169
+ }
125
170
  ]
126
171
  },
127
172
  "reservation_owner": {
128
173
  "description": "Owning run from the authenticated OIDC broker; absent in legacy reservations.",
129
174
  "type": "object",
130
175
  "additionalProperties": false,
131
- "required": ["run_id", "head_sha"],
176
+ "required": [
177
+ "run_id",
178
+ "head_sha"
179
+ ],
132
180
  "properties": {
133
- "run_id": {"type": "string", "pattern": "^[1-9][0-9]{0,18}$"},
134
- "head_sha": {"type": "string", "pattern": "^[a-f0-9]{40}$"}
181
+ "run_id": {
182
+ "type": "string",
183
+ "pattern": "^[1-9][0-9]{0,18}$"
184
+ },
185
+ "head_sha": {
186
+ "type": "string",
187
+ "pattern": "^[a-f0-9]{40}$"
188
+ }
135
189
  }
136
190
  },
137
191
  "reserved_slot": {
138
- "type": ["string", "null"],
139
- "enum": ["initial", "verification", "failed-attempt", null]
192
+ "type": [
193
+ "string",
194
+ "null"
195
+ ],
196
+ "enum": [
197
+ "initial",
198
+ "verification",
199
+ "failed-attempt",
200
+ null
201
+ ]
140
202
  },
141
203
  "last_committed_reservation_id": {
142
204
  "anyOf": [
143
- {"type": "null"},
144
- {"type": "string", "pattern": "^[a-f0-9]{8,64}$"}
205
+ {
206
+ "type": "null"
207
+ },
208
+ {
209
+ "type": "string",
210
+ "pattern": "^[a-f0-9]{8,64}$"
211
+ }
145
212
  ]
146
213
  },
147
214
  "created_at": {
@@ -159,40 +226,134 @@
159
226
  "format": "date-time",
160
227
  "pattern": "^(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2}))$"
161
228
  },
162
- "record_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
163
- "operator_paused": {"type": "boolean"},
164
- "assessment_queue": {"$ref": "https://reviewsensei.dev/schemas/v1/assessment-queue-root.schema.json"},
229
+ "record_sha256": {
230
+ "type": "string",
231
+ "pattern": "^[a-f0-9]{64}$"
232
+ },
233
+ "operator_paused": {
234
+ "type": "boolean"
235
+ },
236
+ "assessment_queue": {
237
+ "$ref": "https://reviewsensei.dev/schemas/v1/assessment-queue-root.schema.json"
238
+ },
165
239
  "dispositions": {
166
240
  "type": "array",
167
241
  "maxItems": 256,
168
242
  "items": {
169
243
  "type": "object",
170
244
  "additionalProperties": false,
171
- "required": ["fingerprint", "action", "reason", "actor", "head_sha", "expires_at"],
245
+ "required": [
246
+ "fingerprint",
247
+ "action",
248
+ "reason",
249
+ "actor",
250
+ "head_sha",
251
+ "expires_at"
252
+ ],
172
253
  "properties": {
173
- "fingerprint": {"type": "string", "pattern": "^[a-f0-9]{16,64}$"},
174
- "action": {"enum": ["dismiss", "defer", "accept-risk", "accept-coverage-uncertainty"]},
175
- "reason": {"type": "string", "minLength": 1, "maxLength": 512},
176
- "actor": {"type": "string", "minLength": 1, "maxLength": 256},
177
- "head_sha": {"type": ["string", "null"], "pattern": "^[a-f0-9]{40,64}$"},
178
- "expires_at": {"type": ["string", "null"], "format": "date-time"},
179
- "actor_role": {"type": ["string", "null"], "maxLength": 64},
180
- "finding_reference": {"type": ["string", "null"], "pattern": "^(?:RS-)?[A-Fa-f0-9]{6,64}$"},
181
- "recorded_at": {"type": ["string", "null"], "format": "date-time"},
182
- "policy_digest": {"type": ["string", "null"], "pattern": "^[a-f0-9]{64}$"},
183
- "provenance": {"type": ["string", "null"], "maxLength": 256},
254
+ "fingerprint": {
255
+ "type": "string",
256
+ "pattern": "^[a-f0-9]{16,64}$"
257
+ },
258
+ "action": {
259
+ "enum": [
260
+ "dismiss",
261
+ "defer",
262
+ "accept-risk",
263
+ "accept-coverage-uncertainty"
264
+ ]
265
+ },
266
+ "reason": {
267
+ "type": "string",
268
+ "minLength": 1,
269
+ "maxLength": 512
270
+ },
271
+ "actor": {
272
+ "type": "string",
273
+ "minLength": 1,
274
+ "maxLength": 256
275
+ },
276
+ "head_sha": {
277
+ "type": [
278
+ "string",
279
+ "null"
280
+ ],
281
+ "pattern": "^[a-f0-9]{40,64}$"
282
+ },
283
+ "expires_at": {
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ],
288
+ "format": "date-time"
289
+ },
290
+ "actor_role": {
291
+ "type": [
292
+ "string",
293
+ "null"
294
+ ],
295
+ "maxLength": 64
296
+ },
297
+ "finding_reference": {
298
+ "type": [
299
+ "string",
300
+ "null"
301
+ ],
302
+ "pattern": "^(?:RS-)?[A-Fa-f0-9]{6,64}$"
303
+ },
304
+ "recorded_at": {
305
+ "type": [
306
+ "string",
307
+ "null"
308
+ ],
309
+ "format": "date-time"
310
+ },
311
+ "policy_digest": {
312
+ "type": [
313
+ "string",
314
+ "null"
315
+ ],
316
+ "pattern": "^[a-f0-9]{64}$"
317
+ },
318
+ "provenance": {
319
+ "type": [
320
+ "string",
321
+ "null"
322
+ ],
323
+ "maxLength": 256
324
+ },
184
325
  "resolution_kind": {
185
- "type": ["string", "null"],
186
- "enum": ["disputed", "deferred", "accepted_unresolved", "coverage_uncertainty_accepted", null]
326
+ "type": [
327
+ "string",
328
+ "null"
329
+ ],
330
+ "enum": [
331
+ "disputed",
332
+ "deferred",
333
+ "accepted_unresolved",
334
+ "coverage_uncertainty_accepted",
335
+ null
336
+ ]
187
337
  },
188
338
  "target_kind": {
189
- "type": ["string", "null"],
190
- "enum": ["finding", "coverage_uncertainty", null]
339
+ "type": [
340
+ "string",
341
+ "null"
342
+ ],
343
+ "enum": [
344
+ "finding",
345
+ "coverage_uncertainty",
346
+ null
347
+ ]
191
348
  },
192
349
  "incomplete_coverage": {
193
350
  "type": "array",
194
351
  "maxItems": 256,
195
- "items": {"type": "string", "minLength": 1, "maxLength": 256}
352
+ "items": {
353
+ "type": "string",
354
+ "minLength": 1,
355
+ "maxLength": 256
356
+ }
196
357
  }
197
358
  }
198
359
  }
@@ -214,27 +375,69 @@
214
375
  "consumed_reservation_id",
215
376
  "consumed_generation"
216
377
  ],
217
- "properties": {
218
- "command_id": {"type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"},
219
- "actor": {"type": "string", "minLength": 1, "maxLength": 256},
220
- "head_sha": {"type": "string", "pattern": "^[a-f0-9]{40,64}$"},
221
- "policy_digest": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
222
- "issued_at": {"type": "string", "format": "date-time"},
223
- "expires_at": {"type": "string", "format": "date-time"},
224
- "consumed_reservation_id": {"type": ["string", "null"], "pattern": "^[a-f0-9]{8,64}$"},
225
- "consumed_generation": {"type": ["integer", "null"], "minimum": 1, "maximum": 2147483647}
378
+ "properties": {
379
+ "command_id": {
380
+ "type": "string",
381
+ "minLength": 1,
382
+ "maxLength": 128,
383
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
384
+ },
385
+ "actor": {
386
+ "type": "string",
387
+ "minLength": 1,
388
+ "maxLength": 256
389
+ },
390
+ "head_sha": {
391
+ "type": "string",
392
+ "pattern": "^[a-f0-9]{40,64}$"
393
+ },
394
+ "policy_digest": {
395
+ "type": "string",
396
+ "pattern": "^[a-f0-9]{64}$"
397
+ },
398
+ "issued_at": {
399
+ "type": "string",
400
+ "format": "date-time"
401
+ },
402
+ "expires_at": {
403
+ "type": "string",
404
+ "format": "date-time"
405
+ },
406
+ "consumed_reservation_id": {
407
+ "type": [
408
+ "string",
409
+ "null"
410
+ ],
411
+ "pattern": "^[a-f0-9]{8,64}$"
412
+ },
413
+ "consumed_generation": {
414
+ "type": [
415
+ "integer",
416
+ "null"
417
+ ],
418
+ "minimum": 1,
419
+ "maximum": 2147483647
420
+ }
226
421
  },
227
422
  "oneOf": [
228
423
  {
229
424
  "properties": {
230
- "consumed_reservation_id": {"type": "null"},
231
- "consumed_generation": {"type": "null"}
425
+ "consumed_reservation_id": {
426
+ "type": "null"
427
+ },
428
+ "consumed_generation": {
429
+ "type": "null"
430
+ }
232
431
  }
233
432
  },
234
433
  {
235
434
  "properties": {
236
- "consumed_reservation_id": {"type": "string"},
237
- "consumed_generation": {"type": "integer"}
435
+ "consumed_reservation_id": {
436
+ "type": "string"
437
+ },
438
+ "consumed_generation": {
439
+ "type": "integer"
440
+ }
238
441
  }
239
442
  }
240
443
  ]
@@ -247,58 +450,183 @@
247
450
  "type": "object",
248
451
  "description": "Bounded convergence envelope. The field caps below bound each member; the validation seam additionally rejects canonical UTF-8 JSON above 12288 history bytes or 20480 record bytes, which JSON Schema cannot express. Writers allocate less history when the surrounding lifecycle state requires it. Older readers reject expanded records; upgrade all shared-ledger readers before enabling new writes.",
249
452
  "additionalProperties": false,
250
- "required": ["state", "progress", "provenance"],
453
+ "required": [
454
+ "state",
455
+ "progress",
456
+ "provenance"
457
+ ],
251
458
  "properties": {
252
- "state": {"enum": ["completed", "invalidated", "recovery-required"]},
459
+ "state": {
460
+ "enum": [
461
+ "completed",
462
+ "invalidated",
463
+ "recovery-required"
464
+ ]
465
+ },
253
466
  "baseline": {
254
467
  "oneOf": [
255
468
  {
256
469
  "type": "object",
257
470
  "additionalProperties": false,
258
- "required": ["cache_key", "policy_digest", "complete", "coverage_complete", "generation", "findings", "reviewed_paths", "related_paths"],
471
+ "required": [
472
+ "cache_key",
473
+ "policy_digest",
474
+ "complete",
475
+ "coverage_complete",
476
+ "generation",
477
+ "findings",
478
+ "reviewed_paths",
479
+ "related_paths"
480
+ ],
259
481
  "properties": {
260
482
  "cache_key": {
261
483
  "type": "object",
262
484
  "additionalProperties": false,
263
- "required": ["repository", "pull_request", "base_sha", "head_sha", "engine", "model", "profile", "stage_digest", "context_digest", "learning_digest"],
485
+ "required": [
486
+ "repository",
487
+ "pull_request",
488
+ "base_sha",
489
+ "head_sha",
490
+ "engine",
491
+ "model",
492
+ "profile",
493
+ "stage_digest",
494
+ "context_digest",
495
+ "learning_digest"
496
+ ],
264
497
  "properties": {
265
- "repository": {"type": "string", "maxLength": 256},
266
- "pull_request": {"type": "integer", "minimum": 1},
267
- "base_sha": {"type": "string", "pattern": "^[a-f0-9]{40}$"},
268
- "head_sha": {"type": "string", "pattern": "^[a-f0-9]{40}$"},
269
- "engine": {"type": "string", "maxLength": 256},
270
- "model": {"type": "string", "maxLength": 256},
271
- "profile": {"type": "string", "maxLength": 256},
272
- "stage_digest": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
273
- "context_digest": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
274
- "learning_digest": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
498
+ "repository": {
499
+ "type": "string",
500
+ "maxLength": 256
501
+ },
502
+ "pull_request": {
503
+ "type": "integer",
504
+ "minimum": 1
505
+ },
506
+ "base_sha": {
507
+ "type": "string",
508
+ "pattern": "^[a-f0-9]{40}$"
509
+ },
510
+ "head_sha": {
511
+ "type": "string",
512
+ "pattern": "^[a-f0-9]{40}$"
513
+ },
514
+ "engine": {
515
+ "type": "string",
516
+ "maxLength": 256
517
+ },
518
+ "model": {
519
+ "type": "string",
520
+ "maxLength": 256
521
+ },
522
+ "profile": {
523
+ "type": "string",
524
+ "maxLength": 256
525
+ },
526
+ "stage_digest": {
527
+ "type": "string",
528
+ "pattern": "^[a-f0-9]{64}$"
529
+ },
530
+ "context_digest": {
531
+ "type": "string",
532
+ "pattern": "^[a-f0-9]{64}$"
533
+ },
534
+ "learning_digest": {
535
+ "type": "string",
536
+ "pattern": "^[a-f0-9]{64}$"
537
+ }
275
538
  }
276
539
  },
277
- "policy_digest": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
278
- "complete": {"type": "boolean"},
279
- "coverage_complete": {"type": "boolean"},
280
- "generation": {"type": "integer", "minimum": 0},
540
+ "policy_digest": {
541
+ "type": "string",
542
+ "pattern": "^[a-f0-9]{64}$"
543
+ },
544
+ "complete": {
545
+ "type": "boolean"
546
+ },
547
+ "coverage_complete": {
548
+ "type": "boolean"
549
+ },
550
+ "generation": {
551
+ "type": "integer",
552
+ "minimum": 0
553
+ },
281
554
  "findings": {
282
555
  "type": "array",
283
556
  "maxItems": 3,
284
557
  "items": {
285
558
  "type": "object",
286
559
  "additionalProperties": false,
287
- "required": ["fingerprint", "resolution_criterion", "concern", "path", "symbol", "defect_kind", "generation", "blocking"],
560
+ "required": [
561
+ "fingerprint",
562
+ "resolution_criterion",
563
+ "concern",
564
+ "path",
565
+ "symbol",
566
+ "defect_kind",
567
+ "generation",
568
+ "blocking"
569
+ ],
288
570
  "properties": {
289
- "fingerprint": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
290
- "resolution_criterion": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
291
- "concern": {"type": ["string", "null"], "pattern": "^[a-f0-9]{64}$"},
292
- "path": {"type": ["string", "null"], "maxLength": 256},
293
- "symbol": {"type": ["string", "null"], "maxLength": 256},
294
- "defect_kind": {"type": "string", "maxLength": 128},
295
- "generation": {"type": "integer", "minimum": 0},
296
- "blocking": {"type": "boolean"}
571
+ "fingerprint": {
572
+ "type": "string",
573
+ "pattern": "^[a-f0-9]{64}$"
574
+ },
575
+ "resolution_criterion": {
576
+ "type": "string",
577
+ "pattern": "^[a-f0-9]{64}$"
578
+ },
579
+ "concern": {
580
+ "type": [
581
+ "string",
582
+ "null"
583
+ ],
584
+ "pattern": "^[a-f0-9]{64}$"
585
+ },
586
+ "path": {
587
+ "type": [
588
+ "string",
589
+ "null"
590
+ ],
591
+ "maxLength": 256
592
+ },
593
+ "symbol": {
594
+ "type": [
595
+ "string",
596
+ "null"
597
+ ],
598
+ "maxLength": 256
599
+ },
600
+ "defect_kind": {
601
+ "type": "string",
602
+ "maxLength": 128
603
+ },
604
+ "generation": {
605
+ "type": "integer",
606
+ "minimum": 0
607
+ },
608
+ "blocking": {
609
+ "type": "boolean"
610
+ }
297
611
  }
298
612
  }
299
613
  },
300
- "reviewed_paths": {"type": "array", "maxItems": 512, "items": {"type": "string", "maxLength": 256}},
301
- "related_paths": {"type": "array", "maxItems": 64, "items": {"type": "string", "maxLength": 256}}
614
+ "reviewed_paths": {
615
+ "type": "array",
616
+ "maxItems": 512,
617
+ "items": {
618
+ "type": "string",
619
+ "maxLength": 256
620
+ }
621
+ },
622
+ "related_paths": {
623
+ "type": "array",
624
+ "maxItems": 64,
625
+ "items": {
626
+ "type": "string",
627
+ "maxLength": 256
628
+ }
629
+ }
302
630
  }
303
631
  },
304
632
  {
@@ -330,7 +658,9 @@
330
658
  }
331
659
  }
332
660
  },
333
- {"$ref": "https://reviewsensei.dev/schemas/v1/evidence-manifest.schema.json"}
661
+ {
662
+ "$ref": "https://reviewsensei.dev/schemas/v1/evidence-manifest.schema.json"
663
+ }
334
664
  ]
335
665
  },
336
666
  "progress": {
@@ -339,31 +669,83 @@
339
669
  "items": {
340
670
  "type": "object",
341
671
  "additionalProperties": false,
342
- "required": ["event", "generation"],
672
+ "required": [
673
+ "event",
674
+ "generation"
675
+ ],
343
676
  "properties": {
344
- "event": {"enum": ["completed", "invalidated", "recovery-required"]},
345
- "generation": {"type": "integer", "minimum": 0, "maximum": 2147483647},
346
- "blocker_set_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
347
- "blocker_count": {"type": "integer", "minimum": 0, "maximum": 4096},
348
- "transaction_id": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
677
+ "event": {
678
+ "enum": [
679
+ "completed",
680
+ "invalidated",
681
+ "recovery-required"
682
+ ]
683
+ },
684
+ "generation": {
685
+ "type": "integer",
686
+ "minimum": 0,
687
+ "maximum": 2147483647
688
+ },
689
+ "blocker_set_sha256": {
690
+ "type": "string",
691
+ "pattern": "^[a-f0-9]{64}$"
692
+ },
693
+ "blocker_count": {
694
+ "type": "integer",
695
+ "minimum": 0,
696
+ "maximum": 4096
697
+ },
698
+ "transaction_id": {
699
+ "type": "string",
700
+ "pattern": "^[a-f0-9]{64}$"
701
+ }
349
702
  },
350
703
  "allOf": [
351
704
  {
352
- "if": {"required": ["blocker_set_sha256"]},
705
+ "if": {
706
+ "required": [
707
+ "blocker_set_sha256"
708
+ ]
709
+ },
353
710
  "then": {
354
- "required": ["blocker_count"],
355
- "properties": {"event": {"const": "completed"}}
711
+ "required": [
712
+ "blocker_count"
713
+ ],
714
+ "properties": {
715
+ "event": {
716
+ "const": "completed"
717
+ }
718
+ }
356
719
  }
357
720
  },
358
721
  {
359
- "if": {"required": ["blocker_count"]},
360
- "then": {"required": ["blocker_set_sha256"]}
722
+ "if": {
723
+ "required": [
724
+ "blocker_count"
725
+ ]
726
+ },
727
+ "then": {
728
+ "required": [
729
+ "blocker_set_sha256"
730
+ ]
731
+ }
361
732
  },
362
733
  {
363
- "if": {"required": ["transaction_id"]},
734
+ "if": {
735
+ "required": [
736
+ "transaction_id"
737
+ ]
738
+ },
364
739
  "then": {
365
- "required": ["blocker_set_sha256", "blocker_count"],
366
- "properties": {"event": {"const": "completed"}}
740
+ "required": [
741
+ "blocker_set_sha256",
742
+ "blocker_count"
743
+ ],
744
+ "properties": {
745
+ "event": {
746
+ "const": "completed"
747
+ }
748
+ }
367
749
  }
368
750
  }
369
751
  ]
@@ -372,46 +754,218 @@
372
754
  "provenance": {
373
755
  "type": "object",
374
756
  "additionalProperties": false,
375
- "required": ["ledger_digest"],
376
- "properties": {"ledger_digest": {"type": "string", "pattern": "^[a-f0-9]{64}$"}}
757
+ "required": [
758
+ "ledger_digest"
759
+ ],
760
+ "properties": {
761
+ "ledger_digest": {
762
+ "type": "string",
763
+ "pattern": "^[a-f0-9]{64}$"
764
+ }
765
+ }
766
+ }
767
+ }
768
+ },
769
+ "quarantine_lineage": {
770
+ "$ref": "https://reviewsensei.dev/schemas/v1/quarantine-lineage.schema.json"
771
+ },
772
+ "publication_staging": {
773
+ "description": "Closed bounded frontier for a multipart native publication. Unknown attempts are retained.",
774
+ "type": "object",
775
+ "additionalProperties": false,
776
+ "required": [
777
+ "schema_version",
778
+ "transaction_id",
779
+ "result_sha256",
780
+ "plan_sha256",
781
+ "part_count",
782
+ "attempted_parts",
783
+ "attempt_tokens",
784
+ "receipts",
785
+ "final_attempted",
786
+ "final_token",
787
+ "final_receipt",
788
+ "manifest_required",
789
+ "manifest_attempted",
790
+ "manifest_token",
791
+ "manifest_receipt"
792
+ ],
793
+ "properties": {
794
+ "schema_version": {
795
+ "const": "publication-staging-v2"
796
+ },
797
+ "transaction_id": {
798
+ "type": "string",
799
+ "pattern": "^[a-f0-9]{64}$"
800
+ },
801
+ "result_sha256": {
802
+ "type": "string",
803
+ "pattern": "^[a-f0-9]{64}$"
804
+ },
805
+ "plan_sha256": {
806
+ "type": "string",
807
+ "pattern": "^[a-f0-9]{64}$"
808
+ },
809
+ "part_count": {
810
+ "type": "integer",
811
+ "minimum": 0,
812
+ "maximum": 8
813
+ },
814
+ "attempted_parts": {
815
+ "type": "integer",
816
+ "minimum": 0,
817
+ "maximum": 8
818
+ },
819
+ "attempt_tokens": {
820
+ "type": "array",
821
+ "maxItems": 8,
822
+ "uniqueItems": true,
823
+ "items": {"type": "string", "pattern": "^[a-f0-9]{32}$"}
824
+ },
825
+ "receipts": {
826
+ "type": "array",
827
+ "maxItems": 8,
828
+ "items": {
829
+ "type": "object",
830
+ "additionalProperties": false,
831
+ "required": [
832
+ "native_id",
833
+ "content_sha256"
834
+ ],
835
+ "properties": {
836
+ "native_id": {
837
+ "type": "string",
838
+ "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"
839
+ },
840
+ "content_sha256": {
841
+ "type": "string",
842
+ "pattern": "^[a-f0-9]{64}$"
843
+ }
844
+ }
845
+ }
846
+ },
847
+ "final_attempted": {
848
+ "type": "boolean"
849
+ },
850
+ "final_token": {
851
+ "anyOf": [
852
+ {"type": "string", "pattern": "^[a-f0-9]{32}$"},
853
+ {"type": "null"}
854
+ ]
855
+ },
856
+ "manifest_required": {"type": "boolean"},
857
+ "manifest_attempted": {"type": "boolean"},
858
+ "manifest_token": {
859
+ "anyOf": [
860
+ {"type": "string", "pattern": "^[a-f0-9]{32}$"},
861
+ {"type": "null"}
862
+ ]
863
+ },
864
+ "manifest_receipt": {
865
+ "anyOf": [
866
+ {
867
+ "type": "object", "additionalProperties": false,
868
+ "required": ["native_id", "content_sha256"],
869
+ "properties": {
870
+ "native_id": {"type": "string", "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"},
871
+ "content_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
872
+ }
873
+ },
874
+ {"type": "null"}
875
+ ]
876
+ },
877
+ "final_receipt": {
878
+ "anyOf": [
879
+ {
880
+ "type": "object",
881
+ "additionalProperties": false,
882
+ "required": [
883
+ "native_id",
884
+ "content_sha256"
885
+ ],
886
+ "properties": {
887
+ "native_id": {
888
+ "type": "string",
889
+ "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"
890
+ },
891
+ "content_sha256": {
892
+ "type": "string",
893
+ "pattern": "^[a-f0-9]{64}$"
894
+ }
895
+ }
896
+ },
897
+ {
898
+ "type": "null"
899
+ }
900
+ ]
377
901
  }
378
902
  }
379
903
  }
380
904
  },
381
905
  "allOf": [
382
906
  {
383
- "if": {"required": ["reservation_owner"]},
907
+ "if": {
908
+ "required": [
909
+ "reservation_owner"
910
+ ]
911
+ },
384
912
  "then": {
385
913
  "properties": {
386
- "reservation_id": {"type": "string"},
387
- "reserved_slot": {"type": "string"}
914
+ "reservation_id": {
915
+ "type": "string"
916
+ },
917
+ "reserved_slot": {
918
+ "type": "string"
919
+ }
388
920
  }
389
921
  }
390
922
  },
391
923
  {
392
924
  "if": {
393
- "required": ["transaction"],
925
+ "required": [
926
+ "transaction"
927
+ ],
394
928
  "properties": {
395
929
  "transaction": {
396
- "required": ["phase"],
397
- "properties": {"phase": {"const": "analysis"}}
930
+ "required": [
931
+ "phase"
932
+ ],
933
+ "properties": {
934
+ "phase": {
935
+ "const": "analysis"
936
+ }
937
+ }
398
938
  }
399
939
  }
400
940
  },
401
941
  "then": {
402
- "required": ["reservation_id", "reserved_slot"],
942
+ "required": [
943
+ "reservation_id",
944
+ "reserved_slot"
945
+ ],
403
946
  "properties": {
404
- "reservation_id": {"type": "string"},
405
- "reserved_slot": {"enum": ["initial", "verification"]}
947
+ "reservation_id": {
948
+ "type": "string"
949
+ },
950
+ "reserved_slot": {
951
+ "enum": [
952
+ "initial",
953
+ "verification"
954
+ ]
955
+ }
406
956
  }
407
957
  }
408
958
  },
409
959
  {
410
960
  "if": {
411
- "required": ["transaction"],
961
+ "required": [
962
+ "transaction"
963
+ ],
412
964
  "properties": {
413
965
  "transaction": {
414
- "required": ["phase"],
966
+ "required": [
967
+ "phase"
968
+ ],
415
969
  "properties": {
416
970
  "phase": {
417
971
  "enum": [
@@ -428,40 +982,72 @@
428
982
  },
429
983
  "then": {
430
984
  "properties": {
431
- "reservation_id": {"type": "null"},
432
- "reserved_slot": {"type": "null"}
985
+ "reservation_id": {
986
+ "type": "null"
987
+ },
988
+ "reserved_slot": {
989
+ "type": "null"
990
+ }
433
991
  }
434
992
  }
435
993
  },
436
994
  {
437
995
  "if": {
438
- "required": ["convergence_history"],
996
+ "required": [
997
+ "convergence_history"
998
+ ],
439
999
  "properties": {
440
1000
  "convergence_history": {
441
- "required": ["state"],
442
- "properties": {"state": {"const": "completed"}}
1001
+ "required": [
1002
+ "state"
1003
+ ],
1004
+ "properties": {
1005
+ "state": {
1006
+ "const": "completed"
1007
+ }
1008
+ }
443
1009
  }
444
1010
  }
445
1011
  },
446
1012
  "then": {
447
1013
  "properties": {
448
- "convergence_history": {"required": ["baseline"]}
1014
+ "convergence_history": {
1015
+ "required": [
1016
+ "baseline"
1017
+ ]
1018
+ }
449
1019
  }
450
1020
  }
451
1021
  },
452
1022
  {
453
1023
  "if": {
454
- "required": ["convergence_history"],
1024
+ "required": [
1025
+ "convergence_history"
1026
+ ],
455
1027
  "properties": {
456
1028
  "convergence_history": {
457
- "required": ["state"],
458
- "properties": {"state": {"not": {"const": "completed"}}}
1029
+ "required": [
1030
+ "state"
1031
+ ],
1032
+ "properties": {
1033
+ "state": {
1034
+ "not": {
1035
+ "const": "completed"
1036
+ }
1037
+ }
1038
+ }
459
1039
  }
460
1040
  }
461
1041
  },
462
1042
  "then": {
463
1043
  "properties": {
464
- "convergence_history": {"not": {"required": ["baseline"]}}
1044
+ "convergence_history": {
1045
+ "not": {
1046
+ "required": [
1047
+ "baseline"
1048
+ ]
1049
+ }
1050
+ }
465
1051
  }
466
1052
  }
467
1053
  }