test_governance_freshness_performance.py python
25 lines 923 B
Raw
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1 docs: MuseHub-first before ISR #74 — staging solidify NEXT Human 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:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1 docs: MuseHub-first before ISR #74 — staging solidify NEXT Human 1 day ago