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:
@@ -28,19 +28,34 @@ async def _create_topic(client, domain_slug="testdomain", slug="testtopic", titl
|
||||
return r.json()
|
||||
|
||||
|
||||
async def _create_workstream(client, topic_id, slug="test-ws", title="Test WS", status="active", **extra):
|
||||
async def _create_workplan(client, repo_id, topic_id=None, slug="test-ws", title="Test WS", status="active", **extra):
|
||||
payload = {
|
||||
"topic_id": topic_id, "slug": slug, "title": title, "status": status,
|
||||
"repo_id": repo_id, "slug": slug, "title": title, "status": status,
|
||||
}
|
||||
if topic_id is not None:
|
||||
payload["topic_id"] = topic_id
|
||||
payload.update(extra)
|
||||
r = await client.post("/workstreams/", json=payload)
|
||||
r = await client.post("/workplans/", json=payload)
|
||||
assert r.status_code == 201, r.text
|
||||
return r.json()
|
||||
|
||||
|
||||
async def _create_task(client, workstream_id, title="Test task"):
|
||||
async def _create_workstream(client, topic_id=None, repo_id=None, slug="test-ws", title="Test WS", status="active", **extra):
|
||||
if repo_id is None:
|
||||
if topic_id is None:
|
||||
await _create_domain(client)
|
||||
topic = await _create_topic(client)
|
||||
topic_id = topic["id"]
|
||||
repo = await _create_repo(client, slug=f"{slug}-repo")
|
||||
repo_id = repo["id"]
|
||||
return await _create_workplan(
|
||||
client, repo_id=repo_id, topic_id=topic_id, slug=slug, title=title, status=status, **extra
|
||||
)
|
||||
|
||||
|
||||
async def _create_task(client, workplan_id, title="Test task"):
|
||||
r = await client.post("/tasks/", json={
|
||||
"workstream_id": workstream_id, "title": title,
|
||||
"workplan_id": workplan_id, "title": title,
|
||||
})
|
||||
assert r.status_code == 201, r.text
|
||||
return r.json()
|
||||
|
||||
Reference in New Issue
Block a user