test(minimateplus): each strict-stream refusal has its own test; a re-poll always follows a SESSION_RESET

Review of 75d79ec / d73a27d (mutation): removing the chunk-timeout raise went
unnoticed because the TERM raise also said 'ended early', and the no-STRT,
metadata-page, mid-stream-terminator and chunk-cap raises had no test at all;
a re-poll without SESSION_RESET passed because the test double ignored it.
Each refusal is now pinned by its own message, each verified by removing it
(bytecode caching off -- same-second, same-size rewrites reuse a stale .pyc).
The strict tests use the shared replay helpers, which load either fixture.

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-25 18:52:23 -04:00
1 parent a7214c50de
commit 78617d47ce
3 files changed
+60 -50

No files matched your search

+4
View File
@@ -42,6 +42,7 @@ class Booting(SessionReplay):
def write(self, data):
data = bytes(data)
self.log = getattr(self, "log", []) + [data]
if data[:2] == b"\x41\x02" and data[5] == 0x5B and data[8] == 0x00: # the POLL probe
self.polls += 1
if self.polls == 1:
@@ -64,6 +65,9 @@ def test_a_unit_booting_on_connect_is_waited_for():
_client, info = connect(t)
assert info.serial == "BE9441"
assert t.polls == 4 # the lost one, two while booting, the answered one
probes = [i for i, w in enumerate(t.log) if w[5:6] == b"\x5b" and w[8] == 0x00]
assert all(t.log[i - 1] == b"\x41\x03" for i in probes) # every POLL follows a SESSION_RESET
assert {w[5] for w in t.log if w[:2] == b"\x41\x02"} <= {0x5B, 0x15, 0x01, 0x1A, 0x08} # reads only
def test_a_unit_that_boots_but_never_answers_says_so():