{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://wanxiang.ai/contracts/play-loop/acceptance-provenance.schema.json", "title": "AcceptanceProvenance", "description": "验收入口的来源清单。它逐字段镜像请求身份和修回链,并绑定请求原始字节与本次被测产物。", "type": "object", "required": [ "schemaVersion", "gameId", "briefHash", "genre", "templateRoute", "proofProfileId", "proofRegistryVersion", "taskBindingHash", "sourceArtifactHash", "parentAcceptanceRequestHash", "repairOrdinal", "acceptanceRequestHash", "artifactHash" ], "properties": { "schemaVersion": { "const": "acceptance-provenance/1" }, "gameId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$" }, "briefHash": { "$ref": "#/$defs/sha256" }, "genre": { "enum": ["narrative", "trpg", "heritage", "puzzle", "sim-business"] }, "templateRoute": { "type": "string", "pattern": "^_template-[a-z0-9-]+$" }, "proofProfileId": { "type": "string", "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*$" }, "proofRegistryVersion": { "type": "string", "minLength": 1 }, "taskBindingHash": { "$ref": "#/$defs/sha256" }, "sourceArtifactHash": { "anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] }, "parentAcceptanceRequestHash": { "anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] }, "repairOrdinal": { "enum": [0, 1] }, "acceptanceRequestHash": { "$ref": "#/$defs/sha256" }, "artifactHash": { "$ref": "#/$defs/sha256" } }, "additionalProperties": false, "allOf": [ { "if": { "properties": { "repairOrdinal": { "const": 0 } }, "required": ["repairOrdinal"] }, "then": { "properties": { "sourceArtifactHash": { "type": "null" }, "parentAcceptanceRequestHash": { "type": "null" } } } }, { "if": { "properties": { "repairOrdinal": { "const": 1 } }, "required": ["repairOrdinal"] }, "then": { "properties": { "sourceArtifactHash": { "$ref": "#/$defs/sha256" }, "parentAcceptanceRequestHash": { "$ref": "#/$defs/sha256" } } } } ], "$defs": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }