fix(hub): decision answers wake their agent as a radio call
🧪 Test / 🧪 Lock + lint (push) Canceled after 0s

Answers to decision rows and to MCP choice cards went to the agent as a
post, which it reads only when its turn ends, so the operator got no
direct feedback. They now go as a passkey-signed call that wakes the agent
at once; the card, the Match note, the decision_wait description and the
operator checks say so. Four passkey hint texts are reworded so MEDUSA's
excessive-agency rules no longer read them as agents handing out keys.

🎯 Fix: 92 %
💥 Break: 4 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 88
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-24 15:42:06 +00:00
1 parent a667ac485a
commit ad03188335
11 files changed
+26 -25

No files matched your search

+3 -3
View File
@@ -212,7 +212,7 @@ class TestHubInbox(base.OrchestratorE2ECase):
def answered(self, result: dict, signs: bool) -> None:
self.assertNotIn("error", result)
self.assertEqual((result["title"], result["asked"], result["closed"], result["tall"], result["wide"]), ("Wait: your passkey signs this answer, a post to Stage", 1, [False, 0], False, False))
self.assertEqual((result["title"], result["asked"], result["closed"], result["tall"], result["wide"]), ("Wait: Stage gets this answer as a call once your passkey signs it", 1, [False, 0], False, False))
signed = [["/api/sign", ["items"], None, None]]
self.assertEqual(result["posted"], [*signed, ["/api/inbox/approve", ["items", "proof"], None, None]] if signs else signed)
self.assertTrue((result["toast"] or "").startswith("Choice: Wait" + ("" if signs else ": not signed")), result)
@@ -268,8 +268,8 @@ class TestHubInbox(base.OrchestratorE2ECase):
state = self.tool("decision_wait", {"id": decision, "timeout_seconds": 0})["structuredContent"]
self.assertEqual((state["status"], state["choice"], state["answer"]), ("decided", "Wait", f"Choice for decision {decision} ({questions[width]}): Wait"))
found = self.tool("operator_message", {"id": state["message"], "text": state["answer"], "to": "Stage"})["structuredContent"]
self.assertEqual((found["match"], found["class"], found["to"]), (True, "post", "Stage"))
self.assertIn(["post", "--to", "Stage", "--session", "Operator", f"[kvb-orchestrator msg {state['message']}] {state['answer']}"], radio)
self.assertEqual((found["match"], found["class"], found["to"]), (True, "call", "Stage"))
self.assertIn(["send", "call", "--to", "Stage", "--session", "Operator", f"[kvb-orchestrator msg {state['message']}] {state['answer']}"], radio)
def test_chromium_requests_choices_on_every_channel_and_signs_a_choice_at_three_widths(self):
self.check_choices("chromium", "cdp.mjs", os.environ.get("CHROMIUM", "chromium"), signs=True)