test_k7_dogfood_cycle.py python
50 lines 1.8 KB
Raw
sha256:4671b7f787ddbe63ced31c895b688c77ab495653b65a730b423329f26b3c1439 feat: K1-P1 complete — agent provenance, build-verification… Sonnet 4.6 patch 55 days ago
1 """E2E fixture dogfood cycle for K7 bridge footprint (§K7.8 e2e tier)."""
2
3 from __future__ import annotations
4
5 import json
6 from pathlib import Path
7
8 from cli.footprint import MUSE_BRIDGE_DEPLOY_DEST, MUSE_BRIDGE_WORKFLOW_DEST
9 from tests.support import FIXTURES, muse_mirror_status_runner, ok, run_cli, seed_muse_substrate
10
11
12 def test_k7_fixture_dogfood_cycle_no_live_muse(tmp_path: Path) -> None:
13 runner = muse_mirror_status_runner(tmp_path)
14 root = str(tmp_path.resolve())
15 runner.responses.update(
16 {
17 f"muse -C {root} rev-parse main": ok('{"commit_id": "' + "a" * 40 + '"}'),
18 "git rev-parse origin/main": ok("b" * 40),
19 "git rev-parse origin/muse-mirror": ok("c" * 40),
20 "gh pr list --state merged --limit 5 --json number,title,mergeCommit,mergedAt": ok(
21 json.dumps([])
22 ),
23 }
24 )
25 seed_muse_substrate(tmp_path)
26 (tmp_path / ".muse" / "git-bridge.toml").write_text(
27 '[last_export]\ngit_sha = "' + ("d" * 40) + '"\n'
28 '[last_import]\ngit_sha = "' + ("d" * 40) + '"\n',
29 encoding="utf-8",
30 )
31 assert (
32 run_cli(
33 [
34 "init",
35 "--from-config",
36 str(FIXTURES / "config-overseer-kit-dogfood.yaml"),
37 "--non-interactive",
38 ],
39 cwd=tmp_path,
40 runner=runner,
41 )
42 == 0
43 )
44 assert (tmp_path / MUSE_BRIDGE_WORKFLOW_DEST).is_file()
45 assert (tmp_path / MUSE_BRIDGE_DEPLOY_DEST).is_file()
46 assert run_cli(["status", "--check-footprint"], cwd=tmp_path, runner=runner) == 0
47 assert run_cli(["governance-sync", "--dry-run"], cwd=tmp_path, runner=runner) == 0
48 assert run_cli(["sync", "-y"], cwd=tmp_path, runner=runner) == 0
49 muse_calls = [c for c in runner.calls if "bridge git-export" in c[0]]
50 assert muse_calls == []
File History 1 commit
sha256:4671b7f787ddbe63ced31c895b688c77ab495653b65a730b423329f26b3c1439 feat: K1-P1 complete — agent provenance, build-verification… Sonnet 4.6 patch 55 days ago