Files
the-custodian/activity-definitions/state-hub-consistency-sweep.md
tegwick 8cfda08cea feat(STATE-WP-0064): add state-hub-consistency-sweep ActivityDefinition
Land the 15-minute consistency sync definition disabled until manual
canary and cutover from the local custodian-sync timer.
2026-06-21 20:19:22 +02:00

2.8 KiB

id, name, type, version, enabled, owner, governance, status, created, trigger, context_sources
id name type version enabled owner governance status created trigger context_sources
7c4e9a12-8f3b-4d5e-9c6a-1b2d3e4f5a6b State Hub Consistency Sweep activity-definition 1.0 false custodian custodian proposed 2026-06-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
300
context.consistency_sweep_remote_all

ActivityDefinition: State Hub Consistency Sweep

Purpose

This definition is the activity-core handoff point for STATE-WP-0064 - Move State Hub consistency sync to Railiance01.

It schedules the 15-minute ADR-001 reconciliation sweep across all registered repos with local paths on the workstation State Hub host. State Hub owns scripts/consistency_check.py, lock semantics, and the consistency_sweep_remote_all progress event; activity-core owns the cron schedule and ActivityRun audit trail.

Runner Status

This definition stays enabled: false until a successful manual canary against Railiance01 Temporal.

Cutover boundary:

  • The local custodian-sync.timer remains the interim primary runner during the parallel week in STATE-WP-0064-T03.
  • After cutover, disable the local timer and enable this definition as 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 State Hub context resolver issues:

  • POST /consistency/sweep/remote-all
  • payload: {"max_seconds": 300}

The context source is marked required: true. A failed State Hub call fails the activity-core workflow visibly instead of silently binding an empty context. On success, the response is stored in the ActivityRun context_snapshot under consistency_sweep_remote_all.

State Hub runs consistency_check.py --remote --all --json on the workstation host and records a compact progress event with event type consistency_sweep_remote_all, including processed repos and skip metadata.

STATE_HUB_URL must point at the workstation State Hub through the ops-bridge tunnel service (for example actcore-state-hub-bridge), not at 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