Migrate remaining in-repo workstream REST callers to /workplans
Point cleanup_stale_tasks, validate_repo_adr, custodian_cli, dashboard data loaders, extensions poll, MCP legacy resource, and consistency_check task queries at preferred /workplans routes. Add caller inventory evidence doc.
This commit is contained in:
parent
050cbbceb9
commit
b05ca2ca8c
10 changed files with 66 additions and 16 deletions
50
docs/evidence/workstream-caller-inventory-20260708.md
Normal file
50
docs/evidence/workstream-caller-inventory-20260708.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Workstream caller inventory — 2026-07-08
|
||||
|
||||
Post `STATE-WP-0069` hunt. Live legacy-meter (7-day window) showed ~150k calls
|
||||
on legacy REST keys; most lacked `X-StateHub-Component` identity (`unknown` bucket).
|
||||
|
||||
## Migrated in this pass (REST → `/workplans/`)
|
||||
|
||||
| Caller | Repo | Was | Now |
|
||||
| --- | --- | --- | --- |
|
||||
| `scripts/consistency_check.py` | state-hub | `/workstreams/*` | `/workplans/*` (prior commit) |
|
||||
| `scripts/consistency_check.py` task queries | state-hub | `?workstream_id=` | `?workplan_id=` |
|
||||
| `scripts/cleanup_stale_tasks.py` | state-hub | `GET /workstreams/` | `GET /workplans/` |
|
||||
| `scripts/validate_repo_adr.py` | state-hub | `/workstreams/{id}`, list | `/workplans/*` |
|
||||
| `custodian_cli.py` | state-hub | CRUD/list `/workstreams/` | `/workplans/` |
|
||||
| `dashboard/src/data/workstreams.json.py` | state-hub | `GET /workstreams` | `GET /workplans` |
|
||||
| `dashboard/src/data/workstreams/[id].json.py` | state-hub | `GET /workstreams/{id}` | `GET /workplans/{id}` |
|
||||
| `dashboard/src/extensions.md` | state-hub | `apiFetch("/workstreams/")` | `apiFetch("/workplans/")` |
|
||||
| `mcp_server/server.py` legacy resource | state-hub | `_get("/workstreams")` | `_get("/workplans")` |
|
||||
| `context_resolvers/state_hub.py` | activity-core | index, detail, tasks | `/workplans/index`, `/workplans/{id}`, `?workplan_id=` |
|
||||
| `cya/shell_session.py` | can-you-assist | `GET /workstreams/?` | `GET /workplans/?` |
|
||||
|
||||
## Intentional legacy (keep until meter clears)
|
||||
|
||||
| Surface | Notes |
|
||||
| --- | --- |
|
||||
| `api/routers/workstreams.py` | Compat router; metered with Deprecation |
|
||||
| `api/routers/workstream_dependencies.py` | Legacy dependency aliases |
|
||||
| MCP tool names `create_workstream`, etc. | Aliases call `/workplans/` internally |
|
||||
| MCP param aliases `workstream_id` | Accepted on tools; REST uses `workplan_id` where updated |
|
||||
| `activity-core` progress sinks | Dual-write `workplan_id` + `workstream_id` on POST `/progress/` (wire compat) |
|
||||
| `railiance-platform/scripts/credential.py` | Dual-write scope fields |
|
||||
| Dashboard **routes** `/workstreams` | Nav URL compat only; `workstreams.md` already polls `/workplans/` |
|
||||
| `tests/test_legacy_meter.py`, `test_routers_core.py` | Regression coverage for legacy routes |
|
||||
|
||||
## Likely remaining production traffic sources
|
||||
|
||||
1. **Remote fix-consistency** on railiance01 / cluster nodes still on pre-`e0c954d` checkout.
|
||||
2. **Dashboard data loaders** on deployed hosts before this migration ships.
|
||||
3. **activity-core** k8s prompts still document `/workstreams/workplan-index` in YAML (docs only until rolled).
|
||||
4. **External MCP clients** (Claude Code `create_workstream` in `~/.claude.json`) — tool aliases hit `/workplans/` but old REST clients may remain.
|
||||
5. **POST bodies** with `workstream_id` on `/tasks/`, `/decisions/`, `/progress/` (metered separately).
|
||||
|
||||
## Next verification
|
||||
|
||||
```bash
|
||||
python scripts/capture_legacy_meter_evidence.py --days 7
|
||||
```
|
||||
|
||||
Expect `GET /workstreams/*` window counts to fall after deploy + one full
|
||||
fix-consistency sweep cycle on all hosts.
|
||||
Loading…
Add table
Add a link
Reference in a new issue