{
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$id": "SHARED_CONTENT_PUBLISHER_CONFIG_V2",
|
"type": "object",
|
"additionalProperties": false,
|
"required": ["schema_version", "identity", "roots", "expected", "commit", "test_control"],
|
"$defs": {
|
"sha256": {"type": "string", "pattern": "^[0-9A-F]{64}$"},
|
"releaseId": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
"positiveInt": {"type": "integer", "minimum": 1},
|
"relativePath": {"type": "string", "minLength": 1, "pattern": "^(?![/\\\\])(?!.*(?:^|[/\\\\])\\.\\.?($|[/\\\\])).+$"},
|
"formalRow": {
|
"type": "object",
|
"additionalProperties": false,
|
"required": ["member_id", "formal_relative_path", "artifact_type", "bytes", "sha256"],
|
"properties": {
|
"member_id": {"type": "string", "minLength": 1},
|
"formal_relative_path": {"$ref": "#/$defs/relativePath"},
|
"artifact_type": {"type": "string", "minLength": 1},
|
"bytes": {"$ref": "#/$defs/positiveInt"},
|
"sha256": {"$ref": "#/$defs/sha256"}
|
}
|
},
|
"artifactRow": {
|
"type": "object",
|
"additionalProperties": false,
|
"required": ["member_id", "relative_path", "formal_relative_path", "artifact_type", "commit_role", "bytes", "sha256"],
|
"properties": {
|
"member_id": {"type": "string", "minLength": 1},
|
"relative_path": {"$ref": "#/$defs/relativePath"},
|
"formal_relative_path": {"$ref": "#/$defs/relativePath"},
|
"artifact_type": {"type": "string", "minLength": 1},
|
"commit_role": {"enum": ["RELEASE_MEMBER", "CASE_CURRENT_INDEX"]},
|
"bytes": {"$ref": "#/$defs/positiveInt"},
|
"sha256": {"$ref": "#/$defs/sha256"}
|
}
|
},
|
"historyRow": {
|
"type": "object",
|
"additionalProperties": false,
|
"required": ["relative_path", "bytes", "sha256"],
|
"properties": {
|
"relative_path": {"$ref": "#/$defs/relativePath"},
|
"bytes": {"$ref": "#/$defs/positiveInt"},
|
"sha256": {"$ref": "#/$defs/sha256"}
|
}
|
},
|
"check": {
|
"type": "object",
|
"additionalProperties": false,
|
"required": ["relative_path", "required_utf8_substrings"],
|
"properties": {
|
"relative_path": {"$ref": "#/$defs/relativePath"},
|
"required_utf8_substrings": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}
|
}
|
}
|
},
|
"properties": {
|
"schema_version": {"const": "SHARED_CONTENT_PUBLISHER_CONFIG_V2"},
|
"identity": {
|
"type": "object",
|
"additionalProperties": false,
|
"required": ["industry", "task_id", "case_id", "batch_id", "run_id", "attempt_id", "canonical_audit_id", "review_handoff_id", "release_id", "prior_release_id", "candidate_release_set_sha256", "operator"],
|
"properties": {
|
"industry": {"type": "string", "minLength": 1},
|
"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},
|
"canonical_audit_id": {"type": "string", "pattern": "^AUDIT-"},
|
"review_handoff_id": {"type": "string", "pattern": "^HANDOFF-"},
|
"release_id": {"$ref": "#/$defs/releaseId"},
|
"prior_release_id": {"$ref": "#/$defs/releaseId"},
|
"candidate_release_set_sha256": {"$ref": "#/$defs/sha256"},
|
"operator": {"type": "string", "minLength": 1}
|
}
|
},
|
"roots": {
|
"type": "object",
|
"additionalProperties": false,
|
"required": ["operation_root", "resolved_root", "volume_identity", "candidate_root", "release_store_root", "case_current_index_path", "result_current_index_path", "ledger_path", "lock_path", "attempt_receipt_root", "history_root", "current_state_relative_path"],
|
"properties": {
|
"operation_root": {"type": "string", "minLength": 1},
|
"resolved_root": {"type": "string", "minLength": 1},
|
"volume_identity": {"type": "string", "minLength": 1},
|
"candidate_root": {"$ref": "#/$defs/relativePath"},
|
"release_store_root": {"$ref": "#/$defs/relativePath"},
|
"case_current_index_path": {"$ref": "#/$defs/relativePath"},
|
"result_current_index_path": {"$ref": "#/$defs/relativePath"},
|
"ledger_path": {"$ref": "#/$defs/relativePath"},
|
"lock_path": {"$ref": "#/$defs/relativePath"},
|
"attempt_receipt_root": {"$ref": "#/$defs/relativePath"},
|
"history_root": {"$ref": "#/$defs/relativePath"},
|
"current_state_relative_path": {"$ref": "#/$defs/relativePath"}
|
}
|
},
|
"expected": {
|
"type": "object",
|
"additionalProperties": false,
|
"required": ["ledger", "candidate", "prior", "history", "case_current_index", "result_current_index", "current_state"],
|
"properties": {
|
"ledger": {
|
"type": "object", "additionalProperties": false,
|
"required": ["bytes", "sha256", "next_event_seq", "next_attempt_seq", "prior_attempt_id", "prior_terminal_state"],
|
"properties": {
|
"bytes": {"$ref": "#/$defs/positiveInt"}, "sha256": {"$ref": "#/$defs/sha256"},
|
"next_event_seq": {"$ref": "#/$defs/positiveInt"}, "next_attempt_seq": {"$ref": "#/$defs/positiveInt"},
|
"prior_attempt_id": {"type": "string", "minLength": 1}, "prior_terminal_state": {"type": "string", "minLength": 1}
|
}
|
},
|
"candidate": {
|
"type": "object", "additionalProperties": false,
|
"required": ["manifest_relative_path", "manifest_bytes", "manifest_sha256", "current_manifest_relative_path", "current_manifest_bytes", "current_manifest_sha256", "manifest_self_formal_relative_path", "rows", "link_checks", "evidence_checks"],
|
"properties": {
|
"manifest_relative_path": {"$ref": "#/$defs/relativePath"},
|
"manifest_bytes": {"$ref": "#/$defs/positiveInt"}, "manifest_sha256": {"$ref": "#/$defs/sha256"},
|
"current_manifest_relative_path": {"$ref": "#/$defs/relativePath"},
|
"current_manifest_bytes": {"$ref": "#/$defs/positiveInt"}, "current_manifest_sha256": {"$ref": "#/$defs/sha256"},
|
"manifest_self_formal_relative_path": {"$ref": "#/$defs/relativePath"},
|
"rows": {"type": "array", "minItems": 2, "items": {"$ref": "#/$defs/artifactRow"}},
|
"link_checks": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/check"}},
|
"evidence_checks": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/check"}}
|
}
|
},
|
"prior": {
|
"type": "object", "additionalProperties": false,
|
"required": ["release_id", "manifest_formal_relative_path", "manifest_bytes", "manifest_sha256", "manifest_self_formal_relative_path", "release_set_sha256", "rows"],
|
"properties": {
|
"release_id": {"$ref": "#/$defs/releaseId"},
|
"manifest_formal_relative_path": {"$ref": "#/$defs/relativePath"},
|
"manifest_bytes": {"$ref": "#/$defs/positiveInt"}, "manifest_sha256": {"$ref": "#/$defs/sha256"},
|
"manifest_self_formal_relative_path": {"$ref": "#/$defs/relativePath"},
|
"release_set_sha256": {"$ref": "#/$defs/sha256"},
|
"rows": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/formalRow"}}
|
}
|
},
|
"history": {
|
"type": "object", "additionalProperties": false,
|
"required": ["rows", "minimum_long_paths", "long_path_threshold"],
|
"properties": {
|
"rows": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/historyRow"}},
|
"minimum_long_paths": {"type": "integer", "minimum": 0},
|
"long_path_threshold": {"$ref": "#/$defs/positiveInt"}
|
}
|
},
|
"case_current_index": {
|
"type": "object", "additionalProperties": false,
|
"required": ["bytes", "sha256", "required_utf8_substrings"],
|
"properties": {
|
"bytes": {"$ref": "#/$defs/positiveInt"}, "sha256": {"$ref": "#/$defs/sha256"},
|
"required_utf8_substrings": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}
|
}
|
},
|
"result_current_index": {
|
"type": "object", "additionalProperties": false,
|
"required": ["member_id", "formal_relative_path", "artifact_type", "bytes", "sha256", "required_utf8_substrings"],
|
"properties": {
|
"member_id": {"type": "string", "minLength": 1}, "formal_relative_path": {"$ref": "#/$defs/relativePath"},
|
"artifact_type": {"type": "string", "minLength": 1}, "bytes": {"$ref": "#/$defs/positiveInt"},
|
"sha256": {"$ref": "#/$defs/sha256"},
|
"required_utf8_substrings": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}
|
}
|
},
|
"current_state": {
|
"type": "object", "additionalProperties": false,
|
"required": ["bytes", "sha256", "semantic_field", "semantic_value", "status_field", "status_value", "exit_code_field", "exit_code_value"],
|
"properties": {
|
"bytes": {"$ref": "#/$defs/positiveInt"}, "sha256": {"$ref": "#/$defs/sha256"},
|
"semantic_field": {"type": "string", "minLength": 1}, "semantic_value": {},
|
"status_field": {"type": "string", "minLength": 1}, "status_value": {},
|
"exit_code_field": {"type": "string", "minLength": 1}, "exit_code_value": {}
|
}
|
}
|
}
|
},
|
"commit": {
|
"type": "object", "additionalProperties": false,
|
"required": ["strategy", "target_release_relative_path", "staging_relative_path"],
|
"properties": {
|
"strategy": {"const": "MARKDOWN_CURRENT_INDEX_REPLACE_V1"},
|
"target_release_relative_path": {"$ref": "#/$defs/relativePath"},
|
"staging_relative_path": {"$ref": "#/$defs/relativePath"}
|
}
|
},
|
"test_control": {
|
"type": "object", "additionalProperties": false,
|
"required": ["environment", "fault", "race_marker_relative_path"],
|
"properties": {
|
"environment": {"enum": ["PRODUCTION", "ISOLATED_TEST"]},
|
"fault": {"enum": ["NONE", "POSTCOMMIT_READBACK_FAIL", "EXTRA_TARGET_AFTER_RENAME", "PAUSE_AFTER_LOCK"]},
|
"race_marker_relative_path": {"type": "string"}
|
}
|
}
|
}
|
}
|