test_track_o_harness.py python
50 lines 1.6 KB
Raw
sha256:8461d44b77376fbf06fa7c3e085d309e3010fd8d5886d63c63e69ce118811ad4 docs: record AFF-b feature-tip SHAs after AFF-b-ISR commit. Human 4 days ago
1 """Integration tests — Track O harness on fixture contract docs (§O0.8 integration)."""
2
3 from __future__ import annotations
4
5 from tools.track_o.validate import MINIMAL_VALID_CONTRACT, validate_contract_fixture
6
7
8 def test_valid_fixture_ok() -> None:
9 result = validate_contract_fixture(MINIMAL_VALID_CONTRACT)
10 assert result.ok, result.errors
11
12
13 def test_missing_stage3_heading_fails_closed() -> None:
14 bad = MINIMAL_VALID_CONTRACT.replace(
15 "### Stage 3 — Optional GitHub backup",
16 "### Stage Three — Backup later",
17 )
18 result = validate_contract_fixture(bad)
19 assert not result.ok
20 assert any("missing_stage" in e for e in result.errors)
21
22
23 def test_missing_stage4_heading_fails_closed() -> None:
24 bad = MINIMAL_VALID_CONTRACT.replace(
25 "### Stage 4 — Optional Knowtation bind",
26 "### Optional vault",
27 )
28 result = validate_contract_fixture(bad)
29 assert not result.ok
30 assert any("missing_stage" in e for e in result.errors)
31
32
33 def test_mutated_boundary_missing_kit_owns_fails_closed() -> None:
34 bad = MINIMAL_VALID_CONTRACT.replace(
35 "`ok init` / regimes / adapters | **Owns**",
36 "regimes | Consumes",
37 )
38 result = validate_contract_fixture(bad)
39 assert not result.ok
40 assert any("missing_boundary" in e for e in result.errors)
41
42
43 def test_stage3_one_click_shipped_claim_fails_closed() -> None:
44 bad = (
45 MINIMAL_VALID_CONTRACT
46 + "\n\nStage 3 one-click backup is shipped and available without O2.\n"
47 )
48 result = validate_contract_fixture(bad)
49 assert not result.ok
50 assert any("one_click_shipped" in e for e in result.errors)
File History 1 commit
sha256:8461d44b77376fbf06fa7c3e085d309e3010fd8d5886d63c63e69ce118811ad4 docs: record AFF-b feature-tip SHAs after AFF-b-ISR commit. Human 4 days ago