P18-01-CODE: 原本関係モデル・旧値保全・Runtime保存と読取経路

This commit is contained in:
Agent Control Runner
2026-10-15 20:58:05 +09:00
parent b7a7cc01d4
commit 265ce30f81
6 changed files with 138 additions and 3 deletions
+9 -1
View File
@@ -517,9 +517,17 @@ func _parse_snapshot(snapshot: Dictionary) -> Dictionary:
for raw_candidate: Variant in raw_candidates:
if not raw_candidate is Dictionary:
return {&"ok": false, &"error": "Threshold candidate is malformed."}
for key: String in ["candidate_id", "relationship_id"]:
for key: String in ["candidate_id", "relationship_id", "metric_id"]:
if not (raw_candidate.get(key) is String or raw_candidate.get(key) is StringName):
return {&"ok": false, &"error": "Threshold candidate identity type is invalid."}
if not raw_candidate.get("deduplication_key") is String or not raw_candidate.get("threshold") is int or not raw_candidate.get("created_at") is int or not raw_candidate.get("requires_unlock_event") is bool:
return {&"ok": false, &"error": "Threshold candidate field type is invalid."}
var actors: Variant = raw_candidate.get("actor_ids")
if not actors is Array or actors.size() != 2:
return {&"ok": false, &"error": "Threshold candidate actor collection is invalid."}
for actor: Variant in actors:
if not (actor is String or actor is StringName):
return {&"ok": false, &"error": "Threshold candidate actor type is invalid."}
var candidate: Dictionary = raw_candidate.duplicate(true)
var candidate_id := StringName(candidate.get(&"candidate_id", candidate.get("candidate_id", "")))
var relationship_id := StringName(candidate.get(&"relationship_id", candidate.get("relationship_id", "")))