2ed449ee5f
Phase 11.3.2. CONTEXT-MANAGER EXCEPTION. The plan claimed 'StartupProfiler.phase() is NOT a context manager; tier-2's claim is factually wrong.' This is incorrect. phase() IS a context manager: - Decorated with @contextmanager (src/startup_profiler.py:26) - Used in 13 'with startup_profiler.phase(...)' call sites in src/gui_2.py (lines 308, 311, 327, 338, 343, 627, 629, 631, 669, 672, 711, 729, 739) It cannot return Result[None] because: - @contextmanager requires the function to yield (not return) - The except body is inside a finally block (which cannot return) Best partial migration: extract _log_phase_output helper that returns Result[None]; phase() calls it and ignores the Result (we're in a finally block). Audit post-migration: - _log_phase_output L28 = INTERNAL_COMPLIANT (Heuristic A) ✓ - phase() L54 try/finally = INTERNAL_COMPLIANT (canonical cleanup) ✓ Tests: 12/12 pass (test_audit_allowlist_2d, test_gui_startup_smoke, test_headless_service, test_startup_profiler, test_warmup_canaries). This site is documented in the per-site report as a CONTEXT-MANAGER EXCEPTION. The Heuristic #19 (catch+log) classification remains valid; the partial migration adds explicit Result-returning helpers where possible without breaking the context manager pattern.