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:
+6
-4
@@ -244,10 +244,12 @@ class LogRegistry:
|
||||
for kw in keywords_to_check:
|
||||
if kw in line and kw not in found_keywords:
|
||||
found_keywords.append(kw)
|
||||
except OSError:
|
||||
pass
|
||||
except OSError:
|
||||
pass
|
||||
except OSError as e:
|
||||
import sys
|
||||
sys.stderr.write(f"[LogRegistry] read comms.log entry failed: {e}\n")
|
||||
except OSError as e:
|
||||
import sys
|
||||
sys.stderr.write(f"[LogRegistry] scan session_path failed: {e}\n")
|
||||
size_kb = total_size_bytes / 1024
|
||||
whitelisted = False
|
||||
reason = ""
|
||||
|
||||
Reference in New Issue
Block a user