test(orchestrator): give each fake radio.py its own mtime second

The radio_module test wrote five fake radio.py versions with nanosecond mtimes, all in second 0. Versions 5 and 6 have the same size, so with bytecode writing on (make test) CPython's pyc check reused version 5 for version 6 and the test failed only in the full suite. The installed hub is not affected: install.sh drops every pyc, the container sets PYTHONDONTWRITEBYTECODE and mounts /skills read-only.

🎯 Fix: 95 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 94
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-13 20:40:26 +00:00
1 parent 1e5aac8a37
commit cd0bb3ccd0
1 file changed
+1 -1
+1 -1
View File
@@ -361,7 +361,7 @@ class TestReceipts(unittest.TestCase):
(6, "def seen(row, name, sid, prompt, state, since):\n return True\n", True), (6, "def seen(row, name, sid, prompt, state, since):\n return True\n", True),
): ):
(fake / "radio.py").write_text(text, encoding="utf-8") (fake / "radio.py").write_text(text, encoding="utf-8")
os.utime(fake / "radio.py", ns=(1, version)) os.utime(fake / "radio.py", (1, version))
with self.subTest(text=text): with self.subTest(text=text):
self.assertEqual(receipts.radio_module(self.base / "skills") is not None, loads) self.assertEqual(receipts.radio_module(self.base / "skills") is not None, loads)
self.assertEqual(tuple(receipts.inspect.signature(self.radio.seen).parameters), receipts.SEEN_PARAMETERS) self.assertEqual(tuple(receipts.inspect.signature(self.radio.seen).parameters), receipts.SEEN_PARAMETERS)