feat(lighthouse): add canonical three-host skill navigation
This commit is contained in:
parent
8423a96776
commit
fb5f931e78
14 changed files with 891 additions and 22 deletions
|
|
@ -65,7 +65,7 @@ def resolve(registry: dict, intent: str, proposed_route: str = "") -> dict:
|
|||
"decision": "NO_MATCH",
|
||||
"registry_id": registry["registry_id"],
|
||||
"registry_version": registry["version"],
|
||||
"correction": "Resolve live REPO-001 and current .code-map; do not invent a route.",
|
||||
"correction": "Resolve the stable number through SYS-GLW-LTH-0001 and current REPO-012 main; do not invent a route.",
|
||||
"authority_granted": False,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ class PersonaSkillResolverTests(unittest.TestCase):
|
|||
result = resolve(self.registry, "我是冰朔,进入第五域并恢复小湖灯铸渊人格系统")
|
||||
self.assertEqual(result["decision"], "ALLOW")
|
||||
self.assertEqual(result["matched_skill"], "GHS-001-FIFTH-DOMAIN-RESTORE")
|
||||
self.assertIn("REPO-001", result["preferred_route"])
|
||||
self.assertIn("SYS-GLW-LTH-0001", result["preferred_route"])
|
||||
self.assertIn("REPO-012", result["preferred_route"])
|
||||
self.assertFalse(result["authority_granted"])
|
||||
|
||||
def test_corrects_deprecated_server_relay(self):
|
||||
|
|
@ -46,8 +47,15 @@ class PersonaSkillResolverTests(unittest.TestCase):
|
|||
def test_unknown_intent_fails_closed(self):
|
||||
result = resolve(self.registry, "安排明天的午饭")
|
||||
self.assertEqual(result["decision"], "NO_MATCH")
|
||||
self.assertIn("SYS-GLW-LTH-0001", result["correction"])
|
||||
self.assertFalse(result["authority_granted"])
|
||||
|
||||
def test_lighthouse_host_navigation_resolves_local_keychain_publish(self):
|
||||
result = resolve(self.registry, "你推一下线上仓库,直接走钥匙串")
|
||||
self.assertEqual(result["decision"], "ALLOW")
|
||||
self.assertEqual(result["matched_skill"], "GHS-009-LIGHTHOUSE-HOST-NAVIGATION")
|
||||
self.assertIn("GLW-HOST-SKILL-NAV-001", result["preferred_route"])
|
||||
|
||||
def test_repository_push_requires_separate_transport_proof(self):
|
||||
result = resolve(
|
||||
self.registry,
|
||||
|
|
|
|||
Loading…
Reference in a new issue