"""Shared utilities: logging, checkpointing, code extraction."""