test_governance_freshness_performance.py python
25 lines 923 B
Raw
sha256:c07f2f34a0db9f43fe866f157d1935322008545ff8940c06c7c921eb219c55ab NXP-b DONE: independent BV-r2 pass + ISR (SD-17) Human minor ⚠ breaking 1 day ago
1 """Performance: status GFG adds no gh invocation (§GFG.9 performance)."""
2
3 from __future__ import annotations
4
5 from pathlib import Path
6
7 from tests.support import FIXTURES, git_status_runner, run_cli, seed_governance_freshness
8
9
10 def test_status_exit_code_adds_no_gh_for_gfg(tmp_path: Path) -> None:
11 runner = git_status_runner()
12 assert (
13 run_cli(
14 ["init", "--from-config", str(FIXTURES / "config-git-only.yaml"), "--non-interactive"],
15 cwd=tmp_path,
16 runner=runner,
17 )
18 == 0
19 )
20 seed_governance_freshness(tmp_path)
21 before = len(runner.calls)
22 run_cli(["status", "--json", "--exit-code"], cwd=tmp_path, runner=runner, json_mode=True)
23 new_cmds = [cmd for cmd, _ in runner.calls[before:]]
24 assert not any(cmd.startswith("gh ") or " gh " in f" {cmd}" for cmd in new_cmds)
25 assert any("git rev-parse origin/main" in cmd for cmd in new_cmds)
File History 1 commit
sha256:c07f2f34a0db9f43fe866f157d1935322008545ff8940c06c7c921eb219c55ab NXP-b DONE: independent BV-r2 pass + ISR (SD-17) Human minor 1 day ago