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

@ -29,12 +29,12 @@ Physical database renames are intentionally out of scope for this workplan.
| Create workplan | `POST /workplans/` | `POST /workstreams/` | `rest_api:POST /workstreams/` |
| Read workplan | `GET /workplans/{workplan_id}` | `GET /workstreams/{workstream_id}` | `rest_api:GET /workstreams/{workstream_id}` |
| Update workplan | `PATCH /workplans/{workplan_id}` | `PATCH /workstreams/{workstream_id}` | `rest_api:PATCH /workstreams/{workstream_id}` |
| Archive workplan | `DELETE /workplans/{workplan_id}` | `DELETE /workstreams/{workstream_id}` | `rest_api:DELETE /workstreams/{workstream_id}` |
| Archive workplan | `DELETE /workplans/{workplan_id}` | ~~`DELETE /workstreams/{workstream_id}`~~ **410 Gone** (2026-07-08) | `rest_api:DELETE /workstreams/{workstream_id}` (retired) |
| Workplan index | `GET /workplans/index` | `GET /workstreams/workplan-index` | `rest_api:GET /workstreams/workplan-index` |
| Workplan dependencies | `GET/POST /workplans/{workplan_id}/dependencies/` | `GET/POST /workstreams/{workstream_id}/dependencies/` | matching `rest_api:* /workstreams/...` keys |
| Delete dependency | `DELETE /workplans/{workplan_id}/dependencies/{dep_id}` | `DELETE /workstreams/{workstream_id}/dependencies/{dep_id}` | `rest_api:DELETE /workstreams/{workstream_id}/dependencies/{dep_id}` |
| Execution intent | `PATCH /execution/workplans/{workplan_id}/intent` | `PATCH /execution/workstreams/{workstream_id}/intent` | `rest_api:PATCH /execution/workstreams/{workstream_id}/intent` |
| Completion event | `org.statehub.workplan.completed` | `org.statehub.workstream.completed` | `event_subject:org.statehub.workstream.completed` |
| Completion event | `org.statehub.workplan.completed` | ~~`org.statehub.workstream.completed`~~ **retired** (2026-07-08) | `event_subject:org.statehub.workstream.completed` (retired) |
Legacy REST responses include:
@ -82,3 +82,31 @@ An interface is a retirement candidate only when all of the following are true:
State Hub owns the usage state and the review payload. Activity-core owns the
weekly wakeup, review activity, and any follow-up dispatch.
## STATE-WP-0069 closeout (2026-07-08)
Completed in this workplan:
- `org.statehub.workstream.completed` dual-publish stopped; legacy subject retired
in legacy-meter.
- `DELETE /workstreams/{workstream_id}` returns **410 Gone** with replacement header.
- `scripts/consistency_check.py`, MCP adhoc bootstrap, and dashboard token summary
now call `/workplans/` (major `/workstreams` usage reduction).
- `flows/workplan.yaml` and `open_workplans` are preferred; legacy dual-keys remain
until legacy-meter clears callers.
Deferred until seven consecutive zero-usage review windows per key:
- MCP alias removal (`create_workstream`, etc.).
- Remaining `/workstreams` GET/POST/PATCH routes (still metered with Deprecation).
- `workstream_id` query/body param aliases on preferred routes.
Evidence capture:
```bash
python scripts/capture_legacy_meter_evidence.py --days 7
# writes docs/evidence/legacy-meter-weekly-review-YYYYMMDD.json
```
Activity-core `weekly-legacy-meter-review` (`30 8 * * 1` Europe/Berlin) consumes
`/legacy-meter/weekly-review`; railiance-cluster rollout suggestion `05da5540`.