STATE-WP-0069 T06: add workplan flow entity and prefer open_workplans
Introduce flows/workplan.yaml and /flows/workplan/* routes alongside the legacy workstream flow. Dashboard, README, and MCP flow docs now prefer open_workplans with open_workstreams fallback until dual-key retirement.
This commit is contained in:
parent
f596fc27c7
commit
2b83654ac3
12 changed files with 122 additions and 13 deletions
|
|
@ -507,7 +507,22 @@ class TestFlowEndpoints:
|
|||
r = await client.get("/flows/definitions")
|
||||
assert r.status_code == 200
|
||||
entity_types = {item["entity_type"] for item in r.json()}
|
||||
assert {"workstream", "task", "contribution", "capability_request"} <= entity_types
|
||||
assert {"workplan", "workstream", "task", "contribution", "capability_request"} <= entity_types
|
||||
|
||||
async def test_get_flow_state_and_advance_workplan(self, client):
|
||||
await _create_domain(client)
|
||||
topic = await _create_topic(client)
|
||||
ws = await _create_workstream(client, topic["id"])
|
||||
task = await _create_task(client, ws["id"])
|
||||
await client.patch(f"/tasks/{task['id']}", json={"status": "done"})
|
||||
|
||||
r = await client.get(f"/flows/workplan/{ws['id']}")
|
||||
assert r.status_code == 200
|
||||
assert r.json()["current_workstation"] == "active"
|
||||
|
||||
r = await client.post(f"/flows/workplan/{ws['id']}/advance/finished")
|
||||
assert r.status_code == 200
|
||||
assert r.json()["current_workstation"] == "finished"
|
||||
|
||||
async def test_get_flow_state_and_advance_workstream(self, client):
|
||||
await _create_domain(client)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue