fix(issue-57): review nits - a damaged audit sequence or an unresolvable log root never aborts the check
_check_disk_fallback converted transition_seq outside its try, so a status.json whose sequence is not an integer would raise out of the subscriber's main loop; such a status is now ignored with a warning, like a stale one. delegate_started_recorded returned 1 before looking at the registry's events.log when the audit-log root could not be resolved; it now skips only the audit check. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
f299034d8d
commit
c982616188
3 files changed
+16
-3
No files matched your search
@@ -110,7 +110,11 @@ def _check_disk_fallback(
|
||||
# ignores it. An unversioned record (never transitioned, or
|
||||
# MAM_ENGINE_CAS=0) and a missing record keep the old rule.
|
||||
aud_seq = logged.get("transition_seq")
|
||||
if rec_seq is not None and (aud_seq is None or int(aud_seq) < int(rec_seq)):
|
||||
try:
|
||||
stale = rec_seq is not None and (aud_seq is None or int(aud_seq) < int(rec_seq))
|
||||
except (TypeError, ValueError):
|
||||
stale = True # a damaged status.json proves nothing either
|
||||
if stale:
|
||||
logger.warning("disk fallback ignored audit status %r for %s: transition_seq %r is older "
|
||||
"than the record's %r", logged.get("status"), jid, aud_seq, rec_seq)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user