For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
- turn_context_compaction: shared home for _clear_overflow_warn,
_reset_retry_state_after_compaction, _blocked_compress_reason,
_apply_grown_window, _refund_api_call (used by turn_preflight and the
turn-start preflight passes).
- turn_context: _with_persist_lock + _clear_staged_cli_input_if_persisted +
two try/except/finally wrappers -> one _persist_under_lock; MoA sanitize
model extracted to _sanitize_model_for; predicates flattened.
- turn_preflight: PreflightVerdict merged into PreflightGateVerdict (the
gate's carrier) and mutated in place; duplicate guard chain + refund blocks
collapsed onto the shared helpers.
- turn_preflight_gate: builds the carrier once, no re-unpack of the inner
verdict.
- turn_iteration_prep: step-callback tool-round scan and steer injection lifted
into helpers; dead _verdict closures on always-fallthrough paths removed.