def history_has_snapshots(history: list[dict]) -> bool:
    """Return True when at least one document snapshot is present in history."""
    for msg in history:
        for doc in msg.get("__documents__") or []:
            if doc.get("snapshots"):
                return True
    return False
