chore: TIER-2 READ conductor/code_styleguides/error_handling.md lines 625-690 (Re-Raise Patterns 1/2/3) before Phase 11
Per AI Agent Checklist Rule #0. Phase 11 focuses on the 2 INTERNAL_RETHROW sites in src/gui_2.py at L757, L760. These are in the App class's __getattr__ method: def __getattr__(self, name: str) -> Any: if name == 'controller': raise AttributeError(name) # L757 if hasattr(self, 'controller') and hasattr(self.controller, name): return getattr(self.controller, name) raise AttributeError(name) # L760 Per the styleguide Re-Raise Patterns (lines 625-690), these are NOT try/except + raise; they are bare raises. The audit script misclassifies them as INTERNAL_RETHROW. They should be INTERNAL_PROGRAMMER_RAISE (compliant; raise is reserved for programmer errors and 'this attribute doesn't exist' is the canonical __getattr__ behavior). The audit heuristic at scripts/audit_exception_handling.py does not have a clause for 'bare raise AttributeError in __getattr__'. We need to add this heuristic per the result_migration_review_pass_20260617 pattern (which added heuristics for raise NotImplementedError as whole body and raise X inside if x is None: guard). Plan for Phase 11: 1. Add new heuristic to scripts/audit_exception_handling.py: bare raise <AttributeError | NameError | AttributeError> in __getattr__/__getattribute__/__delattr__/__setattr__ -> INTERNAL_PROGRAMMER_RAISE 2. Add 5 regression-guard tests in tests/test_audit_heuristics.py 3. Verify audit count drops by 2 (INTERNAL_RETHROW = 0 for gui_2.py) 4. Verify --strict still passes
This commit is contained in: