the-custodian/activity-definitions/state-hub-consistency-sweep.md
codex 22d93669ce
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
ops: pause stale-lineage consistency sweep
2026-08-21 13:36:25 +02:00

3.1 KiB

id name type version enabled owner governance status created updated trigger context_sources
7c4e9a12-8f3b-4d5e-9c6a-1b2d3e4f5a6b State Hub Consistency Sweep activity-definition 1.1 false custodian custodian paused 2026-06-21 2026-08-21
type cron_expression timezone misfire_policy
cron */15 * * * * UTC skip
type query required params bind_to
state-hub consistency_sweep_remote_all true
max_seconds source
300 activity-core
context.consistency_sweep_remote_all

ActivityDefinition: State Hub Consistency Sweep

Purpose

This definition is the activity-core handoff point for the 15-minute ADR-001 reconciliation sweep (STATE-WP-0064, ACTIVITY-WP-0029).

activity-core owns the cron schedule and ActivityRun audit trail. repo-manager owns the C-rule engine. State Hub POST /consistency/sweep/remote-all is the dual-run adapter until REPO_MANAGER_URL / CONSISTENCY_SWEEP_URL points at repo-manager.

Runner Status

Paused 2026-08-21 under RMGR-WP-0005-T11. The production State Hub sweep mounted /home/tegwick read-write and the operator's /home/tegwick/.ssh, while 70 railiance01 checkouts still targeted the superseded gitea-remote lineage. The Temporal schedule is paused and State Hub sweep mounts are disabled until those checkouts are reconciled to forgejo-remote and the registrar preflight passes. Do not re-enable this definition independently.

enabled: true during STATE-WP-0064-T03 parallel week (started 2026-06-21) alongside the local custodian-sync.timer. Both invoke the same State Hub API; the process lock makes overlapping runs idempotent.

Cutover boundary:

  • Parallel week (T03): cluster schedule and local timer both active.
  • After T04 cutover: disable the local timer; this definition remains the sole primary runner.
  • Do not treat the local timer and this activity-core schedule as two independent primary runners after cutover.

Trigger

Every 15 minutes in UTC, with misfire_policy: skip.

If the activity-core host is offline at a scheduled tick, the missed run is skipped rather than replayed as a burst after the host returns.

Deterministic State Hub Invocation

The consistency_sweep_remote_all resolver issues:

  • POST {sweep_base}/consistency/sweep/remote-all
  • payload: {"max_seconds": 300, "source": "activity-core"}

sweep_base is CONSISTENCY_SWEEP_URL or REPO_MANAGER_URL or STATE_HUB_URL (default dual-run adapter). The context source is required: true. A failed call fails the workflow visibly. On success, the ActivityRun snapshot includes engine_owner, adapter, and sweep_url.

STATE_HUB_URL (adapter default) must point at the workstation State Hub through the ops-bridge tunnel, not a cluster-local checkout path.

Output Contract

The run should produce:

  • one State Hub progress event with event_type: consistency_sweep_remote_all
  • zero or more per-repo consistency reports in the API response
  • a lock-skipped response when another remote-all sweep is already active
  • one activity-core ActivityRun containing the sweep response metadata
  • no LLM call and no direct workplan or canon edits