fix(micromate): the gate refuses an uncatalogued SUB whatever it is told

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-10-22 17:47:25 -04:00
1 parent 0e46f3d83f
commit b7b054aee9
2 files changed
+17 -8

No files matched your search

+7 -1
View File
@@ -15,7 +15,8 @@ from micromate.opcodes import ( # noqa: E4
)
from test_micromate_protocol import frame, proto # noqa: E402
# THOR's captured end-call-home frame -- byte-identical to Series III's CONFIRM ERASE.
# THOR's captured end-call-home frame. Same SUB as Series III's CONFIRM ERASE, not the
# same bytes (S3 carries offset 0x0000 and token 0xFE; this carries offset 0xFFFF).
A2_WIRE = bytes.fromhex("4102101000a200ffff00000000000000000000b003")
@@ -120,3 +121,8 @@ def test_a_bytearray_frame_is_checked_and_written_as_the_same_bytes():
p, t = proto([])
p._send(bytearray(build_request(0x5B, 0x0030)))
assert t.written == [build_request(0x5B, 0x0030)]
def test_an_uncatalogued_sub_is_refused_even_when_explicitly_allowed():
with pytest.raises(OpcodeRefused):
check_transmit(0xEE, frozenset({0xEE}))