8ea2ffc3e8
Adds 5 new heuristics (#22-#26) to scripts/audit_exception_handling.py
that recognize narrow-catch + non-Result patterns added in Phase 3-8:
22. Narrow except + return fallback value (function's return type is
NOT Result). Catches: project_manager.py:get_git_commit,
aggregate.py:is_absolute_with_drive, etc.
23. Narrow except + use error inline (except body uses e/exc in a
non-pass way). Catches: session_logger.py:log_tool_call,
summarize.py:_summarise_python, etc.
24. Narrow except + assign fallback (var = <value>, no return).
Catches: file_cache.py:mtime cache, etc.
25. Narrow except + uses traceback module (e.g., traceback.format_exc()).
Catches: aggregate.py file read with traceback, etc.
26. Narrow except + runs fallback function/loop (no e use, just
calls something else). Catches: aggregate.py AST skeleton fallback,
markdown_helper.py render_table fallback, etc.
Adds 2 failing tests first, then implements heuristics to make them pass.
Result: 14 UNCLEAR sites reclassified as INTERNAL_COMPLIANT.
After Phase 10.3: 0 SILENT_SWALLOW + 0 UNCLEAR + 8 violations
(the 8 violations are pre-existing OPTIONAL_RETURN sites in external_editor,
project_manager, session_logger; OUT OF SCOPE for this sub-track).