generated from coulomb/repo-seed
Add validation indexes and generated views
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
from info_tech_canon.service import (
|
||||
artifact_graph,
|
||||
generate_agent_briefs,
|
||||
generate_indexes,
|
||||
generate_tree,
|
||||
inspect_canon,
|
||||
list_models,
|
||||
list_standards,
|
||||
validate_canon,
|
||||
)
|
||||
from info_tech_canon.service import DEFAULT_INFOSPACE_ROOT
|
||||
import shutil
|
||||
|
||||
|
||||
def test_inspect_canon_counts_artifact_kinds() -> None:
|
||||
@@ -30,6 +35,7 @@ def test_validate_canon_passes_scaffold() -> None:
|
||||
|
||||
assert payload["ok"] is True
|
||||
assert payload["errors"] == []
|
||||
assert "warnings" in payload
|
||||
assert payload["details"]["artifact_count"] == 15
|
||||
|
||||
|
||||
@@ -39,3 +45,21 @@ def test_graph_exports_relationship_summary() -> None:
|
||||
assert payload["ok"] is True
|
||||
assert payload["graph"]["node_count"] == 15
|
||||
assert payload["graph"]["edge_count"] > 15
|
||||
|
||||
|
||||
def test_generators_write_expected_assets(tmp_path) -> None:
|
||||
root = tmp_path / "infospace"
|
||||
shutil.copytree(DEFAULT_INFOSPACE_ROOT, root)
|
||||
|
||||
index_payload = generate_indexes(root)
|
||||
tree_payload = generate_tree(root)
|
||||
brief_payload = generate_agent_briefs(root)
|
||||
|
||||
assert index_payload["ok"] is True
|
||||
assert tree_payload["ok"] is True
|
||||
assert brief_payload["ok"] is True
|
||||
assert (root / "indexes" / "concept-ownership.yaml").is_file()
|
||||
assert (root / "views" / "by-standard.md").read_text(
|
||||
encoding="utf-8"
|
||||
).startswith("<!-- GENERATED")
|
||||
assert (root / "agent" / "global-agent-brief.md").is_file()
|
||||
|
||||
Reference in New Issue
Block a user