Cai
8 days ago 2fbc2b9ee0dfcf211f57b04769b7694d539d7312
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "SHARED_CONTENT_POSTCOMMIT_ARCHIVE_CONFIG_V1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "identity", "roots", "expected", "test_control"],
  "properties": {
    "schema_version": {"const": "SHARED_CONTENT_POSTCOMMIT_ARCHIVE_CONFIG_V1"},
    "identity": {
      "type": "object",
      "additionalProperties": false,
      "required": ["task_id", "case_id", "batch_id", "run_id", "attempt_id", "archive_id", "operator", "archive_gate_audit_id"],
      "properties": {
        "task_id": {"type": "string", "minLength": 1},
        "case_id": {"type": "string", "minLength": 1},
        "batch_id": {"type": "string", "minLength": 1},
        "run_id": {"type": "string", "minLength": 1},
        "attempt_id": {"type": "string", "minLength": 1},
        "archive_id": {"type": "string", "minLength": 1},
        "operator": {"type": "string", "minLength": 1},
        "archive_gate_audit_id": {"type": "string", "pattern": "^AUDIT-"}
      }
    },
    "roots": {
      "type": "object",
      "additionalProperties": false,
      "required": ["operation_root", "resolved_root", "publisher_config_path", "source_root", "target_root", "receipt_root", "legacy_map_path"],
      "properties": {
        "operation_root": {"type": "string", "minLength": 3},
        "resolved_root": {"type": "string", "minLength": 3},
        "publisher_config_path": {"$ref": "#/$defs/relativePath"},
        "source_root": {"$ref": "#/$defs/relativePath"},
        "target_root": {"$ref": "#/$defs/relativePath"},
        "receipt_root": {"$ref": "#/$defs/relativePath"},
        "legacy_map_path": {"$ref": "#/$defs/relativePath"}
      }
    },
    "expected": {
      "type": "object",
      "additionalProperties": false,
      "required": ["publisher_config_bytes", "publisher_config_sha256", "legacy_map_bytes", "legacy_map_sha256", "row_count", "source_set_sha256", "canonical_set_sha256"],
      "properties": {
        "publisher_config_bytes": {"type": "integer", "minimum": 1},
        "publisher_config_sha256": {"$ref": "#/$defs/sha256"},
        "legacy_map_bytes": {"type": "integer", "minimum": 1},
        "legacy_map_sha256": {"$ref": "#/$defs/sha256"},
        "row_count": {"type": "integer", "minimum": 1},
        "source_set_sha256": {"$ref": "#/$defs/sha256"},
        "canonical_set_sha256": {"$ref": "#/$defs/sha256"}
      }
    },
    "test_control": {
      "type": "object",
      "additionalProperties": false,
      "required": ["environment", "fault"],
      "properties": {
        "environment": {"enum": ["PRODUCTION", "ISOLATED_TEST"]},
        "fault": {"enum": ["NONE", "INTERRUPT_AFTER_RECEIPT_ROOT", "INTERRUPT_AFTER_CONTRACT", "INTERRUPT_AFTER_MAP", "INTERRUPT_AFTER_ANCHOR", "INTERRUPT_BEFORE_RENAME", "INTERRUPT_AFTER_RENAME", "INTERRUPT_AFTER_TERMINAL_TEMP"]}
      }
    }
  },
  "$defs": {
    "sha256": {"type": "string", "pattern": "^[0-9A-F]{64}$"},
    "relativePath": {"type": "string", "minLength": 1, "pattern": "^(?![A-Za-z]:)(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"}
  }
}