b9b1b2919e
TIER-2 READ conductor/code_styleguides/error_handling.md before Phase 12.0.1.
The 7 sections reviewed: (1) The 5 Patterns, (2) Decision Tree, (3)
Anti-Patterns, (4) Hard Rules, (5) Boundary Types, (6) The Broad-Except
Distinction, (7) AI Agent Checklist.
12.0.1 changes to the styleguide:
(A) Add 'Drain Points: Where Result[T] Propagation Terminates' section
after 'Boundary Types'. Codifies the user's principle (2026-06-17):
'IF ANY PLACE HAS A ERROR LOG IT ALSO NEEDS A RESULT[T]. RESULT[T]
PROPOGATES UNTIL IT REACHED A DRAIN POINT WHERE THE ERROR CAN BE
HANDLED APPROPRIATELY WITHOUT CRASHING THE APP.'
The 5 drain point patterns: HTTP error response, GUI error display,
intentional app termination, telemetry emission, bounded retry.
Each has a code example and a 'NOT a drain' counter-example.
Explicitly states: sys.stderr.write(...) alone is NOT a drain.
(B) Update 'The Broad-Except Distinction' table to add an explicit row:
'narrow except + log only | INTERNAL_SILENT_SWALLOW | Violation'.
Adds 5 new rows for the 5 drain-point patterns (all Heuristic D
compliant). Makes Heuristic #19 laundering impossible by spelling
out narrow+log = violation.
(C) Add Rule #0 to the AI Agent Checklist: 'READ THIS STYLEGUIDE
FIRST'. Forces every agent to read end-to-end before writing
try/except code; acknowledge the read in the commit message.
Cites the Phase 10 LAUNDERING HEURISTICS incident as the reason.