Commit Graph
3 Commits
Author SHA1 Message Date
serversdownandClaude Opus 5.5 b7b054aee9 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
2026-10-22 17:47:25 -04:00
serversdownandClaude Opus 5.5 9c1c7cec76 fix(micromate): the opcode gate is an allowlist -- unknown SUBs refused; tables read-only
READ_SUBS catalogues every read; a SUB in neither table is refused, and
allowed_writes may only name catalogued writes.  Tables are MappingProxyType,
_send checks the exact bytes it writes, check_transmit documents precedence.
Tests cover unknown opcodes, concatenation smuggling and table immutability.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
2026-10-22 17:19:52 -04:00
serversdownandClaude Opus 5.5 a3e4e85dfd feat(micromate): one opcode table and a send-side gate -- writes refused unless allowed, 0xA2 always
micromate/opcodes.py holds WRITE_SUBS and the cross-series collision 0xA2.
MicromateProtocol._send reads the SUB of the bytes about to go out
(framing.request_sub) and refuses any write SUB not in allowed_writes, and
0xA2 unconditionally.  Docstrings now say the reads-only policy is enforced.

request_sub also refuses any frame not in canonical form
(stuff(unstuff(body)) == body): an interior unescaped 02/03/04, a 10 XX
outside {02,03,04,10}, or a trailing lone DLE.  What the gate checks is then
exactly what the unit parses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
2026-10-22 17:10:23 -04:00