test_governance_freshness_performance.py python
25 lines 923 B
Raw
sha256:106ef9e12cca7f3be3ffb2a6bd3abfa76f032dce453c9e5010d732a8d86f2e14 Reconcile reviewed credential compatibility 32254cd939885d9… Human patch 8 days 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 2 commits
sha256:106ef9e12cca7f3be3ffb2a6bd3abfa76f032dce453c9e5010d732a8d86f2e14 Reconcile reviewed credential compatibility 32254cd939885d9… Human patch 8 days ago
sha256:c87cf2c2f03da507f66f93922cb339a2cbebb33ad6372a6039032fb09a20da12 Reconcile reviewed Overseer recovery d47291d5d9030de5ebef71… Human minor ⚠ 8 days ago