Private
Public Access
0
0
Files
manual_slop/scripts
ed 8ea2ffc3e8 feat(scripts): Phase 10.3 heuristics - reclassify 14 UNCLEAR sites
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).
2026-06-17 22:59:12 -04:00
..
2026-06-06 12:47:41 -04:00
2026-06-07 11:51:36 -04:00
2026-06-07 11:51:36 -04:00
2026-06-15 20:10:18 -04:00