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.
Doc consistency: guide_ai_client.md, guide_app_controller.md, and
the error_handling styleguide now reference the new symbol name.
Also fixes two consistency issues in error_handling.md introduced by
the mechanical rename:
1. The 'Deprecation: send -> send_result' section (lines 623-642) was
rewritten as a 'Historical deprecation (added 2026-06-15, reverted
2026-06-16)' note that points to the relevant track specs.
2. Line 204 (the 'Current State Audit' summary for src/ai_client.py)
had a self-contradictory claim ('send() is the new public API;
send() is @deprecated') after the rename. Updated to describe
the canonical public API.
Historical archives (conductor/tracks/*/spec.md, conductor/tracks/*/plan.md,
docs/reports/*) are NOT modified - they document the 2026-06-15
public_api_migration decision and stay as historical record.