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
@@ -369,6 +369,12 @@ def test_old_audit_terminal_does_not_complete_the_redispatched_attempt(moved, mo
|
||||
pending, terminal = {jid}, {}
|
||||
job_subscriber._check_disk_fallback(pending, str(reg), terminal, {jid: rec["dispatch_token"]}, {jid: 2})
|
||||
assert pending == {jid} and terminal == {}
|
||||
# a damaged sequence is ignored too, and does not take the subscriber down
|
||||
mqtt_common.job_log_path(jid, mqtt_common.STATUS_FILENAME, str(logs)).write_text(
|
||||
json.dumps({"job_id": jid, "status": "completed", "transition_seq": "n/a"}))
|
||||
pending, terminal = {jid}, {}
|
||||
job_subscriber._check_disk_fallback(pending, str(reg), terminal, {jid: rec["dispatch_token"]}, {jid: 2})
|
||||
assert pending == {jid} and terminal == {}
|
||||
# a newer audit-only terminal is still taken
|
||||
mqtt_common.update_logged_status(jid, "completed", logs_dir=str(logs), transition_seq=rec["transition_seq"] + 1)
|
||||
pending, terminal = {jid}, {}
|
||||
|
||||
Reference in new issue
Block a user