generated from coulomb/repo-seed
feat(classification-spine): implement STATE-WP-0065 repo-anchored model
Replace the ad-hoc coordination-domain spine with the Repo Classification Standard: 14 market domains, classification columns on managed_repos, and workplans anchored by repo_id (topic_id optional). - Add Alembic migration d8e9f0a1b2c3 with data backfill and workstream→workplan rename - Add api/classification.py validation and register-from-classification tooling - Expose workplan-first REST/MCP surface with legacy workstream aliases - Add C-24 consistency rule and legacy domain frontmatter mapping - Update dashboard repos page with category/capability/stake filters - Update orientation docs; mark STATE-WP-0065 finished
This commit is contained in:
@@ -23,6 +23,7 @@ import pytest
|
||||
# Make scripts/ importable without installing
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent / "scripts"))
|
||||
|
||||
from api.classification import resolve_topic_domain_slug
|
||||
from consistency_check import (
|
||||
ConsistencyReport,
|
||||
Issue,
|
||||
@@ -54,6 +55,15 @@ from api.workplan_status import ready_review_status
|
||||
# for backward compat; their canonical implementations live in repo_sync.py.
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# domain mapping (STATE-WP-0065 P4)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
class TestResolveTopicDomainSlug:
|
||||
def test_workplan_custodian_maps_to_infotech(self):
|
||||
assert resolve_topic_domain_slug("custodian", repo_market_domain="infotech") == "infotech"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# parse_frontmatter
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -372,7 +382,7 @@ class TestRenderText:
|
||||
r.add(severity="WARN", check_id="C-04", message="w")
|
||||
r.add(severity="INFO", check_id="C-08", message="i")
|
||||
text = render_text(r)
|
||||
assert "1 fail" in text
|
||||
assert "1 assessment-fail" in text
|
||||
assert "1 warn" in text
|
||||
assert "1 info" in text
|
||||
|
||||
@@ -443,7 +453,7 @@ class TestReportToDict:
|
||||
r = ConsistencyReport(repo_slug="r", repo_path="/p")
|
||||
d = report_to_dict(r)
|
||||
assert d["result"] == "pass"
|
||||
assert d["summary"] == {"fail": 0, "warn": 0, "info": 0}
|
||||
assert d["summary"] == {"fail": 0, "automation_error": 0, "warn": 0, "info": 0}
|
||||
assert d["issues"] == []
|
||||
|
||||
def test_fail_result(self):
|
||||
|
||||
Reference in New Issue
Block a user