railiance-cluster/workplans/RAIL-BS-WP-0011-legacy-meter-8h-capture-image-reconcile.md
tegwick 7d3de31f41
Some checks are pending
CI Smoke / host-smoke (push) Waiting to run
CI Smoke / container-smoke (push) Waiting to run
RAIL-BS-WP-0011: recheck notes and T04 revisit after 16:00 UTC
Record Temporal schedule upsert from recheck, reopen workplan to active,
and document T04 cadence proof criteria for the 16:00 UTC production tick.
2026-07-09 12:00:04 +02:00

5.7 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 active railiance-cluster railiance 2026-07-09 2026-07-09 a97b27ae-cb9f-455b-b5a7-5f5a31bc7058

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: "9c29427e-d3d9-464f-aeec-533038e7a8d4"

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: "977e57b7-060a-45bb-94c7-1db8b480351b"

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: "ba6256fe-efff-4038-bb7d-72dadac33251"

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: wait
priority: low
state_hub_task_id: "b7f725bc-cd6f-468d-9748-e5b887185adb"

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.

Revisit after 16:00 UTC 2026-07-09. Schedule enabled and registered in Temporal (see T02 recheck). Poll cluster State Hub for a third legacy_meter_8h_capture progress event with scheduled_for at the 16:00 UTC tick and no manual trigger_key in the workflow id.

Evidence so far (not sufficient to close T04):

  • 92893da2 — manual acceptance (T03), scheduled_for 09:47:49Z
  • 47d461b9 — catchup run, scheduled_for 09:42:30Z (predates schedule registration; not a clean cadence proof)

Done when: unattended 16:00 UTC fire posts progress with window_label: 8h linked to workplan 44e2e123-9934-4b5e-8b50-1bac548c5b70, then mark T04 done and workplan finished.