Finish STATE-WP-0069: retire legacy completion event and DELETE /workstreams
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s

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:
tegwick 2026-07-08 23:36:58 +02:00
parent b659ff8d13
commit e0c954d098
13 changed files with 404 additions and 149 deletions

View file

@ -16,13 +16,23 @@ _LEGACY_OWNER = "state-hub.api"
_LEGACY_WORKSTREAM_SUNSET = "Wed, 30 Jun 2027 23:59:59 GMT"
def legacy_response_headers(replacement_ref: str) -> dict[str, str]:
return {
"Deprecation": "true",
"Sunset": _LEGACY_WORKSTREAM_SUNSET,
"X-StateHub-Replacement": replacement_ref,
"Link": f'<{replacement_ref}>; rel="successor-version"',
}
def mark_legacy_response(response: Response | None, replacement_ref: str) -> None:
if response is None:
return
response.headers["Deprecation"] = "true"
response.headers["Sunset"] = _LEGACY_WORKSTREAM_SUNSET
response.headers["X-StateHub-Replacement"] = replacement_ref
response.headers.append("Link", f'<{replacement_ref}>; rel="successor-version"')
for key, value in legacy_response_headers(replacement_ref).items():
if key == "Link":
response.headers.append(key, value)
else:
response.headers[key] = value
def legacy_query_param_key(method: str, route: str, param: str = "workstream_id") -> str: