test_landing_integrity.py python
35 lines 1.1 KB
Raw
sha256:0e9549ec7b463911bc08b7d586dc320b1ac9b1f5c943ee7e3865dcc6cb0f6f83 chore(governance): sync handover+roadmap to 84db8c8 (drift:… Human 1 day ago
1 """Data-integrity tests — landing manifest and validator idempotency."""
2
3 from __future__ import annotations
4
5 from pathlib import Path
6
7 from tools.landing.schema import load_manifest
8 from tools.landing.validate import validate_landing
9
10 KIT_ROOT = Path(__file__).resolve().parents[2]
11
12
13 def test_manifest_section_order_stable() -> None:
14 path = KIT_ROOT / "docs" / "landing" / "manifest.yaml"
15 first = load_manifest(path).section_ids
16 second = load_manifest(path).section_ids
17 assert first == second
18 assert first[0] == "hero"
19 assert first[-1] == "scenarios"
20
21
22 def test_validate_idempotent_on_kit_root() -> None:
23 r1 = validate_landing(KIT_ROOT)
24 r2 = validate_landing(KIT_ROOT)
25 assert r1.ok and r2.ok
26 assert r1.errors == r2.errors == []
27
28
29 def test_persona_badge_count_matches_manifest() -> None:
30 manifest = load_manifest(KIT_ROOT / "docs" / "landing" / "manifest.yaml")
31 html = (KIT_ROOT / "docs" / "landing" / "scenarios" / "index.html").read_text(
32 encoding="utf-8"
33 )
34 for persona_id in manifest.persona_ids:
35 assert html.count(f'id="persona-{persona_id}"') == 1
File History 1 commit
sha256:6abcf1fa82a7a621ccbc945f19acdba5bc0db54569599404a1452fb4a096a199 fix(ISR): default require_independent_second_reviewer to require Human minor 1 day ago