test(micromate): corpus counts are floors, and 0x71 is the over-the-ceiling example
Two test-side breaks, found by the full suite after phase-4 task 6:
- test_micromate_framing's three whole-session tests pinned exact counts of a
gitignored corpus (bridges/captures/9-24-26 - micromate2, a symlink into the
main checkout). The full copy of the BW VM's captures on 2026-11-02 added
sessions: 287 responses / 241 reads / 287 requests, every one passing the same
per-frame checks. The counts are now floors (>= 251 / 218 / 251), so a lost
file still fails and a grown corpus does not.
- test_micromate_opcodes' beyond-the-ceiling permit took 0x7E, enableable since
the call-home commit (eeb55ef); 0x71 (the setup write, phase 5) replaces it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
1 parent
84c142f36c
commit
51e7dddcb3
2 files changed
+13
-4
No files matched your search
@@ -373,7 +373,10 @@ def test_whole_captured_sessions_parse_with_no_bad_checksums():
|
||||
bad = [f for f in frames if not f.checksum_valid]
|
||||
assert not bad, f"{path.name}: {len(bad)} bad checksums"
|
||||
total += len(frames)
|
||||
assert total == 251, f"expected 251 response frames across the corpus, got {total}"
|
||||
# A floor, not an exact count: the corpus is a gitignored folder that grows
|
||||
# (2026-11-02, the full copy from the BW VM: 287 responses, 241 reads, every
|
||||
# one passing the same rule). Fewer than first verified means a lost file.
|
||||
assert total >= 251, f"expected at least 251 response frames across the corpus, got {total}"
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
@@ -410,7 +413,10 @@ def test_builder_reproduces_every_captured_read_frame():
|
||||
)
|
||||
checked += 1
|
||||
i = j + 1
|
||||
assert checked == 218, f"expected 218 read frames, checked {checked}"
|
||||
# A floor, not an exact count: the corpus is a gitignored folder that grows
|
||||
# (2026-11-02, the full copy from the BW VM: 287 responses, 241 reads, every
|
||||
# one passing the same rule). Fewer than first verified means a lost file.
|
||||
assert checked >= 218, f"expected at least 218 read frames, checked {checked}"
|
||||
|
||||
# ── the data section (writes) ─────────────────────────────────────────────────
|
||||
|
||||
@@ -523,4 +529,7 @@ def test_builder_reproduces_every_captured_request_frame_including_writes():
|
||||
)
|
||||
checked += 1
|
||||
i = j + 1
|
||||
assert checked == 251, f"expected 251 request frames, checked {checked}"
|
||||
# A floor, not an exact count: the corpus is a gitignored folder that grows
|
||||
# (2026-11-02, the full copy from the BW VM: 287 responses, 241 reads, every
|
||||
# one passing the same rule). Fewer than first verified means a lost file.
|
||||
assert checked >= 251, f"expected at least 251 request frames, checked {checked}"
|
||||
@@ -98,7 +98,7 @@ def test_an_unknown_opcode_is_refused_and_nothing_is_written(sub):
|
||||
assert t.written == []
|
||||
|
||||
|
||||
@pytest.mark.parametrize("sub", [0xEE, 0x7E, 0xA8])
|
||||
@pytest.mark.parametrize("sub", [0xEE, 0x71, 0xA8]) # 0x71 (setup write) stays above the ceiling until phase 5
|
||||
def test_a_permit_beyond_the_ceiling_is_refused_at_the_wire(sub):
|
||||
p, t = proto([])
|
||||
with pytest.raises(OpcodeRefused):
|
||||
|
||||
Reference in new issue
Block a user