generated from coulomb/repo-seed
Implement scope-derived candidate review infrastructure
This commit is contained in:
@@ -216,6 +216,43 @@ def test_list_legacy_auto_approvals_cli_writes_json_inventory(tmp_path):
|
||||
assert records[0]["current_approved_ability_count"] == 1
|
||||
|
||||
|
||||
def test_assess_dataset_cli_reports_sparse_hierarchy_issues(tmp_path):
|
||||
service = make_service(tmp_path)
|
||||
source = tmp_path / "scope-only"
|
||||
source.mkdir()
|
||||
(source / "SCOPE.md").write_text(
|
||||
"# SCOPE\n\n## One-liner\nScope-only current behavior.\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
repository = service.register_repository(name="Scope Only", url=str(source))
|
||||
service.analyze_repository(repository.id, use_llm_assistance=False)
|
||||
output_path = tmp_path / "dataset.json"
|
||||
|
||||
exit_code = main(
|
||||
[
|
||||
"assess-dataset",
|
||||
"--format",
|
||||
"json",
|
||||
"--output",
|
||||
str(output_path),
|
||||
"--database-path",
|
||||
str(tmp_path / "registry.sqlite3"),
|
||||
"--checkout-root",
|
||||
str(tmp_path / "checkouts"),
|
||||
]
|
||||
)
|
||||
|
||||
report = json.loads(output_path.read_text(encoding="utf-8"))
|
||||
repo_report = report["repositories"][0]
|
||||
assert exit_code == 0
|
||||
assert report["schema_version"] == "repo-scoping-dataset-assessment/v1"
|
||||
assert repo_report["name"] == "Scope Only"
|
||||
assert repo_report["documents"]["SCOPE.md"] is True
|
||||
assert repo_report["candidate_counts"]["capabilities"] >= 1
|
||||
assert repo_report["dependency_graph"]["node_count"] > 0
|
||||
assert "facts-with-empty-dependency-graph" not in repo_report["issues"]
|
||||
|
||||
|
||||
def test_self_assess_cli_exports_challenger_and_comparison(tmp_path):
|
||||
source = write_repo(tmp_path)
|
||||
golden_path = tmp_path / "golden.json"
|
||||
|
||||
Reference in New Issue
Block a user