STATE-WP-0070 T04 (partial): drop open_workstreams from /state/summary
Removes the redundant open_workstreams mirror field from StateSummary (schema,
router, MCP get_domain_summary reader, dashboard consumers + empty-state stub,
and tests). Consumers already preferred open_workplans, so this is the
low-risk half of T04.
Deferred (still have live callers — not yet retirement-ready):
- workstream_id query/body field alias on preferred routes — external
session-close curls/scripts fleet-wide still send it.
- flows/workstream.yaml — /flows/workstream/{id} routes are still served and
exercised by tests; retire only once no callers remain.
Staged on branch state-wp-0070-legacy-retirement — do not merge until the 7th
documented zero-usage window is captured.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ef62cb3872
commit
6d3de59436
8 changed files with 9 additions and 16 deletions
|
|
@ -48,14 +48,14 @@ class TestGetStateSummary:
|
|||
assert r.status_code == 200
|
||||
body = r.json()
|
||||
# Required top-level fields
|
||||
for key in ("open_workstreams", "blocking_decisions", "blocked_tasks",
|
||||
for key in ("open_workplans", "blocking_decisions", "blocked_tasks",
|
||||
"domains", "contribution_counts", "licence_risk_count"):
|
||||
assert key in body, f"missing key: {key}"
|
||||
|
||||
async def test_empty_db_returns_zero_counts(self, client):
|
||||
r = await client.get("/state/summary")
|
||||
body = r.json()
|
||||
assert body["open_workstreams"] == []
|
||||
assert body["open_workplans"] == []
|
||||
assert body["blocking_decisions"] == []
|
||||
assert body["blocked_tasks"] == []
|
||||
|
||||
|
|
|
|||
|
|
@ -433,9 +433,7 @@ class TestStateSummary:
|
|||
r = await client.get("/state/summary")
|
||||
assert r.status_code == 200
|
||||
body = r.json()
|
||||
assert "open_workstreams" in body
|
||||
assert "open_workplans" in body
|
||||
assert body["open_workplans"] == body["open_workstreams"]
|
||||
assert "blocking_decisions" in body
|
||||
assert "blocked_tasks" in body
|
||||
assert "domains" in body
|
||||
|
|
@ -471,7 +469,7 @@ class TestStateSummary:
|
|||
r = await client.get("/state/summary")
|
||||
assert r.status_code == 200
|
||||
body = r.json()
|
||||
summaries = {item["id"]: item for item in body["open_workstreams"]}
|
||||
summaries = {item["id"]: item for item in body["open_workplans"]}
|
||||
|
||||
assert summaries[blocked_ws["id"]]["status"] == "blocked"
|
||||
assert summaries[blocked_ws["id"]]["blocked_reasons"][0]["id"] == "dependencies.all_complete"
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ def test_summary_cache_unit_progress_section():
|
|||
blocking_decisions=[],
|
||||
waiting_tasks=[],
|
||||
recent_progress=[],
|
||||
open_workstreams=[],
|
||||
open_workplans=[],
|
||||
)
|
||||
cache.store(summary, rev)
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ def test_invalidate_summary_cache_scopes():
|
|||
blocking_decisions=[],
|
||||
waiting_tasks=[],
|
||||
recent_progress=[],
|
||||
open_workstreams=[],
|
||||
open_workplans=[],
|
||||
)
|
||||
cache.store(summary, rev)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue