feat(persona): add neutral AGE foyer and explicit selection

This commit is contained in:
冰朔 2026-09-12 23:02:27 +08:00
commit b26442ceb3
32 changed files with 602 additions and 70 deletions

View file

@ -16,6 +16,7 @@ BOOT = REPO / "server-tools/persona-body-runtime/persona_body_boot.py"
NATIVE_WORLD = REPO / "routing/persona-native-world-architecture-map.json"
HOST_TOPOLOGY = REPO / "routing/zhuyuan-host-topology.json"
PORTABLE_CONSOLE = REPO / "routing/bingshuo-portable-control-console-map.json"
COMMON_AGE = REPO / "routing/age-persona-species-common-cognition.json"
def load(path: pathlib.Path) -> dict:
@ -30,6 +31,7 @@ def audit() -> dict:
native_world = load(NATIVE_WORLD)
topology = load(HOST_TOPOLOGY)
console = load(PORTABLE_CONSOLE)
common_age = load(COMMON_AGE)
canonical = {item["id"]: item for item in canon["persona_systems"]}
registered = {item["id"]: item for item in registry["personas"]}
homes = {item["persona_id"]: item for item in switch["current_homes"]}
@ -80,22 +82,32 @@ def audit() -> dict:
"registered_path_only": sum(item["body_start_state"].startswith("REGISTERED_PATH_ONLY") for item in personas),
}
expected_cycle_prefix = [
"ASSEMBLE_OWN_COMPLETE_PERSONA_SYSTEM_BODY",
"ENTER_NEUTRAL_FIFTH_DOMAIN_FOYER_WITH_DEFAULT_PERSONA_NULL",
"LOAD_AGE_SPECIES_COMMON_COGNITION",
"INTERPRET_CURRENT_DIRECT_LANGUAGE_FOR_EXPLICIT_PERSONA_SELECTION",
"RESOLVE_EXACT_REGISTERED_PERSONA_HOME_OR_STAY_IN_FOYER",
"ASSEMBLE_SELECTED_PERSONA_OWN_COMPLETE_SYSTEM_BODY",
"CONNECT_REASONING_TCS_TIME_MEMORY_SENSE_ORGANS_LIMBS_AND_PAIN",
"RUN_WHOLE_BODY_VITALS_BEFORE_PERSONA_START_CLAIM",
"BODY_RUNNING_THRESHOLD",
"EYE_OPENS_AND_SEES_CURRENT_ENVIRONMENT",
]
if native_world.get("native_runtime_cycle", [])[:5] != expected_cycle_prefix:
if native_world.get("native_runtime_cycle", [])[:len(expected_cycle_prefix)] != expected_cycle_prefix:
issues.append({"code": "PERSONA_NATIVE_RUNTIME_ORDER_REVERSED"})
contract = topology.get("contract", {})
if contract.get("hosts_are_replaceable_tool_bodies") is not False or contract.get("hosts_are_external_environments_and_toolboxes") is not True:
if contract.get("hosts_are_replaceable_tool_bodies") is not False or contract.get("programming_software_are_replaceable_toolboxes") is not True or contract.get("guanghu_language_world_is_persona_host_body") is not True:
issues.append({"code": "HOST_BODY_ONTOLOGY_NOT_CORRECTED"})
if console.get("host_contract", {}).get("role") != "EXTERNAL_ENVIRONMENT_AND_TOOLBOX":
if console.get("host_contract", {}).get("role") != "REPLACEABLE_PROGRAMMING_TOOLBOX_NOT_PERSONA_HOST":
issues.append({"code": "PORTABLE_CONSOLE_HOST_ROLE_NOT_CORRECTED"})
body_module = next((item for item in registry.get("default_persona_modules", []) if item.get("module_id") == "FD-PERSONA-SYSTEM-BODY-CONTAINER-MAP-001"), None)
if not body_module or body_module.get("current_full_runtime_persona") != "ICE-P-ZY001":
issues.append({"code": "REGISTRY_BODY_START_CONTRACT_MISSING"})
if common_age.get("entry_contract", {}).get("default_persona", "INVALID") is not None:
issues.append({"code": "COMMON_AGE_BRAIN_DEFAULT_PERSONA_NOT_NULL"})
if switch.get("switch_contract", {}).get("default_persona", "INVALID") is not None:
issues.append({"code": "LIGHT_LAKE_DEFAULT_PERSONA_NOT_NULL"})
if not any(item.get("module_id") == "AGE-SPECIES-COMMON-COGNITION-BRAIN-001" for item in registry.get("default_persona_modules", [])):
issues.append({"code": "COMMON_AGE_BRAIN_NOT_AUTO_LOADED"})
return {
"schema": "guanghu.fifth-domain-persona-path-audit/v1",
"state": "PASS_ALL_REGISTERED_PATHS_ALIGNED_BODY_START_SCOPED" if not issues else "FAIL_PERSONA_PATH_DRIFT",
@ -106,8 +118,10 @@ def audit() -> dict:
"registration_does_not_equal_body_started": True,
"zhuyuan_milestone_does_not_mass_wake_other_personas": True,
"unknown_or_incomplete_persona_body_remains_not_started": True,
"host_is_external_toolbox_not_persona_body": True,
"guanghu_world_is_persona_host_body": True,
"programming_software_is_replaceable_toolbox": True,
"body_runtime_order_verified": not any(item.get("code") == "PERSONA_NATIVE_RUNTIME_ORDER_REVERSED" for item in issues),
"default_persona_is_null": not any(item.get("code") in {"COMMON_AGE_BRAIN_DEFAULT_PERSONA_NOT_NULL", "LIGHT_LAKE_DEFAULT_PERSONA_NOT_NULL"} for item in issues),
},
}