| 1 | { |
| 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | "title": "Proposed maintenance REST and local custody objects; NOT approved or mounted", |
| 4 | "$defs": { |
| 5 | "id": { |
| 6 | "type": "string", |
| 7 | "pattern": "^[A-Za-z0-9_-]{43}$", |
| 8 | "x-validation": "maintenanceguard.ValidID, including canonical last base64 bits" |
| 9 | }, |
| 10 | "digest": { |
| 11 | "type": "string", |
| 12 | "pattern": "^[a-f0-9]{64}$" |
| 13 | }, |
| 14 | "v": { |
| 15 | "const": 1 |
| 16 | }, |
| 17 | "time": { |
| 18 | "type": "string", |
| 19 | "format": "date-time", |
| 20 | "maxLength": 35, |
| 21 | "x-validation": "UTC RFC3339Nano; exact parse; server-generated except immutable client command timeout" |
| 22 | }, |
| 23 | "scope": { |
| 24 | "type": "object", |
| 25 | "additionalProperties": false, |
| 26 | "required": [ |
| 27 | "console_origin", |
| 28 | "account", |
| 29 | "app", |
| 30 | "host" |
| 31 | ], |
| 32 | "properties": { |
| 33 | "console_origin": { |
| 34 | "type": "string", |
| 35 | "minLength": 1, |
| 36 | "maxLength": 253 |
| 37 | }, |
| 38 | "account": { |
| 39 | "type": "string", |
| 40 | "minLength": 1, |
| 41 | "maxLength": 64 |
| 42 | }, |
| 43 | "app": { |
| 44 | "type": "string", |
| 45 | "minLength": 1, |
| 46 | "maxLength": 64 |
| 47 | }, |
| 48 | "host": { |
| 49 | "type": "string", |
| 50 | "minLength": 1, |
| 51 | "maxLength": 253 |
| 52 | } |
| 53 | } |
| 54 | }, |
| 55 | "reference": { |
| 56 | "type": "object", |
| 57 | "additionalProperties": false, |
| 58 | "required": [ |
| 59 | "id", |
| 60 | "digest" |
| 61 | ], |
| 62 | "properties": { |
| 63 | "id": { |
| 64 | "$ref": "#/$defs/id" |
| 65 | }, |
| 66 | "digest": { |
| 67 | "$ref": "#/$defs/digest" |
| 68 | } |
| 69 | } |
| 70 | }, |
| 71 | "recipient": { |
| 72 | "type": "object", |
| 73 | "additionalProperties": false, |
| 74 | "required": [ |
| 75 | "public_key", |
| 76 | "fingerprint" |
| 77 | ], |
| 78 | "properties": { |
| 79 | "public_key": { |
| 80 | "type": "string", |
| 81 | "minLength": 88, |
| 82 | "maxLength": 88 |
| 83 | }, |
| 84 | "fingerprint": { |
| 85 | "$ref": "#/$defs/digest" |
| 86 | } |
| 87 | } |
| 88 | }, |
| 89 | "config_source": { |
| 90 | "type": "object", |
| 91 | "additionalProperties": false, |
| 92 | "required": [ |
| 93 | "kind", |
| 94 | "revision" |
| 95 | ], |
| 96 | "properties": { |
| 97 | "kind": { |
| 98 | "enum": [ |
| 99 | "default", |
| 100 | "named", |
| 101 | "instance", |
| 102 | "box-overlay" |
| 103 | ] |
| 104 | }, |
| 105 | "revision": { |
| 106 | "type": "string", |
| 107 | "minLength": 1, |
| 108 | "maxLength": 256, |
| 109 | "pattern": "^[!-~]+$", |
| 110 | "not": { |
| 111 | "pattern": "\\*" |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | }, |
| 116 | "target": { |
| 117 | "type": "object", |
| 118 | "additionalProperties": false, |
| 119 | "required": [ |
| 120 | "version", |
| 121 | "scope", |
| 122 | "deployment_recipient", |
| 123 | "record_identity", |
| 124 | "record_revision", |
| 125 | "artifact_version", |
| 126 | "artifact_digest", |
| 127 | "manifest_digest", |
| 128 | "platform_version" |
| 129 | ], |
| 130 | "properties": { |
| 131 | "version": { |
| 132 | "$ref": "#/$defs/v" |
| 133 | }, |
| 134 | "scope": { |
| 135 | "$ref": "#/$defs/scope" |
| 136 | }, |
| 137 | "deployment_recipient": { |
| 138 | "$ref": "#/$defs/recipient" |
| 139 | }, |
| 140 | "record_identity": { |
| 141 | "$ref": "#/$defs/digest" |
| 142 | }, |
| 143 | "record_revision": { |
| 144 | "type": "string", |
| 145 | "minLength": 1, |
| 146 | "maxLength": 256, |
| 147 | "pattern": "^[!-~]+$", |
| 148 | "not": { |
| 149 | "pattern": "\\*" |
| 150 | } |
| 151 | }, |
| 152 | "artifact_version": { |
| 153 | "type": "string", |
| 154 | "minLength": 1, |
| 155 | "maxLength": 64, |
| 156 | "pattern": "^[a-zA-Z0-9._-]{1,64}$", |
| 157 | "not": { |
| 158 | "enum": [ |
| 159 | ".", |
| 160 | ".." |
| 161 | ] |
| 162 | } |
| 163 | }, |
| 164 | "artifact_digest": { |
| 165 | "$ref": "#/$defs/digest" |
| 166 | }, |
| 167 | "manifest_digest": { |
| 168 | "$ref": "#/$defs/digest" |
| 169 | }, |
| 170 | "platform_version": { |
| 171 | "type": "string", |
| 172 | "minLength": 1, |
| 173 | "maxLength": 64 |
| 174 | } |
| 175 | } |
| 176 | }, |
| 177 | "prepare": { |
| 178 | "type": "object", |
| 179 | "additionalProperties": false, |
| 180 | "required": [ |
| 181 | "version", |
| 182 | "request_id", |
| 183 | "attempt_id", |
| 184 | "operation_label", |
| 185 | "target", |
| 186 | "result_recipient", |
| 187 | "input_envelope", |
| 188 | "input_envelope_digest", |
| 189 | "timeout_seconds", |
| 190 | "predecessor" |
| 191 | ], |
| 192 | "properties": { |
| 193 | "version": { |
| 194 | "$ref": "#/$defs/v" |
| 195 | }, |
| 196 | "request_id": { |
| 197 | "$ref": "#/$defs/id" |
| 198 | }, |
| 199 | "attempt_id": { |
| 200 | "$ref": "#/$defs/id" |
| 201 | }, |
| 202 | "operation_label": { |
| 203 | "type": "string", |
| 204 | "minLength": 1, |
| 205 | "maxLength": 64 |
| 206 | }, |
| 207 | "target": { |
| 208 | "$ref": "#/$defs/target" |
| 209 | }, |
| 210 | "result_recipient": { |
| 211 | "$ref": "#/$defs/recipient" |
| 212 | }, |
| 213 | "input_envelope": { |
| 214 | "type": "string", |
| 215 | "maxLength": 98620, |
| 216 | "minLength": 1 |
| 217 | }, |
| 218 | "input_envelope_digest": { |
| 219 | "$ref": "#/$defs/digest" |
| 220 | }, |
| 221 | "timeout_seconds": { |
| 222 | "type": "integer", |
| 223 | "minimum": 1, |
| 224 | "maximum": 600 |
| 225 | }, |
| 226 | "predecessor": { |
| 227 | "anyOf": [ |
| 228 | { |
| 229 | "$ref": "#/$defs/reference" |
| 230 | }, |
| 231 | { |
| 232 | "type": "null" |
| 233 | } |
| 234 | ] |
| 235 | } |
| 236 | } |
| 237 | }, |
| 238 | "prepared": { |
| 239 | "type": "object", |
| 240 | "additionalProperties": false, |
| 241 | "required": [ |
| 242 | "version", |
| 243 | "request_id", |
| 244 | "attempt_id", |
| 245 | "request_digest", |
| 246 | "state", |
| 247 | "status_url", |
| 248 | "review_url", |
| 249 | "payload_expires_at", |
| 250 | "lifecycle_operation_id" |
| 251 | ], |
| 252 | "properties": { |
| 253 | "version": { |
| 254 | "$ref": "#/$defs/v" |
| 255 | }, |
| 256 | "request_id": { |
| 257 | "$ref": "#/$defs/id" |
| 258 | }, |
| 259 | "attempt_id": { |
| 260 | "$ref": "#/$defs/id" |
| 261 | }, |
| 262 | "request_digest": { |
| 263 | "$ref": "#/$defs/digest" |
| 264 | }, |
| 265 | "state": { |
| 266 | "enum": [ |
| 267 | "awaiting-preflight", |
| 268 | "awaiting-approval" |
| 269 | ] |
| 270 | }, |
| 271 | "status_url": { |
| 272 | "type": "string", |
| 273 | "minLength": 1, |
| 274 | "maxLength": 1024 |
| 275 | }, |
| 276 | "review_url": { |
| 277 | "type": "string", |
| 278 | "minLength": 1, |
| 279 | "maxLength": 1024 |
| 280 | }, |
| 281 | "payload_expires_at": { |
| 282 | "$ref": "#/$defs/time" |
| 283 | }, |
| 284 | "lifecycle_operation_id": { |
| 285 | "$ref": "#/$defs/id" |
| 286 | } |
| 287 | } |
| 288 | }, |
| 289 | "preflight": { |
| 290 | "type": "object", |
| 291 | "additionalProperties": false, |
| 292 | "required": [ |
| 293 | "version", |
| 294 | "request", |
| 295 | "attempt_id", |
| 296 | "worker_assignment", |
| 297 | "scope", |
| 298 | "record_identity", |
| 299 | "record_revision", |
| 300 | "artifact_version", |
| 301 | "artifact_digest", |
| 302 | "manifest_digest", |
| 303 | "input_envelope_digest", |
| 304 | "result_recipient_fingerprint", |
| 305 | "environment_envelope_digest", |
| 306 | "config_sources", |
| 307 | "worker_evidence", |
| 308 | "expires_at", |
| 309 | "lifecycle_operation_id", |
| 310 | "execution_kind" |
| 311 | ], |
| 312 | "properties": { |
| 313 | "version": { |
| 314 | "$ref": "#/$defs/v" |
| 315 | }, |
| 316 | "request": { |
| 317 | "$ref": "#/$defs/reference" |
| 318 | }, |
| 319 | "attempt_id": { |
| 320 | "$ref": "#/$defs/id" |
| 321 | }, |
| 322 | "worker_assignment": { |
| 323 | "$ref": "#/$defs/reference", |
| 324 | "description": "Opaque server-internal immutable reference; encoding and authenticated producer validation remain unresolved worker-coordinator dependencies. CLI comparison is not provenance verification." |
| 325 | }, |
| 326 | "scope": { |
| 327 | "$ref": "#/$defs/scope" |
| 328 | }, |
| 329 | "record_identity": { |
| 330 | "$ref": "#/$defs/digest" |
| 331 | }, |
| 332 | "record_revision": { |
| 333 | "type": "string", |
| 334 | "minLength": 1, |
| 335 | "maxLength": 256, |
| 336 | "pattern": "^[!-~]+$", |
| 337 | "not": { |
| 338 | "pattern": "\\*" |
| 339 | } |
| 340 | }, |
| 341 | "artifact_version": { |
| 342 | "type": "string", |
| 343 | "minLength": 1, |
| 344 | "maxLength": 64, |
| 345 | "pattern": "^[a-zA-Z0-9._-]{1,64}$", |
| 346 | "not": { |
| 347 | "enum": [ |
| 348 | ".", |
| 349 | ".." |
| 350 | ] |
| 351 | } |
| 352 | }, |
| 353 | "artifact_digest": { |
| 354 | "$ref": "#/$defs/digest" |
| 355 | }, |
| 356 | "manifest_digest": { |
| 357 | "$ref": "#/$defs/digest" |
| 358 | }, |
| 359 | "input_envelope_digest": { |
| 360 | "$ref": "#/$defs/digest" |
| 361 | }, |
| 362 | "result_recipient_fingerprint": { |
| 363 | "$ref": "#/$defs/digest" |
| 364 | }, |
| 365 | "environment_envelope_digest": { |
| 366 | "$ref": "#/$defs/digest" |
| 367 | }, |
| 368 | "config_sources": { |
| 369 | "type": "array", |
| 370 | "maxItems": 8, |
| 371 | "items": { |
| 372 | "$ref": "#/$defs/config_source" |
| 373 | } |
| 374 | }, |
| 375 | "worker_evidence": { |
| 376 | "$ref": "#/$defs/reference", |
| 377 | "description": "Opaque server-internal immutable reference; encoding and authenticated producer validation remain unresolved worker-coordinator dependencies. CLI comparison is not provenance verification." |
| 378 | }, |
| 379 | "expires_at": { |
| 380 | "$ref": "#/$defs/time" |
| 381 | }, |
| 382 | "lifecycle_operation_id": { |
| 383 | "$ref": "#/$defs/id" |
| 384 | }, |
| 385 | "execution_kind": { |
| 386 | "enum": [ |
| 387 | "operation", |
| 388 | "compatibility-check" |
| 389 | ] |
| 390 | } |
| 391 | } |
| 392 | }, |
| 393 | "approval_form": { |
| 394 | "type": "object", |
| 395 | "additionalProperties": false, |
| 396 | "required": [ |
| 397 | "csrf", |
| 398 | "request_id", |
| 399 | "attempt_id", |
| 400 | "candidate_digest", |
| 401 | "candidate_revision" |
| 402 | ], |
| 403 | "properties": { |
| 404 | "csrf": { |
| 405 | "type": "string", |
| 406 | "minLength": 1, |
| 407 | "maxLength": 256 |
| 408 | }, |
| 409 | "request_id": { |
| 410 | "$ref": "#/$defs/id" |
| 411 | }, |
| 412 | "attempt_id": { |
| 413 | "$ref": "#/$defs/id" |
| 414 | }, |
| 415 | "candidate_digest": { |
| 416 | "$ref": "#/$defs/digest" |
| 417 | }, |
| 418 | "candidate_revision": { |
| 419 | "type": "string", |
| 420 | "minLength": 1, |
| 421 | "maxLength": 512 |
| 422 | } |
| 423 | } |
| 424 | }, |
| 425 | "status": { |
| 426 | "type": "object", |
| 427 | "additionalProperties": false, |
| 428 | "required": [ |
| 429 | "version", |
| 430 | "scope", |
| 431 | "request", |
| 432 | "attempt_id", |
| 433 | "revision", |
| 434 | "state", |
| 435 | "preflight", |
| 436 | "approval", |
| 437 | "outcome", |
| 438 | "result_state", |
| 439 | "result_envelope_digest", |
| 440 | "payload_expires_at", |
| 441 | "updated_at", |
| 442 | "lifecycle_operation_id", |
| 443 | "compatibility_outcome", |
| 444 | "resume_ready_evidence" |
| 445 | ], |
| 446 | "properties": { |
| 447 | "version": { |
| 448 | "$ref": "#/$defs/v" |
| 449 | }, |
| 450 | "scope": { |
| 451 | "$ref": "#/$defs/scope" |
| 452 | }, |
| 453 | "request": { |
| 454 | "$ref": "#/$defs/reference" |
| 455 | }, |
| 456 | "attempt_id": { |
| 457 | "$ref": "#/$defs/id" |
| 458 | }, |
| 459 | "revision": { |
| 460 | "type": "string", |
| 461 | "minLength": 1, |
| 462 | "maxLength": 512 |
| 463 | }, |
| 464 | "state": { |
| 465 | "enum": [ |
| 466 | "awaiting-preflight", |
| 467 | "awaiting-approval", |
| 468 | "approved", |
| 469 | "requested", |
| 470 | "quiescing", |
| 471 | "fenced", |
| 472 | "executing", |
| 473 | "succeeded", |
| 474 | "failed", |
| 475 | "ambiguous", |
| 476 | "resume-requested", |
| 477 | "resumed", |
| 478 | "refused", |
| 479 | "expired", |
| 480 | "resume-ready" |
| 481 | ] |
| 482 | }, |
| 483 | "preflight": { |
| 484 | "anyOf": [ |
| 485 | { |
| 486 | "$ref": "#/$defs/reference" |
| 487 | }, |
| 488 | { |
| 489 | "type": "null" |
| 490 | } |
| 491 | ] |
| 492 | }, |
| 493 | "approval": { |
| 494 | "anyOf": [ |
| 495 | { |
| 496 | "$ref": "#/$defs/reference" |
| 497 | }, |
| 498 | { |
| 499 | "type": "null" |
| 500 | } |
| 501 | ] |
| 502 | }, |
| 503 | "outcome": { |
| 504 | "anyOf": [ |
| 505 | { |
| 506 | "$ref": "#/$defs/reference" |
| 507 | }, |
| 508 | { |
| 509 | "type": "null" |
| 510 | } |
| 511 | ] |
| 512 | }, |
| 513 | "result_state": { |
| 514 | "enum": [ |
| 515 | "pending", |
| 516 | "available", |
| 517 | "unavailable", |
| 518 | "expired" |
| 519 | ] |
| 520 | }, |
| 521 | "result_envelope_digest": { |
| 522 | "anyOf": [ |
| 523 | { |
| 524 | "$ref": "#/$defs/digest" |
| 525 | }, |
| 526 | { |
| 527 | "type": "null" |
| 528 | } |
| 529 | ] |
| 530 | }, |
| 531 | "payload_expires_at": { |
| 532 | "$ref": "#/$defs/time" |
| 533 | }, |
| 534 | "updated_at": { |
| 535 | "$ref": "#/$defs/time" |
| 536 | }, |
| 537 | "lifecycle_operation_id": { |
| 538 | "$ref": "#/$defs/id" |
| 539 | }, |
| 540 | "compatibility_outcome": { |
| 541 | "anyOf": [ |
| 542 | { |
| 543 | "$ref": "#/$defs/reference" |
| 544 | }, |
| 545 | { |
| 546 | "type": "null" |
| 547 | } |
| 548 | ] |
| 549 | }, |
| 550 | "resume_ready_evidence": { |
| 551 | "anyOf": [ |
| 552 | { |
| 553 | "$ref": "#/$defs/reference" |
| 554 | }, |
| 555 | { |
| 556 | "type": "null" |
| 557 | } |
| 558 | ], |
| 559 | "description": "Opaque server-internal immutable reference; exact stored encoding and authenticated producer validation belong to future coordinator; CLI comparison is not provenance proof." |
| 560 | } |
| 561 | }, |
| 562 | "allOf": [ |
| 563 | { |
| 564 | "if": { |
| 565 | "properties": { |
| 566 | "state": { |
| 567 | "const": "resumed" |
| 568 | } |
| 569 | } |
| 570 | }, |
| 571 | "then": { |
| 572 | "properties": { |
| 573 | "outcome": { |
| 574 | "$ref": "#/$defs/reference" |
| 575 | }, |
| 576 | "compatibility_outcome": { |
| 577 | "$ref": "#/$defs/reference" |
| 578 | }, |
| 579 | "resume_ready_evidence": { |
| 580 | "$ref": "#/$defs/reference" |
| 581 | } |
| 582 | } |
| 583 | } |
| 584 | }, |
| 585 | { |
| 586 | "if": { |
| 587 | "properties": { |
| 588 | "state": { |
| 589 | "const": "resume-ready" |
| 590 | } |
| 591 | } |
| 592 | }, |
| 593 | "then": { |
| 594 | "properties": { |
| 595 | "outcome": { |
| 596 | "type": "null" |
| 597 | }, |
| 598 | "compatibility_outcome": { |
| 599 | "$ref": "#/$defs/reference" |
| 600 | }, |
| 601 | "resume_ready_evidence": { |
| 602 | "$ref": "#/$defs/reference" |
| 603 | }, |
| 604 | "result_state": { |
| 605 | "const": "pending" |
| 606 | }, |
| 607 | "result_envelope_digest": { |
| 608 | "type": "null" |
| 609 | } |
| 610 | } |
| 611 | } |
| 612 | } |
| 613 | ] |
| 614 | }, |
| 615 | "outcome": { |
| 616 | "type": "object", |
| 617 | "additionalProperties": false, |
| 618 | "required": [ |
| 619 | "version", |
| 620 | "scope", |
| 621 | "request", |
| 622 | "attempt_id", |
| 623 | "worker_assignment", |
| 624 | "preflight", |
| 625 | "approval", |
| 626 | "record_identity", |
| 627 | "record_revision", |
| 628 | "artifact_digest", |
| 629 | "environment_envelope_digest", |
| 630 | "input_envelope_digest", |
| 631 | "recipient_fingerprint", |
| 632 | "guard_generation", |
| 633 | "guard_digest", |
| 634 | "state", |
| 635 | "execution_evidence", |
| 636 | "result_envelope_digest", |
| 637 | "completed_at", |
| 638 | "lifecycle_operation_id", |
| 639 | "execution_kind", |
| 640 | "compatibility_outcome", |
| 641 | "resume_ready_evidence" |
| 642 | ], |
| 643 | "properties": { |
| 644 | "version": { |
| 645 | "$ref": "#/$defs/v" |
| 646 | }, |
| 647 | "scope": { |
| 648 | "$ref": "#/$defs/scope" |
| 649 | }, |
| 650 | "request": { |
| 651 | "$ref": "#/$defs/reference" |
| 652 | }, |
| 653 | "attempt_id": { |
| 654 | "$ref": "#/$defs/id" |
| 655 | }, |
| 656 | "worker_assignment": { |
| 657 | "$ref": "#/$defs/reference", |
| 658 | "description": "Opaque server-internal immutable reference; encoding and authenticated producer validation remain unresolved worker-coordinator dependencies. CLI comparison is not provenance verification." |
| 659 | }, |
| 660 | "preflight": { |
| 661 | "$ref": "#/$defs/reference" |
| 662 | }, |
| 663 | "approval": { |
| 664 | "$ref": "#/$defs/reference" |
| 665 | }, |
| 666 | "record_identity": { |
| 667 | "$ref": "#/$defs/digest" |
| 668 | }, |
| 669 | "record_revision": { |
| 670 | "type": "string", |
| 671 | "minLength": 1, |
| 672 | "maxLength": 256, |
| 673 | "pattern": "^[!-~]+$", |
| 674 | "not": { |
| 675 | "pattern": "\\*" |
| 676 | } |
| 677 | }, |
| 678 | "artifact_digest": { |
| 679 | "$ref": "#/$defs/digest" |
| 680 | }, |
| 681 | "environment_envelope_digest": { |
| 682 | "$ref": "#/$defs/digest" |
| 683 | }, |
| 684 | "input_envelope_digest": { |
| 685 | "$ref": "#/$defs/digest" |
| 686 | }, |
| 687 | "recipient_fingerprint": { |
| 688 | "$ref": "#/$defs/digest" |
| 689 | }, |
| 690 | "guard_generation": { |
| 691 | "type": "integer", |
| 692 | "minimum": 1, |
| 693 | "maximum": 9223372036854775807 |
| 694 | }, |
| 695 | "guard_digest": { |
| 696 | "$ref": "#/$defs/digest" |
| 697 | }, |
| 698 | "state": { |
| 699 | "enum": [ |
| 700 | "succeeded", |
| 701 | "failed", |
| 702 | "ambiguous", |
| 703 | "resumed", |
| 704 | "compatibility-checked" |
| 705 | ] |
| 706 | }, |
| 707 | "execution_evidence": { |
| 708 | "$ref": "#/$defs/reference", |
| 709 | "description": "Opaque server-internal immutable reference; encoding and authenticated producer validation remain unresolved worker-coordinator dependencies. CLI comparison is not provenance verification." |
| 710 | }, |
| 711 | "result_envelope_digest": { |
| 712 | "anyOf": [ |
| 713 | { |
| 714 | "$ref": "#/$defs/digest" |
| 715 | }, |
| 716 | { |
| 717 | "type": "null" |
| 718 | } |
| 719 | ] |
| 720 | }, |
| 721 | "completed_at": { |
| 722 | "$ref": "#/$defs/time" |
| 723 | }, |
| 724 | "lifecycle_operation_id": { |
| 725 | "$ref": "#/$defs/id" |
| 726 | }, |
| 727 | "execution_kind": { |
| 728 | "enum": [ |
| 729 | "operation", |
| 730 | "compatibility-check", |
| 731 | "resume" |
| 732 | ] |
| 733 | }, |
| 734 | "compatibility_outcome": { |
| 735 | "anyOf": [ |
| 736 | { |
| 737 | "$ref": "#/$defs/reference" |
| 738 | }, |
| 739 | { |
| 740 | "type": "null" |
| 741 | } |
| 742 | ] |
| 743 | }, |
| 744 | "resume_ready_evidence": { |
| 745 | "anyOf": [ |
| 746 | { |
| 747 | "$ref": "#/$defs/reference" |
| 748 | }, |
| 749 | { |
| 750 | "type": "null" |
| 751 | } |
| 752 | ], |
| 753 | "description": "Opaque server-internal immutable reference; exact stored encoding and authenticated producer validation belong to future coordinator; CLI comparison is not provenance proof." |
| 754 | } |
| 755 | }, |
| 756 | "allOf": [ |
| 757 | { |
| 758 | "if": { |
| 759 | "properties": { |
| 760 | "state": { |
| 761 | "const": "resumed" |
| 762 | } |
| 763 | } |
| 764 | }, |
| 765 | "then": { |
| 766 | "properties": { |
| 767 | "execution_kind": { |
| 768 | "const": "resume" |
| 769 | }, |
| 770 | "compatibility_outcome": { |
| 771 | "$ref": "#/$defs/reference" |
| 772 | }, |
| 773 | "resume_ready_evidence": { |
| 774 | "$ref": "#/$defs/reference" |
| 775 | }, |
| 776 | "result_envelope_digest": { |
| 777 | "$ref": "#/$defs/digest" |
| 778 | } |
| 779 | } |
| 780 | } |
| 781 | }, |
| 782 | { |
| 783 | "if": { |
| 784 | "properties": { |
| 785 | "state": { |
| 786 | "const": "compatibility-checked" |
| 787 | } |
| 788 | } |
| 789 | }, |
| 790 | "then": { |
| 791 | "properties": { |
| 792 | "execution_kind": { |
| 793 | "const": "compatibility-check" |
| 794 | }, |
| 795 | "compatibility_outcome": { |
| 796 | "type": "null" |
| 797 | }, |
| 798 | "resume_ready_evidence": { |
| 799 | "type": "null" |
| 800 | }, |
| 801 | "result_envelope_digest": { |
| 802 | "$ref": "#/$defs/digest" |
| 803 | } |
| 804 | } |
| 805 | } |
| 806 | }, |
| 807 | { |
| 808 | "if": { |
| 809 | "properties": { |
| 810 | "execution_kind": { |
| 811 | "const": "operation" |
| 812 | } |
| 813 | } |
| 814 | }, |
| 815 | "then": { |
| 816 | "properties": { |
| 817 | "compatibility_outcome": { |
| 818 | "type": "null" |
| 819 | }, |
| 820 | "resume_ready_evidence": { |
| 821 | "type": "null" |
| 822 | }, |
| 823 | "state": { |
| 824 | "enum": [ |
| 825 | "succeeded", |
| 826 | "failed", |
| 827 | "ambiguous" |
| 828 | ] |
| 829 | } |
| 830 | } |
| 831 | } |
| 832 | } |
| 833 | ] |
| 834 | }, |
| 835 | "result": { |
| 836 | "type": "object", |
| 837 | "additionalProperties": false, |
| 838 | "required": [ |
| 839 | "version", |
| 840 | "outcome", |
| 841 | "outcome_reference", |
| 842 | "result_envelope" |
| 843 | ], |
| 844 | "properties": { |
| 845 | "version": { |
| 846 | "$ref": "#/$defs/v" |
| 847 | }, |
| 848 | "outcome": { |
| 849 | "$ref": "#/$defs/outcome" |
| 850 | }, |
| 851 | "outcome_reference": { |
| 852 | "$ref": "#/$defs/reference" |
| 853 | }, |
| 854 | "result_envelope": { |
| 855 | "type": "string", |
| 856 | "maxLength": 87512, |
| 857 | "minLength": 1 |
| 858 | } |
| 859 | } |
| 860 | }, |
| 861 | "resume": { |
| 862 | "type": "object", |
| 863 | "additionalProperties": false, |
| 864 | "required": [ |
| 865 | "version", |
| 866 | "request_id", |
| 867 | "attempt_id", |
| 868 | "predecessor", |
| 869 | "expected_status_revision", |
| 870 | "target", |
| 871 | "required_contracts", |
| 872 | "result_recipient", |
| 873 | "checker_input_envelope", |
| 874 | "checker_input_envelope_digest", |
| 875 | "timeout_seconds" |
| 876 | ], |
| 877 | "properties": { |
| 878 | "version": { |
| 879 | "$ref": "#/$defs/v" |
| 880 | }, |
| 881 | "request_id": { |
| 882 | "$ref": "#/$defs/id" |
| 883 | }, |
| 884 | "attempt_id": { |
| 885 | "$ref": "#/$defs/id" |
| 886 | }, |
| 887 | "predecessor": { |
| 888 | "$ref": "#/$defs/reference" |
| 889 | }, |
| 890 | "expected_status_revision": { |
| 891 | "type": "string", |
| 892 | "minLength": 1, |
| 893 | "maxLength": 512 |
| 894 | }, |
| 895 | "target": { |
| 896 | "$ref": "#/$defs/target" |
| 897 | }, |
| 898 | "required_contracts": { |
| 899 | "type": "array", |
| 900 | "maxItems": 16, |
| 901 | "items": { |
| 902 | "type": "string", |
| 903 | "minLength": 1, |
| 904 | "maxLength": 64, |
| 905 | "pattern": "^[a-z][a-z0-9]*([.-][a-z0-9]+)*$" |
| 906 | }, |
| 907 | "minItems": 1, |
| 908 | "uniqueItems": true, |
| 909 | "x-validation": "maintenanceguard.ValidContracts; strict ascending byte order and superset of retained contracts before approval/spawn." |
| 910 | }, |
| 911 | "result_recipient": { |
| 912 | "$ref": "#/$defs/recipient" |
| 913 | }, |
| 914 | "checker_input_envelope": { |
| 915 | "type": "string", |
| 916 | "minLength": 1, |
| 917 | "maxLength": 98620 |
| 918 | }, |
| 919 | "checker_input_envelope_digest": { |
| 920 | "$ref": "#/$defs/digest" |
| 921 | }, |
| 922 | "timeout_seconds": { |
| 923 | "type": "integer", |
| 924 | "minimum": 1, |
| 925 | "maximum": 600 |
| 926 | } |
| 927 | } |
| 928 | }, |
| 929 | "resume_proposed": { |
| 930 | "type": "object", |
| 931 | "additionalProperties": false, |
| 932 | "required": [ |
| 933 | "version", |
| 934 | "request", |
| 935 | "attempt_id", |
| 936 | "lifecycle_operation_id", |
| 937 | "state", |
| 938 | "review_url", |
| 939 | "status_url" |
| 940 | ], |
| 941 | "properties": { |
| 942 | "version": { |
| 943 | "$ref": "#/$defs/v" |
| 944 | }, |
| 945 | "request": { |
| 946 | "$ref": "#/$defs/reference" |
| 947 | }, |
| 948 | "attempt_id": { |
| 949 | "$ref": "#/$defs/id" |
| 950 | }, |
| 951 | "lifecycle_operation_id": { |
| 952 | "$ref": "#/$defs/id" |
| 953 | }, |
| 954 | "state": { |
| 955 | "enum": [ |
| 956 | "awaiting-preflight", |
| 957 | "awaiting-approval" |
| 958 | ] |
| 959 | }, |
| 960 | "review_url": { |
| 961 | "type": "string", |
| 962 | "minLength": 1, |
| 963 | "maxLength": 1024 |
| 964 | }, |
| 965 | "status_url": { |
| 966 | "type": "string", |
| 967 | "minLength": 1, |
| 968 | "maxLength": 1024 |
| 969 | } |
| 970 | } |
| 971 | }, |
| 972 | "error": { |
| 973 | "type": "object", |
| 974 | "additionalProperties": false, |
| 975 | "required": [ |
| 976 | "version", |
| 977 | "code" |
| 978 | ], |
| 979 | "properties": { |
| 980 | "version": { |
| 981 | "$ref": "#/$defs/v" |
| 982 | }, |
| 983 | "code": { |
| 984 | "enum": [ |
| 985 | "invalid-request", |
| 986 | "not-signed-in", |
| 987 | "not-found", |
| 988 | "conflict", |
| 989 | "precondition-failed", |
| 990 | "payload-expired", |
| 991 | "result-unavailable", |
| 992 | "unsupported", |
| 993 | "rate-limited", |
| 994 | "unavailable" |
| 995 | ] |
| 996 | } |
| 997 | } |
| 998 | }, |
| 999 | "pending_local": { |
| 1000 | "type": "object", |
| 1001 | "additionalProperties": false, |
| 1002 | "required": [ |
| 1003 | "version", |
| 1004 | "scope", |
| 1005 | "request_id", |
| 1006 | "attempt_id", |
| 1007 | "recipient_private_key", |
| 1008 | "recipient_fingerprint", |
| 1009 | "private_input_path", |
| 1010 | "private_input_sha256", |
| 1011 | "exact_request_body_base64", |
| 1012 | "request_kind" |
| 1013 | ], |
| 1014 | "properties": { |
| 1015 | "version": { |
| 1016 | "$ref": "#/$defs/v" |
| 1017 | }, |
| 1018 | "scope": { |
| 1019 | "$ref": "#/$defs/scope" |
| 1020 | }, |
| 1021 | "request_id": { |
| 1022 | "$ref": "#/$defs/id" |
| 1023 | }, |
| 1024 | "attempt_id": { |
| 1025 | "$ref": "#/$defs/id" |
| 1026 | }, |
| 1027 | "recipient_private_key": { |
| 1028 | "type": "string", |
| 1029 | "minLength": 44, |
| 1030 | "maxLength": 44 |
| 1031 | }, |
| 1032 | "recipient_fingerprint": { |
| 1033 | "$ref": "#/$defs/digest" |
| 1034 | }, |
| 1035 | "private_input_path": { |
| 1036 | "type": "string", |
| 1037 | "minLength": 1, |
| 1038 | "maxLength": 4096 |
| 1039 | }, |
| 1040 | "private_input_sha256": { |
| 1041 | "$ref": "#/$defs/digest" |
| 1042 | }, |
| 1043 | "exact_request_body_base64": { |
| 1044 | "type": "string", |
| 1045 | "minLength": 1, |
| 1046 | "maxLength": 174764 |
| 1047 | }, |
| 1048 | "request_kind": { |
| 1049 | "enum": [ |
| 1050 | "operation", |
| 1051 | "retry", |
| 1052 | "resume" |
| 1053 | ] |
| 1054 | } |
| 1055 | } |
| 1056 | }, |
| 1057 | "environment_private": { |
| 1058 | "type": "object", |
| 1059 | "additionalProperties": false, |
| 1060 | "required": [ |
| 1061 | "version", |
| 1062 | "entries", |
| 1063 | "box_overlay_identity" |
| 1064 | ], |
| 1065 | "properties": { |
| 1066 | "version": { |
| 1067 | "$ref": "#/$defs/v" |
| 1068 | }, |
| 1069 | "entries": { |
| 1070 | "type": "array", |
| 1071 | "maxItems": 512, |
| 1072 | "items": { |
| 1073 | "type": "object", |
| 1074 | "additionalProperties": false, |
| 1075 | "required": [ |
| 1076 | "name", |
| 1077 | "value" |
| 1078 | ], |
| 1079 | "properties": { |
| 1080 | "name": { |
| 1081 | "type": "string", |
| 1082 | "minLength": 1, |
| 1083 | "maxLength": 256 |
| 1084 | }, |
| 1085 | "value": { |
| 1086 | "type": "string", |
| 1087 | "maxLength": 65536 |
| 1088 | } |
| 1089 | } |
| 1090 | } |
| 1091 | }, |
| 1092 | "box_overlay_identity": { |
| 1093 | "type": "string", |
| 1094 | "minLength": 1, |
| 1095 | "maxLength": 512 |
| 1096 | } |
| 1097 | } |
| 1098 | }, |
| 1099 | "preflight_publication": { |
| 1100 | "type": "object", |
| 1101 | "additionalProperties": false, |
| 1102 | "required": [ |
| 1103 | "version", |
| 1104 | "publication_id", |
| 1105 | "preflight", |
| 1106 | "environment_envelope" |
| 1107 | ], |
| 1108 | "properties": { |
| 1109 | "version": { |
| 1110 | "$ref": "#/$defs/v" |
| 1111 | }, |
| 1112 | "publication_id": { |
| 1113 | "$ref": "#/$defs/id" |
| 1114 | }, |
| 1115 | "preflight": { |
| 1116 | "$ref": "#/$defs/preflight" |
| 1117 | }, |
| 1118 | "environment_envelope": { |
| 1119 | "type": "string", |
| 1120 | "minLength": 1, |
| 1121 | "maxLength": 1398232 |
| 1122 | } |
| 1123 | } |
| 1124 | }, |
| 1125 | "outcome_publication": { |
| 1126 | "type": "object", |
| 1127 | "additionalProperties": false, |
| 1128 | "required": [ |
| 1129 | "version", |
| 1130 | "publication_id", |
| 1131 | "outcome", |
| 1132 | "result_envelope" |
| 1133 | ], |
| 1134 | "properties": { |
| 1135 | "version": { |
| 1136 | "$ref": "#/$defs/v" |
| 1137 | }, |
| 1138 | "publication_id": { |
| 1139 | "$ref": "#/$defs/id" |
| 1140 | }, |
| 1141 | "outcome": { |
| 1142 | "$ref": "#/$defs/outcome" |
| 1143 | }, |
| 1144 | "result_envelope": { |
| 1145 | "anyOf": [ |
| 1146 | { |
| 1147 | "type": "string", |
| 1148 | "minLength": 1, |
| 1149 | "maxLength": 87512 |
| 1150 | }, |
| 1151 | { |
| 1152 | "type": "null" |
| 1153 | } |
| 1154 | ] |
| 1155 | } |
| 1156 | } |
| 1157 | }, |
| 1158 | "retry": { |
| 1159 | "type": "object", |
| 1160 | "additionalProperties": false, |
| 1161 | "required": [ |
| 1162 | "version", |
| 1163 | "request_id", |
| 1164 | "attempt_id", |
| 1165 | "operation_label", |
| 1166 | "target", |
| 1167 | "result_recipient", |
| 1168 | "input_envelope", |
| 1169 | "input_envelope_digest", |
| 1170 | "timeout_seconds", |
| 1171 | "predecessor" |
| 1172 | ], |
| 1173 | "properties": { |
| 1174 | "version": { |
| 1175 | "$ref": "#/$defs/v" |
| 1176 | }, |
| 1177 | "request_id": { |
| 1178 | "$ref": "#/$defs/id" |
| 1179 | }, |
| 1180 | "attempt_id": { |
| 1181 | "$ref": "#/$defs/id" |
| 1182 | }, |
| 1183 | "operation_label": { |
| 1184 | "type": "string", |
| 1185 | "minLength": 1, |
| 1186 | "maxLength": 64 |
| 1187 | }, |
| 1188 | "target": { |
| 1189 | "$ref": "#/$defs/target" |
| 1190 | }, |
| 1191 | "result_recipient": { |
| 1192 | "$ref": "#/$defs/recipient" |
| 1193 | }, |
| 1194 | "input_envelope": { |
| 1195 | "type": "string", |
| 1196 | "maxLength": 98620, |
| 1197 | "minLength": 1 |
| 1198 | }, |
| 1199 | "input_envelope_digest": { |
| 1200 | "$ref": "#/$defs/digest" |
| 1201 | }, |
| 1202 | "timeout_seconds": { |
| 1203 | "type": "integer", |
| 1204 | "minimum": 1, |
| 1205 | "maximum": 600 |
| 1206 | }, |
| 1207 | "predecessor": { |
| 1208 | "$ref": "#/$defs/reference" |
| 1209 | } |
| 1210 | }, |
| 1211 | "description": "Same prepare fields; predecessor is required non-null and its ID must equal the route request_id. Digest binds predecessor request bytes; server resolves its outcome." |
| 1212 | } |
| 1213 | } |
| 1214 | } |
| 1215 | |