Finish STATE-WP-0069: retire legacy completion event and DELETE /workstreams
Stop dual-publishing org.statehub.workstream.completed; return 410 Gone for
legacy DELETE /workstreams/{id}. Migrate fix-consistency, MCP adhoc bootstrap,
and dashboard token summary to /workplans/. Add legacy-meter evidence capture
script and pytest snapshot; update docs and close out the workplan.
This commit is contained in:
parent
b659ff8d13
commit
e0c954d098
13 changed files with 404 additions and 149 deletions
|
|
@ -967,17 +967,17 @@ class TestLifecycleRenormalization:
|
|||
"local_path": str(repo),
|
||||
"host_paths": {socket.gethostname(): str(repo)},
|
||||
}
|
||||
if path == "/workstreams/ws-1":
|
||||
if path == "/workplans/ws-1":
|
||||
return ws
|
||||
if path == "/tasks/task-1":
|
||||
return task
|
||||
if path == "/tasks" and params == {"workstream_id": "ws-1"}:
|
||||
return [task]
|
||||
if path == "/workstreams/ws-1/dependencies":
|
||||
if path == "/workplans/ws-1/dependencies":
|
||||
return []
|
||||
if path == "/workstreams" and params == {"repo_id": "repo-1"}:
|
||||
if path == "/workplans" and params == {"repo_id": "repo-1"}:
|
||||
return [ws]
|
||||
if path == "/workstreams" and params and params.get("topic_id") == "topic-1":
|
||||
if path == "/workplans" and params and params.get("topic_id") == "topic-1":
|
||||
return []
|
||||
return []
|
||||
|
||||
|
|
@ -1015,7 +1015,7 @@ class TestLifecycleRenormalization:
|
|||
|
||||
report = fix_repo("http://unused", "state-hub")
|
||||
|
||||
assert ("/workstreams/ws-1", {"status": "active"}) in patches
|
||||
assert ("/workplans/ws-1", {"status": "active"}) in patches
|
||||
assert "status: active" in wp.read_text(encoding="utf-8")
|
||||
assert any("C-23 fixed" in fix for fix in report.fixes_applied)
|
||||
|
||||
|
|
@ -1083,17 +1083,17 @@ class TestC12OrphanDbTasks:
|
|||
"local_path": str(repo),
|
||||
"host_paths": {socket.gethostname(): str(repo)},
|
||||
}
|
||||
if path == "/workstreams/ws-1":
|
||||
if path == "/workplans/ws-1":
|
||||
return ws
|
||||
if path == "/tasks/task-linked":
|
||||
return linked
|
||||
if path == "/tasks" and params == {"workstream_id": "ws-1"}:
|
||||
return [linked, orphan]
|
||||
if path == "/workstreams/ws-1/dependencies":
|
||||
if path == "/workplans/ws-1/dependencies":
|
||||
return []
|
||||
if path == "/workstreams" and params == {"repo_id": "repo-1"}:
|
||||
if path == "/workplans" and params == {"repo_id": "repo-1"}:
|
||||
return [ws]
|
||||
if path == "/workstreams" and params and params.get("topic_id") == "topic-1":
|
||||
if path == "/workplans" and params and params.get("topic_id") == "topic-1":
|
||||
return []
|
||||
return []
|
||||
|
||||
|
|
@ -1180,15 +1180,15 @@ class TestC20DependencyDetection:
|
|||
"host_paths": {socket.gethostname(): str(repo)},
|
||||
"domain_slug": "financials",
|
||||
}
|
||||
if path == "/workstreams/base-ws":
|
||||
if path == "/workplans/base-ws":
|
||||
return {"id": "base-ws", "repo_id": "repo-1", "slug": "state-wp-0001", "title": "Base", "status": "active"}
|
||||
if path == "/workstreams/dependent-ws":
|
||||
if path == "/workplans/dependent-ws":
|
||||
return {"id": "dependent-ws", "repo_id": "repo-1", "slug": "state-wp-0002", "title": "Dependent", "status": "active"}
|
||||
if path == "/tasks" and params and params.get("workstream_id") in {"base-ws", "dependent-ws"}:
|
||||
return []
|
||||
if path == "/workstreams/base-ws/dependencies":
|
||||
if path == "/workplans/base-ws/dependencies":
|
||||
return []
|
||||
if path == "/workstreams/dependent-ws/dependencies":
|
||||
if path == "/workplans/dependent-ws/dependencies":
|
||||
return [
|
||||
{
|
||||
"id": "dep-1",
|
||||
|
|
@ -1198,7 +1198,7 @@ class TestC20DependencyDetection:
|
|||
"relationship_type": "blocks",
|
||||
}
|
||||
]
|
||||
if path == "/workstreams" and params == {"repo_id": "repo-1"}:
|
||||
if path == "/workplans" and params == {"repo_id": "repo-1"}:
|
||||
return []
|
||||
return []
|
||||
|
||||
|
|
@ -1250,18 +1250,18 @@ class TestC06WorkstreamCreation:
|
|||
}
|
||||
if path == "/topics":
|
||||
return [{"id": "topic-1", "domain_slug": "financials"}]
|
||||
if path == "/workstreams" and params == {"slug": "state-wp-0001"}:
|
||||
if path == "/workplans" and params == {"slug": "state-wp-0001"}:
|
||||
return [{"id": "old-ws", "repo_id": "other-repo", "title": "Old Workplan"}]
|
||||
if path == "/workstreams" and params == {"slug": "demo-repo-state-wp-0001"}:
|
||||
if path == "/workplans" and params == {"slug": "demo-repo-state-wp-0001"}:
|
||||
return []
|
||||
if path == "/workstreams" and params == {"repo_id": "repo-1"}:
|
||||
if path == "/workplans" and params == {"repo_id": "repo-1"}:
|
||||
return []
|
||||
if path == "/workstreams" and params and params.get("topic_id") == "topic-1":
|
||||
if path == "/workplans" and params and params.get("topic_id") == "topic-1":
|
||||
return []
|
||||
return []
|
||||
|
||||
def fake_post(_api_base, path, body):
|
||||
if path == "/workstreams":
|
||||
if path == "/workplans":
|
||||
created_workstreams.append(body)
|
||||
return {"id": "new-ws", **body}
|
||||
if path == "/tasks":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue