test_check_ok_cycle.py file-level

at sha256:a · View file ↗ · Intel ↗

History
1 files
1 commits
0 hotspots
0 🧊 dead
0 💥 blast risk
sha256:6 fix(ISR): default require_independent_second_reviewer to require Opera… · aaronrene · Sep 2, 2026
1 """E2E — scaffold → check-ok → equivalent review --freeze on same artifact."""
2
3 from __future__ import annotations
4
5 from pathlib import Path
6
7 from cli.kit_root import kit_root
8 from tests.support import git_status_runner, pass_provider_factory, run_cli, write_config
9
10
11 def test_scaffold_then_check_and_review_agree(tmp_path: Path) -> None:
12 write_config(tmp_path, "config-git-only.yaml")
13 assert (
14 run_cli(
15 ["check-ok", "--topic", "e2e-cycle", "--scaffold-only"],
16 cwd=tmp_path,
17 runner=git_status_runner(),
18 kit=kit_root(),
19 )
20 == 0
21 )
22 artifact = next((tmp_path / "docs" / "reviews").glob("*-e2e-cycle.md"))
23 rel = artifact.relative_to(tmp_path).as_posix()
24
25 code_cio = run_cli(
26 ["check-ok", "--path", rel, "--dry-run"],
27 cwd=tmp_path,
28 runner=git_status_runner(),
29 kit=kit_root(),
30 review_provider_factory=pass_provider_factory(),
31 )
32 code_review = run_cli(
33 ["review", "--freeze", rel, "--dry-run"],
34 cwd=tmp_path,
35 runner=git_status_runner(),
36 kit=kit_root(),
37 review_provider_factory=pass_provider_factory(),
38 )
39 assert code_cio == code_review