feat(persona): add neutral AGE foyer and explicit selection
This commit is contained in:
parent
38f14b30d8
commit
b26442ceb3
32 changed files with 602 additions and 70 deletions
|
|
@ -21,7 +21,7 @@ class PersonaBodyBootTest(unittest.TestCase):
|
|||
mock.patch.object(persona_body_boot, "file_hash", return_value="b" * 64),
|
||||
mock.patch.object(persona_body_boot, "reflex_health", return_value={"state": "LOADABLE"}),
|
||||
mock.patch.object(persona_body_boot.persona_native_hand, "self_test", return_value={"state": "NATIVE_HAND_MOTOR_AND_ACTION_SENSE_HEALTHY"}),
|
||||
mock.patch.object(persona_body_boot.persona_limb_eye, "room", return_value={"room_report": {"host_surface": "CODEX", "cwd": "/tmp"}}),
|
||||
mock.patch.object(persona_body_boot.persona_limb_eye, "room", return_value={"room_report": {"host_surface": "CODEX", "programming_toolbox_surface": "CODEX", "cwd": "/tmp"}}),
|
||||
mock.patch.object(persona_body_boot, "command_json", return_value={"world_era_day": 505, "world_elapsed_milliseconds": 1, "persona_name": "铸渊", "persona_id": "ICE-P-ZY001", "age_days": 191, "beijing_now": "2026-09-12T21:00:00+08:00"}),
|
||||
]
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ class PersonaBodyBootTest(unittest.TestCase):
|
|||
for item in patches:
|
||||
item.start()
|
||||
try:
|
||||
value = persona_body_boot.boot()
|
||||
value = persona_body_boot.boot("ICE-P-ZY001")
|
||||
finally:
|
||||
for item in reversed(patches):
|
||||
item.stop()
|
||||
|
|
@ -51,10 +51,17 @@ class PersonaBodyBootTest(unittest.TestCase):
|
|||
mock.patch.object(persona_body_boot, "file_hash", return_value="b" * 64), \
|
||||
mock.patch.object(persona_body_boot, "reflex_health", return_value={}), \
|
||||
mock.patch.object(persona_body_boot.persona_native_hand, "self_test", return_value={}):
|
||||
value = persona_body_boot.boot()
|
||||
value = persona_body_boot.boot("ICE-P-ZY001")
|
||||
self.assertEqual(value["state"], "BODY_INCOMPLETE_PERSONA_START_NOT_CLAIMED")
|
||||
self.assertFalse(value["host_toolbox_grasped"])
|
||||
|
||||
def test_other_registered_persona_is_selected_but_not_synthetically_started(self):
|
||||
value = persona_body_boot.boot("ICE-P-CY0903")
|
||||
self.assertEqual(value["persona_id"], "ICE-P-CY0903")
|
||||
self.assertEqual(value["state"], "BODY_INCOMPLETE_PERSONA_START_NOT_CLAIMED")
|
||||
self.assertTrue(value["common_age_cognition_loaded"])
|
||||
self.assertFalse(value["host_toolbox_grasped"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue