diff --git a/workplans/RAIL-BS-WP-0010-weekly-legacy-meter-review-rollout.md b/workplans/RAIL-BS-WP-0010-weekly-legacy-meter-review-rollout.md new file mode 100644 index 0000000..8149405 --- /dev/null +++ b/workplans/RAIL-BS-WP-0010-weekly-legacy-meter-review-rollout.md @@ -0,0 +1,132 @@ +--- +id: RAIL-BS-WP-0010 +type: workplan +title: "Weekly legacy-meter review rollout (STATE-WP-0069)" +domain: financials +repo: railiance-cluster +status: ready +owner: railiance-cluster +topic_slug: railiance +created: "2026-07-08" +updated: "2026-07-08" +state_hub_workstream_id: "d2286123-feaf-40ae-bf5e-6b620885d729" +--- + +# Weekly legacy-meter review rollout (STATE-WP-0069) + +## Context + +State Hub suggestion `05da5540-e7cd-41fb-a511-3c1572e4604f` (origin +`weekly-legacy-meter-review-railiance-rollout`, STATE-WP-0069): deploy the +`weekly-legacy-meter-review` ActivityDefinition on railiance01 so legacy-meter +retirement gating receives automated weekly evidence from production +activity-core. + +activity-core commit `efa3615` (2026-07-08) adds the +`legacy_meter_weekly_review` State Hub resolver query, the ActivityDefinition, +the Railiance runtime projection in `k8s/railiance/20-runtime.yaml`, and the +`legacy_meter_weekly_review` progress sink. Code is merged on main; cluster +reconcile is pending. + +**Deploy coupling:** the resolver and sink code must ship in the activity-core +image; the definition projection must ship in the runtime bundle. Apply both +before calling `POST /admin/sync`. This is not a ConfigMap-only change. + +**Prereqs:** + +- activity-core checkout on railiance01 at `efa3615` or later +- `actcore-state-hub-bridge` reachable at `127.0.0.1:18000` (State Hub tunnel) +- `kubectl` access: `export KUBECONFIG=~/.kube/config-hosteurope` + +**Pattern reuse:** RAIL-BS-WP-0008 revision-gated image reconcile; +RAIL-BS-WP-0009 no-restart admin sync. Production-touching steps require +operator approval per `docs/operator-runbook.md`. + +## Reconcile activity-core image to efa3615+ + +```task +id: RAIL-BS-WP-0010-T01 +status: todo +priority: high +state_hub_task_id: "d0dda77e-a236-48f9-a3ba-54c2183e848e" +``` + +Rebuild and import `activity-core:railiance01-prod` from activity-core main at +`efa3615` or later into the railiance01 k3s containerd store. Sync the remote +activity-core repo (with `.git` metadata for revision gating). Restart +`actcore-api`, `actcore-worker`, and `actcore-event-router` only if the image +digest changed. + +## Apply runtime bundle with weekly-legacy-meter-review + +```task +id: RAIL-BS-WP-0010-T02 +status: todo +priority: high +state_hub_task_id: "9b11485a-2a9d-4e45-a358-b2c7318c387f" +``` + +Apply `k8s/railiance/20-runtime.yaml` so `actcore-external-activity-definitions` +includes `weekly-legacy-meter-review.md` with: + +- cron `30 8 * * 1` Europe/Berlin +- context query `legacy_meter_weekly_review` (`days: 7`) +- evidence sink `legacy_meter_weekly_review` linked to workplan + `923bb94a-d16c-422c-b81e-16328bd7b60c` (STATE-WP-0069) + +## No-restart admin sync + +```task +id: RAIL-BS-WP-0010-T03 +status: todo +priority: high +state_hub_task_id: "b5906fd2-2f39-4379-af2f-8bc0f7cbeb1f" +``` + +After ConfigMap apply, wait ~60s for API pod volume propagation (see +`activity-core/docs/runbook.md` and `scripts/smoke_admin_sync_no_restart.py`). +Call `POST /admin/sync?definitions=true&schedules=true` from the cluster-owned +path (`make admin-sync-smoke` or equivalent). Confirm worker pod UID and +restart count are unchanged. + +## Verify definition and Temporal schedule + +```task +id: RAIL-BS-WP-0010-T04 +status: todo +priority: medium +state_hub_task_id: "f47e4ab2-04fc-4441-8983-f45060afcd10" +``` + +Confirm `weekly-legacy-meter-review` is `enabled=true` in the activity-core DB +and that a Temporal schedule exists for `30 8 * * 1` Europe/Berlin. Query via +the activity-core API or `actcore-api` exec. + +## Manual trigger acceptance smoke + +```task +id: RAIL-BS-WP-0010-T05 +status: todo +priority: high +state_hub_task_id: "7f4c3a15-75b6-48c5-9f5f-594f693a688a" +``` + +Manually trigger `weekly-legacy-meter-review` once (do not wait for Monday). +Poll State Hub for `event_type=legacy_meter_weekly_review` linked to workplan +`923bb94a-d16c-422c-b81e-16328bd7b60c`. Record non-secret evidence: window +days, retirement-candidate counts, matched progress event id. Closes the +functional acceptance gate for suggestion `05da5540`. + +## First scheduled Monday run watch + +```task +id: RAIL-BS-WP-0010-T06 +status: wait +priority: low +state_hub_task_id: "c3011200-1bfc-4da6-ac15-05702617eeeb" +``` + +After T05 passes, leave the schedule enabled. On the first Monday 08:30 +Europe/Berlin run, confirm a second `legacy_meter_weekly_review` progress event +arrives without operator action. This proves production cadence, not only manual +trigger. \ No newline at end of file