railiance-cluster/workplans/RAIL-BS-WP-0011-legacy-meter-8h-capture-image-reconcile.md
codex 33bf6e7f3d
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
fix(workplans): adopt ADR-007 derived identifiers for unregistered records
These workplans exist only in the retired local hub. Their random pre-ADR-007
identifiers are refused by C-06 as stale references, so they cannot be
registered. Deriving from the canonical record id takes no identity from
anything: central does not hold them and the old ids die with the cache.

Records central already holds were deliberately left untouched.

Refs CUST-WP-0068-T06

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 2583210@bnt-lap001
Assistant-Session: f2bff2d5-e9b2-4338-92ca-10282a927006
2026-08-25 20:18:34 +02:00

5.5 KiB

id type title domain repo status owner topic_slug created updated state_hub_workstream_id
RAIL-BS-WP-0011 workplan Legacy-meter 8h capture image reconcile (STATE-WP-0073) financials railiance-cluster finished railiance-cluster railiance 2026-07-09 2026-07-09 4e548003-b936-587f-a83c-09b4f7d12196

Legacy-meter 8h capture image reconcile (STATE-WP-0073)

Context

State Hub suggestion 8b3301d6-0222-41e4-89c9-99e8c6dd5248 (origin legacy-meter-8h-capture-railiance-rollout, STATE-WP-0073): rebuild activity-core:railiance01-prod from activity-core f41cf14 or later so the legacy_meter_weekly_review resolver passes hours=8 to State Hub. Without this, legacy-meter-8h-capture scheduled runs report a 7-day window instead of the intended 8-hour retirement gate.

activity-core commit f41cf14 adds hours through the State Hub resolver, legacy-meter-8h-capture cron (0 */8 * * * UTC), and progress sink legacy_meter_8h_capture for STATE-WP-0070 seven-window gating. The runtime ConfigMap and definition are already applied on railiance01; the live image digest sha256:ead63d4a… predates the resolver change (hours absent in _legacy_meter_weekly_review source).

Deploy coupling: resolver code must ship in the activity-core image; the definition projection is already in k8s/railiance/20-runtime.yaml. Image reconcile is the remaining gate.

Prereqs:

  • activity-core checkout at f41cf14 or later (workstation and railiance01)
  • export KUBECONFIG=~/.kube/config-hosteurope (workstation) or /etc/rancher/k3s/k3s.yaml (railiance01)
  • actcore-state-hub-bridge reachable at 127.0.0.1:18000 (State Hub tunnel)

Pattern reuse: RAIL-BS-WP-0010 revision-gated image reconcile. Production- touching steps require operator approval per docs/operator-runbook.md.

Reconcile activity-core image to f41cf14+

id: RAIL-BS-WP-0011-T01
status: done
priority: high
state_hub_task_id: "67239106-21f0-5b2e-aa48-fe10dc241dca"

Build activity-core:railiance01-prod from activity-core main at f41cf14 or later, import into railiance01 k3s containerd, and restart actcore-api, actcore-worker, and actcore-event-router only if the image digest changed. Sync remote activity-core repo to f41cf14+ for revision evidence.

2026-07-09: Built activity-core:railiance01-prod from workstation checkout f41cf14, imported into railiance01 k3s. Digest changed sha256:ead63d4a…sha256:7f8e56a378b1521f8d3d1d75f47bfcc90dc6e0ad7b15531f181603a7878e3b03. Deployments restarted; all rollouts green. Remote activity-core on railiance01 already at f41cf14.

Verify resolver hours param in live pods

id: RAIL-BS-WP-0011-T02
status: done
priority: high
state_hub_task_id: "c643d99a-8515-5ae2-9946-a87e5087ef8f"

Confirm _legacy_meter_weekly_review source in the worker pod includes the hours param path. Confirm legacy-meter-8h-capture is enabled=true in the activity-core DB with cron 0 */8 * * * UTC and a matching Temporal schedule.

2026-07-09: hours_in_resolver: True in actcore-api pod post-rollout. Edge relay logged GET /legacy-meter/weekly-review?hours=8 200 OK. Definition a0fae182-52e9-5990-9fa6-6fea12a14753 enabled in DB; ConfigMap carries hours: 8 and cron 0 */8 * * * UTC.

Recheck (same day): image digest sha256:7f8e56a3… still live. Temporal schedule activity-schedule-a0fae182-52e9-5990-9fa6-6fea12a14753 was missing from the 13-schedule inventory (bulk sync_schedules blocked by unrelated ScheduleAlreadyRunningError). Targeted upsert_schedule created it: every 8h at :00 UTC, paused=false, schedule count 13 → 14.

Manual trigger acceptance smoke

id: RAIL-BS-WP-0011-T03
status: done
priority: high
state_hub_task_id: "b0e6625f-5197-5521-9057-d2bb43cc078f"

Manually trigger legacy-meter-8h-capture once. Poll State Hub for event_type=legacy_meter_8h_capture linked to workplan 44e2e123-9934-4b5e-8b50-1bac548c5b70. Record non-secret evidence: window_label: 8h, retirement-candidate counts, matched progress event id. Closes the functional acceptance gate for suggestion 8b3301d6.

2026-07-09: Manual trigger activity-a0fae182-52e9-5990-9fa6-6fea12a14753:manual-49eebfc6-1d23-4bb9-bdad-6ffd1f6eab65 completed. Cluster State Hub progress 92893da2-46e5-4060-a0d5-9b247e1b2ef3 (legacy_meter_8h_capture, workplan 44e2e123-9934-4b5e-8b50-1bac548c5b70): window_label: 8h, 1 retirement candidate of 9 interfaces, 382103 legacy calls in window. Prerequisite: inserted STATE-WP-0073 workplan row into cluster state_hub DB (FK was missing vs workstation hub). Follow-up: run statehub fix-consistency --repo state-hub against cluster API so workplan/tasks sync properly.

First scheduled 8h UTC run watch

id: RAIL-BS-WP-0011-T04
status: done
priority: low
state_hub_task_id: "cca1fe22-893d-561e-925c-4d3d1ac16e98"

After T03 passes, leave the schedule enabled. On the next 0 */8 * * * UTC tick, confirm a second legacy_meter_8h_capture progress event arrives without operator action. Proves production cadence, not only manual trigger.

2026-07-09 16:00 UTC: Temporal schedule activity-schedule-a0fae182-52e9-5990-9fa6-6fea12a14753 fired at 16:00:00Z (workflow activity-a0fae182-52e9-5990-9fa6-6fea12a14753:${firstScheduledTime}-2026-07-09T16:00:00Z, no manual trigger). Cluster progress ec231bca-e8c6-4e4e-9b48-c1295aec5221 at 16:00:13Z: window_label: 8h, 1 retirement candidate of 9 interfaces, 396529 legacy calls in window, workplan 44e2e123-9934-4b5e-8b50-1bac548c5b70. Next scheduled ticks: 00:00 / 08:00 / 16:00 UTC daily cadence confirmed.