fix(sfm): a Micromate's call-home is refused while monitoring, and only a real call-home block is ever edited

Measured at the bench 2026-11-03 (UM20147): monitoring, a Micromate returns its
real call-home block and ACKS a call-home write, but does not apply it -- three
read-backs unchanged, and its own menu says 'Feature disabled while monitoring'.
SFM now refuses up front (UnitStateUnknown, 409: '... is monitoring -- a Micromate
ignores call-home changes while monitoring ...; stop monitoring first -- nothing
sent'), dry run included, instead of sending a write the unit ignores.

And the block must be the call-home block: micromate.writes.is_call_home_content
checks its header is its own length (00 7C, N = 124 -- 00 7C DC on every read,
UM12947 and UM20147).  plan_call_home_enabled refuses any other 126 bytes, the
change refuses before sending, and call_home_state says why (enabled = None).
At the bench this was checked by eye before the monitoring write.

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-11-03 15:32:02 -05:00
1 parent 5326e99ac2
commit f35845d403
4 files changed
+74 -4

No files matched your search

+7
View File
@@ -265,3 +265,10 @@ def test_setup_push_refuses_a_block_whose_own_length_header_is_wrong():
bad[0:2] = (int.from_bytes(bad[0:2], "big") + 1).to_bytes(2, "big")
with pytest.raises(ValueError, match="header"):
plan_setup_push(reads[0x08], reads[0x2E], bytes(bad), "x.mmb")
def test_call_home_refuses_a_block_whose_header_is_not_its_length():
# 126 bytes, but not the call-home block: its header must be its own length (00 7C).
with pytest.raises(ValueError, match="header"):
plan_call_home_enabled(bytes(126), True)