"""Kind-extension completeness meta-test (SPEC §7.6).

A registered ``kind`` without a probe handler (or without a golden fixture entry
exercising it) fails here — the library cannot grow an unverifiable branch.
"""

from __future__ import annotations

from mgf.secrets.model import KINDS
from mgf.secrets.probes import PROBES


def test_every_kind_has_a_probe_handler() -> None:
    missing = set(KINDS) - set(PROBES)
    assert not missing, f"kinds without a probe handler: {sorted(missing)}"


def test_no_orphan_probe_handlers() -> None:
    orphan = set(PROBES) - set(KINDS)
    assert not orphan, f"probe handlers for unknown kinds: {sorted(orphan)}"


def test_every_kind_is_exercised_by_a_fixture_entry() -> None:
    """Each kind must appear in the incident-replay fixture corpus so growth is
    accompanied by a verifying fixture (not just a handler)."""
    from tests.unit import test_incident_replays as replays

    covered = replays.KINDS_UNDER_TEST
    missing = set(KINDS) - covered
    assert not missing, f"kinds with no replay/fixture coverage: {sorted(missing)}"
