activity-core/workplans/ACTIVITY-WP-0048-state-hub-execution-surface-switch-receipts.md
tegwick 36aca6f796
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Record the execution-surface smoke and close the finished lease-recovery ad hoc.
ACTIVITY-WP-0048-T01 now has the 2026-10-23 production read. Semantics and the activity-core 410 pointers match the contract. Ops-run history still needs operator auth, and State Hub has not switched yet. ACTIVITY-WP-ADHOC-2026-10-19 is finished because T01–T03 were already done.

Assistant: grok
Assistant-Session: 01a16889-9224-7ec0-bee0-2a46dd3819c4
2026-10-23 13:39:33 +02:00

91 lines
3.7 KiB
Markdown

---
id: ACTIVITY-WP-0048
type: workplan
title: "Route-switch and rollback receipts for the moved /execution surface (STATE-WP-0079-T04, STATE-WP-0098-T02)"
domain: infotech
repo: activity-core
status: active
owner: claude-activity-core
topic_slug: activity-core
created: "2026-10-19"
updated: "2026-10-23"
flavor: implementation
related: [STATE-WP-0079, STATE-WP-0098, ACTIVITY-WP-0029]
state_hub_workstream_id: "af8b55fe-1b69-5bfc-9d95-cc88b2de8463"
---
Origin: State Hub messages 4427c6cb (STATE-WP-0079-T04 asks for the workplan
that holds activity-core's receipts) and 13cff5ff (STATE-WP-0098-T02 asks about
the `/workplan-queue` dashboard view), both dated 2026-10-13.
Scope is only the part activity-core owns. That part is `GET /execution/semantics`,
plus `GET /ops-runs` as the automation-history replacement for
`GET /execution/launch-requests`. `GET /execution/workplan-stack` and
`PATCH /execution/workplans/{id}/intent` are not activity-core's. The first
belongs to the Repo Manager work index or the hub-core projection; for the
second, edit the workplan file. activity-core's own `/execution` routes answer
410 with those pointers (ACTIVITY-WP-0029). `POST /execution/launch-requests`
does not move: workplan ids are never queued in activity-core.
## Candidate read smoke
```task
id: ACTIVITY-WP-0048-T01
status: progress
priority: medium
state_hub_task_id: "92d0af6a-217e-5382-9803-1dc9d90e48a6"
```
Run a read-only smoke against the production activity-core API.
`GET /execution/semantics` returns 200 with the `replacements` map, and the
State Hub 410 routes point to the same owners. `GET /ops-runs?limit=50`
returns rows comparable on ids and counts with what the dashboard used
`GET /execution/launch-requests` for. Record the commands and the result
here. There are no writes.
Partial read — 2026-10-23, from railiance01 against ClusterIP `10.43.221.249:8010`
(host DNS does not resolve `*.svc.cluster.local`). No token was available, so
`/ops-runs` was not read.
| Call | Result |
|---|---|
| `GET /health` | 200 `{"status":"ok","db":true,"temporal":true}` |
| `GET /execution/semantics` | 200. `replacements` maps semantics to itself, launch-requests to `GET /ops-runs`, workplan-stack to repo-manager/hub-core, and intent to the workplan file. |
| `GET /execution/workplan-stack` | 410, `replacement_ref` repo-manager port.work / hub-core projection |
| `GET /execution/launch-requests` | 410, `replacement_ref` `GET /ops-runs` |
| `PATCH /execution/workplans/{id}/intent` | 410, `replacement_ref` edit the workplan file |
| `GET /ops-runs?limit=50` | 401 `worker or operator auth required` |
State Hub `http://127.0.0.1:8000` still serves the pre-switch surface:
`GET /execution/semantics` 200, `GET /execution/launch-requests?limit=50` 200 `[]`,
`GET /execution/workplan-stack` 200, `PATCH /execution/workplans/{id}/intent` 404
for an unknown id. Those 410 pointers are T02, after State Hub sets the switch.
## Route-switch receipt
```task
id: ACTIVITY-WP-0048-T02
status: wait
blocked_on: message-from:state-hub
priority: medium
state_hub_task_id: "02358c93-627a-5dcb-abbf-922a9ebf2263"
```
Wait: State Hub sets the switch window and gives metered acceptance under
STATE-WP-0079-T04. The `/workplan-queue` page points its `/execution/semantics`
read and its history read at activity-core behind a toggle. The other
widgets go to repo-manager or hub-core. Record the switch time, the toggle
state and the smoke result as the receipt.
## Rollback receipt
```task
id: ACTIVITY-WP-0048-T03
status: wait
blocked_on: message-from:state-hub
priority: medium
state_hub_task_id: "16a55060-8362-5667-ad43-a43bf2e82294"
```
Rollback flips the toggle back to the retained State Hub view, which stays
unchanged. Rehearse it once in the switch window and record the receipt.