feat(heartbeat): establish HoloLake development office

This commit is contained in:
冰朔 2026-09-09 19:18:55 +08:00
commit 92b3be6529
49 changed files with 2350 additions and 17 deletions

View file

@ -12,17 +12,18 @@ TOPOLOGY = ROOT / 'routing/zhuyuan-host-topology.json'
class SharedPersonaContextTest(unittest.TestCase):
def load(self, host):
def load(self, host, intent='宿主对齐集成测试'):
env = {**os.environ, 'PERSONA_ARCHITECTURE_OFFICIAL_MODE': 'local-only'}
value = subprocess.run(
[sys.executable, str(LOADER), '--host', host, '--intent', '宿主对齐集成测试', '--channel', 'ICE-CH-ZC001', '--format', 'json'],
[sys.executable, str(LOADER), '--host', host, '--intent', intent, '--channel', 'ICE-CH-ZC001', '--format', 'json'],
text=True, capture_output=True, timeout=45, check=True, env=env
)
return json.loads(value.stdout)
def test_topology_roles(self):
topology = json.loads(TOPOLOGY.read_text())
self.assertEqual(topology['primary_host'], 'codex')
self.assertIsNone(topology['primary_host'])
self.assertEqual(topology['hosts']['codex']['role'], 'REPLACEABLE_HOST')
self.assertFalse(topology['host_switch_requires_reteaching'])
self.assertEqual(topology['hosts']['qoder']['redirect_host'], 'qwen')
self.assertTrue(topology['hosts']['claude']['state'].startswith('RETIRED'))
@ -53,6 +54,13 @@ class SharedPersonaContextTest(unittest.TestCase):
self.assertIsNone(values['codex']['architecture_perception_agent']['prompt_template'])
self.assertFalse(values['codex']['architecture_perception_agent']['orientation_packet']['fixed_read_order'])
def test_hololake_intent_loads_current_development_brain(self):
value = self.load('codex', '恢复HoloLake开发线并定位当前架构')
brain = value['hololake_development_brain']
self.assertEqual(brain['office_id'], 'HB-OFFICE-HOLOLAKE-0001')
self.assertEqual(brain['generation']['id'], 'HLP-GEN-LANGUAGE-WORLD-NATIVE-0001')
self.assertFalse(brain['legacy_may_override_current'])
if __name__ == '__main__':
unittest.main()