{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "AGLA_W_NUMBERED_SUCCESSOR_AND_MUTATION_MANIFEST.schema.json",
  "title": "Stack W numbered successor and mutation manifest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "schema",
    "version",
    "status",
    "authority_effect",
    "runtime_available",
    "execution_base",
    "hash_basis",
    "replay_method",
    "mutation_envelope",
    "replay_count",
    "artifacts",
    "control_artifacts_excluded_from_replay",
    "closing_law"
  ],
  "properties": {
    "$schema": {
      "const": "../schemas/W_NUMBERED_SUCCESSOR_AND_MUTATION_MANIFEST.schema.json"
    },
    "schema": {
      "const": "AGLA_W_NUMBERED_SUCCESSOR_AND_MUTATION_MANIFEST_v1.0.0"
    },
    "version": {
      "const": "1.0.0"
    },
    "status": {
      "const": "CANONICAL_SUPPORT_NON_PROVIDER_NON_RUNTIME_RUNTIME_DISABLED"
    },
    "authority_effect": {
      "const": "TRACE_ONLY_NO_RUNTIME_AUTHORITY"
    },
    "runtime_available": {
      "const": false
    },
    "execution_base": {
      "type": "object",
      "additionalProperties": false,
      "required": ["commit", "tree", "qualification_subtree"],
      "properties": {
        "commit": {
          "const": "58ce4cec5f15a78b0263e85deea5a1e9e7412eed"
        },
        "tree": {
          "const": "564560ebf3a767ee39bd1267fdfc862f950d2d0c"
        },
        "qualification_subtree": {
          "const": "f9894202d45a94aab488d0919606b431d001cdea"
        }
      }
    },
    "hash_basis": {
      "const": "SHA256_UTF8_WITH_LF_LINE_ENDINGS"
    },
    "replay_method": {
      "const": "ORDERED_UNIQUE_UTF8_PREIMAGE_POSTIMAGE_WITH_SHA256_CHAIN_AND_JSON_POINTER_ALLOWLIST"
    },
    "mutation_envelope": {
      "type": "array",
      "minItems": 6,
      "maxItems": 6,
      "uniqueItems": true,
      "items": {
        "enum": [
          "VERSION",
          "STATUS_LIFECYCLE",
          "NUMBERED_PATH",
          "INTERNAL_REFERENCE",
          "REGISTRY_METADATA",
          "PROVENANCE_METADATA"
        ]
      }
    },
    "replay_count": {
      "const": 19
    },
    "artifacts": {
      "type": "array",
      "minItems": 19,
      "maxItems": 19,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_path",
          "source_git_blob_oid",
          "source_sha256",
          "source_version",
          "target_path",
          "target_sha256",
          "target_version",
          "target_lifecycle",
          "target_runtime_available",
          "mutation_kinds",
          "semantic_equivalence",
          "json_pointer_allowlist",
          "operations"
        ],
        "properties": {
          "source_path": {
            "type": "string",
            "pattern": "^AGLA_ArsGeneralisLlullApplied/_01_INTEGRATION_CANDIDATES/STACK_W/QUALIFICATION/"
          },
          "source_git_blob_oid": {
            "type": "string",
            "pattern": "^[0-9a-f]{40}$"
          },
          "source_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "source_version": {
            "type": "string",
            "minLength": 1
          },
          "target_path": {
            "type": "string",
            "pattern": "^AGLA_ArsGeneralisLlullApplied/(19_STACK_W|90_STACK_LIBER)/"
          },
          "target_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "target_version": {
            "const": "1.0.0"
          },
          "target_lifecycle": {
            "enum": [
              "CANONICAL_SOURCE_NON_RUNTIME_RUNTIME_DISABLED",
              "CANONICAL_SUPPORT_NON_PROVIDER_NON_RUNTIME_RUNTIME_DISABLED",
              "CANONICAL_SUPPORT_NON_INFORMANT_NON_PROVIDER_NON_RUNTIME_RUNTIME_DISABLED"
            ]
          },
          "target_runtime_available": {
            "const": false
          },
          "mutation_kinds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 6,
            "uniqueItems": true,
            "items": {
              "enum": [
                "VERSION",
                "STATUS_LIFECYCLE",
                "NUMBERED_PATH",
                "INTERNAL_REFERENCE",
                "REGISTRY_METADATA",
                "PROVENANCE_METADATA"
              ]
            }
          },
          "semantic_equivalence": {
            "const": "PROVEN_BY_ORDERED_EXACT_REPLAY_WITH_CLOSED_HP_030_A_MUTATION_KINDS"
          },
          "json_pointer_allowlist": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "pattern": "^/"
            }
          },
          "operations": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "sequence",
                "kinds",
                "json_pointers",
                "preimage_utf8_base64",
                "postimage_utf8_base64",
                "expected_occurrences",
                "pre_sha256",
                "post_sha256"
              ],
              "properties": {
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "kinds": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 6,
                  "uniqueItems": true,
                  "items": {
                    "enum": [
                      "VERSION",
                      "STATUS_LIFECYCLE",
                      "NUMBERED_PATH",
                      "INTERNAL_REFERENCE",
                      "REGISTRY_METADATA",
                      "PROVENANCE_METADATA"
                    ]
                  }
                },
                "json_pointers": {
                  "type": "array",
                  "uniqueItems": true,
                  "items": {
                    "type": "string",
                    "pattern": "^/"
                  }
                },
                "preimage_utf8_base64": {
                  "type": "string",
                  "minLength": 1
                },
                "postimage_utf8_base64": {
                  "type": "string",
                  "minLength": 1
                },
                "expected_occurrences": {
                  "const": 1
                },
                "pre_sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "post_sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              }
            }
          }
        }
      }
    },
    "control_artifacts_excluded_from_replay": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "closing_law": {
      "type": "string",
      "minLength": 1
    }
  }
}
