ae65a6c3fe
Phase 7 = Strict Enforcement Cleanup. 4 sites in src/app_controller.py
(L242, L256, L5064, L5093) are still classified compliant by the audit
via heuristic over-application, but strictly per error_handling.md:530
('logging is NOT a drain') they remain silent-swallow violations:
- L242, L256 in _api_generate: sys.stderr.write only (BOUNDARY_FASTAPI
over-application: scripts/audit_exception_handling.py:319-321 + 393-397
classify all nested try/except in _api_* handlers as compliant,
regardless of whether the except body raises HTTPException)
- L5064 _push_mma_state_update: logging.debug + print, no Result
- L5093 _load_active_tickets.beads inner: logging.debug + print, no Result
Phase 7 migrates all 4 to proper Result[T] propagation using the Phase 6
helpers already in the file (_rag_search_result, _symbol_resolution_result,
_report_worker_error), adds new Result helpers for _push_mma_state_update
and _load_beads_from_path, and tightens the audit heuristic so BOUNDARY_FASTAPI
only applies when the except body actually raises HTTPException or returns
a Result.
Spec.md sections 22.1-22.9 (9 sections, 111 lines); plan.md Phase 7 with
13 worker-ready tasks (81 lines); state.toml adds phase_7 entry + 13 t7_*
tasks + [verification.phase_7] block (25 lines); metadata.json adds 3
verification_criteria, 3 risk_register entries, 2 modified_files, and
updates estimated_effort.scope to reflect Phase 7 (49 migration sites
total, 25+ atomic commits).