Skip to main content

alphaswarm-beat

Catalog date: 2026-06-24.

Celery beat process responsible for time-based task dispatch. It writes to the same Redis broker the worker drains; nothing else writes schedule-driven payloads.

Identity​

FieldValue
Service idalphaswarm-beat
Rolescheduler
Packagealphaswarm/ (schedule under alphaswarm/tasks/celery_app.py)
Image (key)beat
Built fromalphaswarm_platform/Dockerfile (image key beat → target worker; beat shares the slim orchestration image)

Wire​

FieldValue
Protocolnone
HealthCelery broker connection probe
Replicasexactly 1 (singleton) — replicas: 1, strategy: Recreate

A beat replica > 1 leads to duplicate task emissions; the Recreate strategy guarantees the old pod is down before the new one starts.

Deployment surfaces​

SurfaceWhere
Composebeat is folded into the worker container in compose (single-replica entrypoint switch)
Kustomizedeployments/kubernetes/base/alphaswarm-beat/deployment.yaml (its own base, not folded into alphaswarm-worker/)
AlphaSwarm CRAlphaSwarmMonolith (spec.beatReplicas, default 1, allowed range 0–2)

Schedule highlights​

Verified against the actual beat_schedule dict — not an exhaustive list, and several entries below stay declared-but-no-op until their gating setting is turned on:

  • Every ~5s: ownership_tasks.drain_events (event-bus → Neo4j ownership-graph projection drain).
  • ~Every 60s (default): agent_watchdog_tasks.scan_for_stalled_agent_runs, ledger_outbox_tasks.reconcile_agent_ledger_outbox.
  • ~Every 5 minutes (default): cache_tasks.refresh_metadata, trading.outbox_relay.reconcile_open_state (order/position reconcile).
  • ~Every 30 minutes (default): ownership_tasks.full_resync.
  • Hourly: agent_tasks.drift_check.
  • Every 6 hours: rag_tasks.refresh_l0_alpha_base, finops_tasks.audit (governance label scan).
  • Daily (UTC): ingestion_tasks.ingest_alpha_vantage_daily (06:00), ingestion_tasks.ingest_databento_daily (07:00), dbt_tasks.build_scheduled (08:00), retention_tasks.rolling_daily_refresh (05:30).
  • Nightly: audit_log_export.export_nightly (02:00 UTC, money-plane WORM export).
  • Weekly (default): docs_freshness_tasks.scan_stale_pages (stale-frontmatter scan, opens GitHub issues).
  • Also present: terraform_tasks.terraform_drift_scan, data_metadata_tasks.reconcile_physical_registration, and several guarded-beat crash-safety entries (order outbox relay, fill-stream supervisor watchdog).

The full schedule lives in alphaswarm/tasks/celery_app.py.

Operations​

  • Single-instance by default: the kustomize base sets replicas: 1 with strategy.type: Recreate. Via the AlphaSwarmMonolith CR, spec.beatReplicas is configurable 0–2 (default 1) — it is not hard-refused at any value other than 1, so operators can scale it to 0 (disabled) or 2; running more than one live beat replica still risks duplicate task emissions.
  • Persistence: beat schedule lives at /tmp/celerybeat-schedule inside the pod (ephemeral); the schedule itself is code-defined so loss is recoverable.
  • Audit: could not verify a "system:beat" tagging convention in alphaswarm — WorkloadRun (alphaswarm/persistence/models_workloads.py) has a nullable user_id, not a started_by_user_id field, and no system:beat sentinel was found in the codebase. Flagging this bullet as unverified rather than asserting a specific mechanism.

See also​

  • alphaswarm-worker.md — what consumes beat's output.
  • tasks-api (private alphaswarm_internal repo) — task progress contract. (As of 2026-07-19, alphaswarm/.cursor/rules/ only carries a pointer to this SSoT repo.)