diff --git a/tests/artifacts/PHASE1_AUDIT.json b/tests/artifacts/PHASE1_AUDIT.json new file mode 100644 index 00000000..08acae0e --- /dev/null +++ b/tests/artifacts/PHASE1_AUDIT.json @@ -0,0 +1,2909 @@ +{ + "refactored_baseline_files": [ + "src/ai_client.py", + "src/mcp_client.py", + "src/rag_engine.py" + ], + "files_scanned": 65, + "files_with_findings": 42, + "total_sites": 393, + "by_kind": { + "EXCEPT": 312, + "RAISE": 68, + "TRY": 13 + }, + "compliant_sites": 241, + "suspicious_sites": 30, + "violation_sites": 119, + "unclear_sites": 3, + "by_category": { + "INTERNAL_COMPLIANT": 131, + "INTERNAL_BROAD_CATCH": 87, + "BOUNDARY_CONVERSION": 49, + "INTERNAL_RETHROW": 30, + "INTERNAL_PROGRAMMER_RAISE": 30, + "INTERNAL_SILENT_SWALLOW": 28, + "BOUNDARY_SDK": 18, + "BOUNDARY_FASTAPI": 13, + "INTERNAL_OPTIONAL_RETURN": 4, + "UNCLEAR": 3 + }, + "violations_by_category": { + "INTERNAL_BROAD_CATCH": 87, + "INTERNAL_SILENT_SWALLOW": 28, + "INTERNAL_OPTIONAL_RETURN": 4 + }, + "baseline": { + "file_count": 3, + "sites": 129, + "violations": 77 + }, + "migration_target": { + "sites": 264, + "violations": 42 + }, + "files": [ + { + "filename": "src\\mcp_client.py", + "in_refactored_baseline": true, + "violation_count": 45, + "compliant_count": 9, + "suspicious_count": 0, + "unclear_count": 1, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 126, + "kind": "EXCEPT", + "context": "configure", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 152, + "kind": "EXCEPT", + "context": "_is_allowed", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 171, + "kind": "EXCEPT", + "context": "_is_allowed", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 177, + "kind": "EXCEPT", + "context": "_is_allowed", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 191, + "kind": "EXCEPT", + "context": "_resolve_and_check", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 229, + "kind": "EXCEPT", + "context": "search_files", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 254, + "kind": "EXCEPT", + "context": "list_directory", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 266, + "kind": "EXCEPT", + "context": "read_file", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 276, + "kind": "EXCEPT", + "context": "_resolve_and_check_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 307, + "kind": "EXCEPT", + "context": "read_file_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 335, + "kind": "EXCEPT", + "context": "list_directory_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 363, + "kind": "EXCEPT", + "context": "search_files_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 395, + "kind": "EXCEPT", + "context": "edit_file", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 414, + "kind": "EXCEPT", + "context": "get_file_summary", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 430, + "kind": "EXCEPT", + "context": "get_file_slice", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 451, + "kind": "EXCEPT", + "context": "set_file_slice", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 471, + "kind": "EXCEPT", + "context": "get_git_diff", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 473, + "kind": "EXCEPT", + "context": "get_git_diff", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 492, + "kind": "EXCEPT", + "context": "ts_c_get_skeleton", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 509, + "kind": "EXCEPT", + "context": "ts_c_get_code_outline", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 523, + "kind": "EXCEPT", + "context": "ts_c_get_definition", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 537, + "kind": "EXCEPT", + "context": "ts_c_get_signature", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 555, + "kind": "EXCEPT", + "context": "ts_c_update_definition", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 576, + "kind": "EXCEPT", + "context": "ts_cpp_get_skeleton", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 593, + "kind": "EXCEPT", + "context": "ts_cpp_get_code_outline", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 610, + "kind": "EXCEPT", + "context": "ts_cpp_get_definition", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 624, + "kind": "EXCEPT", + "context": "ts_cpp_get_signature", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 645, + "kind": "EXCEPT", + "context": "ts_cpp_update_definition", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 695, + "kind": "EXCEPT", + "context": "py_get_skeleton", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 713, + "kind": "EXCEPT", + "context": "py_get_code_outline", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 739, + "kind": "EXCEPT", + "context": "py_get_symbol_info", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 768, + "kind": "EXCEPT", + "context": "py_get_definition", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 788, + "kind": "EXCEPT", + "context": "py_update_definition", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 818, + "kind": "EXCEPT", + "context": "py_get_signature", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 843, + "kind": "EXCEPT", + "context": "py_set_signature", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 872, + "kind": "EXCEPT", + "context": "py_get_class_summary", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 893, + "kind": "EXCEPT", + "context": "py_get_var_declaration", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 913, + "kind": "EXCEPT", + "context": "py_set_var_declaration", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 936, + "kind": "EXCEPT", + "context": "_search_file", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 951, + "kind": "EXCEPT", + "context": "py_find_usages", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 974, + "kind": "EXCEPT", + "context": "py_get_imports", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 987, + "kind": "EXCEPT", + "context": "py_check_syntax", + "category": "UNCLEAR" + }, + { + "line": 989, + "kind": "EXCEPT", + "context": "py_check_syntax", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1012, + "kind": "EXCEPT", + "context": "_search_file", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 1026, + "kind": "EXCEPT", + "context": "py_get_hierarchy", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1047, + "kind": "EXCEPT", + "context": "py_get_docstring", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1071, + "kind": "EXCEPT", + "context": "derive_code_path", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1106, + "kind": "EXCEPT", + "context": "trace", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1126, + "kind": "EXCEPT", + "context": "_build_tree", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1140, + "kind": "EXCEPT", + "context": "get_tree", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1223, + "kind": "EXCEPT", + "context": "web_search", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1249, + "kind": "EXCEPT", + "context": "fetch_url", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1268, + "kind": "EXCEPT", + "context": "get_ui_performance", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1311, + "kind": "EXCEPT", + "context": "stop", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 1316, + "kind": "EXCEPT", + "context": "stop", + "category": "INTERNAL_SILENT_SWALLOW" + } + ] + }, + { + "filename": "src\\gui_2.py", + "in_refactored_baseline": false, + "violation_count": 38, + "compliant_count": 12, + "suspicious_count": 2, + "unclear_count": 2, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 65, + "kind": "EXCEPT", + "context": "_resolve", + "category": "UNCLEAR" + }, + { + "line": 69, + "kind": "EXCEPT", + "context": "_resolve", + "category": "UNCLEAR" + }, + { + "line": 216, + "kind": "EXCEPT", + "context": "_detect_refresh_rate_win32", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 241, + "kind": "EXCEPT", + "context": "_resolve_font_path", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 567, + "kind": "EXCEPT", + "context": "_post_init", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 591, + "kind": "EXCEPT", + "context": "_diag_layout_state", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 684, + "kind": "EXCEPT", + "context": "run", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 731, + "kind": "EXCEPT", + "context": "_load_fonts", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 742, + "kind": "EXCEPT", + "context": "_load_fonts", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 757, + "kind": "RAISE", + "context": "__getattr__", + "category": "INTERNAL_RETHROW" + }, + { + "line": 760, + "kind": "RAISE", + "context": "__getattr__", + "category": "INTERNAL_RETHROW" + }, + { + "line": 806, + "kind": "EXCEPT", + "context": "_get_active_capabilities", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 865, + "kind": "TRY", + "context": "_apply_snapshot", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 905, + "kind": "EXCEPT", + "context": "_capture_workspace_profile", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 979, + "kind": "EXCEPT", + "context": "shutdown", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 1079, + "kind": "EXCEPT", + "context": "_gui_func", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 1123, + "kind": "EXCEPT", + "context": "_gui_func", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1172, + "kind": "EXCEPT", + "context": "_show_menus", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1198, + "kind": "EXCEPT", + "context": "_show_menus", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1223, + "kind": "EXCEPT", + "context": "_show_menus", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1285, + "kind": "EXCEPT", + "context": "_handle_history_logic", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1335, + "kind": "EXCEPT", + "context": "_populate_auto_slices", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1344, + "kind": "EXCEPT", + "context": "_populate_auto_slices", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1349, + "kind": "EXCEPT", + "context": "_populate_auto_slices", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1385, + "kind": "TRY", + "context": "_stats_worker", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1398, + "kind": "EXCEPT", + "context": "_close_vscode_diff", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 1418, + "kind": "EXCEPT", + "context": "_apply_pending_patch", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1444, + "kind": "EXCEPT", + "context": "_open_patch_in_external_editor", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1479, + "kind": "EXCEPT", + "context": "request_patch_from_tier4", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1593, + "kind": "EXCEPT", + "context": "render_main_interface", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 1619, + "kind": "EXCEPT", + "context": "render_main_interface", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 2415, + "kind": "EXCEPT", + "context": "render_rag_panel", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2425, + "kind": "EXCEPT", + "context": "render_rag_panel", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2547, + "kind": "EXCEPT", + "context": "render_agent_tools_panel", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2575, + "kind": "EXCEPT", + "context": "render_agent_tools_panel", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2773, + "kind": "EXCEPT", + "context": "render_persona_selector_panel", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3214, + "kind": "EXCEPT", + "context": "render_tool_preset_manager_content", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 3449, + "kind": "EXCEPT", + "context": "render_persona_editor_window", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 3633, + "kind": "EXCEPT", + "context": "render_context_batch_actions", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 3769, + "kind": "EXCEPT", + "context": "render_ast_inspector_modal", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 3796, + "kind": "EXCEPT", + "context": "render_ast_inspector_modal", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 4121, + "kind": "EXCEPT", + "context": "render_context_files_table", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 4174, + "kind": "EXCEPT", + "context": "render_context_presets", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 4418, + "kind": "EXCEPT", + "context": "worker", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 4836, + "kind": "EXCEPT", + "context": "_on_warmup_complete_callback", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 4849, + "kind": "EXCEPT", + "context": "render_warmup_status_indicator", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 5430, + "kind": "EXCEPT", + "context": "render_operations_hub", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 5836, + "kind": "EXCEPT", + "context": "render_text_viewer_window", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 5970, + "kind": "EXCEPT", + "context": "render_external_editor_panel", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 6817, + "kind": "EXCEPT", + "context": "render_tier_stream_panel", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 6842, + "kind": "EXCEPT", + "context": "render_tier_stream_panel", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 7152, + "kind": "EXCEPT", + "context": "render_task_dag_panel", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 7168, + "kind": "EXCEPT", + "context": "render_task_dag_panel", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 7258, + "kind": "EXCEPT", + "context": "render_beads_tab", + "category": "INTERNAL_BROAD_CATCH" + } + ] + }, + { + "filename": "src\\ai_client.py", + "in_refactored_baseline": true, + "violation_count": 26, + "compliant_count": 26, + "suspicious_count": 7, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 276, + "kind": "EXCEPT", + "context": "_load_credentials", + "category": "BOUNDARY_SDK" + }, + { + "line": 277, + "kind": "RAISE", + "context": "_load_credentials", + "category": "INTERNAL_RETHROW" + }, + { + "line": 302, + "kind": "EXCEPT", + "context": "_classify_anthropic_error", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 314, + "kind": "EXCEPT", + "context": "_classify_gemini_error", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 332, + "kind": "EXCEPT", + "context": "_classify_deepseek_error", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 355, + "kind": "EXCEPT", + "context": "_classify_minimax_error", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 394, + "kind": "EXCEPT", + "context": "set_provider", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 414, + "kind": "EXCEPT", + "context": "cleanup", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 432, + "kind": "EXCEPT", + "context": "reset_session", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 520, + "kind": "EXCEPT", + "context": "set_tool_preset", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 537, + "kind": "EXCEPT", + "context": "set_bias_profile", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 716, + "kind": "EXCEPT", + "context": "_execute_tool_calls_concurrently", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 723, + "kind": "EXCEPT", + "context": "_execute_tool_calls_concurrently", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 801, + "kind": "RAISE", + "context": "_default_send", + "category": "INTERNAL_RETHROW" + }, + { + "line": 802, + "kind": "RAISE", + "context": "_default_send", + "category": "INTERNAL_RETHROW" + }, + { + "line": 828, + "kind": "EXCEPT", + "context": "run_with_tool_loop", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 994, + "kind": "EXCEPT", + "context": "_reread_file_items", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1233, + "kind": "EXCEPT", + "context": "_list_anthropic_models", + "category": "BOUNDARY_SDK" + }, + { + "line": 1234, + "kind": "RAISE", + "context": "_list_anthropic_models", + "category": "INTERNAL_RETHROW" + }, + { + "line": 1437, + "kind": "EXCEPT", + "context": "_send_anthropic", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1488, + "kind": "EXCEPT", + "context": "_send_anthropic", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1528, + "kind": "EXCEPT", + "context": "_list_gemini_models", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1529, + "kind": "RAISE", + "context": "_list_gemini_models", + "category": "INTERNAL_RETHROW" + }, + { + "line": 1555, + "kind": "EXCEPT", + "context": "_extract_gemini_thoughts", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 1599, + "kind": "EXCEPT", + "context": "_send_gemini", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1611, + "kind": "EXCEPT", + "context": "_send_gemini", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1636, + "kind": "EXCEPT", + "context": "_send_gemini", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1657, + "kind": "EXCEPT", + "context": "_send_gemini", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1777, + "kind": "EXCEPT", + "context": "_send_gemini", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1809, + "kind": "EXCEPT", + "context": "_send_gemini", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1854, + "kind": "EXCEPT", + "context": "_send", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 1856, + "kind": "RAISE", + "context": "_send", + "category": "INTERNAL_RETHROW" + }, + { + "line": 1896, + "kind": "EXCEPT", + "context": "_pre_dispatch", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1926, + "kind": "EXCEPT", + "context": "_send_gemini_cli", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1989, + "kind": "RAISE", + "context": "_send_deepseek", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 2071, + "kind": "EXCEPT", + "context": "_send_deepseek", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2125, + "kind": "EXCEPT", + "context": "_send_deepseek", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2184, + "kind": "EXCEPT", + "context": "_send_deepseek", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2222, + "kind": "EXCEPT", + "context": "_send_deepseek", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2242, + "kind": "EXCEPT", + "context": "_list_minimax_models", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 2299, + "kind": "RAISE", + "context": "_ensure_minimax_client", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 2310, + "kind": "RAISE", + "context": "_ensure_grok_client", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 2391, + "kind": "EXCEPT", + "context": "_send_grok", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2473, + "kind": "EXCEPT", + "context": "_send_minimax", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2487, + "kind": "RAISE", + "context": "_ensure_qwen_client", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 2520, + "kind": "RAISE", + "context": "_dashscope_call", + "category": "INTERNAL_RETHROW" + }, + { + "line": 2617, + "kind": "EXCEPT", + "context": "_send_qwen", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2711, + "kind": "EXCEPT", + "context": "_send_llama", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2799, + "kind": "EXCEPT", + "context": "_send_llama_native", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2813, + "kind": "EXCEPT", + "context": "_get_llama_cost_tracking", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2848, + "kind": "EXCEPT", + "context": "run_tier4_analysis", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 2867, + "kind": "EXCEPT", + "context": "run_tier4_patch_callback", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 2898, + "kind": "EXCEPT", + "context": "run_tier4_patch_generation", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 2914, + "kind": "EXCEPT", + "context": "get_token_stats", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 2922, + "kind": "EXCEPT", + "context": "get_token_stats", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 3057, + "kind": "EXCEPT", + "context": "send", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 3082, + "kind": "EXCEPT", + "context": "", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 3133, + "kind": "EXCEPT", + "context": "run_subagent_summarization", + "category": "BOUNDARY_SDK" + }, + { + "line": 3174, + "kind": "EXCEPT", + "context": "run_discussion_compression", + "category": "BOUNDARY_SDK" + } + ] + }, + { + "filename": "src\\rag_engine.py", + "in_refactored_baseline": true, + "violation_count": 6, + "compliant_count": 6, + "suspicious_count": 3, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 29, + "kind": "EXCEPT", + "context": "_get_sentence_transformers", + "category": "INTERNAL_RETHROW" + }, + { + "line": 31, + "kind": "RAISE", + "context": "_get_sentence_transformers", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 32, + "kind": "RAISE", + "context": "_get_sentence_transformers", + "category": "INTERNAL_RETHROW" + }, + { + "line": 33, + "kind": "EXCEPT", + "context": "_get_sentence_transformers", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 36, + "kind": "RAISE", + "context": "_get_sentence_transformers", + "category": "INTERNAL_RETHROW" + }, + { + "line": 57, + "kind": "RAISE", + "context": "embed", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 75, + "kind": "RAISE", + "context": "embed", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 80, + "kind": "RAISE", + "context": "embed", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 109, + "kind": "RAISE", + "context": "_init_embedding_provider", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 165, + "kind": "EXCEPT", + "context": "_validate_collection_dim_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 224, + "kind": "EXCEPT", + "context": "_chunk_code", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 247, + "kind": "EXCEPT", + "context": "index_file", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 255, + "kind": "EXCEPT", + "context": "index_file", + "category": "INTERNAL_SILENT_SWALLOW" + }, + { + "line": 261, + "kind": "EXCEPT", + "context": "index_file", + "category": "INTERNAL_BROAD_CATCH" + }, + { + "line": 290, + "kind": "EXCEPT", + "context": "_async_search_mcp", + "category": "INTERNAL_BROAD_CATCH" + } + ] + }, + { + "filename": "src\\external_editor.py", + "in_refactored_baseline": false, + "violation_count": 2, + "compliant_count": 1, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 47, + "kind": "EXCEPT", + "context": "launch_diff", + "category": "INTERNAL_OPTIONAL_RETURN" + }, + { + "line": 56, + "kind": "EXCEPT", + "context": "launch_editor", + "category": "INTERNAL_OPTIONAL_RETURN" + }, + { + "line": 83, + "kind": "EXCEPT", + "context": "_find_vscode_in_registry", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\project_manager.py", + "in_refactored_baseline": false, + "violation_count": 1, + "compliant_count": 5, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 32, + "kind": "EXCEPT", + "context": "parse_ts", + "category": "INTERNAL_OPTIONAL_RETURN" + }, + { + "line": 98, + "kind": "EXCEPT", + "context": "get_git_commit", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 297, + "kind": "EXCEPT", + "context": "load_track_state", + "category": "BOUNDARY_SDK" + }, + { + "line": 373, + "kind": "EXCEPT", + "context": "get_all_tracks", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 385, + "kind": "EXCEPT", + "context": "get_all_tracks", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 400, + "kind": "EXCEPT", + "context": "get_all_tracks", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\session_logger.py", + "in_refactored_baseline": false, + "violation_count": 1, + "compliant_count": 7, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 100, + "kind": "EXCEPT", + "context": "open_session", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 132, + "kind": "EXCEPT", + "context": "close_session", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 149, + "kind": "EXCEPT", + "context": "log_api_hook", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 163, + "kind": "EXCEPT", + "context": "log_comms", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 191, + "kind": "EXCEPT", + "context": "log_tool_call", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 206, + "kind": "EXCEPT", + "context": "log_tool_call", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 231, + "kind": "EXCEPT", + "context": "log_tool_output", + "category": "INTERNAL_OPTIONAL_RETURN" + }, + { + "line": 251, + "kind": "EXCEPT", + "context": "log_cli_call", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\app_controller.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 63, + "suspicious_count": 4, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 99, + "kind": "RAISE", + "context": "_api_get_key", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 102, + "kind": "RAISE", + "context": "_api_get_key", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 216, + "kind": "RAISE", + "context": "_api_generate", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 218, + "kind": "RAISE", + "context": "_api_generate", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 286, + "kind": "RAISE", + "context": "_api_generate", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 310, + "kind": "EXCEPT", + "context": "_api_generate", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 313, + "kind": "RAISE", + "context": "_api_generate", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 321, + "kind": "RAISE", + "context": "_api_stream", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 342, + "kind": "RAISE", + "context": "_api_confirm_action", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 370, + "kind": "RAISE", + "context": "_api_get_session", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 381, + "kind": "RAISE", + "context": "_api_delete_session", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 402, + "kind": "EXCEPT", + "context": "_api_get_context", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 403, + "kind": "RAISE", + "context": "_api_get_context", + "category": "BOUNDARY_FASTAPI" + }, + { + "line": 538, + "kind": "EXCEPT", + "context": "_handle_custom_callback", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 588, + "kind": "EXCEPT", + "context": "_handle_click", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 592, + "kind": "EXCEPT", + "context": "_handle_click", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1283, + "kind": "RAISE", + "context": "__getattr__", + "category": "INTERNAL_RETHROW" + }, + { + "line": 1309, + "kind": "RAISE", + "context": "__getattr__", + "category": "INTERNAL_RETHROW" + }, + { + "line": 1334, + "kind": "EXCEPT", + "context": "_shutdown_io_pool_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1350, + "kind": "EXCEPT", + "context": "_install_signal_handler_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1392, + "kind": "EXCEPT", + "context": "_write_first_frame_timeline_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1484, + "kind": "EXCEPT", + "context": "cold_start_ts", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1515, + "kind": "EXCEPT", + "context": "_write_warmup_complete_timeline_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1577, + "kind": "EXCEPT", + "context": "_update_inject_preview_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1642, + "kind": "EXCEPT", + "context": "_do_rag_sync", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1743, + "kind": "EXCEPT", + "context": "_set_mcp_config_json_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 1865, + "kind": "EXCEPT", + "context": "_execute_gui_task_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2043, + "kind": "EXCEPT", + "context": "init_state", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2159, + "kind": "EXCEPT", + "context": "_read_ref_file_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2174, + "kind": "EXCEPT", + "context": "_flush_to_project_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2196, + "kind": "EXCEPT", + "context": "_deserialize_active_track_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2211, + "kind": "EXCEPT", + "context": "_serialize_tool_calls_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2228, + "kind": "EXCEPT", + "context": "_parse_token_history_first_ts_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2352, + "kind": "EXCEPT", + "context": "_parse_token_history_first_ts_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2354, + "kind": "EXCEPT", + "context": "_parse_token_history_first_ts_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2421, + "kind": "EXCEPT", + "context": "run_manual_prune", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2440, + "kind": "EXCEPT", + "context": "_load_project_from_path_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2461, + "kind": "EXCEPT", + "context": "_save_fallback_project_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2536, + "kind": "EXCEPT", + "context": "run_prune", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 2750, + "kind": "EXCEPT", + "context": "_run_pending_tasks_once_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3135, + "kind": "TRY", + "context": "_do_project_switch", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3139, + "kind": "EXCEPT", + "context": "_do_project_switch", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3157, + "kind": "EXCEPT", + "context": "_do_project_switch", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3340, + "kind": "EXCEPT", + "context": "_save_active_project_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3384, + "kind": "RAISE", + "context": "load_context_preset", + "category": "INTERNAL_RETHROW" + }, + { + "line": 3387, + "kind": "RAISE", + "context": "load_context_preset", + "category": "INTERNAL_RETHROW" + }, + { + "line": 3459, + "kind": "EXCEPT", + "context": "_run", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3485, + "kind": "EXCEPT", + "context": "_rag_search_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3507, + "kind": "EXCEPT", + "context": "_symbol_resolution_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3544, + "kind": "EXCEPT", + "context": "_list_models_for_provider_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3591, + "kind": "EXCEPT", + "context": "do_fetch", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 3628, + "kind": "RAISE", + "context": "_cb_save_preset", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 3795, + "kind": "EXCEPT", + "context": "do_post", + "category": "BOUNDARY_SDK" + }, + { + "line": 3817, + "kind": "EXCEPT", + "context": "do_post", + "category": "BOUNDARY_SDK" + }, + { + "line": 3939, + "kind": "EXCEPT", + "context": "worker", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 3982, + "kind": "EXCEPT", + "context": "worker", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 4059, + "kind": "EXCEPT", + "context": "worker", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 4264, + "kind": "EXCEPT", + "context": "_on_ai_stream", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 4591, + "kind": "EXCEPT", + "context": "_bg_task", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 4624, + "kind": "EXCEPT", + "context": "_bg_task", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 4628, + "kind": "EXCEPT", + "context": "_bg_task", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 4701, + "kind": "EXCEPT", + "context": "_topological_sort_tickets_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 4791, + "kind": "EXCEPT", + "context": "_start_track_logic_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 4893, + "kind": "EXCEPT", + "context": "_read_conductor_file_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 5029, + "kind": "EXCEPT", + "context": "_cb_load_track_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 5075, + "kind": "EXCEPT", + "context": "_push_mma_state_update_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 5120, + "kind": "EXCEPT", + "context": "_load_beads_from_path_result", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\gemini_cli_adapter.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 2, + "suspicious_count": 3, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 126, + "kind": "EXCEPT", + "context": "send", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 155, + "kind": "RAISE", + "context": "send", + "category": "INTERNAL_RETHROW" + }, + { + "line": 166, + "kind": "EXCEPT", + "context": "send", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 173, + "kind": "RAISE", + "context": "send", + "category": "INTERNAL_RETHROW" + }, + { + "line": 174, + "kind": "RAISE", + "context": "send", + "category": "INTERNAL_RETHROW" + } + ] + }, + { + "filename": "src\\api_hooks.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 12, + "suspicious_count": 2, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 88, + "kind": "EXCEPT", + "context": "_safe_controller_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 102, + "kind": "EXCEPT", + "context": "_parse_float_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 118, + "kind": "EXCEPT", + "context": "_run_callback_result", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 263, + "kind": "TRY", + "context": "get_val", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 294, + "kind": "TRY", + "context": "get_mma", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 329, + "kind": "TRY", + "context": "check_all", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 359, + "kind": "TRY", + "context": "get_state", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 476, + "kind": "EXCEPT", + "context": "do_GET", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 541, + "kind": "TRY", + "context": "get_val", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 836, + "kind": "EXCEPT", + "context": "do_POST", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 924, + "kind": "EXCEPT", + "context": "_handler", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 926, + "kind": "EXCEPT", + "context": "_handler", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 949, + "kind": "EXCEPT", + "context": "main", + "category": "INTERNAL_RETHROW" + }, + { + "line": 952, + "kind": "RAISE", + "context": "main", + "category": "INTERNAL_RETHROW" + } + ] + }, + { + "filename": "src\\shell_runner.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 2, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 20, + "kind": "EXCEPT", + "context": "", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 93, + "kind": "EXCEPT", + "context": "run_powershell", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 97, + "kind": "EXCEPT", + "context": "run_powershell", + "category": "INTERNAL_RETHROW" + }, + { + "line": 100, + "kind": "RAISE", + "context": "run_powershell", + "category": "INTERNAL_RETHROW" + }, + { + "line": 101, + "kind": "EXCEPT", + "context": "run_powershell", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\conductor_tech_lead.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 4, + "suspicious_count": 1, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 64, + "kind": "TRY", + "context": "generate_tickets", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 92, + "kind": "EXCEPT", + "context": "generate_tickets", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 97, + "kind": "RAISE", + "context": "generate_tickets", + "category": "INTERNAL_RETHROW" + }, + { + "line": 121, + "kind": "EXCEPT", + "context": "topological_sort", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 123, + "kind": "RAISE", + "context": "topological_sort", + "category": "INTERNAL_PROGRAMMER_RAISE" + } + ] + }, + { + "filename": "src\\log_pruner.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 1, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 91, + "kind": "EXCEPT", + "context": "prune", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 113, + "kind": "EXCEPT", + "context": "prune", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 117, + "kind": "RAISE", + "context": "prune", + "category": "INTERNAL_RETHROW" + }, + { + "line": 122, + "kind": "EXCEPT", + "context": "prune", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\models.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 4, + "suspicious_count": 1, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 267, + "kind": "RAISE", + "context": "__getattr__", + "category": "INTERNAL_RETHROW" + }, + { + "line": 451, + "kind": "EXCEPT", + "context": "from_dict", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 456, + "kind": "EXCEPT", + "context": "from_dict", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 507, + "kind": "EXCEPT", + "context": "from_dict", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 1082, + "kind": "EXCEPT", + "context": "load_mcp_config", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\outline_tool.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 1, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 51, + "kind": "EXCEPT", + "context": "outline", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 70, + "kind": "RAISE", + "context": "walk", + "category": "INTERNAL_RETHROW" + }, + { + "line": 93, + "kind": "EXCEPT", + "context": "walk", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 112, + "kind": "EXCEPT", + "context": "walk", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\theme_models.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 9, + "suspicious_count": 1, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 122, + "kind": "RAISE", + "context": "__post_init__", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 147, + "kind": "RAISE", + "context": "from_dict", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 152, + "kind": "RAISE", + "context": "from_dict", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 168, + "kind": "RAISE", + "context": "load_theme_file", + "category": "INTERNAL_RETHROW" + }, + { + "line": 172, + "kind": "EXCEPT", + "context": "load_theme_file", + "category": "BOUNDARY_SDK" + }, + { + "line": 173, + "kind": "RAISE", + "context": "load_theme_file", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 175, + "kind": "RAISE", + "context": "load_theme_file", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 192, + "kind": "EXCEPT", + "context": "load_themes_from_dir", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 207, + "kind": "EXCEPT", + "context": "load_themes_from_toml", + "category": "BOUNDARY_SDK" + }, + { + "line": 220, + "kind": "EXCEPT", + "context": "load_themes_from_toml", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\vendor_capabilities.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 0, + "suspicious_count": 1, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 42, + "kind": "RAISE", + "context": "get_capabilities", + "category": "INTERNAL_RETHROW" + } + ] + }, + { + "filename": "src\\warmup.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 1, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 96, + "kind": "RAISE", + "context": "submit", + "category": "INTERNAL_RETHROW" + }, + { + "line": 185, + "kind": "EXCEPT", + "context": "_warmup_one", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 320, + "kind": "EXCEPT", + "context": "_log_stderr", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 338, + "kind": "EXCEPT", + "context": "_fire_callback", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\aggregate.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 7, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 52, + "kind": "EXCEPT", + "context": "is_absolute_with_drive", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 107, + "kind": "EXCEPT", + "context": "compute_file_stats", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 109, + "kind": "EXCEPT", + "context": "compute_file_stats", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 271, + "kind": "EXCEPT", + "context": "build_file_items", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 275, + "kind": "EXCEPT", + "context": "build_file_items", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 279, + "kind": "EXCEPT", + "context": "build_file_items", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 452, + "kind": "EXCEPT", + "context": "build_tier3_context", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\api_hook_client.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 2, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 62, + "kind": "RAISE", + "context": "_make_request", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 74, + "kind": "EXCEPT", + "context": "_make_request", + "category": "BOUNDARY_SDK" + } + ] + }, + { + "filename": "src\\command_palette.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 2, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 43, + "kind": "RAISE", + "context": "register", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 122, + "kind": "EXCEPT", + "context": "_execute", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\commands.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 117, + "kind": "EXCEPT", + "context": "generate_md_only", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 149, + "kind": "EXCEPT", + "context": "save_all", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 274, + "kind": "EXCEPT", + "context": "reset_layout", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\context_presets.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 1, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 18, + "kind": "EXCEPT", + "context": "load_all", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\dag_engine.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 1, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 162, + "kind": "RAISE", + "context": "topological_sort", + "category": "INTERNAL_PROGRAMMER_RAISE" + } + ] + }, + { + "filename": "src\\diff_viewer.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 1, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 169, + "kind": "EXCEPT", + "context": "apply_patch_to_file", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\file_cache.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 2, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 61, + "kind": "EXCEPT", + "context": "_get_mtime_safe", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 83, + "kind": "RAISE", + "context": "__init__", + "category": "INTERNAL_PROGRAMMER_RAISE" + } + ] + }, + { + "filename": "src\\hot_reloader.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 2, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 29, + "kind": "RAISE", + "context": "register", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 61, + "kind": "EXCEPT", + "context": "reload", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\log_registry.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 5, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 97, + "kind": "EXCEPT", + "context": "load_registry", + "category": "BOUNDARY_SDK" + }, + { + "line": 135, + "kind": "EXCEPT", + "context": "save_registry", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 247, + "kind": "EXCEPT", + "context": "update_auto_whitelist_status", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 250, + "kind": "EXCEPT", + "context": "update_auto_whitelist_status", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 294, + "kind": "EXCEPT", + "context": "get_old_non_whitelisted_sessions", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\markdown_helper.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 2, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 124, + "kind": "EXCEPT", + "context": "_on_open_link", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 202, + "kind": "EXCEPT", + "context": "render", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\multi_agent_conductor.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 8, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 75, + "kind": "TRY", + "context": "wrapper", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 235, + "kind": "EXCEPT", + "context": "parse_json_tickets", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 237, + "kind": "EXCEPT", + "context": "parse_json_tickets", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 318, + "kind": "EXCEPT", + "context": "run", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 470, + "kind": "EXCEPT", + "context": "run_worker_lifecycle", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 521, + "kind": "EXCEPT", + "context": "run_worker_lifecycle", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 594, + "kind": "TRY", + "context": "run_worker_lifecycle", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 640, + "kind": "EXCEPT", + "context": "run_worker_lifecycle", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\openai_compatible.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 1, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 87, + "kind": "EXCEPT", + "context": "send_openai_compatible", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\orchestrator_pm.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 4, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 39, + "kind": "EXCEPT", + "context": "get_track_history_summary", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 51, + "kind": "EXCEPT", + "context": "get_track_history_summary", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 85, + "kind": "TRY", + "context": "generate_tracks", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 113, + "kind": "EXCEPT", + "context": "generate_tracks", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\paths.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 116, + "kind": "EXCEPT", + "context": "_resolve_path", + "category": "BOUNDARY_SDK" + }, + { + "line": 164, + "kind": "RAISE", + "context": "_cfg", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 267, + "kind": "EXCEPT", + "context": "_get_project_conductor_dir_from_toml", + "category": "BOUNDARY_SDK" + } + ] + }, + { + "filename": "src\\performance_monitor.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 1, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 136, + "kind": "EXCEPT", + "context": "_monitor_cpu", + "category": "BOUNDARY_SDK" + } + ] + }, + { + "filename": "src\\personas.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 24, + "kind": "RAISE", + "context": "_get_path", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 27, + "kind": "RAISE", + "context": "_get_path", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 95, + "kind": "EXCEPT", + "context": "_load_file", + "category": "BOUNDARY_SDK" + } + ] + }, + { + "filename": "src\\presets.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 5, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 36, + "kind": "EXCEPT", + "context": "load_all", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 46, + "kind": "EXCEPT", + "context": "load_all", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 60, + "kind": "RAISE", + "context": "save_preset", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 113, + "kind": "EXCEPT", + "context": "_load_file", + "category": "BOUNDARY_SDK" + }, + { + "line": 122, + "kind": "RAISE", + "context": "_save_file", + "category": "INTERNAL_PROGRAMMER_RAISE" + } + ] + }, + { + "filename": "src\\startup_profiler.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 2, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 28, + "kind": "EXCEPT", + "context": "_log_phase_output", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 54, + "kind": "TRY", + "context": "phase", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\summarize.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 37, + "kind": "EXCEPT", + "context": "_summarise_python", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 185, + "kind": "EXCEPT", + "context": "summarise_file", + "category": "BOUNDARY_CONVERSION" + }, + { + "line": 190, + "kind": "EXCEPT", + "context": "summarise_file", + "category": "BOUNDARY_CONVERSION" + } + ] + }, + { + "filename": "src\\summary_cache.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 4, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 43, + "kind": "EXCEPT", + "context": "load", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 54, + "kind": "EXCEPT", + "context": "save", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 99, + "kind": "EXCEPT", + "context": "clear", + "category": "INTERNAL_COMPLIANT" + }, + { + "line": 108, + "kind": "EXCEPT", + "context": "get_stats", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\theme_2.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 1, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 282, + "kind": "EXCEPT", + "context": "apply", + "category": "INTERNAL_COMPLIANT" + } + ] + }, + { + "filename": "src\\tool_presets.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 23, + "kind": "RAISE", + "context": "_get_path", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 26, + "kind": "RAISE", + "context": "_get_path", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 34, + "kind": "EXCEPT", + "context": "_read_raw", + "category": "BOUNDARY_SDK" + } + ] + }, + { + "filename": "src\\workspace_manager.py", + "in_refactored_baseline": false, + "violation_count": 0, + "compliant_count": 3, + "suspicious_count": 0, + "unclear_count": 0, + "has_error": false, + "error_message": "", + "findings": [ + { + "line": 25, + "kind": "RAISE", + "context": "_get_path", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 28, + "kind": "RAISE", + "context": "_get_path", + "category": "INTERNAL_PROGRAMMER_RAISE" + }, + { + "line": 78, + "kind": "EXCEPT", + "context": "_load_file", + "category": "BOUNDARY_SDK" + } + ] + } + ] +} diff --git a/tests/artifacts/PHASE1_SITE_INVENTORY.md b/tests/artifacts/PHASE1_SITE_INVENTORY.md new file mode 100644 index 00000000..6018857d --- /dev/null +++ b/tests/artifacts/PHASE1_SITE_INVENTORY.md @@ -0,0 +1,139 @@ +# Phase 1 Site Inventory — src/gui_2.py + +## Phase Summary + +| Phase | Count | Description | +|-------|-------|-------------| +| Phase 3 | 8 | Render-loop sites (called every frame, must not break rendering) | +| Phase 4 | 3 | Modal/dialog sites (can trigger imgui.open_popup inline) | +| Phase 5 | 13 | Event handler sites (accumulate in app._last_request_errors or similar) | +| Phase 7 | 1 | Worker/background sites (use app._report_worker_error; thread-safety) | +| Phase 8 | 4 | Property setter / state mutation / startup callback sites | +| Phase 9 | 1 | Helper/utility module-level sites | +| Phase 10 | 8 | INTERNAL_SILENT_SWALLOW sites (logging-only bodies, sliming-prone) | +| Phase 11 | 2 | INTERNAL_RETHROW classification (2 rethrow sites) | +| Phase 12 | 2 | UNCLEAR classification (lazy module loading, need Phase 1 audit review) | + +**Total: 42 sites** + +--- + +## Site Inventory + +| L# | Category | Phase | Context | Migration Target | Rationale | +|----|----------|-------|---------|------------------|-----------| +| 65 | UNCLEAR | 12 | _resolve | Retain lazy-loading fallback; document as intentional sentinel pattern | Lazy module loader fallback; AttributeError caught and leads to submodule attempt; not sliming | +| 69 | UNCLEAR | 12 | _resolve | Retain lazy-loading fallback; document as intentional sentinel pattern | ImportError/ModuleNotFoundError caught and returns _FiledialogStub; legitimate fallback | +| 216 | INTERNAL_SILENT_SWALLOW | 10 | _detect_refresh_rate_win32 | Accumulate in app._last_request_errors via app._append_diagnostic_error | Logging-only body; returns 0.0 fallback; sliming-prone | +| 241 | INTERNAL_SILENT_SWALLOW | 10 | _resolve_font_path | Accumulate in app._last_request_errors | Logging-only body at thirdparty boundary; returns fallback path silently | +| 567 | INTERNAL_SILENT_SWALLOW | 10 | _post_init | Phase 8 startup callback — accumulate via app._append_diagnostic_error | Startup callback; calls _diag_layout_state which logs to stderr | +| 591 | INTERNAL_BROAD_CATCH | 8 | _diag_layout_state | _render_diag_layout_result() -> Result[None, ErrorInfo] | One-shot startup diagnostic; uses sys.stderr.write; should use Result-drain helper | +| 684 | INTERNAL_SILENT_SWALLOW | 10 | run | Phase 8 startup guard — accumulate via app._append_diagnostic_error | Startup exception guard for immapp.run; logs to stderr then returns | +| 731 | INTERNAL_BROAD_CATCH | 3 | _load_fonts | _render_load_fonts_result() -> Result[None, ErrorInfo] | Called from run() at startup; thirdparty font loading; must not break render | +| 742 | INTERNAL_BROAD_CATCH | 3 | _load_fonts | _render_load_fonts_result() -> Result[None, ErrorInfo] | Second thirdparty font loading call; same helper as line 731 | +| 757 | INTERNAL_RETHROW | 11 | __getattr__ | Pattern 1: reraise AttributeError as ErrorInfo(kind=PROGRAMMER_ERROR) | First raise AttributeError — programmer raised, not caught then rethrown | +| 760 | INTERNAL_RETHROW | 11 | __getattr__ | Pattern 1: reraise AttributeError as ErrorInfo(kind=PROGRAMMER_ERROR) | Second raise AttributeError — programmer raised, not caught then rethrown | +| 905 | INTERNAL_BROAD_CATCH | 8 | _capture_workspace_profile | _capture_workspace_profile_result() -> Result[str, ErrorInfo] | Property setter-equivalent; imgui.save_ini_settings_to_memory thirdparty call | +| 979 | INTERNAL_SILENT_SWALLOW | 10 | shutdown | Phase 8 shutdown method — accumulate via app._append_diagnostic_error | Shutdown handler; bare except: swallows all errors silently | +| 1079 | INTERNAL_SILENT_SWALLOW | 8 | _gui_func | _render_first_frame_timing_result() -> Result[None, ErrorInfo] | First-frame callback timing; not in render hot path; uses sys.stderr.write | +| 1123 | INTERNAL_BROAD_CATCH | 3 | _gui_func | _render_main_interface_result() -> Result[None, ErrorInfo] | Render loop site; render_main_interface(self) called every frame | +| 1172 | INTERNAL_BROAD_CATCH | 3 | _show_menus | _render_show_menus_result() -> Result[None, ErrorInfo] | Render-loop menu bar; calls thirdparty win32gui functions every frame | +| 1198 | INTERNAL_BROAD_CATCH | 3 | _show_menus | _render_show_menus_result() -> Result[None, ErrorInfo] | Second win32gui call in _show_menus; same helper | +| 1223 | INTERNAL_BROAD_CATCH | 3 | _show_menus | _render_show_menus_result() -> Result[None, ErrorInfo] | Third win32gui call in _show_menus; same helper | +| 1285 | INTERNAL_BROAD_CATCH | 3 | _handle_history_logic | _render_history_logic_result() -> Result[None, ErrorInfo] | Render-loop history handler; called every frame | +| 1335 | INTERNAL_BROAD_CATCH | 5 | _populate_auto_slices | Accumulate in app._last_request_errors via _handle_mcp_error | Event handler; mcp_client calls; result accumulates in error state | +| 1344 | INTERNAL_BROAD_CATCH | 5 | _populate_auto_slices | Accumulate in app._last_request_errors via _handle_mcp_error | Second mcp_client call; same error drain | +| 1398 | INTERNAL_SILENT_SWALLOW | 9 | _close_vscode_diff | _handle_close_vscode_diff_result() -> Result[None, ErrorInfo] | Helper/utility method; process cleanup; exceptions drained not swallowed | +| 1418 | INTERNAL_BROAD_CATCH | 5 | _apply_pending_patch | Accumulate in app._last_request_errors via _handle_patch_error | Event handler for patch modal; error goes to modal message | +| 1444 | INTERNAL_BROAD_CATCH | 5 | _open_patch_in_external_editor | Accumulate in app._last_request_errors via _handle_patch_error | Event handler for external editor launch; exceptions set _patch_error_message | +| 1479 | INTERNAL_BROAD_CATCH | 5 | request_patch_from_tier4 | Accumulate in app._last_request_errors via _handle_tier4_error | Event handler; calls run_tier4_patch_generation; error drains to modal | +| 1593 | INTERNAL_SILENT_SWALLOW | 10 | render_main_interface | Phase 3 render — use _render_main_interface_result() not sys.stderr | Called from _gui_func render loop; exception logged to stderr | +| 1619 | INTERNAL_SILENT_SWALLOW | 10 | render_main_interface | Phase 3 render — use _render_main_interface_result() not sys.stderr | Second logging site in render_main_interface; auto-save failure | +| 3214 | INTERNAL_BROAD_CATCH | 5 | render_tool_preset_manager_content | Accumulate in app._last_request_errors via _handle_preset_error | Modal content renderer; exception drains to ai_status | +| 3449 | INTERNAL_BROAD_CATCH | 4 | render_persona_editor_window | render_persona_editor_result() -> Result[None, ErrorInfo] (modal) | Modal window renderer; can call imgui.open_popup; Phase 4 | +| 3633 | INTERNAL_BROAD_CATCH | 5 | render_context_batch_actions | Accumulate in app._last_request_errors via _handle_context_error | Modal content renderer; exception from _do_generate() drains to preview | +| 3769 | INTERNAL_BROAD_CATCH | 4 | render_ast_inspector_modal | render_ast_inspector_result() -> Result[None, ErrorInfo] (modal) | Modal renderer; makes mcp_client calls; Phase 4 | +| 3796 | INTERNAL_BROAD_CATCH | 4 | render_ast_inspector_modal | render_ast_inspector_result() -> Result[None, ErrorInfo] (modal) | Second mcp_client call; same helper | +| 4418 | INTERNAL_BROAD_CATCH | 7 | worker | Use app._report_worker_error(msg) with thread-safe accumulation | Background worker thread; thread-safe error reporting | +| 4836 | INTERNAL_SILENT_SWALLOW | 8 | _on_warmup_complete_callback | Phase 8 startup callback — thread-safe Result accumulation | IO pool thread callback; lock-protected append; bare except pass | +| 4849 | INTERNAL_BROAD_CATCH | 3 | render_warmup_status_indicator | _render_warmup_status_result() -> Result[None, ErrorInfo] | Render-loop indicator; called every frame | +| 5430 | INTERNAL_BROAD_CATCH | 5 | render_operations_hub | Accumulate in app._last_request_errors via _handle_ops_error | Tab content renderer; exception drains to ai_status | +| 5836 | INTERNAL_BROAD_CATCH | 5 | render_text_viewer_window | Accumulate in app._last_request_errors via _handle_text_viewer_error | Window renderer; exception drains to error text display | +| 5970 | INTERNAL_BROAD_CATCH | 5 | render_external_editor_panel | Accumulate in app._last_request_errors via _handle_external_editor_error | Panel renderer; exception drains to panel error text | +| 6817 | INTERNAL_SILENT_SWALLOW | 10 | render_tier_stream_panel | Phase 3 render — use _render_tier_stream_result() not sys.stderr | Render-loop panel; exception from imgui.set_scroll_here_y logged to stderr | +| 7152 | INTERNAL_SILENT_SWALLOW | 5 | render_task_dag_panel | Accumulate in app._last_request_errors via _handle_dag_error | Modal content renderer; exception drains to error display | +| 7168 | INTERNAL_SILENT_SWALLOW | 5 | render_task_dag_panel | Accumulate in app._last_request_errors via _handle_dag_error | Second exception site; ticket ID parsing error | +| 7258 | INTERNAL_BROAD_CATCH | 5 | render_beads_tab | Accumulate in app._last_request_errors via _handle_beads_error | Tab renderer; exception drains to error text | + +--- + +## Migration Target Naming Conventions + +### Render-loop helpers (Phase 3) +- _render__result() — returns Result[None, ErrorInfo], called from render loop + +### Modal/dialog helpers (Phase 4) +- render__result() — returns Result[None, ErrorInfo], modal content renderers + +### Event handler error drains (Phase 5) +- _handle__error(msg: str) — accumulates in app._last_request_errors + +### Worker/background helpers (Phase 7) +- app._report_worker_error(msg: str) — thread-safe error reporting + +### Property setter / state mutation helpers (Phase 8) +- _capture__result() — returns Result[T, ErrorInfo] for state capture +- _render__result() for startup callbacks + +### Helper/utility (Phase 9) +- _handle__result() — utility method error handling + +### SILENT_SWALLOW drains (Phase 10) +- _append_diagnostic_error(context: str, msg: str) — accumulates diagnostic errors +- For render-loop SILENT_SWALLOW: same helper as Phase 3 + +### INTERNAL_RETHROW patterns (Phase 11) +- Pattern 1: ErrorInfo(kind=PROGRAMMER_ERROR) for raise AttributeError +- Pattern 2: raise ErrorInfo(kind=PROGRAMMER_ERROR) from caught exception +- Pattern 3: drain to sys.stderr.write + sys.exit(1) + +--- + +## Sites Inspected (line ranges) + +| Lines Read | Purpose | +|------------|---------| +| 50-100 | _resolve, _LazyModule, _FiledialogStub (UNCLEAR sites) | +| 210-250 | _detect_refresh_rate_win32, _resolve_font_path | +| 560-600 | _post_init, _diag_layout_state | +| 680-770 | run, _load_fonts, __getattr__ | +| 800-820 | _get_active_capabilities (compliant baseline) | +| 860-920 | _apply_snapshot, _capture_workspace_profile | +| 975-1000 | shutdown | +| 1070-1140 | _gui_func | +| 1165-1240 | _show_menus | +| 1280-1360 | _handle_history_logic, _populate_auto_slices | +| 1390-1500 | _close_vscode_diff, _apply_pending_patch, _open_patch_in_external_editor, request_patch_from_tier4 | +| 1585-1640 | render_main_interface | +| 3200-3260 | render_tool_preset_manager_content | +| 3440-3500 | render_persona_editor_window | +| 3625-3680 | render_context_batch_actions | +| 3760-3820 | render_ast_inspector_modal | +| 4410-4470 | worker (context preview) | +| 4830-4870 | _on_warmup_complete_callback, render_warmup_status_indicator | +| 5420-5480 | render_operations_hub | +| 5830-5900 | render_text_viewer_window | +| 5960-6020 | render_external_editor_panel | +| 6810-6860 | render_tier_stream_panel | +| 7145-7190 | render_task_dag_panel | +| 7250-7282 | render_beads_tab | + +--- + +## Confidence Notes + +- Lines 757, 760 (__getattr__ raises): Both are raise AttributeError(name) — these are original raises, not rethrows. Audit classifies as INTERNAL_RETHROW but pattern is actually INTERNAL_PROGRAMMER_RAISE. Recommend Phase 11 as Pattern 1 (reraise as ErrorInfo(kind=PROGRAMMER_ERROR)). +- Lines 65, 69 (_resolve): These are legitimate lazy-loading fallbacks with _FiledialogStub sentinel. Not sliming. Recommend Phase 12 for UNCLEAR resolution — may be reclassified as INTERNAL_COMPLIANT. +- Lines 1593, 1619 (render_main_interface): Both are in render_main_interface called from _gui_func render loop. Phase 10 (SILENT_SWALLOW) for logging bodies; Phase 3 for the render site. Recommend Phase 3 helper with stderr-to-Result drain. +- Line 6817 (render_tier_stream_panel): SILENT_SWALLOW with sys.stderr.write in render loop. Phase 10 for logging body; Phase 3 for render site. +- Line 1079 (_gui_func first-frame timing): Startup callback, not render hot path. Phase 8 rather than Phase 3.