"""DOC-09 / AP-10 — PUBLIC_API.md lists every public __all__ name."""

from __future__ import annotations

import importlib
from pathlib import Path


def test_md_lists_every_all_name() -> None:
    md = (Path(__file__).resolve().parents[2] / "PUBLIC_API.md").read_text(encoding="utf-8")
    mod = importlib.import_module("mgf.logship")
    missing = [n for n in mod.__all__ if n != "__version__" and f"`{n}`" not in md and n not in md]
    assert not missing, f"PUBLIC_API.md missing (DOC-09/AP-10): {missing}"
