fix(sfm): a Micromate in an unknown run state gets no call-home write, and a lost ack keeps its snapshot (phase-4 review)
- s4_change_call_home's read_state now returns an unknown(0xNN) run state as it is, so the change core refuses it (UnitStateUnknown, nothing sent), as start/stop already does; it checked only for calling_home. - run_change records the snapshot on the lost-ack path too: after an ack is lost, what the unit now holds (and, on Series 4, whether [118:120] moved) is what tells whether the write landed. 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
bdd76b8f74
commit
9e03b3f0ab
3 files changed
+30
-4
No files matched your search
@@ -403,8 +403,9 @@ def s4_change_call_home(client: Any, serial: str, *, enabled: bool, dry_run: boo
|
||||
planned: list = []
|
||||
|
||||
def read_state() -> str:
|
||||
if client.read_run_state().name == "calling_home":
|
||||
return "calling_home"
|
||||
run = client.read_run_state().name
|
||||
if run == "calling_home" or run.startswith("unknown"):
|
||||
return run # the core refuses both; a write waits for a known state
|
||||
block = client.get_call_home_content()
|
||||
reads.append(block)
|
||||
return "enabled" if block[5] & 0x01 else "disabled"
|
||||
|
||||
Reference in new issue
Block a user