fix(hub): operator_message matches a signed text the radio escaped

The radio's clip() writes every '<' as '<\', so an agent that copied a signed operator message from radio.py show passed a text that never matched and got 'no match' for the operator's own words. operator_message now compares the text as given and with that escape undone (copied()), each with its whitespace collapsed, against the signed and the relayed text; the recipient check is unchanged.

Applied cleanly onto queuefix (0ba6e15); neither file changed on master since its base 2aea6d1.

Tests: test_hub_composer covers an escaped and a plain copy. Written, not run: the full suite runs once on master after all bundles (operator order).

Security: MEDUSA over the staged tree on master: 100, both files covered; one info finding (EXA007 at messaging.py:21, outside the diff) does not lower the score.

🎯 Fix: 90 %
💥 Break: 5 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 86
🚦 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-22 21:46:21 +00:00
1 parent 0ba6e1506f
commit 144dbf1941
2 files changed
+17 -1

No files matched your search

+6
View File
@@ -192,6 +192,12 @@ class TestHubComposer(HubCase):
result = self.check(sent, text, to)
self.assertTrue(result["isError"], result)
self.assertNotIn("structuredContent", result)
status, _, body = self.say({"to": "Skills", "text": "run make deploy <\\target>", "class": "post", "voice": ""}, signer)
self.assertEqual(status, 201, body)
tagged = json.loads(body)["id"]
for text, matches in (("run make deploy <\\target>", True), ("run make deploy <\\\\target>", True), ("run make deploy <target>", False)):
with self.subTest(text=text):
self.assertEqual(self.check(tagged, text, "Skills")["isError"], not matches)
self.assertEqual(self.tell_all({"text": "main is green", "class": "newsletter"}, signer)[0], 200)
everyone = next(message["id"] for message in self.snapshot()["messages"] if message["to"] == "*")
self.assertTrue(self.check(everyone, "main is green", "*")["structuredContent"]["match"])