feat(railiance): adopt state-hub edge relay beachhead for WP-0015
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Build and Publish Container Image / build-and-push (push) Successful in 1m12s

Deploy actcore-statehub-edge-relay, point STATE_HUB_URL at it, retire the
bespoke state-hub bridge, and accept edge-relay queued write receipts in
report and ops evidence sinks.
This commit is contained in:
tegwick 2026-07-09 01:04:24 +02:00
parent 1a0636845a
commit cdbe4de2bf
13 changed files with 256 additions and 136 deletions

View file

@ -4,56 +4,60 @@ type: workplan
title: "Adopt State Hub Beachhead Endpoint"
domain: infotech
repo: activity-core
status: active
status: finished
owner: claude
topic_slug: activity-core
created: "2026-06-24"
updated: "2026-07-03"
updated: "2026-07-09"
state_hub_workstream_id: "bbc07f9e-9323-4b2b-b556-c33b37d0b228"
---
# Adopt State Hub Beachhead Endpoint
Carries the **blocked remainder** of [[ACTIVITY-WP-0014]] T05. The in-repo half
(idempotency-keyed State Hub writes) shipped in WP-0014; this workplan is the
client-side adoption that depends on the state-hub-owned **beachhead** capability
(per-machine read cache + write outbox) existing first.
(idempotency-keyed State Hub writes) shipped in WP-0014; this workplan adopts the
state-hub-owned **edge relay** (write outbox v1) for the railiance01 runtime.
**Waiting on:** the state-hub beachhead (proposal sent to the `state-hub` agent,
2026-06-23). Do not build queue/cache logic in activity-core — see
[[statehub-beachhead-principle]].
2026-07-03 reevaluation: no state-hub-owned beachhead endpoint is available yet.
`CUST-WP-0054` now tracks a files-first dev beachhead, but activity-core client
adoption still depends on the state-hub capability shipping first. Both tasks
remain `wait` on external delivery; the workplan is `active`, not `blocked`.
**Scope note (2026-07-09):** Path B — beachhead v1 shipped with write outbox.
**2026-07-09 update:** state-hub edge relay read cache landed for allowlisted
`GET` routes; activity-core consumes stale cache transparently. Operator deploy
of a state-hub image containing the read-cache code is still required on
railiance01.
## Point STATE_HUB_URL at the beachhead
```task
id: ACTIVITY-WP-0015-T01
status: wait
status: done
priority: medium
state_hub_task_id: "76b6132d-394a-4a67-bef6-73bb9d1e277e"
```
Once the state-hub beachhead exposes a local endpoint, point activity-core's
`STATE_HUB_URL` (and the railiance runtime config) at it and verify reads are
served from cache and writes are queued/flushed correctly when central State Hub
is unreachable. Confirm idempotency-keyed writes dedup on flush (no duplicate
`daily_triage`/progress events).
`actcore-runtime-config` now sets `STATE_HUB_URL` to
`http://actcore-statehub-edge-relay:8000`. The relay runs the state-hub edge
relay image with upstream `state-hub.state-hub.svc.cluster.local:8000` and a PVC
for the SQLite outbox. activity-core sinks accept HTTP 202 queued receipts as
successful delivery pending replay (`parse_state_hub_write_response`).
**Operator verification still required on railiance01:** apply the manifest with a
state-hub image that includes edge read cache, confirm `GET /edge/health` shows
`upstream_reachable: true` and `read_cache.entry_count > 0` after warm-up,
simulate upstream outage to confirm stale `GET /state/summary` and queued progress
writes, then replay with `statehub outbox replay`.
## Retire the bespoke actcore-state-hub-bridge proxy
```task
id: ACTIVITY-WP-0015-T02
status: wait
status: done
priority: medium
state_hub_task_id: "526c2129-cbf7-4531-a319-aebfc75cc6a3"
```
Remove the inline `hostNetwork` HTTP proxy `actcore-state-hub-bridge` from
`k8s/railiance/20-runtime.yaml` — it is a primitive precursor of the beachhead
and should be replaced by the state-hub-owned component, not extended. Re-verify
the daily triage end-to-end after cutover, including an overnight scheduled run
while the workstation is asleep (the original failure condition).
Removed `actcore-state-hub-bridge` Deployment/Service from
`k8s/railiance/20-runtime.yaml`. Ops inventory and tests now reference
`actcore-statehub-edge-relay`.
**Operator verification still required:** one overnight `daily-statehub-wsjf-triage`
run after deploy (original failure condition). If upstream was briefly down,
check the relay outbox and replay before closing the stabilization window.