Runtime Cloud — workers, grains and sagas¶
Generated from the architecture model
This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.
Workers¶
| Worker | Service | Trigger | Output events | Retry | Idempotency key | Concurrency |
|---|---|---|---|---|---|---|
| Planner | IaCProvisioningService | event EnvironmentPromotionService.PromotionApproved | ProvisioningPlanned | exponential ×3 | provisioningRunId + plan |
4 by EnvironmentId |
| Applier | IaCProvisioningService | event IaCProvisioningService.ProvisioningPlanned | ProvisioningApplied, ProvisioningFailed | none ×1 | provisioningRunId + apply |
2 by EnvironmentId |
| GitOpsReconciler | IaCProvisioningService | schedule 0 */4 * * * |
ProvisioningPlanned, ProvisioningApplied | fixed ×2 | environmentId + window |
4 by TenantId |
| Autoscaler | ExecutionCapacityService | schedule */2 * * * * |
WorkerPoolStateChanged | fixed ×2 | poolId + window |
4 by PoolId |
| LeaseExpirer | ExecutionCapacityService | schedule */1 * * * * |
CapacityLeaseReleased | none ×1 | leaseId + expiry |
4 by PoolId |
| Observer | RuntimeEnvironmentService | schedule */5 * * * * |
ObservedStateChanged | fixed ×2 | environmentId + observation window |
8 by EnvironmentId |
| DriftComparer | RuntimeEnvironmentService | event RuntimeEnvironmentService.ObservedStateChanged | RuntimeDriftDetected, ReconciliationProposed | fixed ×2 | environmentId + observedAt |
4 by EnvironmentId |
- Planner (IaCProvisioningService): Resolves the program version, configuration and secret references and runs the IaC planner; records the plan receipt; routes to approval when required.
- Applier (IaCProvisioningService): Runs the IaC apply for approved or allowed runs with the runner's workload identity; records outputs and logs as artifacts; reports applied or failed.
- GitOpsReconciler (IaCProvisioningService): Re-plans the declared specification of every environment on a schedule; applies non-destructive differences automatically where policy allows, and turns destructive or production differences into reconciliation proposals.
- Autoscaler (ExecutionCapacityService): Adjusts pool sizes within bounds from utilisation and queued leases; size changes go through provisioning.
- LeaseExpirer (ExecutionCapacityService): Expires leases whose heartbeat stopped and frees their capacity.
- Observer (RuntimeEnvironmentService): Reads clusters and cloud APIs for every environment, updates the inventory, marks stale environments, and resolves findings no longer observed.
- DriftComparer (RuntimeEnvironmentService): Compares each observation with the declared specification, raises findings and groups them into proposals (auto-accepting non-destructive ones outside production where policy allows).
Grains (actors)¶
| Grain | Service | Key | Reminders / timers | Reentrant | Summary |
|---|---|---|---|---|---|
| PoolGrain | ExecutionCapacityService | string = poolId | queue-drain, lease-expiry | no | Serialises lease grants per pool so capacity accounting is exact under concurrency; drains the queue as capacity frees. |
Sagas¶
None modelled
No sagas are modelled for this item yet.