test_large_footprint.py python
44 lines 1.6 KB
Raw
sha256:0e9549ec7b463911bc08b7d586dc320b1ac9b1f5c943ee7e3865dcc6cb0f6f83 chore(governance): sync handover+roadmap to 84db8c8 (drift:… Human 2 days ago
1 """Stress tests for large footprint handling."""
2
3 from __future__ import annotations
4
5 from pathlib import Path
6
7 from cli.version_lock import read_version_lock
8 from tests.support import run_cli
9
10
11 def test_large_footprint_only_scope(tmp_path: Path, monkeypatch) -> None:
12 kit = tmp_path / "kit"
13 kit.mkdir()
14 (kit / "VERSION").write_text("0.1.0\n", encoding="utf-8")
15 for sub in ("templates", "policy", "cursor/rules", "cursor/skills/big"):
16 (kit / sub).mkdir(parents=True)
17 (kit / "templates" / "OVERSEER-HANDOVER.template.md").write_text("# {{repo.name}}\n", encoding="utf-8")
18 (kit / "templates" / "ROADMAP.template.md").write_text("# Roadmap\n", encoding="utf-8")
19 (kit / "templates" / "STANDING-DECISIONS.template.md").write_text("| SD-1 |\n", encoding="utf-8")
20
21 for index in range(200):
22 (kit / "policy" / f"p{index}.yaml").write_text(f"k: {index}\n", encoding="utf-8")
23 (kit / "cursor" / "rules" / f"r{index}.mdc").write_text(f"rule {index}\n", encoding="utf-8")
24 (kit / "cursor" / "skills" / "big" / "SKILL.md").write_text("x" * 100_000 + "\n", encoding="utf-8")
25
26 repo = tmp_path / "repo"
27 repo.mkdir()
28 assert run_cli(
29 ["init", "--regime", "git-only", "--non-interactive"],
30 cwd=repo,
31 kit=kit,
32 ) == 0
33
34 conflict = repo / ".overseer" / "policy" / "p0.yaml"
35 conflict.write_text("edited\n", encoding="utf-8")
36
37 code = run_cli(
38 ["sync", "-y", "--only", ".overseer/policy/p1.yaml"],
39 cwd=repo,
40 kit=kit,
41 )
42 assert code == 0
43 lock = read_version_lock(repo / ".overseer" / "version.lock")
44 assert len(lock.footprint) >= 200
File History 1 commit
sha256:6abcf1fa82a7a621ccbc945f19acdba5bc0db54569599404a1452fb4a096a199 fix(ISR): default require_independent_second_reviewer to require Human minor 2 days ago