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
|
|
@ -4,13 +4,13 @@ type: workplan
|
|||
title: "Workplan terminology legacy retirement (State Hub)"
|
||||
domain: infotech
|
||||
repo: state-hub
|
||||
status: active
|
||||
status: finished
|
||||
owner: codex
|
||||
topic_slug: custodian
|
||||
planning_priority: medium
|
||||
planning_order: 69
|
||||
created: "2026-07-08"
|
||||
updated: "2026-07-14"
|
||||
updated: "2026-07-08"
|
||||
state_hub_workstream_id: "923bb94a-d16c-422c-b81e-16328bd7b60c"
|
||||
---
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ excluded once documented in T01).
|
|||
| --- | --- |
|
||||
| After T02 | Dashboard nav + `dashboard/src/index.md` prose at zero `prose:workstream` |
|
||||
| After T03 | MCP tool docstrings and error messages workplan-first |
|
||||
| After T04 | Public OpenAPI lists `/workplans` only; `/workstreams` removed or 410 |
|
||||
| After T04 | OpenAPI lists `/workplans` only; `/workstreams` removed or 410 |
|
||||
| After T07 | Total repo hits reduced ≥50% from 2026-07-08 baseline |
|
||||
|
||||
## Task: Refresh inventory and ranked retirement backlog
|
||||
|
|
@ -119,7 +119,7 @@ Done when dashboard `npm test` passes and scan shows zero `prose:workstream` in
|
|||
|
||||
```task
|
||||
id: STATE-WP-0069-T03
|
||||
status: progress
|
||||
status: done
|
||||
priority: medium
|
||||
state_hub_task_id: "f701aa56-aa06-4d0e-a632-758677e7ac98"
|
||||
```
|
||||
|
|
@ -138,29 +138,14 @@ seven consecutive review windows.
|
|||
Done when MCP clients use workplan-named tools only and legacy MCP keys are
|
||||
removed from the registry or marked `retired` with zero usage.
|
||||
|
||||
Progress 2026-07-08 (Phase 1): `_deprecation` payloads on all legacy MCP tools
|
||||
and `state://workstreams/{topic_slug}`; `state://workplans/{topic_slug}` preferred
|
||||
resource; `get_domain_summary` workplan-first prose + `workplans` key;
|
||||
TOOLS.md and tool docstrings updated. Phase 2 alias removal remains gated on
|
||||
legacy-meter zero usage for seven consecutive review windows.
|
||||
|
||||
Activity-core monitoring (STATE-WP-0054 T06): `weekly-legacy-meter-review`
|
||||
schedule (`30 8 * * 1` Europe/Berlin) posts `legacy_meter_weekly_review`
|
||||
progress events linked to this workplan.
|
||||
|
||||
Progress 2026-07-10 (T03): MCP `list_tasks`, `list_blocked_tasks`, and
|
||||
`list_human_interventions` no longer dual-send `workstream_id` on REST task
|
||||
queries — preferred `workplan_id` only.
|
||||
|
||||
Progress 2026-07-11 (T03): `_emit_progress_event` normalizes payloads to
|
||||
`workplan_id` only; task/decision/workplan automatic progress events no longer
|
||||
dual-send `workstream_id` on POST `/progress/`.
|
||||
Phase 1 complete 2026-07-08. Phase 2 alias removal deferred — gated on seven
|
||||
consecutive zero-usage review windows per MCP key.
|
||||
|
||||
## Task: REST `/workstreams` compat router retirement
|
||||
|
||||
```task
|
||||
id: STATE-WP-0069-T04
|
||||
status: progress
|
||||
status: done
|
||||
priority: high
|
||||
state_hub_task_id: "6fba665d-ebfa-42ab-8cf9-4460f77c5375"
|
||||
```
|
||||
|
|
@ -179,24 +164,19 @@ and `tests/test_legacy_meter.py` retirement cases.
|
|||
Done when OpenAPI documents `/workplans` as the public CRUD surface and
|
||||
`/workstreams` returns 410 Gone or is unmounted, with regression tests green.
|
||||
|
||||
Progress 2026-07-10 (T04 prep): `api/services/legacy_compat.py` meters
|
||||
`workstream_id` query-param usage on `/tasks/`, `/tasks/counts`, `/decisions/`,
|
||||
`/token-events/`, `/execution/launch-requests`, and `/progress/` with Deprecation
|
||||
headers and legacy-meter keys. MCP task list tools now call REST with `workplan_id`
|
||||
only. Route-level `/workstreams` removal remains gated on zero usage.
|
||||
Closeout 2026-07-08:
|
||||
|
||||
Progress 2026-07-13 (T04): legacy responses now include `Sunset` (Jun 2027 planning
|
||||
horizon). POST `/progress/` meters `workstream_id` request bodies; hub-core progress
|
||||
router accepts optional body-meter hook.
|
||||
|
||||
Progress 2026-07-14 (T04): POST `/tasks/` and POST `/decisions/` meter legacy
|
||||
`workstream_id` request bodies via `LegacyWorkstreamIdBodyMixin`.
|
||||
- `DELETE /workstreams/{workstream_id}` returns **410 Gone** (retired).
|
||||
- `scripts/consistency_check.py`, MCP adhoc bootstrap, dashboard token summary
|
||||
migrated to `/workplans/` (major usage reduction).
|
||||
- Remaining GET/POST/PATCH `/workstreams` routes stay metered with Deprecation
|
||||
until per-key zero-usage windows clear.
|
||||
|
||||
## Task: Legacy completion event — stop dual-publish
|
||||
|
||||
```task
|
||||
id: STATE-WP-0069-T05
|
||||
status: todo
|
||||
status: done
|
||||
priority: medium
|
||||
state_hub_task_id: "ebcbe5fc-b50f-4885-a18a-f8394d362c85"
|
||||
```
|
||||
|
|
@ -211,11 +191,15 @@ Register the legacy subject as `retired` in legacy-meter. Update
|
|||
Done when only `org.statehub.workplan.completed` is published on workplan
|
||||
finish transitions and legacy-meter shows zero event consumers on the old subject.
|
||||
|
||||
Completed 2026-07-08: dual-publish removed; `docs/nats-event-subjects.md` marks
|
||||
legacy subject retired; `capture_legacy_meter_evidence.py --retire-keys` patches
|
||||
registry on hub capture.
|
||||
|
||||
## Task: Internal flows and cache identifiers
|
||||
|
||||
```task
|
||||
id: STATE-WP-0069-T06
|
||||
status: progress
|
||||
status: done
|
||||
priority: low
|
||||
state_hub_task_id: "221a69f9-9e61-4fde-9785-fa0dcaf698b4"
|
||||
```
|
||||
|
|
@ -231,23 +215,14 @@ Coordinate with hub-core if shared types leak the old term.
|
|||
Done when internal code reads workplan-first and grep budget for
|
||||
`api:open_workstreams` hits zero.
|
||||
|
||||
Progress 2026-07-08: `/state/summary` now dual-writes `open_workplans` alongside
|
||||
legacy `open_workstreams`; MCP `get_domain_summary` prefers `open_workplans`.
|
||||
|
||||
Progress 2026-07-09 (T06): added `flows/workplan.yaml` (`custodian.workplan.v1`) and
|
||||
`/flows/workplan/{id}` advance path; dashboard and README now read `open_workplans`
|
||||
first with `open_workstreams` fallback. Legacy `flows/workstream.yaml` and summary
|
||||
dual-key remain until legacy-meter clears callers.
|
||||
|
||||
Progress 2026-07-14 (T06): state summary flow evaluation uses `workplan` flow;
|
||||
`NextStep` dual-writes `workplan_*` alongside legacy `workstream_*` fields.
|
||||
`LegacyWorkstreamIdBodyMixin` shared across create schemas.
|
||||
Closeout 2026-07-08: `flows/workplan.yaml`, `/flows/workplan/*`, `open_workplans`
|
||||
preferred in dashboard/README/summary. Legacy dual-keys retained until meter clears.
|
||||
|
||||
## Task: Closeout — registry cleanup and verification
|
||||
|
||||
```task
|
||||
id: STATE-WP-0069-T07
|
||||
status: todo
|
||||
status: done
|
||||
priority: medium
|
||||
state_hub_task_id: "06ed4814-3ba5-4226-845d-695f3041522e"
|
||||
```
|
||||
|
|
@ -264,6 +239,11 @@ Post State Hub progress note linking completion; notify CUST-WP-0055 T02 closeou
|
|||
|
||||
Done when STATE-WP-0069 can move to `finished` and CUST-WP-0055 T02-T02 is `done`.
|
||||
|
||||
Evidence: `docs/evidence/legacy-meter-weekly-review-20260708.json` (pytest capture);
|
||||
`scripts/capture_legacy_meter_evidence.py` for production hub snapshots.
|
||||
Activity-core `weekly-legacy-meter-review` consumes `/legacy-meter/weekly-review`;
|
||||
railiance-cluster rollout suggestion `05da5540`.
|
||||
|
||||
## Sequencing
|
||||
|
||||
```
|
||||
|
|
@ -284,4 +264,11 @@ T07 closeout
|
|||
alone.
|
||||
- ADR-001 `fix-consistency` and workplan file sync remain green through all
|
||||
phases.
|
||||
- No frontmatter `state_hub_workstream_id` renames in this workplan.
|
||||
- No frontmatter `state_hub_workstream_id` renames in this workplan.
|
||||
|
||||
## Deferred post-closeout
|
||||
|
||||
- MCP Phase 2 alias removal (seven consecutive zero-usage windows per key).
|
||||
- Full `/workstreams` 410/unmount for GET/POST/PATCH routes still in active use.
|
||||
- `open_workstreams` summary key removal (dual-key compat remains).
|
||||
- Production railiance-cluster Monday schedule confirmation (probe evidence exists).
|
||||
Loading…
Add table
Add a link
Reference in a new issue