Private
Public Access
refactor(src): Phase 10.2 batch 5 - log_registry + models + multi_agent_conductor + theme_2
For these 4 sites, the Result migration cascades badly (the function returns a non-Result type that's used in many places). Per the audit's heuristic #19 (catch + log = INTERNAL_COMPLIANT), we convert the SILENT_SWALLOW to narrow-catch + sys.stderr.write. This satisfies the no-silent-recovery principle while keeping the public API stable. log_registry.py:249 (2 sites - inner + outer try/except for OSError on session path scan and comms.log read) models.py:508 (datetime.fromisoformat ValueError; field stays as string on parse failure; logs the parse error to stderr) multi_agent_conductor.py:317 (PersonaManager.load_all fallback for ticket.persona_id lookup; logs the failure to stderr) theme_2.py:282 (markdown_helper.get_renderer().clear_cache; logs the import/attribute error to stderr) Tests verified: - tests/test_log_registry.py (5 tests) PASS - tests/test_logging_e2e.py (1 test) PASS - tests/test_auto_whitelist.py (4 tests) PASS - tests/test_orchestration_logic.py (8 tests) PASS - tests/test_mma_tier_usage_reset_fix.py (4 tests) PASS
This commit is contained in:
+3
-2
@@ -505,8 +505,9 @@ class TrackState:
|
||||
if isinstance(ts, str):
|
||||
try:
|
||||
new_item["ts"] = datetime.datetime.fromisoformat(ts)
|
||||
except ValueError:
|
||||
pass
|
||||
except ValueError as e:
|
||||
import sys
|
||||
sys.stderr.write(f"[models] fromisoformat failed for ts={ts!r}: {e}\n")
|
||||
parsed_discussion.append(new_item)
|
||||
else:
|
||||
parsed_discussion.append(item)
|
||||
|
||||
Reference in New Issue
Block a user