固化 Match-3 生产者、视觉、音频与双 Judge 证据闭包。 将《山海行纪》r1.1 绑定新的不可变 release,并以生产预检现场核验 bundle、Registry/2 和 25 项 Writer 快照。 同步地图1平衡锁值、跨游戏回归修复、验收契约与 SoT 证据。
323 lines
14 KiB
JSON
323 lines
14 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"$id": "https://wanxiang.ai/contracts/play-loop/playtest-evidence-v3.schema.json",
|
||
"title": "PlaytestEvidenceV3",
|
||
"description": "playtest/3 权威证据。Actor 只选择结构化视觉目标;每掷封存互相致盲的 Judge A/B 与确定性 consensus;只有 finalPostguard 能写最终结果。",
|
||
"type": "object",
|
||
"required": [
|
||
"schemaVersion", "runId", "parentRunId", "gameId", "genre", "templateRoute", "proofProfileId",
|
||
"proofRegistryVersion", "taskBindingHash", "acceptanceRequestHash", "artifactHash", "briefHash",
|
||
"acceptanceMode", "evidenceMode", "phase", "environment", "floor", "actor", "actions", "events",
|
||
"briefRuleMatches", "proofObligations", "firstPlay", "rolls", "merge", "sourceRollId", "judge",
|
||
"repair", "costRmb"
|
||
],
|
||
"properties": {
|
||
"schemaVersion": { "const": "playtest/3" },
|
||
"runId": { "type": "string", "minLength": 1 },
|
||
"parentRunId": { "type": ["string", "null"] },
|
||
"gameId": { "type": "string", "minLength": 1 },
|
||
"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": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"acceptanceRequestHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"artifactHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"briefHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"acceptanceMode": { "enum": ["v3_shadow", "v3", "historical_replay"] },
|
||
"evidenceMode": { "enum": ["native", "legacy-adapted"] },
|
||
"phase": { "enum": ["PRECHECK", "COLLECTING", "JUDGING", "DECIDED"] },
|
||
"outcome": { "$ref": "playtest-evidence.schema.json#/$defs/outcome" },
|
||
"environment": { "$ref": "#/$defs/environmentV3" },
|
||
"floor": { "$ref": "playtest-evidence.schema.json#/$defs/floor" },
|
||
"actor": {
|
||
"anyOf": [
|
||
{ "$ref": "playtest-evidence.schema.json#/$defs/actor" },
|
||
{ "type": "null" }
|
||
]
|
||
},
|
||
"actions": {
|
||
"type": "array",
|
||
"items": { "$ref": "#/$defs/actionRecord" }
|
||
},
|
||
"events": {
|
||
"type": "array",
|
||
"items": { "$ref": "game-event.schema.json" }
|
||
},
|
||
"briefRuleMatches": {
|
||
"type": "array",
|
||
"items": { "type": "string", "minLength": 1 }
|
||
},
|
||
"proofObligations": {
|
||
"type": "array",
|
||
"items": { "$ref": "playtest-evidence.schema.json#/$defs/proofObligation" }
|
||
},
|
||
"firstPlay": { "$ref": "playtest-evidence.schema.json#/$defs/firstPlay" },
|
||
"rolls": {
|
||
"type": "array", "maxItems": 2,
|
||
"items": { "$ref": "#/$defs/roll" }
|
||
},
|
||
"merge": {
|
||
"anyOf": [
|
||
{ "$ref": "playtest-evidence.schema.json#/$defs/merge" },
|
||
{ "type": "null" }
|
||
]
|
||
},
|
||
"sourceRollId": { "type": ["string", "null"], "pattern": "^roll-[12]$" },
|
||
"judge": {
|
||
"anyOf": [
|
||
{ "$ref": "#/$defs/judgeConsensusProjection" },
|
||
{ "type": "null" }
|
||
]
|
||
},
|
||
"repair": { "$ref": "playtest-evidence.schema.json#/$defs/repair" },
|
||
"costRmb": { "type": "number", "minimum": 0 },
|
||
"finalPostguard": { "$ref": "playtest-evidence.schema.json#/$defs/finalPostguard" },
|
||
"decision": { "$ref": "playtest-evidence.schema.json#/$defs/decision" },
|
||
"compatibility": { "$ref": "#/$defs/compatibility" }
|
||
},
|
||
"patternProperties": { "^_": {} },
|
||
"additionalProperties": false,
|
||
"allOf": [
|
||
{
|
||
"if": { "properties": { "phase": { "const": "DECIDED" } }, "required": ["phase"] },
|
||
"then": { "required": ["outcome", "finalPostguard", "decision", "compatibility"] },
|
||
"else": {
|
||
"not": {
|
||
"anyOf": [
|
||
{ "required": ["outcome"] },
|
||
{ "required": ["finalPostguard"] },
|
||
{ "required": ["decision"] },
|
||
{ "required": ["compatibility"] }
|
||
]
|
||
}
|
||
}
|
||
}
|
||
],
|
||
"$defs": {
|
||
"environmentV3": {
|
||
"type": "object",
|
||
"required": ["host", "chromeVersion", "viewport", "buildRef", "virtualTime"],
|
||
"properties": {
|
||
"host": { "type": "string", "minLength": 1 },
|
||
"chromeVersion": { "type": "string", "minLength": 1 },
|
||
"viewport": {
|
||
"type": "object",
|
||
"required": ["width", "height", "dpr"],
|
||
"properties": {
|
||
"width": { "const": 390 },
|
||
"height": { "const": 844 },
|
||
"dpr": { "const": 1 }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"buildRef": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"virtualTime": {
|
||
"type": "object",
|
||
"required": ["mode", "actionQuantumMs", "waitMinMs", "waitMaxMs"],
|
||
"properties": {
|
||
"mode": { "const": "cdp" },
|
||
"actionQuantumMs": { "const": 600 },
|
||
"waitMinMs": { "const": 100 },
|
||
"waitMaxMs": { "const": 600 },
|
||
"rafFrameMs": { "type": "number", "minimum": 1 },
|
||
"bootBoundary": { "type": "object" }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"timings": {
|
||
"type": "object",
|
||
"required": [
|
||
"chromeProcessReadyWallMs", "cdpConnectedWallMs", "browserContextCreatedWallMs",
|
||
"navigationSubmittedWallMs", "runtimeBootedWallMs", "gameInteractiveWallMs"
|
||
],
|
||
"properties": {
|
||
"chromeProcessReadyWallMs": { "type": ["integer", "null"], "minimum": 0 },
|
||
"cdpConnectedWallMs": { "type": ["integer", "null"], "minimum": 0 },
|
||
"browserContextCreatedWallMs": { "type": ["integer", "null"], "minimum": 0 },
|
||
"navigationSubmittedWallMs": { "type": ["integer", "null"], "minimum": 0 },
|
||
"runtimeBootedWallMs": { "type": ["integer", "null"], "minimum": 0 },
|
||
"gameInteractiveWallMs": { "type": ["integer", "null"], "minimum": 0 }
|
||
},
|
||
"additionalProperties": false
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"hashRef": {
|
||
"type": "object",
|
||
"required": ["ref", "hash"],
|
||
"properties": {
|
||
"ref": { "type": "string", "minLength": 1 },
|
||
"hash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"actionRecord": {
|
||
"type": "object",
|
||
"required": [
|
||
"actionId", "request", "normalized", "targetResolution", "valid", "retryCount",
|
||
"preFrameRef", "preEventSeq", "dispatchReceipt", "virtualTimeBudgetMs", "timeAdvance",
|
||
"postFrameRef", "postEventSeq", "protocolErrors"
|
||
],
|
||
"properties": {
|
||
"actionId": { "type": "string", "pattern": "^action-[1-9][0-9]*$" },
|
||
"request": {
|
||
"type": "object",
|
||
"required": ["raw", "parsed"],
|
||
"properties": {
|
||
"raw": { "type": "string", "minLength": 1 },
|
||
"parsed": { "$ref": "actor-selection.schema.json" }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"normalized": { "$ref": "playtest-evidence.schema.json#/$defs/action" },
|
||
"targetResolution": { "$ref": "target-resolution.schema.json" },
|
||
"valid": { "const": true },
|
||
"retryCount": { "type": "integer", "minimum": 0, "maximum": 2 },
|
||
"preFrameRef": { "$ref": "playtest-evidence.schema.json#/$defs/frameRef" },
|
||
"preEventSeq": { "type": "integer", "minimum": 0 },
|
||
"dispatchReceipt": { "$ref": "playtest-evidence.schema.json#/$defs/dispatchReceipt" },
|
||
"virtualTimeBudgetMs": { "type": "integer", "minimum": 100, "maximum": 600 },
|
||
"timeAdvance": { "$ref": "playtest-evidence.schema.json#/$defs/timeAdvance" },
|
||
"postFrameRef": { "$ref": "playtest-evidence.schema.json#/$defs/frameRef" },
|
||
"postEventSeq": { "type": "integer", "minimum": 0 },
|
||
"protocolErrors": {
|
||
"type": "array",
|
||
"maxItems": 2,
|
||
"items": { "type": "string", "minLength": 1 }
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"roll": {
|
||
"type": "object",
|
||
"required": [
|
||
"rollId", "roll", "requestedGameSeed", "actualGameSeed", "policySeed", "actorSessionId",
|
||
"proofPackageRef", "proofPackageHash", "judgePackageRef", "judgePackageHash",
|
||
"judgeARef", "judgeAHash", "judgeBRef", "judgeBHash", "judgeConsensusRef",
|
||
"judgeConsensusHash", "costReservationRef", "costReservationHash",
|
||
"rollGuard", "rollOutcome", "errors", "costRmb"
|
||
],
|
||
"properties": {
|
||
"rollId": { "type": "string", "pattern": "^roll-[12]$" },
|
||
"roll": { "type": "integer", "minimum": 1, "maximum": 2 },
|
||
"requestedGameSeed": { "type": "integer", "minimum": 0 },
|
||
"actualGameSeed": { "type": "integer", "minimum": 0 },
|
||
"policySeed": { "type": "integer", "minimum": 0 },
|
||
"actorSessionId": { "type": "string", "minLength": 1 },
|
||
"proofPackageRef": { "type": "string", "minLength": 1 },
|
||
"proofPackageHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"judgePackageRef": { "type": "string", "minLength": 1 },
|
||
"judgePackageHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"judgeARef": { "$ref": "#/$defs/judgeSlotRef" },
|
||
"judgeAHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"judgeBRef": { "$ref": "#/$defs/judgeSlotRef" },
|
||
"judgeBHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"judgeConsensusRef": { "type": "string", "minLength": 1 },
|
||
"judgeConsensusHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"costReservationRef": { "type": "string", "minLength": 1 },
|
||
"costReservationHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"rollGuard": { "$ref": "playtest-evidence.schema.json#/$defs/guard" },
|
||
"rollOutcome": { "$ref": "playtest-evidence.schema.json#/$defs/outcome" },
|
||
"errors": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
||
"costRmb": { "type": "number", "minimum": 0 }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"judgeSlotRef": {
|
||
"type": "object",
|
||
"required": ["rawRef", "rawHash", "parsedRef", "parsedHash", "normalizedRef", "resultHash"],
|
||
"properties": {
|
||
"rawRef": { "type": "string", "minLength": 1 },
|
||
"rawHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"parsedRef": { "type": "string", "minLength": 1 },
|
||
"parsedHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"normalizedRef": { "type": "string", "minLength": 1 },
|
||
"resultHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"independenceChecks": {
|
||
"type": "object",
|
||
"required": [
|
||
"differentLogicalClient", "differentSession", "differentPolicySeed", "differentPromptArtifact",
|
||
"differentEvidenceDir", "differentRawFile", "sameJudgePackage", "sameImageManifest", "sameModel"
|
||
],
|
||
"properties": {
|
||
"differentLogicalClient": { "const": true },
|
||
"differentSession": { "const": true },
|
||
"differentPolicySeed": { "const": true },
|
||
"differentPromptArtifact": { "const": true },
|
||
"differentEvidenceDir": { "const": true },
|
||
"differentRawFile": { "const": true },
|
||
"sameJudgePackage": { "const": true },
|
||
"sameImageManifest": { "const": true },
|
||
"sameModel": { "type": "boolean" }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"consensusObligation": {
|
||
"type": "object",
|
||
"required": ["id", "status", "sequenceRefs", "evidenceRefs"],
|
||
"properties": {
|
||
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*$" },
|
||
"status": { "enum": ["satisfied", "failed", "missing", "contradicted", "disputed"] },
|
||
"sequenceRefs": {
|
||
"type": "array",
|
||
"items": { "$ref": "playtest-evidence.schema.json#/$defs/sequenceRef" }
|
||
},
|
||
"evidenceRefs": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"judgeConsensusProjection": {
|
||
"type": "object",
|
||
"required": [
|
||
"schemaVersion", "sourceRollId", "consensusRef", "consensusHash", "packageHash",
|
||
"strategyVersion", "decision", "degraded", "sameModel", "independenceChecks",
|
||
"judgeAResultHash", "judgeBResultHash", "obligationResults", "conflicts", "failureSignature"
|
||
],
|
||
"properties": {
|
||
"schemaVersion": { "const": "JudgeConsensus/1" },
|
||
"sourceRollId": { "type": ["string", "null"], "pattern": "^roll-[12]$" },
|
||
"consensusRef": { "type": ["string", "null"], "minLength": 1 },
|
||
"consensusHash": {
|
||
"anyOf": [
|
||
{ "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
{ "type": "null" }
|
||
]
|
||
},
|
||
"packageHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"strategyVersion": { "type": "string", "minLength": 1 },
|
||
"decision": { "$ref": "playtest-evidence.schema.json#/$defs/outcome" },
|
||
"degraded": { "type": "boolean" },
|
||
"sameModel": { "type": "boolean" },
|
||
"independenceChecks": { "$ref": "#/$defs/independenceChecks" },
|
||
"judgeAResultHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"judgeBResultHash": { "$ref": "playtest-evidence.schema.json#/$defs/sha256" },
|
||
"obligationResults": {
|
||
"type": "array",
|
||
"items": { "$ref": "#/$defs/consensusObligation" }
|
||
},
|
||
"conflicts": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
||
"failureSignature": { "type": ["string", "null"] }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"compatibility": {
|
||
"type": "object",
|
||
"required": ["accepted", "ok", "acceptanceVersion", "publishFrozen", "schemaVersion", "sourceRollId"],
|
||
"properties": {
|
||
"accepted": { "type": "boolean" },
|
||
"ok": { "type": "boolean" },
|
||
"acceptanceVersion": { "enum": ["v3_shadow", "v3", "historical_replay"] },
|
||
"publishFrozen": { "type": "boolean" },
|
||
"schemaVersion": { "const": "playtest/3" },
|
||
"sourceRollId": { "type": ["string", "null"], "pattern": "^roll-[12]$" }
|
||
},
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
}
|