System resilience and administration
The system resilience and administration services keep an Arcane installation usable, observable, recoverable, and current. They manage shared settings and runtime state, check local and remote health, run maintenance and update work, deliver operational notices, protect system and volume data through backup and recovery flows, and record the result of each operation. See Platform operations for the wider operational model and Observability and workspace insights for the operator view.
Operational control plane
Settings and runtime behavior
The settings service is the control point for values that shape Arcane behavior. It loads defaults and saved values, applies supported environment overrides, builds an effective read snapshot, limits values by visibility, and publishes safe changes so dependent services can react. Settings cover paths, timeouts, update behavior, health intervals, maintenance rules, security controls, and service credentials. backend/…/service.go• L75-132 backend/…/model.go• L65-215
Settings changes affect more than the settings screen. A successful change is saved and then made effective in the in-memory snapshot. Dependent services can refresh a watcher, reschedule a job, or update a runtime limit. Settings writes are serialized, while change effects run in lifecycle order after the write. Sensitive values are redacted in views and are not sent through change notifications. The settings API also supports public reads, permission-filtered reads, environment-only operation, and category search. backend/…/service.go• L135-177 backend/…/service.go• L398-481 backend/…/service.go• L486-589 backend/…/service.go• L789-805
Feature gates provide a per-environment switch for optional capabilities. A disabled gate blocks the related operation, while an unknown or invalid runtime value falls back to the feature's declared default. Feature settings accept only the exact boolean values true and false, and an environment override can control the effective value. This gives the system one consistent decision point for both API actions and scheduled work. backend/…/service.go• L422-446 backend/…/service.go• L1020-1044
Settings that name a protected external target follow a replacement rule. Arcane does not allow an OIDC issuer or Trivy server to change while its stored credential remains in place unless a replacement credential is supplied. This keeps a saved secret from being silently sent to a new target. Sensitive signing keys are generated and stored in encrypted form for later authentication and session use. backend/…/service.go• L496-547 backend/…/service.go• L864-930
References: backend/…/service.go• L75-177 backend/…/service.go• L190-256 backend/…/service.go• L398-481 backend/…/service.go• L486-589 backend/…/service.go• L789-805 backend/…/service.go• L1020-1044 backend/…/model.go• L65-215 backend/…/model.go• L273-320
System-wide Docker operations
The system module is the assembly point for Docker administration. It connects system actions, pruning, self-update, system backups, system-managed volume backups, resource services, settings, activity tracking, and environment access, then exposes the related routes. This keeps shared actions on one service boundary that both API requests and scheduled work can use. backend/…/module.go• L21-57 backend/…/service.go• L62-127
The system service provides administrative actions for a Docker environment. It reports daemon information, starts or stops groups of containers, and removes selected unused Docker resources. Long operations produce activity records so an operator can follow progress and see partial failures instead of receiving only a single final result. backend/…/handler.go• L63-152 backend/…/service.go• L184-303
Pruning treats containers as the first stage because removing them can make other resources unused. Image, build-cache, volume, and network cleanup can then run in parallel. The service prevents two prune runs for the same environment from changing the same resources at once, and it reports a build-cache error as part of the final result rather than hiding it. backend/…/service.go• L39-49 backend/…/service.go• L70-105 backend/…/service.go• L172-305
Scheduled pruning first records a plan of exact resources. It checks each resource again before deletion and can resume unfinished work after a restart. This reduces the risk of deleting a resource that became active after the plan was made. Backup volumes and internal resources are excluded, and image cleanup also removes update records for images that Docker removes. backend/…/service.go• L504-591 backend/…/service.go• L641-661 backend/…/service.go• L766-867 backend/…/service.go• L961-1018
System resource reporting can account for the enclosing Docker host when Arcane shares its host cgroup namespace. This gives the operator a useful host memory view without replacing the normal daemon data when that host-level view is not available. backend/…/service.go• L314-405
References: backend/…/module.go• L21-57 backend/…/handler.go• L63-152 backend/…/service.go• L62-127 backend/…/service.go• L184-405 backend/…/service.go• L39-49 backend/…/service.go• L70-105 backend/…/service.go• L172-305 backend/…/service.go• L504-591 backend/…/service.go• L641-661 backend/…/service.go• L766-867 backend/…/service.go• L961-1058
Health and diagnostics
Service and environment health
The public /health endpoint answers whether the API runtime is available. It returns UP during startup and while the Francis runtime is active. After that runtime exits, it returns DOWN with HTTP service-unavailable; its HEAD form returns the same status without a response body. backend/…/handler.go• L16-47 backend/…/module.go• L11-33
The environment health flow checks the Docker daemon for the local environment and checks the API or edge tunnel for remote environments. It stores the resulting online, offline, or error state and records the latest liveness time. backend/…/environment_health.go• L156-272
Health checks also maintain the manager's view of its connected environments. For an online remote environment, the manager refreshes related registry, storage, repository, and variable data. Edge status uses live tunnel or poll state because a saved online flag can be stale after a manager restart. backend/…/environment_health.go• L78-154 backend/…/environment_health.go• L275-441
The system-specific health route checks Docker responsiveness and returns service-unavailable when the daemon cannot be reached. This gives container orchestration and external monitors a more direct signal than the process-level API health route. backend/…/handler.go• L63-70 backend/…/module.go• L59-71
References: backend/…/handler.go• L16-47 backend/…/module.go• L11-33 backend/…/environment_health.go• L78-154 backend/…/environment_health.go• L156-272 backend/…/environment_health.go• L275-441 backend/…/handler.go• L63-70 backend/…/module.go• L59-71
Runtime diagnostics and telemetry
The diagnostics service gives an operator a current view of process health. It reports runtime, memory, garbage-collector, uptime, and goroutine data. REST handlers combine this process data with WebSocket and worker counts, while a separate endpoint exposes recent buffered backend logs. backend/…/service.go• L22-140 backend/…/diagnostics.go• L42-94
Diagnostics are available as a point-in-time REST view and as live WebSocket streams. The live system statistics stream samples CPU, memory, disk, host, and optional GPU data for active subscribers. Other streams send refreshed runtime snapshots or replay recent log entries before sending new entries. backend/…/diagnostics.go• L36-49 backend/…/diagnostics.go• L80-207 backend/…/system_stats.go• L218-241 backend/…/system_stats.go• L422-527
References: backend/…/service.go• L22-140 backend/…/diagnostics.go• L42-94 backend/…/diagnostics.go• L36-49 backend/…/diagnostics.go• L80-207 backend/…/system_stats.go• L218-241 backend/…/system_stats.go• L422-527
Backup and recovery
System backup lifecycle
System backups protect Arcane's application data, configuration, and project files so an installation can be rebuilt after data loss. They support local storage, an S3-compatible destination, or both. The service records each run and its snapshot identifiers, supports manual and scheduled creation, applies retention to completed runs, and exposes one history view for system and system-managed volume backup activity. It can also discover remote snapshots when the local run record is missing. backend/…/service.go• L482-487 backend/…/service.go• L660-686 backend/…/service.go• L922-964 backend/…/handler.go• L108-136
System backup work uses a shared admission boundary. Manual creation, scheduled creation, retention, upload, delete, restore, and volume backup operations compete for the same system backup slot. Durable manual runs save their intent, progress, and recovery data before work starts so a restart can reconcile the run instead of silently losing it. backend/…/service.go• L275-284 backend/…/service.go• L1568-1633 backend/…/service.go• L1670-1775 backend/…/service.go• L347-413
Local-plus-S3 runs create one staged local snapshot and copy that stable snapshot to S3. S3-only runs write directly to the remote repository without creating a local snapshot. This keeps remote-only backup policy independent from local backup storage while preserving one source snapshot when both destinations are enabled. backend/…/service.go• L513-657
Recovery uses one instance-wide recovery key for system and Rustic volume backups. The key is generated in a fixed format and stored in encrypted form when Arcane is configured to keep it. When backups already exist, Arcane re-keys their repositories before it saves a replacement key; a failed re-key leaves the current key in place. System recovery is currently supported only for SQLite-backed installations. backend/…/service.go• L345-365 backend/…/service.go• L1215-1314
Operators can list, discover, upload, delete, and restore system backups. Discovery makes remote snapshots visible again when the local run record is missing. Delete and restore operations use the same run admission boundary as backup creation so a snapshot cannot be removed or changed during another system backup action. backend/…/handler.go• L108-318 backend/…/service.go• L749-1025
References: backend/…/service.go• L482-487 backend/…/handler.go• L108-318 backend/…/service.go• L275-284 backend/…/service.go• L345-365 backend/…/service.go• L408-657 backend/…/service.go• L749-1025 backend/…/service.go• L1215-1314 backend/…/service.go• L1370-1561 backend/…/service.go• L1568-1775 backend/…/service.go• L347-413
System-managed volume backups
System-managed volume backups protect selected Docker volumes through saved policies or a one-time custom request. A policy can include all volumes, an allowlist, or a blocklist, can ignore anonymous volumes, can stop containers when the volume backup service requires it, and can write to local storage, S3, or both. backend/…/service.go• L187-265 backend/…/service.go• L347-413
Manual and scheduled volume runs freeze the policy and the matching live volume set before work starts. Each volume reports success, failure, or skip, and an interrupted scheduled run can resume from that frozen selection instead of selecting a different set after restart. A volume with its own enabled backup policy is skipped to avoid duplicate backup ownership. backend/…/service.go• L416-517 backend/…/service.go• L519-681
Policy changes persist the full policy set and reschedule the matching jobs. A missing S3 destination disables the remote part of a policy; a policy with no local destination then needs operator attention rather than silently reporting success. The API exposes policy state, live and previously configured volume choices, and accepted run activity. backend/…/service.go• L267-344 backend/…/service.go• L704-787 backend/…/handler.go• L45-79
References: backend/…/service.go• L98-161 backend/…/service.go• L187-344 backend/…/service.go• L347-413 backend/…/service.go• L416-517 backend/…/service.go• L519-681 backend/…/service.go• L704-804 backend/…/handler.go• L15-79
Snapshot engine and retention
The shared backup engine presents one backup model for system and volume data. It creates, lists, restores, copies, and forgets encrypted Rustic snapshots. Snapshot discovery accepts Rustic's flat or grouped listing forms and rejects malformed entries or invalid snapshot IDs before other services use them. backend/…/service.go• L183-216 backend/…/service.go• L218-290 backend/…/service.go• L344-486
System recovery snapshots record a manifest that describes the data and project roots inside the snapshot. The snapshot service can capture separately mounted project files as well as Arcane data, while excluding database sidecar files and recovery control files from the project view. It checks the source tree before and after capture so a changing source does not produce a backup that claims to be consistent. backend/…/service.go• L587-615 backend/…/service.go• L695-750 backend/…/service.go• L1072-1207
Work for one repository is serialized, while separate repositories can proceed independently. A shared admission gate makes scheduled and manual runs compete for the same operation slot. Forget operations validate requested IDs, match them to snapshots in the repository, and prune removed data in one pass. backend/…/service.go• L183-216 backend/…/service.go• L497-546
The engine can re-key a repository and replicate a snapshot without reading the live source again. This lets system backup flows copy a stable local snapshot to S3 and lets the shared recovery key cover both system and volume backup repositories. The recovery-key store validates the key format and keeps the encrypted key available to both backup domains. backend/…/service.go• L549-581 backend/…/service.go• L629-705
Backup runs have their own lifecycle separate from repository commands. A submitted run has one tracked owner, can be canceled during shutdown, and is removed only after its final result is processed. Accepted intents whose dispatch result is uncertain remain held for reconciliation, while interrupted dispatches are repaired after startup. backend/…/service.go• L190-216 backend/…/service.go• L948-1030 backend/…/service.go• L1203-1279
Retention selects the oldest successful runs beyond the configured keep count and removes their snapshots through the owning service. Policy updates normalize schedules, validate retention and destination rules, reconcile the full policy set, and reschedule the related jobs. backend/…/service.go• L1370-1561
References: backend/…/service.go• L183-216 backend/…/service.go• L218-290 backend/…/service.go• L344-486 backend/…/service.go• L497-581 backend/…/service.go• L629-705 backend/…/service.go• L719-842 backend/…/service.go• L948-1030 backend/…/service.go• L1203-1279 backend/…/service.go• L513-657 backend/…/service.go• L1370-1561 backend/…/service.go• L587-615 backend/…/service.go• L695-750 backend/…/service.go• L1072-1207
Recovery handoff
Full restore is a controlled handoff from the running Arcane process to a short-lived recovery helper. Before the handoff, the service creates a local safety backup, checks the target snapshot and data mount, plans the data and project restore stages, and writes a recovery request that contains the snapshot and runtime information. The helper stops Arcane, restores the data, validates the recovery manifest, updates the restored run and activity, and recreates Arcane with the recovered configuration. backend/…/service.go• L1028-1204 backend/…/request.go• L9-44 backend/…/recovery.go• L48-97
Operators can also browse a successful backup and restore selected project files while Arcane keeps running. This flow creates a safety snapshot in the same repository as the source, protects Arcane's own data files from selection, and rolls back the affected project paths if a later selected restore fails. backend/…/service.go• L689-747 backend/…/service.go• L283-313 backend/…/service.go• L403-456
The helper can restore from a local repository or an S3 repository. It preserves the safety backup in the restored database, so an operator has a fallback if the selected restore is not usable. The request and manifest are short-lived control files and are removed after the handoff or after a failed preparation. backend/…/recovery.go• L100-240
References: backend/…/handler.go• L231-278 backend/…/service.go• L689-747 backend/…/service.go• L1028-1204 backend/…/service.go• L283-313 backend/…/service.go• L403-574 backend/…/request.go• L9-44 backend/…/recovery.go• L48-97 backend/…/recovery.go• L100-240
Notifications
Provider configuration and delivery
The notification service turns operational events into messages for enabled providers. It supports provider settings, per-event enablement, test sends, and delivery logs. Events include image updates, container updates, vulnerability summaries, prune reports, and auto-heal actions. backend/…/handler.go• L79-140 backend/…/notification.go• L522-657 backend/…/notification.go• L890-1187
The settings page validates each built-in provider before it can be saved. The form checks required targets and credentials only when a provider is enabled, keeps existing secrets valid when a field is left blank, and validates provider-specific addresses, ports, destinations, authentication modes, and webhook fields. Every provider also exposes the same event subscription choices and test action. frontend/…/built-in-provider-form.svelte• L66-370 frontend/…/built-in-provider-form.svelte• L1110-1146
Provider credentials are encrypted before storage and redacted in API responses. Updates preserve an existing credential when the request omits it, but a provider target change must include the credential needed for that target. This prevents a saved secret from being silently used with a different server. backend/…/notification.go• L348-469
Delivery fans out only to enabled providers that have the event enabled. Each attempt is logged as an event, and the service reports aggregate delivery errors without hiding successful sends to other providers. Email messages have both HTML and text forms where required, and batch messages group related image or container changes into one notice. backend/…/notification.go• L592-657 backend/…/email_templates.go• L19-49 backend/…/email_templates.go• L151-188
References: backend/…/handler.go• L79-140 backend/…/handler.go• L150-294 backend/…/notification.go• L348-469 backend/…/notification.go• L522-657 backend/…/notification.go• L890-1218 frontend/…/built-in-provider-form.svelte• L66-370 frontend/…/built-in-provider-form.svelte• L1110-1146 backend/…/email_templates.go• L19-49 backend/…/email_templates.go• L98-148 backend/…/email_templates.go• L151-188
Manager-agent dispatch
Notifications are owned by the Arcane manager. An agent sends an event to the manager with its environment identity, using the manager API when configured or the edge tunnel when HTTP is unavailable. The manager resolves the target environment and performs provider fan-out, which keeps provider secrets and delivery policy in one place. backend/…/notification.go• L101-166 backend/…/notification.go• L169-244
The dispatch endpoint authenticates remote agents with an environment access token and accepts only known event kinds. Agents do not manage notification settings or deliver directly from their own provider configuration. If the HTTP route is missing, unreachable, or returns a non-success response, the agent tries the edge tunnel before reporting failure. backend/…/handler.go• L131-140 backend/…/handler.go• L270-294 backend/…/notification.go• L169-231
References: backend/…/notification.go• L101-166 backend/…/notification.go• L169-244 backend/…/notification.go• L262-330 backend/…/handler.go• L131-140 backend/…/handler.go• L270-294
Background work
Job schedules and execution
The job service presents background work as named jobs with a schedule, enabled state, prerequisites, durable run history, and run-now support. Schedule values are stored with the broader settings, but the job service owns schedule validation and tells the active scheduler when a value changes. A schedule update restores the prior value if the runtime scheduler cannot apply the new one. backend/…/service.go• L47-78 backend/…/service.go• L128-252
Jobs can be normal scheduled tasks, continuous watchers, or dynamic jobs created for an environment or backup policy. The Jobs view combines saved run state with live scheduler state, including current work, last success, last error, next run, and watcher health. Queued, waiting, and retrying work remains current activity, while a run that needs attention moves to run history so it does not appear to be active. Environment health appears as one logical job to the operator even though the manager maintains a dynamic check for each environment. backend/…/service.go• L255-377 backend/…/runtime_status.go• L14-43 backend/…/runtime_status.go• L134-239
When an operator submits a run, the service checks the job, environment, permissions, enablement, and prerequisites before it enters the queue. Local Docker work waits for a reachable Docker environment. The outcome model distinguishes success, waiting, retrying, partial work, cancellation, and work that needs attention. Safe network failures can retry, while unsafe failures require review. backend/…/service.go• L470-557 backend/…/service.go• L560-653
The scheduler uses the application lifecycle rather than the request that changed a schedule. This lets a rescheduled task continue after the settings request ends. Queue state and admission gates prevent duplicate or conflicting runs where concurrent work could damage state or overload Docker. backend/…/service.go• L255-317 backend/…/service.go• L183-216
References: backend/…/service.go• L47-78 backend/…/service.go• L128-317 backend/…/service.go• L319-377 backend/…/service.go• L470-653 backend/…/runtime_status.go• L14-43 backend/…/runtime_status.go• L134-239 backend/…/handler.go• L49-95 backend/…/run_routes.go• L18-27
Remote job execution
The manager can accept work for a remote environment and deliver it to the owning agent. The manager keeps a durable delivery record with the run ID, attempt state, confirmed agent outcome, and settlement state. A repeated delivery uses the same run ID, so the agent can deduplicate admission instead of starting the work twice. backend/…/service.go• L470-512 backend/…/service.go• L30-81
Remote execution separates delivery from completion. The manager first confirms that the agent supports durable runs and that the job is still eligible. It then records the agent result and sends an acknowledgement after terminal completion. If the environment is offline, the run waits. If delivery is uncertain or the agent returns inconsistent identity data, the run needs attention instead of an automatic retry. backend/…/service.go• L20-119
Run history gives operators one view of manager records and agent-owned records. The manager merges both sources and forwards explicit retry or cancel actions to the agent. A remote retry keeps confirmed target progress and requires a known terminal or attention result before new work is sent. backend/…/service.go• L752-858 backend/…/service.go• L171-283
References: backend/…/service.go• L470-512 backend/…/service.go• L752-858 backend/…/service.go• L20-119 backend/…/service.go• L171-283 backend/…/run_routes.go• L29-150
Maintenance and self-healing
Scheduled maintenance uses the settings and job system to run Docker cleanup, image checks, vulnerability scans, and container health repair. The prune job builds its resource plan from the selected cleanup modes and sends a report when it removes resources or finds errors. backend/…/scheduled_prune_job.go• L31-103 backend/…/scheduled_prune_job.go• L110-178
Auto-heal finds unhealthy containers, confirms that each candidate is still unhealthy, and restarts eligible containers. It excludes Arcane and internal helper containers, honors configured exclusions, and limits restarts within a time window to stop a restart loop. Successful repairs create an event and can send an auto-heal notification. backend/…/auto_heal_job.go• L80-155 backend/…/auto_heal_job.go• L177-271
Image update checks combine scheduled polling with Docker image events. The watcher debounces bursts of events, avoids overlapping scans, and records pending image updates for the updater service to apply later. backend/…/image_update_watcher.go• L76-123 backend/…/image_update_watcher.go• L131-207 backend/…/image_update_watcher.go• L280-316
References: backend/…/scheduled_prune_job.go• L31-103 backend/…/scheduled_prune_job.go• L110-178 backend/…/auto_heal_job.go• L80-155 backend/…/auto_heal_job.go• L177-271 backend/…/image_update_watcher.go• L76-123 backend/…/image_update_watcher.go• L131-207 backend/…/image_update_watcher.go• L280-316
Container update execution
The updater applies pending image changes to containers and Compose projects, or updates one selected container. It reports counts and per-resource outcomes, records update history, writes audit events, and groups notifications from one run into a single batch. Activity records connect a long update run to visible progress and a final state. backend/…/service.go• L65-188 backend/…/service.go• L217-321 backend/…/service.go• L615-655 backend/…/service.go• L838-897
The updater supports a dry plan, a full pending-update pass, and scoped passes for containers, projects, or images. Scoped requests resolve to concrete containers before work starts. The service serializes container update work because sibling resources can share a Compose namespace. A bounded run time and image-pull timeout keep a stalled Docker or registry operation from holding the update system forever. backend/…/service.go• L217-321 backend/…/service.go• L324-485 backend/…/service.go• L546-565 backend/…/service.go• L665-709
Pending image records are frozen before an update run. The service sends any pending update notice before the engine consumes those records, then reconciles the records after a pull. This keeps the operator notice and stored update state aligned with the work that the run applies. backend/…/service.go• L253-271 backend/…/service.go• L712-743
References: backend/…/service.go• L65-188 backend/…/service.go• L217-321 backend/…/service.go• L324-485 backend/…/service.go• L546-565 backend/…/service.go• L615-655 backend/…/service.go• L665-709 backend/…/service.go• L712-743 backend/…/service.go• L838-897 backend/…/handler.go• L60-105
Update administration
Instance self-update
Arcane updates itself through a detached upgrader container rather than stopping its own process in the middle of an update. The upgrader pulls the target Arcane image, receives the Docker access and data mounts it needs, and replaces the running Arcane container. The current process can therefore end cleanly while the update continues outside it. backend/…/service.go• L212-239 backend/…/service.go• L337-476
The service checks that Arcane runs in Docker and that the Docker daemon and target container are available before it accepts a self-update. It records the action and refuses a second upgrade while one is active. The API reports when the installation is already on the newest image because that case does not require a restart. backend/…/service.go• L194-210 backend/…/service.go• L241-328
Target selection follows the installation's image form. An explicit target wins. An exact release tag moves to the resolved newest release, a mutable channel keeps its reference, and a digest pin requires a resolved newest digest. Arcane refuses an unresolved exact target or a downgrade. A version check is considered current only when its version or digest evidence is complete; matching version text alone does not hide a changed or unresolved digest. backend/…/service.go• L297-312 backend/…/service.go• L514-570
Compose-managed installations keep their service image reference aligned with the update target when Arcane can safely edit the project. If the running image and Compose image do not match, the service refuses the change rather than overwriting an unrelated configuration. backend/…/service.go• L479-511
References: backend/…/service.go• L194-239 backend/…/service.go• L241-328 backend/…/service.go• L337-476 backend/…/service.go• L479-570
Fleet update orchestration
The manager can update every environment through one durable update-all job. It updates remote agents first while the manager is available, then starts the manager self-update last. Every environment pulls the latest image even when its version check reports no change. Each environment receives a result such as updated, already current, unreachable, triggered, or failed. Live stages show checking, starting, reconnecting, and verifying before the result becomes terminal. backend/…/service.go• L173-191 backend/…/service.go• L573-631 backend/…/service.go• L722-881
The job is saved before work starts and before the manager self-update begins. If the manager restarts, startup reads the pending job and finalizes the manager result without repeating the agent phase. If the manager dies before that phase is safely recorded, the job is marked failed rather than silently claiming success. Reachable agents that fail or time out are recorded as failed. Environments that could not be reached are recorded as offline. backend/…/service.go• L648-681 backend/…/service.go• L884-977 backend/…/service.go• L1074-1084
The manager confirms remote updates by polling for a changed version, digest, or known target. It waits for evidence that the detached upgrader finished and that the manager image changed or was already a confirmed no-op. An unobserved or ambiguous result does not become success. backend/…/service.go• L845-881 backend/…/service.go• L980-1047
References: backend/…/service.go• L173-191 backend/…/service.go• L573-705 backend/…/service.go• L722-881 backend/…/service.go• L884-1047 backend/…/service.go• L1074-1084 backend/…/service.go• L1204-1268
Change checklist
When these files or sections are changed, remember to consider these:
- When changing system backup destinations or staged snapshots, keep local and S3 run IDs, durable checkpoints, remote discovery, upload, retention, delete behavior, and unified history aligned.
- When changing system backup source layout or project mounts, keep the recovery manifest, protected Arcane files, full-restore stages, selective project restore, and safety rollback paths aligned.
- When changing system backup scheduling, keep recovery-key and database-provider checks aligned with policy persistence and dynamic job registration.
- When changing system-managed volume policies, keep selection modes, anonymous-volume rules, existing volume-policy ownership, frozen scheduled selections, per-volume outcomes, and shared system admission aligned.
- When changing recovery-key handling, preserve the shared key contract for system and Rustic volume repositories. Keep repository re-key and key-store update atomic enough that a failed migration does not leave the saved key unusable.
- When changing restore preparation, keep the safety snapshot, data mount, projects directory, helper runtime, network access, and recovery request consistent.
- When changing backup run admission or dispatch recovery, keep the durable intent, admission lease, activity record, snapshot tags, held recovery key, and startup reconciliation aligned.
- When changing prune planning or result fields, preserve the dependency order, exact resource plan, live eligibility checks, protected backup volumes, per-resource errors, reclaimed-space totals, image update record cleanup, and restart recovery data.
- When changing health route behavior, keep GET and HEAD status responses aligned with the Francis runtime lifecycle and external monitor expectations.
- When changing notification provider forms, keep client validation aligned with backend credential preservation, target-change checks, provider event subscriptions, and test sends.
- When changing provider credentials or delivery targets, update encryption, response redaction, manager-agent dispatch validation, and fallback transport together.
- When changing updater scope or pending records, preserve resource resolution, exclusions, frozen records, notification timing, activity completion, and update history.
- When changing self-update targets, keep exact tags, mutable channels, digest pins, explicit targets, Compose references, version and digest evidence, and downgrade checks consistent.
- When changing update-all phases or status values, preserve the durable
pending_restarthandoff, per-environment stage records, timeout classification, and startup resume path. A manager restart must not cause agent updates to run twice. - When changing detached upgrade runtime options, keep Docker host access, data and log mounts, network selection, and inherited security settings aligned with the running Arcane container.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| The Francis runtime has exited | The public health endpoint returns DOWN and service-unavailable. | The health handler checks the runtime completion signal for both GET and HEAD routes. backend/…/handler.go• L29-47 |
| A feature gate is unknown, disabled, or has an invalid value | The related operation is refused, or a known feature uses its declared default. | Feature lookup uses the declared default and setting validation accepts only strict boolean values. backend/…/service.go• L422-446 backend/…/service.go• L1020-1044 |
| Docker daemon cannot be reached | System health returns service-unavailable and Docker operations cannot run. | Docker client and ping checks happen before system actions. backend/…/handler.go• L63-70 |
| A job schedule contains an invalid cron expression | The schedule update is rejected and the saved schedule does not change. | Schedule updates parse expressions before persistence. backend/…/service.go• L210-219 |
| A scheduler cannot apply a valid new schedule | The setting and runtime schedule can diverge unless the prior value is restored. | The job service restores the previous setting and reschedules the affected jobs after an apply failure. backend/…/service.go• L236-249 |
| A run needs attention but is treated as active work | The Jobs view can show work as still running after automatic progress has stopped. | Runtime status moves NeedsAttention to latest-run history and keeps only live or waiting work current. backend/…/runtime_status.go• L134-220 |
| A remote agent is offline | The manager cannot deliver or confirm the run, so the run waits. | Remote failures use a waiting outcome unless the agent rejects the request with a configuration or permission error. backend/…/service.go• L20-28 |
| Remote delivery is attempted but its receipt is lost | A second submission could duplicate work. | The manager marks uncertain delivery as needing attention and does not retry automatically. backend/…/service.go• L57-65 |
| A backup, restore, upload, delete, or volume backup overlaps another system backup action | The new operation is refused instead of changing a repository while another operation uses it. | Shared system admission covers system and system-managed volume backup workflows. backend/…/service.go• L275-284 backend/…/service.go• L397-413 |
| Local staging is requested for an S3-only backup | The service must not create an unnecessary local repository or report the wrong destination. | S3-only runs choose the remote repository before snapshot creation. backend/…/service.go• L566-600 |
| A recovery-key re-key fails while replacing the key | Repositories must remain readable with the prior key. | Repository migration completes before the new key is saved, and a failed migration rolls repositories back where possible. backend/…/service.go• L1245-1314 |
| System recovery has no valid key or uses a non-SQLite database | Arcane cannot open the repository or create a supported system recovery snapshot. | Recovery-key validation and database-provider checks run before backup and restore. backend/…/service.go• L345-365 backend/…/service.go• L421-426 |
| A configured volume backup uses a missing S3 destination | Remote backup is disabled. A policy without local storage needs attention. | Scheduled volume work checks the destination, persists the disabled remote state, and returns a needs-attention outcome when no local destination remains. backend/…/service.go• L519-576 |
| A selected system prune stage fails, such as build-cache cleanup | Other stages can finish, but the overall result is failed and the error is shown in activity. | Each stage adds its error to the shared result and activity completion uses the aggregate error state. backend/…/service.go• L172-305 |
| A planned resource becomes active before deletion | The resource is skipped instead of being deleted from stale plan data. | Prune re-checks live state and references before each destructive action. backend/…/service.go• L790-855 backend/…/service.go• L961-1018 |
| A system backup source changes during capture | The unconfirmed snapshot is removed and the run fails instead of claiming a consistent backup. | The snapshot service compares source files before and after capture and confirms the snapshot only when they match. backend/…/service.go• L1175-1207 |
| A selected project restore fails after earlier entries were restored | The project directory can contain a partial restore. | The service restores affected entries from a pre-restore safety snapshot or reports rollback failure. backend/…/service.go• L403-456 |
| An enabled notification provider has invalid or incomplete settings | Save or test delivery is blocked, or the provider cannot deliver the event. | Provider forms require enabled-provider targets and credentials and validate provider-specific addresses, ports, and auth rules. frontend/…/built-in-provider-form.svelte• L90-370 |
| A notification provider is enabled but its event is disabled | The event is not sent to that provider even when other providers receive it. | Fan-out filters on both provider enablement and the event subscription before delivery. backend/…/notification.go• L592-615 |
| A pending image record is cleared before its notice is sent | The operator can miss the update notification. | Pending records are read through a flush step that aborts the run when notification data cannot be determined. backend/…/service.go• L712-743 |
| A self-update target cannot be resolved or would downgrade the installation | The self-update is refused instead of reinstalling an old or unknown image. | Target resolution requires a valid newest release or digest and compares it with the running release. backend/…/service.go• L514-570 |
| A version check shows the same version but has a changed or unresolved digest | A mutable image could be left stale while the API reports it as current. | Current-image detection requires matching resolved digest evidence as well as version evidence. backend/…/service_test.go• L611-670 |
| A Compose service image does not match the running image | The self-update could overwrite a configuration that belongs to another image. | Compose-managed updates require the stored service reference to match the running reference before saving a new one. backend/…/service.go• L491-511 |
| A reachable agent times out or returns an error during update-all | Its result is failed, not offline, and the fleet job keeps the failure visible. | Update-all classifies request timeouts and agent status errors as failures; only an unreachable agent is skipped offline. backend/…/service.go• L1074-1084 |
| Manager restarts during fleet update | Agent results or the manager result could be left incomplete. | The update-all job is persisted before self-update and is resumed or failed on startup. backend/…/service.go• L648-681 backend/…/service.go• L884-977 |
| The detached manager upgrader exits without an observable result | A fleet update could be marked successful even though no restart or image change occurred. | The watcher waits for a status, checks version or digest evidence, and fails ambiguous outcomes. backend/…/service.go• L980-1047 |
Key files
| File | Why to read it |
|---|---|
| backend/…/service.go | Central settings lifecycle, effective values, persistence, credential-target checks, encrypted keys, and change publication. |
| backend/…/model.go | Setting visibility, sensitivity, defaults, environment override markers, and operational setting groups. |
| backend/…/handler.go | Public health status derived from the API runtime lifecycle. |
| backend/…/module.go | Unauthenticated GET and HEAD health route registration. |
| backend/…/module.go | System domain wiring and route registration for Docker, prune, backup, volume backup, and upgrade actions. |
| backend/…/handler.go | HTTP surface for Docker health, daemon information, batch container actions, and command conversion. |
| backend/…/service.go | System service wiring, batch container actions, host resource reporting, unified backup history, and backup scheduler integration. |
| backend/…/service.go | Selective and scheduled resource cleanup, exact plans, activity reporting, live safety checks, image record cleanup, and restart recovery. |
| backend/…/environment_health.go | Environment reachability, edge state, and health-driven synchronization. |
| backend/…/service.go | Runtime, memory, garbage-collector, and goroutine diagnostic data. |
| backend/…/diagnostics.go | Live diagnostics and backend log streams plus protected profiling access. |
| backend/…/system_stats.go | Live host resource statistics and subscriber sampling. |
| backend/…/service.go | Shared snapshot operations, repository isolation, listing validation, replication, durable run admission, and recovery-key services. |
| backend/…/service.go | System backup policy, durable snapshot lifecycle, recovery-key migration, remote discovery, retention, and restore handoff. |
| backend/…/handler.go | System backup history, policy, recovery, discovery, upload, delete, and file-restore API surface. |
| backend/…/service_test.go | Backup integration checks for history decoration, recovery environment data, and recovery-key safety. |
| backend/…/service.go | System snapshot layout, separately mounted project handling, source consistency checks, project browsing, and restore safety rollback. |
| backend/…/service.go | System-managed volume policy, selection, frozen scheduled runs, per-volume results, and shared admission. |
| backend/…/handler.go | System-managed volume backup policy and run endpoints. |
| backend/…/service.go | Shared system backup models and older backup integration used by the broader system domain. |
| backend/…/recovery.go | Detached restore execution and post-restore state finalization. |
| backend/…/notification.go | Provider fan-out, credential handling, event logging, and manager dispatch. |
| frontend/…/built-in-provider-form.svelte | Built-in notification provider validation, event subscriptions, and test controls. |
| backend/…/service.go | Job schedule API, lifecycle-aware rescheduling, dynamic health fan-out, run admission, local and remote execution entry points, and outcome classification. |
| backend/…/service.go | Durable manager-agent delivery, acknowledgement, retry, and offline behavior. |
| backend/…/runtime_status.go | Runtime job health and durable run state shown in the Jobs view. |
| backend/…/auto_heal_job.go | Container health repair and restart-loop protection. |
| backend/…/service.go | Image update execution, scoped work, activity and history recording, pending-record handling, and notification batching. |
| backend/…/service.go | Detached self-update, target selection, durable fleet update orchestration, stage tracking, restart recovery, and log retention. |
| backend/…/model.go | Durable fleet update states, per-environment outcomes, and live update stages. |