Platform operations and reliability
Arcane's platform operations layer keeps the control plane configurable, observable, and recoverable. It combines settings, health checks, live state feeds, event and activity records, scheduled work, durable job runs, notifications, backups, uploads, and upgrades so an operator can manage local and remote environments through the same system.
Operational control plane
The operational control plane is the shared path for changes that affect the whole service or an environment. Settings define behavior, the job service exposes recurring work and run history, and permission checks keep diagnostic and administrative actions within the caller's scope. The detailed backend service relationships are described in System resilience and administration.
Configuration settings
Settings provide the durable control surface for service behavior. The service loads stored values at startup, applies fixed environment overrides where allowed, and publishes successful changes so dependent jobs and watchers can refresh without a process restart. Settings are grouped into searchable categories and are filtered by visibility and permission before they reach a caller.
Startup configuration is a separate path for deployment concerns such as the listen address, database, Docker connection, agent mode, proxy trust, time zone, and workspace limits. Sensitive values can come from Docker secret files and are masked when configuration is reported. The generated schema is the canonical reference for environment-backed configuration and setting overrides. It records defaults, types, visibility, sensitivity, source information, and mode requirements. Agent mode and disabled UI configuration expose more settings through environment variables.
Operational settings cover storage paths, Docker access, timeouts, update checks, resource pruning, health checks, activity retention, notifications, authentication, backup destinations, and security scans. A setting change can therefore affect a schedule or live watcher, not only the settings screen. Effective values remain available from a refreshed snapshot, while sensitive values stay out of change notifications and non-admin views. When the service listens only on loopback, it can trust loopback proxy headers by default; other proxy trust requires explicit configuration.
Feature flags use the settings surface as their runtime control. Each feature has a default state, and an operation can reject a disabled feature before it starts.
References: backend/…/config.go• L30-127 backend/…/config.go• L152-204 backend/…/config.go• L206-250 backend/…/config.go• L253-393 backend/…/config.go• L403-476 backend/…/schema.go• L28-83 backend/…/schema.go• L158-188 backend/…/schema.go• L191-228 backend/…/schema.go• L290-354 backend/…/service.go• L45-60 backend/…/service.go• L74-137 backend/…/service.go• L161-183 backend/…/service.go• L464-525 backend/…/service.go• L541-573 backend/…/model.go• L23-38 backend/…/handler.go• L128-178 backend/…/features.go• L12-47
System-wide Docker operations
System-wide Docker operations provide environment-scoped health and daemon information, bulk container start and stop actions, and conversion of a Docker command into a project form. These actions share the system service with pruning, backup, and upgrades, and long-running container actions appear in the activity view.
The system route module exposes these operations with separate permissions. Bulk actions skip containers that do not match the requested state and report partial results instead of hiding individual failures. This keeps broad operator actions visible while limiting their effect to the selected environment.
References: backend/…/module.go• L21-61 backend/…/module.go• L64-127 backend/…/handler.go• L59-153 backend/…/service.go• L184-303
Resource pruning
Resource pruning reclaims unused Docker resources for one environment. An operator or scheduled job can select containers, images, volumes, networks, and build cache with resource-specific age or scope rules.
The service removes containers first, then processes the other resource groups in parallel. It records reclaimed space and each error in the activity and result, so a partial cleanup remains visible. Scheduled pruning first saves a plan of exact targets, checks each target again before deletion, and can resume unfinished work after a restart. Volume pruning first reaps idle backup helpers, then uses the same live eligibility checks as the broader prune plan. Arcane-owned resources and the backup volume are excluded from volume pruning.
References: backend/…/service.go• L39-67 backend/…/service.go• L70-127 backend/…/service.go• L134-220 backend/…/service.go• L499-587 backend/…/service.go• L636-714 backend/…/service.go• L757-863 backend/…/service.go• L942-1035
User administration
User administration manages local accounts and the access scope assigned to each account. Profile changes and role-assignment changes use separate actions, so an operator can update profile data without changing access, while only an administrator can change manual role assignments. OpenID Connect (OIDC)-sourced assignments stay out of the manual assignment update so identity-provider access is not copied into local grants.
The user list summarizes access by role and environment. It groups repeated grants into one role view, marks global administrators distinctly, and blocks deletion controls for protected accounts. The same page exposes avatar policy: deployment settings can force Gravatar on, and read-only configuration prevents local changes to that policy or the avatar upload limit.
References: frontend/…/+page.svelte• L40-65 frontend/…/+page.svelte• L93-195 frontend/…/+page.svelte• L198-232 frontend/…/user-table.svelte• L43-95 frontend/…/user-table.svelte• L99-153 frontend/…/user-table.svelte• L247-287
Scheduled operations
The scheduler is the timing layer for recurring maintenance and control work. It accepts six-field cron schedules with seconds, keeps the installed schedule and next run visible, and supports fixed jobs plus jobs that appear or disappear with an environment, volume, backup policy, or GitOps object.
At startup, Arcane registers maintenance jobs and rebuilds dynamic jobs from saved records. Settings changes validate a new schedule before saving it, then reschedule affected jobs or notify continuous watchers. The job service uses the application lifetime for rescheduling and verifies the installed schedule. A disabled conditional job can still accept a schedule change, but it reports no active runtime schedule until its condition allows execution. The service restores the prior setting and runtime schedule if the change cannot be applied. In agent mode it does not reschedule manager-only jobs. Manual runs let an operator act without waiting for the next scheduled time. A worker restart restarts a continuous watcher without creating a scheduled run. When UI configuration is disabled, schedule updates through this path are rejected.
This diagram shows how settings and saved records become scheduled work and durable run history.
flowchart LR
Settings[Settings change] --> Reschedule[Reschedule affected job]
Records[Saved records] --> Dynamic[Dynamic job registration]
Startup[Application startup] --> Scheduler[Scheduler]
Reschedule --> Scheduler
Dynamic --> Scheduler
Scheduler --> Runs[Durable run coordinator]
Runs --> Operation[Run operation]
Operation --> Activity[Activity and event records]
References: backend/…/service.go• L128-317 backend/…/service.go• L319-377 backend/…/handler.go• L98-131 backend/…/handler.go• L223-245 backend/…/module.go• L31-84 backend/…/module.go• L161-172 backend/…/service.go• L20-88 backend/…/service.go• L234-310 backend/…/scheduler.go• L17-20 backend/…/scheduler.go• L45-99 backend/…/scheduler.go• L102-149 backend/…/scheduler.go• L161-224 backend/…/jobs_bootstrap.go• L99-142 backend/…/jobs_bootstrap.go• L196-237 backend/…/jobs_bootstrap.go• L271-317
Durable job runs
Durable job runs give scheduled and manual work a stored identity, status, outcome, and target progress. The run coordinator validates the target and permissions before acceptance, stores the request before execution, and projects run history and runtime state onto the job catalog. Reusing a run ID deduplicates admission for the same job and environment.
The job view combines configured schedule data with current runtime state and recent run results. It reports worker health and dynamic children such as per-environment health checks and backup jobs. An operator can list, inspect, retry, cancel, acknowledge, resolve, or restart the appropriate kind of run. Interrupted work is reconciled from confirmed activity or target results; safe maintenance jobs can execute again during reconciliation, while work without a confirmed result remains a review case instead of being replayed without proof.
References: backend/…/service.go• L470-557 backend/…/service.go• L560-730 backend/…/service.go• L749-856 backend/…/service.go• L90-232 backend/…/handler.go• L134-220 backend/…/handler.go• L261-277 backend/…/module.go• L86-172
Remote job coordination
The manager treats a remote run as delivery and confirmation rather than local execution. It stores delivery state, sends eligible work to the agent, observes agent-owned progress, and acknowledges a terminal result before history is settled. Managers may accept an eligible request while the environment is offline, but the run stays waiting until the agent can be reached.
Remote history merges agent records with manager delivery records. If an environment is offline, the manager retains the last job catalog and reports that the view is offline. A retry is explicit and preserves confirmed target progress. An uncertain delivery is held for review instead of being replayed automatically. The manager distinguishes an agent that rejects a request from one that is only unavailable.
This sequence shows how delivery, agent progress, and acknowledgement become one durable outcome.
sequenceDiagram
participant Operator
participant Manager
participant Agent
Operator->>Manager: Submit remote run
Manager->>Agent: Deliver run with stable ID
Agent-->>Manager: Receipt and progress
Manager->>Agent: Confirm terminal result
Manager->>Agent: Acknowledge completion
Agent-->>Manager: Settled receipt
Manager-->>Operator: Durable outcome
References: backend/…/service.go• L470-512 backend/…/service.go• L560-588 backend/…/service.go• L783-856 backend/…/service.go• L28-79 backend/…/service.go• L117-181 backend/…/service.go• L184-301 backend/…/service.go• L304-360 backend/…/service.go• L362-418 backend/…/service.go• L421-486 backend/…/service.go• L489-576 backend/…/service.go• L615-755
Health and diagnostics
Health and diagnostics answer two operational questions. Health checks show whether the API or a Docker environment responds, while diagnostics explain the state of the running Arcane process and its live connections.
Service health
The health endpoint is a small liveness contract for the API. It returns the API health status, and the CLI health command checks the local endpoint with a bounded request so a process manager can treat a non-success response or timeout as unhealthy.
Environment health checks each enabled environment on its own schedule, updates connection status, and refreshes shared registries, S3 destinations, Git repositories, and global variables when a remote environment is online. A failed check records an offline or error state without deleting the environment.
References: backend/…/handler.go• L9-25 backend/…/module.go• L9-31 types/…/health.go• L3-9 backend/…/health.go• L18-23 backend/…/health.go• L27-42 backend/…/health.go• L69-97 backend/…/environment_health.go• L35-54 backend/…/environment_health.go• L78-107 backend/…/environment_health.go• L110-154
Runtime diagnostics
Runtime diagnostics provide a point-in-time view of process health. The snapshot combines runtime and uptime data with memory use, garbage-collector data, worker counts, and active WebSocket metrics. On supported Linux Docker hosts, resource reporting can also use the enclosing host memory view.
Operators can request recent buffered backend logs or run an on-demand goroutine leak scan. The REST diagnostics endpoint and live diagnostics WebSocket use the same snapshot builder. The live stream sends fresh snapshots at a fixed interval. The server log stream replays its buffer and then sends new entries. Both streams stop when the peer is no longer live.
References: backend/…/service.go• L22-43 backend/…/service.go• L107-140 types/…/diagnostics.go• L5-53 backend/…/diagnostics.go• L19-77 backend/…/diagnostics.go• L36-50 backend/…/diagnostics.go• L52-78 backend/…/diagnostics.go• L80-180
Operational records and live state
Arcane separates durable records from live feeds. Events preserve notable system actions, activities represent long-running work with progress and output, and one multiplexed stream carries current environment, dashboard, and activity state.
Events
An event is an audit-style record with a type, severity, title, optional resource and actor identity, environment scope, and metadata. Services write events after workload changes, updates, environment changes, backup work, authentication, webhook triggers, and notification delivery.
Events can be listed globally or by environment. Operators can search and filter them by severity or type, inspect severity counts, and delete records with the event-delete permission. In agent mode, an event is stored locally first and then forwarded to the manager through the edge tunnel or an authenticated manager API path. Docker daemon observations use a bounded queue and short batch writes, with direct persistence when the queue is full or the writer has stopped; shutdown flushes queued observations before it returns.
References: backend/…/model.go• L9-17 backend/…/model.go• L68-137 backend/…/service.go• L50-155 backend/…/service.go• L168-219 backend/…/service.go• L679-768 backend/…/handler.go• L32-194
Activities
An activity is the user-facing record for queued or running work that may take time. It ties progress, current step, latest message, duration, error state, actor, resource, and environment together. Services use the activity ID in the work context so progress and terminal state follow asynchronous work.
The Activity Center supports paged history, detail with recent messages, cancellation of queued or running work, and deletion of completed history. Queue limits can hold new work per environment, and retention removes old completed entries. Activity updates can stream for local or remote environments. Remote summaries remain visible when an environment is offline, while permission checks hide job-run activities unless the caller can read the target environment. The filter is applied before pagination.
The activity service repairs work that loses its worker during a restart or process failure. It tracks workers and concurrency slots, fails abandoned active rows, resolves orphaned queued work, and marks stale image checks or updates according to their recovery state. Ordered publication and coalescing keep a live view from reverting to older progress. Queue waiters re-read the current per-environment limit, and cancelled work can stop while a transient database write is retrying.
References: backend/…/model.go• L11-49 backend/…/service.go• L30-114 backend/…/service.go• L138-240 backend/…/service.go• L486-597 backend/…/service.go• L599-639 backend/…/service.go• L872-1015 backend/…/service.go• L1109-1399 backend/…/service.go• L1-161 backend/…/service.go• L1-115 backend/…/handler.go• L92-234 backend/…/helpers.go• L14-55 backend/…/visibility.go• L13-54
Multiplexed live stream
The client stream is a single JSON-lines connection that carries only the channels requested by the caller. It sends heartbeats and keeps each channel separate, which lets the dashboard, environment list, and Activity Center update without one connection per feature.
Permission checks apply per channel. Local producers subscribe before their first snapshot, so updates that occur during startup are not lost. Activity events are coalesced per activity, while other messages use a bounded queue; overflow marks the subscriber and the next heartbeat requests a fresh snapshot. Terminal activity snapshots suppress stale non-terminal publishes. Remote producers share one poller for each enabled environment and snapshot size, refresh the environment list while the connection stays open, and keep polling after a remote error. A remote error or snapshot is published only when its data or error changes. Unchanged snapshots are not repeated.
References: types/…/stream.go• L1-60 backend/…/stream.go• L37-180 backend/…/handler.go• L236-414 backend/…/service.go• L17-287 backend/…/helpers.go• L36-55
Notifications
Notifications turn selected operational events into messages for external providers. The manager stores provider settings, validates provider input, protects credentials, filters delivery by provider and event, and records each send attempt as an event. Bounded fan-out lets one provider fail without hiding the result of other eligible providers.
Providers can receive image and container update messages, vulnerability summaries, prune reports, and auto-heal notices. Email uses shared event content with HTML and optional text templates. Agent-mode services send typed requests to the manager over HTTP when configured. If that path is unavailable or rejected, the edge tunnel is used as a fallback.
Notification settings preserve stored credentials when an update omits them, redact credentials in API responses, and retain event filters when a provider changes. A provider target change needs a replacement credential when the old credential cannot safely apply to the new target. Test sends report when a provider or event is disabled, so a successful test does not imply live delivery. Signal settings also include a notify-self choice for messages sent through that provider.
Notification administration is manager-only. Agent dispatch requires an environment access token at the manager boundary, while an edge-connected agent can use its authenticated tunnel to carry the same typed request.
References: backend/…/service.go• L46-92 backend/…/service.go• L139-165 backend/…/service.go• L167-223 backend/…/service.go• L225-324 backend/…/service.go• L326-484 backend/…/service.go• L503-650 backend/…/service.go• L653-976 backend/…/service.go• L979-1086 backend/…/handler.go• L21-82 backend/…/handler.go• L85-172 backend/…/handler.go• L174-224 backend/…/module.go• L39-100 backend/…/service.go• L22-189 backend/…/service.go• L192-362 backend/…/service_test.go• L456-713 backend/…/service_test.go• L734-808
Backup and recovery
Backup and recovery protect workload data and the Arcane control plane. A shared backup service runs typed snapshot, restore, browse, discovery, prune, replication, and repository-key operations through a repository, while system and volume policies decide when to run, where to store data, and how many successful runs to keep.
The backup service admits scheduled and manual work through shared scopes. It serializes operations for one repository while allowing separate repositories to work at the same time. Snapshot inputs and discovered records are checked before the repository changes, so missing sources, ambiguous paths, malformed listings, and incomplete snapshot IDs do not become recovery state. Durable backup runs persist accepted commands and progress before dispatch, then reconcile interrupted dispatches after restart. Discovery, upload, restore, and recovery-key changes use the same run gate so repository work and key changes cannot overlap unsafely.
Backup destinations and policies
S3 destinations are reusable named connections to S3-compatible storage. The system tests upload, download, and delete access before saving a destination. A destination cannot be removed while backup records, policies, or settings use it, and manager-owned destinations can be synchronized to agents.
System and volume policies can use local storage, S3 storage, or both. Policy updates validate schedule, retention range, and destination as one change. Reconciliation saves the complete policy set and replaces related scheduled jobs, so removed policies stop running. Scheduled and manual runs share a durable admission gate, and the backup service serializes work per repository while different repositories can run independently. Remote repository probes use a bounded check and distinguish missing storage from transport or credential errors before an operation acts on retained snapshots. Local repository maintenance can later prune data that deleted snapshots no longer reference; it uses the recovery key and treats an uninitialized repository as empty work. Retention is also attempted when a scheduled backup fails or resumes with an error, so old recovery data does not remain solely because the new run failed.
References: backend/…/model.go• L5-12 backend/…/service.go• L48-59 backend/…/service.go• L61-105 backend/…/service.go• L129-228 backend/…/service.go• L231-412 backend/…/service.go• L414-540 backend/…/service.go• L542-601 backend/…/service.go• L603-715 backend/…/service.go• L717-845 backend/…/service.go• L847-991 backend/…/service.go• L274-317 backend/…/service.go• L367-405 backend/…/service.go• L407-509 backend/…/service.go• L512-656 backend/…/service.go• L901-919 backend/…/service.go• L922-1025 backend/…/service.go• L1282-1458 backend/…/service.go• L187-317 backend/…/service.go• L347-414 backend/…/service.go• L519-607 backend/…/service.go• L704-786
System backup
System backup captures the Arcane data directory and recovery manifest into a local repository, an S3 repository, or both. An S3-only backup writes directly to the S3 repository, so it does not require local backup storage; a backup with local storage still keeps a local snapshot before optional replication. The backup is encrypted with a recovery key and records run status, trigger, destination, snapshot IDs, and errors so an operator can find and manage recovery points.
System recovery currently requires SQLite. The recovery key may be generated and stored by an administrator or supplied for one operation. Replacing a stored key re-keys existing repositories before the new key is stored, and refuses to proceed while volume backups are running; a failure attempts to restore the old repository key. Discovery can import remote recovery points, and restore uses the manifest to confirm that a snapshot is an Arcane system backup before changing the running instance.
System snapshots also preserve volume subpaths on older Docker daemons that do not support them directly. This keeps a mounted subdirectory as the backup source instead of accidentally capturing the volume root. A full restore creates a local safety snapshot first, while a selected project-file restore creates a safety snapshot in the source repository and can roll back paths that were changed by a failed restore.
The backup screen brings these actions into one operator flow. It supports schedules, manual system and volume backups, remote discovery, upload, full restore, and selected-file restore. It uses activity state to show active backup work and requires a valid recovery key for actions that read or change encrypted system snapshots.
References: backend/…/model.go• L5-12 backend/…/service.go• L603-715 backend/…/model.go• L11-69 backend/…/service.go• L125-181 backend/…/service.go• L344-387 backend/…/service.go• L390-405 backend/…/service.go• L407-509 backend/…/service.go• L512-656 backend/…/service.go• L688-745 backend/…/service.go• L748-1019 backend/…/service.go• L1028-1205 backend/…/service.go• L1215-1316 backend/…/service.go• L1466-1531 backend/…/service.go• L56-243 backend/…/service.go• L283-313 backend/…/service.go• L350-513 backend/…/service.go• L515-585 backend/…/service.go• L587-615 backend/…/service.go• L762-880 backend/…/service.go• L1072-1207 backend/…/handler.go• L108-318 backend/…/module.go• L14-216
Volume backup and restore
Volume backup protects application data stored in Docker volumes. Before a backup or restore, the service coordinates containers that use the volume so data is not changed during the operation. Restore can replace the full volume or recover selected paths, and the operation is tracked through activities and events.
The backup storage mount is shared with system backup work. If Arcane has no suitable /backups mount, the service falls back to a Docker named volume and warns that the local copy remains inside Docker storage. Retention removes old successful snapshots through the repository rather than only deleting database rows. System-managed volume policies can select all volumes, an allowlist, or a blocklist, and a scheduled run freezes its selection so a restart resumes the same set.
References: backend/…/backup.go• L38-50 backend/…/backup.go• L81-117 backend/…/backup.go• L152-177 backend/…/backup.go• L180-226 backend/…/backup.go• L826-882 backend/…/backup.go• L924-995 backend/…/backup.go• L1342-1428 backend/…/handler.go• L15-79 backend/…/service.go• L39-95 backend/…/service.go• L98-160 backend/…/service.go• L187-317 backend/…/service.go• L347-414 backend/…/service.go• L416-517 backend/…/service.go• L519-733 backend/…/service.go• L735-803
Uploads and data movement
Large files use upload sessions instead of one request. A session records file kind, size, chunk layout, and received chunk indexes so clients can retry or resume without sending data that already arrived.
The upload service stages data on the node that serves the environment. It validates file type, size, and chunk bounds, writes chunks at final offsets, treats repeated chunks as safe overwrites, and allows a complete session to be consumed only once. The consuming operation removes the session after it opens the assembled file. Idle sessions are purged after 24 hours by a manager-and-agent cleanup job.
Supported session kinds are image archives, volume-backup archives, and build workspaces. The older multipart path is still accepted as a compatibility bridge, but it is converted into a complete session before the domain operation continues.
This sequence shows how a client moves a large file from resumable upload into one domain operation.
sequenceDiagram
participant Client
participant Uploads
participant Domain as Image, volume, or build operation
participant Cleanup as Hourly cleanup
Client->>Uploads: Create session
loop Missing chunks
Client->>Uploads: Send chunk
Uploads-->>Client: Received chunk indexes
end
Client->>Uploads: Consume complete session
Uploads->>Domain: Open assembled file
Domain-->>Uploads: Finish operation
Uploads->>Uploads: Remove session data
Cleanup->>Uploads: Purge idle sessions after 24 hours
References: backend/…/upload.go• L1-4 backend/…/upload.go• L36-121 backend/…/upload.go• L163-217 backend/…/upload.go• L241-320 backend/…/handler.go• L24-279 backend/…/module.go• L1-80 backend/…/upload_sessions_cleanup_job.go• L11-45
Upgrades and recovery state
Upgrades are controlled system operations because the Arcane process may replace itself while a request is in progress. The service checks Docker access and the Arcane container, then starts a separate upgrader container so the current process does not need to survive its own replacement.
The upgrade path records a system event, pulls the target image, preserves access to Arcane data, and reports whether the target is already running. Mutable image channels keep their reference, exact release tags move to the resolved newest release, and digest-pinned images move to the resolved newest digest without permitting a downgrade. Image update runs reconcile the selected image reference after a successful pull. Self-updates pull a frozen image target while keeping the selected image reference for the recreated container.
A fleet update persists one job with per-environment outcomes. It updates agents first, triggers the manager last, and resumes finalization after the manager restarts. Resume checks version or digest changes and does not rerun the agent phase when only manager finalization remains. The status distinguishes updated, already-current, triggered but unconfirmed, offline, and failed environments.
This flow shows how a self-upgrade survives replacement of the process that started it.
flowchart TD
Check[Check Docker and target] --> Pull[Pull target image]
Pull --> Upgrader[Run detached upgrader]
Upgrader --> Replace[Replace Arcane container]
Replace --> Restart[Process restarts]
Restart --> Resume[Resume persisted update state]
Resume --> Result[Complete upgrade result]
References: backend/…/handler.go• L19-118 backend/…/handler.go• L121-171 backend/…/model.go• L10-43 backend/…/model.go• L46-119 backend/…/service.go• L194-239 backend/…/service.go• L241-329 backend/…/service.go• L331-463 backend/…/service.go• L500-557 backend/…/service.go• L559-686 backend/…/service.go• L688-867 backend/…/service.go• L870-1033 backend/…/service.go• L1093-1254 backend/…/service.go• L1256-1316 backend/…/service.go• L169-181 backend/…/service.go• L665-710 backend/…/service.go• L788-836 backend/…/service.go• L20-29 backend/…/service.go• L245-300 backend/…/service.go• L303-423 backend/…/service.go• L45-107 backend/…/service.go• L140-270
Related operational pages
Use System resilience and administration for the service view of settings, system state, health, diagnostics, backup and recovery, notifications, job execution, and update administration. This page is the broad map; that child page explains the service boundaries that carry each operation.
Use Observability and workspace insights for operational state, live insight views, and workspace-focused monitoring. Use Command-line interface for operator access to health checks and command-line administration.
Change checklist
When these files or sections are changed, remember to consider these:
- Keep startup configuration tags, secret-file support, effective defaults, masked output, proxy trust, and generated schema metadata aligned. A setting can load correctly while its documented default, sensitivity, or mode requirement is wrong.
- Keep settings metadata, setting visibility, environment override rules, and settings-change subscriptions aligned. A setting can be stored correctly yet fail to appear in the right category or fail to refresh the job or watcher that uses it.
- Keep proxy binding, trusted-proxy defaults, forwarded-header handling, and reported configuration aligned. A local proxy can work in one deployment while an external proxy is trusted by mistake in another.
- Keep system route permissions, environment scope, activity records, and partial-result reporting aligned for bulk Docker actions. An action can affect the right containers while reporting the wrong scope or hiding individual failures.
- Keep prune target selection, dependency references, protected-resource rules, helper cleanup, live rechecks, scheduled recovery data, and reclaimed-space reporting aligned. A plan can otherwise delete a resource that became needed or claim space that it did not free.
- Keep schedule validation, setting persistence, lifecycle context, conditional enablement, runtime schedule checks, and rollback aligned. A valid schedule can otherwise be stored while a disabled job reports or runs the wrong active schedule.
- Keep job admission, durable run state, activity links, remote delivery state, and run status views aligned. A run can otherwise appear accepted while its progress or final state is missing.
- Keep activity creation, worker tracking, cancellation, slot release, terminal repair, publication order, subscriber coalescing, and stream snapshots aligned. A restart, queue limit change, or slow subscriber can otherwise leave work stuck or show stale progress.
- Keep event batching, deduplication, shutdown flushing, event scopes, and manager forwarding aligned. A daemon event can otherwise be written twice, remain buffered on exit, or cross the edge path without its environment and actor.
- Keep event and activity scopes aligned with manager-to-agent forwarding. A remote record must retain its environment, actor, resource, and terminal status when it crosses the edge path.
- Keep backup policy validation, scheduler registration, shared admission scopes, repository serialization, durable run state, and retention cleanup aligned. A policy that saves but does not reschedule or release snapshots can silently create missed runs or unbounded storage.
- Keep backup record deletion, snapshot forgetting, repository pruning, recovery-key access, and uninitialized-repository handling aligned. Removing a record can otherwise leave its stored data behind or make harmless empty-repository maintenance fail.
- Keep recovery-key rekey order, running-volume guards, rollback, repository access, and stored key state aligned. A key change can otherwise make existing system or volume snapshots unreadable.
- Keep snapshot input rules, path qualification, directory markers, recovery manifests, and snapshot ID validation aligned with every system and volume restore view. A listing can otherwise show an incomplete path model or accept a source shape that the repository cannot represent.
- Keep repository discovery, run tags, password changes, replication, and snapshot retention aligned with the shared backup service. A new repository action can bypass per-repository ordering or leave database history out of step with stored snapshots.
- Keep upload session kinds and permissions aligned with every domain consumer. A new consumer needs session validation, remote proxy handling, cleanup behavior, and one-time consumption semantics.
- Keep notification dispatch kinds, provider event filters, credential preservation, email templates, and event logging aligned. A new notification can pass a provider test yet fail during manager dispatch or leave no delivery record.
- Keep manager-only notification routes, access-token checks, typed dispatch payloads, and tunnel fallback aligned. An agent can report a successful local send while the manager never receives the event.
- Keep provider form schemas, credential-preservation rules, event subscription controls, and provider-specific authentication rules aligned. A UI can accept a value that the delivery path cannot use, or reject a valid update that keeps an existing secret.
- Keep recovery-key state, key rotation guards, backup action validation, manifest layout, and restore-file selection aligned. A UI can show a usable action while the repository cannot be opened with the selected key or scope.
- Keep profile updates, manual role-assignment replacement, OIDC assignment filtering, protected-user deletion rules, and role summaries aligned. The user editor can otherwise turn provider-managed access into manual access or offer a destructive action for a protected account.
- Keep avatar settings, environment-forced state, UI read-only state, and upload-size validation aligned. The settings page can otherwise show an editable control whose value the deployment cannot change.
- Keep upgrade persistence, detached upgrader state, version or digest confirmation, selected image references, and startup resume aligned. Changes to the fleet job state must still distinguish an updated environment, an already-current environment, an offline environment, and an upgrade that was triggered but not yet confirmed.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Docker daemon does not respond to an environment health check | The environment is marked offline or in error, and remote sync work is skipped | Bounded health requests and per-environment admission prevent an overlapping check from masking the result |
| A diagnostic WebSocket peer stops reading or answering | A live diagnostics or log stream can stall and retain resources | Write deadlines, ping checks, and a read loop close dead peers |
| A job is accepted after local or remote eligibility changes | Work can run against a disabled target or fail after delivery | Admission checks metadata, prerequisites, permissions, and the remote catalog before execution |
| A schedule is saved but runtime reschedule fails | The settings view and active scheduler can use different schedules | Schedule updates validate first, apply with the application lifetime, verify runtime state, and restore the prior value on failure |
| A disabled conditional job is checked against its configured schedule as if it were active | A valid schedule update is rejected because the runtime has no installed schedule | Runtime verification expects an empty active schedule until the job's condition allows it |
| Manager delivery is attempted but the agent receipt is lost | Retrying can duplicate an operation whose outcome is unknown | Stable run IDs, delivery receipts, and an explicit uncertain-delivery review state block automatic replay |
| A caller lacks access to a job-run activity's target environment | A list, detail view, deletion action, or stream can disclose another environment's work | Job activities are filtered by target permission before pagination and checked again for details and stream messages |
| A remote activity environment is offline during a list or stream request | Stored summaries can disappear, or one remote error can close the whole live view | Local summaries are merged with the remote window, and pollers publish distinct errors while continuing to poll |
| Activity messages fill a subscriber queue or progress updates arrive out of order | The Activity Center can show stale progress or miss output | Progress events coalesce, terminal snapshots seal older state, overflow marks the subscriber as missed, and the next heartbeat requests a snapshot |
| A worker disappears after an activity row is created or a process restarts | The activity can remain queued or running forever | Worker tracking, startup repair, stale-work sweeps, terminal writes, and slot release reconcile unowned work |
| A queued activity waits while its concurrency setting changes | Work can remain blocked under the old limit or exceed the new limit | Slot acquisition reads the current setting and rechecks waiters after releases or a short timer |
| Two prune requests target the same environment | Resource deletion can overlap and produce conflicting results | Per-environment prune admission returns the existing activity instead of starting a second run |
| A scheduled prune resumes after its target resource changed | The job can delete a resource that is now in use or report a stale reclaim size | The saved plan rechecks each target and its current references before deletion |
| A backup volume is unused between backups | General volume pruning can remove the volume that stores recovery data | Prune selection and live eligibility checks exclude volumes identified as backup storage |
| Two backup paths start the same policy or system run | Snapshot work can overlap and produce conflicting repository state | Durable run admission and per-repository serialization reject or queue conflicting work |
| A recovery key changes while repositories or volume backups are active | Existing snapshots can become unreadable or a running backup can finish with the wrong key | One run lease guards the change, active volume backups block it, repositories are re-keyed first, and failures attempt rollback |
| An S3-only system backup cannot open its selected remote repository | The backup fails without creating a local staging snapshot | S3-only execution opens the remote repository before capture and records the failed run |
| A system backup uses a volume subpath on an older Docker daemon | The daemon can mount the volume root and capture the wrong data | Older daemon versions resolve the subpath to a bind mount before snapshot creation |
| Deleted local backup snapshots are not followed by repository pruning | Unreferenced backup data remains and local storage grows | Local repository pruning uses the recovery key and lets the repository remove data after its keep-delete window; an uninitialized repository is treated as no-op work |
| A snapshot source is missing or combines an invalid path rewrite with multiple sources | The backup operation is rejected before it creates an incomplete or ambiguous snapshot | Shared snapshot input validation requires a source and permits a path rewrite only for one source |
| A repository returns file and metadata listings with different entries | Snapshot browsing can assign the wrong directory marker or fail to show a usable path tree | The backup service rejects mismatched listings instead of guessing the directory structure |
| Snapshot discovery returns malformed or mixed flat and grouped data | Recovery-point discovery can show invalid records or accept an unsafe snapshot ID | The backup service requires the expected JSON shape and a complete snapshot ID |
| A system restore uses an invalid key or a snapshot without the recovery manifest | Restore stops before it changes Arcane data | Recovery-key validation and manifest inspection gate restore |
| A restore cannot create its safety snapshot | The detached helper is not started and the current data remains unchanged | Restore prepares and completes a local safety snapshot before writing the recovery request |
| An upload session is incomplete, has a wrong kind, or has an invalid chunk | The consuming endpoint cannot safely open the file | Session metadata, kind checks, chunk-size checks, and one-time consume rules reject it |
| A notification provider target changes without a replacement credential | Delivery can use a stale or invalid credential, or configuration is rejected | Target-change validation and credential preservation require a valid replacement when needed |
| A Signal provider has an incomplete or conflicting source, recipient, or authentication setup | The provider cannot be saved as a usable notification target | Provider validation requires the host, source, recipients, and one usable authentication mode |
| A notification provider is disabled or has the event filtered out | A test may succeed while the live event is not sent | Delivery checks provider enablement and event filters before fan-out and reports test warnings |
| An agent sends a dispatch without a valid environment access token | The manager rejects the request and no provider receives it | The dispatch boundary requires the token and resolves it to an environment before delivery |
| The manager restarts during a fleet update | The request ends before its final manager result is known | The persisted environment update job resumes on startup |
| An administrator submits provider-managed role assignments as manual assignments | Access rows can be duplicated or assigned to the wrong source | The user editor excludes OIDC assignments from the manual replacement request and summarizes duplicate environment grants once |
| A protected user is included in a bulk deletion selection | The delete action can remove an account that the service marks as protected | Selection and row actions disable deletion when any selected user cannot be deleted |
| An agent cannot reach the manager API during notification or event forwarding | Manager-side records or notifications may not arrive through HTTP | Edge-tunnel forwarding is the alternate transport when available, including after an HTTP failure |
| A guarded feature is disabled or its setting value is invalid | The related operation is rejected instead of starting | Feature lookup falls back to its declared default and runtime guards return a feature-disabled error |
| A self-upgrade target cannot be confirmed after the detached upgrader exits | The system can report a successful update when no replacement occurred | The upgrade flow distinguishes confirmed exit, lost exit code, unobserved run, and already-current image |
| A frozen update target changes during an interrupted image update | Recovery can apply an update to the wrong container or image | The updater records target identity and desired digest before the pull, then confirms the target before resuming |
Key files
| File | Why to read it |
|---|---|
| backend/…/config.go | Shows environment loading, secret-file support, effective defaults, proxy trust, time zone, and masked runtime values |
| backend/…/schema.go | Shows the canonical reference contract for environment configuration and setting overrides |
| backend/…/service.go | Shows stored settings, effective values, environment overrides, and change effects |
| backend/…/model.go | Defines setting metadata, visibility, sensitive-value handling, and the setting model |
| backend/…/features.go | Shows how runtime feature availability follows settings and defaults |
| backend/…/module.go | Shows system route boundaries and permissions for health, Docker information, bulk container actions, and command conversion |
| backend/…/service.go | Shows system-wide Docker actions, activity reporting, backup persistence, scheduled backup recovery, and upgrade coordination |
| backend/…/service.go | Shows selective and scheduled resource pruning, protected backup volumes, helper cleanup, target rechecks, and recovery |
| backend/…/service.go | Shows schedule configuration, validation, rollback, conditional rescheduling, runtime status, admission, execution, and interrupted-run reconciliation |
| backend/…/service.go | Shows manager-to-agent delivery, catalog fallback, confirmation, acknowledgement, and safe retry behavior |
| backend/…/service.go | Shows how durable runs and scheduler state become job status |
| backend/…/handler.go | Shows operator actions for schedules and job runs |
| backend/…/module.go | Shows job API boundaries and permission requirements |
| backend/…/jobs_bootstrap.go | Shows how operational services become scheduled jobs |
| backend/…/environment_health.go | Shows environment liveness checks and post-health synchronization |
| backend/…/service.go | Shows activity progress, cancellation, limits, restart repair, retention, and terminal publication |
| backend/…/service.go | Shows ordered live activity publication, coalescing, overflow recovery, and terminal-state protection |
| backend/…/service.go | Shows per-environment activity concurrency limits and slot release |
| backend/…/service.go | Shows candidate selection for startup and periodic activity repair |
| backend/…/handler.go | Shows local and remote activity APIs and stream polling |
| backend/…/service.go | Shows durable event creation, Docker event batching, deduplication, shutdown flushing, and manager forwarding |
| backend/…/diagnostics.go | Shows runtime diagnostics and live backend log streams |
| backend/…/service.go | Shows provider selection, protected settings, manager dispatch, fan-out, and event logging |
| backend/…/handler.go | Shows manager-only notification settings, test, and dispatch boundaries |
| backend/…/service.go | Shows shared content for operational messages |
| frontend/…/built-in-provider-form.svelte | Shows provider-specific validation and operator controls for built-in notification targets |
| backend/…/service.go | Shows shared snapshot, restore, discovery, serialization, replication, pruning, remote repository checks, and durable run contracts |
| backend/…/model.go | Defines encrypted recovery-key state shared by backup domains |
| backend/…/service.go | Shows system backup, recovery-key re-keying, policy scheduling, discovery, upload, restore, and retention |
| backend/…/service.go | Shows system snapshot layout, manifest checks, browsing, selective restore, mount compatibility, and rollback planning |
| backend/…/service.go | Shows system-managed volume policy, selection, scheduling, durable runs, and recovery |
| backend/…/backup.go | Shows volume coordination, selective restore, and snapshot retention |
| backend/…/upload.go | Shows resumable upload sessions and idle cleanup |
| backend/…/service.go | Shows self-upgrade, detached upgrader execution, and fleet update resume behavior |
| backend/…/model.go | Defines persisted fleet update state that survives manager restart |
| backend/…/handler.go | Shows upgrade checks, self-upgrade triggers, and update-all status |
| backend/…/service.go | Shows updater activity, frozen image pulls, self-update handoff, image update events, and notification integration |
| backend/…/service.go | Shows frozen update targets and interrupted update recovery |
| backend/…/service.go | Shows durable single-container update delivery and repair |
| frontend/…/+page.svelte | Shows the operator flow for recovery keys, backup actions, discovery, and selected-file restore |
| frontend/…/+page.svelte | Shows account editing, scoped manual role assignment, and avatar policy administration |
| frontend/…/user-table.svelte | Shows role-access summaries and protected-user deletion controls |