fix(sfm): an audit finish that fails on a hang-up path still releases the line
The final fix wave's AuditIncomplete landed in _exchange's `except DeviceError`, which keeps the line -- so on the nine ring / link-fault paths (and a refusal) a failed audit write turned a hang-up into a held Series-4 line, blocking a THOR call-home for up to the 5-minute idle hang-up and making "SFM hung up" false. AuditIncomplete now carries release_line, set by every finish whose path hangs up anyway, and _exchange honours it. Also pins the Series-3 change path's retry=False again (the rewritten lost-ack test no longer could). 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
8f68b09f5e
commit
cdc6360ec0
4 files changed
+102
-12
No files matched your search
@@ -33,9 +33,17 @@ class AuditUnavailable(DeviceError):
|
||||
|
||||
class AuditIncomplete(DeviceError):
|
||||
"""The unit was dealt with, but its audit row could not be finished. The
|
||||
message says what happened to the unit first, then names the row."""
|
||||
message says what happened to the unit first, then names the row.
|
||||
|
||||
`release_line` is True when the path would have hung up had the finish
|
||||
worked (a ring, a link fault, a refusal): the failed write to the audit log
|
||||
must not turn that into a held line, which would block a call-home."""
|
||||
http_status = 500
|
||||
|
||||
def __init__(self, message: str, *, release_line: bool = False) -> None:
|
||||
super().__init__(message)
|
||||
self.release_line = release_line
|
||||
|
||||
|
||||
class ChangeUnconfirmed(DeviceError):
|
||||
"""A change failed after its frame went out, or may have gone out.
|
||||
|
||||
Reference in new issue
Block a user