"""Conformance test for the draft pilot-candidate Phase Manifests (WP-0008-T03, examples/pilot-candidates/). These are non-binding worked examples, not real Phases, but they must stay schema-conformant like examples/phase-001/ does. """ from __future__ import annotations import json import pytest from conftest import REPO_ROOT from target_revenue import validation PILOT_CANDIDATES_DIR = REPO_ROOT / "examples" / "pilot-candidates" PILOT_CANDIDATE_NAMES = [ "net-kingdom-local-identity", "railiance-vergabe-teilnahme", "info-tech-canon-service-surface", ] @pytest.mark.parametrize("name", PILOT_CANDIDATE_NAMES) def test_pilot_candidate_manifest_is_conformant(name): manifest = json.loads((PILOT_CANDIDATES_DIR / name / "manifest.json").read_text()) validation.validate_phase_manifest(manifest) assert manifest["phase"]["id"].startswith("trsl:phase:draft-") @pytest.mark.parametrize("name", PILOT_CANDIDATE_NAMES) def test_pilot_candidate_ledger_is_empty_draft_state(name): ledger = json.loads((PILOT_CANDIDATES_DIR / name / "ledger.json").read_text()) assert ledger == [], "draft candidates must not carry any real ledger entries"