2026-07-10 13:31:57 +02:00
|
|
|
|
---
|
|
|
|
|
|
id: STATE-WP-0075
|
|
|
|
|
|
type: workplan
|
|
|
|
|
|
title: "Workstream REST route 410 stranglers"
|
|
|
|
|
|
domain: infotech
|
|
|
|
|
|
repo: state-hub
|
|
|
|
|
|
status: finished
|
|
|
|
|
|
owner: codex
|
|
|
|
|
|
topic_slug: custodian
|
|
|
|
|
|
planning_priority: high
|
|
|
|
|
|
planning_order: 75
|
|
|
|
|
|
created: "2026-07-10"
|
|
|
|
|
|
updated: "2026-07-10"
|
2026-08-25 20:22:27 +02:00
|
|
|
|
state_hub_workstream_id: "a7fc6116-6587-5c17-9a64-d47634aa6a59"
|
2026-07-10 13:31:57 +02:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
# STATE-WP-0075 — Workstream REST route 410 stranglers
|
|
|
|
|
|
|
|
|
|
|
|
**Parent:** `STATE-WP-0070` T02 (phase-2 legacy retirement).
|
|
|
|
|
|
**Handoff from:** `STATE-WP-0073` T04 (meter-cleared REST key retirement).
|
|
|
|
|
|
|
|
|
|
|
|
**Baseline evidence:** `docs/evidence/legacy-meter-weekly-review-20260710.json`
|
|
|
|
|
|
— phase-1 `/workstreams/*` keys at 0 calls (retirement candidates; ~2/7
|
|
|
|
|
|
consecutive 8h zero windows at capture time). Operator approved early 410 rollout
|
|
|
|
|
|
after caller remediation (`STATE-WP-0072`) drove hot-key counts to zero.
|
|
|
|
|
|
|
|
|
|
|
|
## Goal
|
|
|
|
|
|
|
|
|
|
|
|
Convert remaining phase-1 and phase-2 `/workstreams` REST aliases to **410 Gone**
|
|
|
|
|
|
stranglers that still meter final legacy usage, matching the existing
|
|
|
|
|
|
`DELETE /workstreams/{id}` and `GET /workstreams/workplan-index` pattern.
|
|
|
|
|
|
|
|
|
|
|
|
Preferred `/workplans/*` routes remain the only functional surface.
|
|
|
|
|
|
|
|
|
|
|
|
## Task: Shared retire_legacy_route helper
|
|
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
|
id: STATE-WP-0075-T01
|
|
|
|
|
|
status: done
|
|
|
|
|
|
priority: high
|
2026-08-25 20:22:27 +02:00
|
|
|
|
state_hub_task_id: "cce857a7-cdec-5ceb-a8e4-b0c54498fe41"
|
2026-07-10 13:31:57 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
1. Add `retire_legacy_route()` to `api/services/legacy_compat.py` — meter usage,
|
|
|
|
|
|
set deprecation headers, raise `HTTPException(410)`.
|
|
|
|
|
|
2. Refactor existing 410 routes (`workplan-index`, `DELETE`) to use the helper.
|
|
|
|
|
|
|
|
|
|
|
|
Done when all 410 stranglers share one code path for metering and headers.
|
|
|
|
|
|
|
|
|
|
|
|
## Task: Phase-1 workstream CRUD stranglers
|
|
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
|
id: STATE-WP-0075-T02
|
|
|
|
|
|
status: done
|
|
|
|
|
|
priority: high
|
2026-08-25 20:22:27 +02:00
|
|
|
|
state_hub_task_id: "819494cf-5539-5c2e-897b-9650835c6aee"
|
2026-07-10 13:31:57 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Return **410 Gone** on:
|
|
|
|
|
|
|
|
|
|
|
|
- `GET /workstreams/`
|
|
|
|
|
|
- `POST /workstreams/`
|
|
|
|
|
|
- `GET /workstreams/{workstream_id}`
|
|
|
|
|
|
- `PATCH /workstreams/{workstream_id}`
|
|
|
|
|
|
|
|
|
|
|
|
Keep `/workplans/*` handlers unchanged.
|
|
|
|
|
|
|
|
|
|
|
|
## Task: Phase-2 dependency and execution stranglers
|
|
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
|
id: STATE-WP-0075-T03
|
|
|
|
|
|
status: done
|
|
|
|
|
|
priority: high
|
2026-08-25 20:22:27 +02:00
|
|
|
|
state_hub_task_id: "cac01081-f78e-5d55-90d1-5b486fb9b9f6"
|
2026-07-10 13:31:57 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Return **410 Gone** on:
|
|
|
|
|
|
|
|
|
|
|
|
- `POST/GET/DELETE /workstreams/{workstream_id}/dependencies/…`
|
|
|
|
|
|
- `PATCH /execution/workstreams/{workstream_id}/intent`
|
|
|
|
|
|
|
|
|
|
|
|
## Task: Tests, backlog, and parent handoff
|
|
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
|
id: STATE-WP-0075-T04
|
|
|
|
|
|
status: done
|
|
|
|
|
|
priority: high
|
2026-08-25 20:22:27 +02:00
|
|
|
|
state_hub_task_id: "df8e19fb-93ad-5b00-ab62-431d27d9c8a0"
|
2026-07-10 13:31:57 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
1. Update `tests/test_legacy_meter.py` and `tests/test_routers_core.py` for 410
|
|
|
|
|
|
expectations on all retired keys.
|
|
|
|
|
|
2. Mark phase 1–2 REST keys retired in
|
|
|
|
|
|
`docs/workplan-terminology-legacy-retirement-backlog.md`.
|
|
|
|
|
|
3. Run `pytest tests/test_legacy_meter.py tests/test_routers_core.py`.
|
|
|
|
|
|
4. Register via `statehub fix-consistency --repo state-hub`.
|
|
|
|
|
|
5. Hand off completion to `STATE-WP-0070` T02 and close `STATE-WP-0073` T04.
|
|
|
|
|
|
|
|
|
|
|
|
Done when tests pass, workplan registered, and parent tasks reflect retirement.
|