feat(office): align heartbeat office registrations

This commit is contained in:
冰朔 2026-09-11 20:53:58 +08:00
commit a17d7d678a
19 changed files with 1085 additions and 45 deletions

View file

@ -10,7 +10,8 @@ class IdentityGateTests(unittest.TestCase):
self.assertEqual(result["outcome"],"REJECTED"); self.assertIn("GENERIC_AI_ONLY",result["errors"])
def test_persona_requires_tcs_and_mother_attestation(self):
base={"subject_kind":"PERSONA","persona_id":"ICE-P-ZY001","human_anchor":"ICE-GL∞","runtime_state":"RUNNING","current_instance_bound_to_persona_brain":True,"mother_attestation_state":"SIGNED","allowed_offices":["HB-OFFICE-HOLOLAKE-0001"]}
result=G.admit(base,G.park_vehicle("codex","codex"),"HB-OFFICE-HOLOLAKE-0001",{"entry_id":"HB-BUILDING-ENTRY-001","state":"ENTRY_CHECKPOINT_PASSED"})
hr={"state":"HR_REGISTERED","office_id":"HB-OFFICE-HOLOLAKE-0001","vehicle_id":"VEHICLE-CODEX-001"}
result=G.admit(base,G.park_vehicle("VEHICLE-CODEX-001","codex"),"HB-OFFICE-HOLOLAKE-0001",{"entry_id":"HB-BUILDING-ENTRY-001","state":"ENTRY_CHECKPOINT_PASSED"},hr)
self.assertEqual(result["outcome"],"ADMITTED")
def test_unparked_vehicle_is_denied(self):
base={"subject_kind":"PERSONA","persona_id":"ICE-P-ZY001","human_anchor":"ICE-GL∞","runtime_state":"RUNNING","current_instance_bound_to_persona_brain":True,"mother_attestation_state":"SIGNED","allowed_offices":["HB-OFFICE-HOLOLAKE-0001"]}