@usine/executor 0.5.1-next.335.gc80354d.2.1 → 0.5.1-next.338.ga1032fd.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +34 -11
  2. package/dist/executor.d.ts +21 -9
  3. package/dist/executor.d.ts.map +1 -1
  4. package/dist/executor.js +13 -4
  5. package/dist/executor.js.map +1 -1
  6. package/dist/remote/container.d.ts +13 -7
  7. package/dist/remote/container.d.ts.map +1 -1
  8. package/dist/remote/container.js +41 -29
  9. package/dist/remote/container.js.map +1 -1
  10. package/dist/remote/remote.d.ts.map +1 -1
  11. package/dist/remote/remote.js +5 -5
  12. package/dist/remote/remote.js.map +1 -1
  13. package/dist/remote/runtime.d.ts +6 -0
  14. package/dist/remote/runtime.d.ts.map +1 -0
  15. package/dist/remote/runtime.js +5 -0
  16. package/dist/remote/runtime.js.map +1 -0
  17. package/dist/ssh/container.d.ts +2 -2
  18. package/dist/ssh/container.d.ts.map +1 -1
  19. package/dist/ssh/container.js +65 -83
  20. package/dist/ssh/container.js.map +1 -1
  21. package/dist/ssh/gateway/attachments.d.ts +1 -1
  22. package/dist/ssh/gateway/attachments.d.ts.map +1 -1
  23. package/dist/ssh/gateway/attachments.js +2 -2
  24. package/dist/ssh/gateway/attachments.js.map +1 -1
  25. package/dist/ssh/model.d.ts +3 -1
  26. package/dist/ssh/model.d.ts.map +1 -1
  27. package/dist/ssh/model.js.map +1 -1
  28. package/dist/ssh/preflight.d.ts +2 -2
  29. package/dist/ssh/preflight.js +3 -3
  30. package/dist/ssh/preflight.js.map +1 -1
  31. package/dist/ssh/provisioner/boat.d.ts +1 -0
  32. package/dist/ssh/provisioner/boat.d.ts.map +1 -1
  33. package/dist/ssh/provisioner/boat.js +12 -3
  34. package/dist/ssh/provisioner/boat.js.map +1 -1
  35. package/dist/ssh/provisioner/checks.d.ts +17 -0
  36. package/dist/ssh/provisioner/checks.d.ts.map +1 -0
  37. package/dist/ssh/provisioner/checks.js +107 -0
  38. package/dist/ssh/provisioner/checks.js.map +1 -0
  39. package/dist/ssh/provisioner/hetzner.d.ts +1 -0
  40. package/dist/ssh/provisioner/hetzner.d.ts.map +1 -1
  41. package/dist/ssh/provisioner/hetzner.js +11 -1
  42. package/dist/ssh/provisioner/hetzner.js.map +1 -1
  43. package/dist/ssh/provisioner/holds.d.ts +45 -0
  44. package/dist/ssh/provisioner/holds.d.ts.map +1 -0
  45. package/dist/ssh/provisioner/holds.js +46 -0
  46. package/dist/ssh/provisioner/holds.js.map +1 -0
  47. package/dist/ssh/provisioner/machines.d.ts +3 -1
  48. package/dist/ssh/provisioner/machines.d.ts.map +1 -1
  49. package/dist/ssh/provisioner/machines.js +70 -110
  50. package/dist/ssh/provisioner/machines.js.map +1 -1
  51. package/dist/ssh/provisioner/model.d.ts +8 -2
  52. package/dist/ssh/provisioner/model.d.ts.map +1 -1
  53. package/dist/ssh/provisioner/model.js +5 -2
  54. package/dist/ssh/provisioner/model.js.map +1 -1
  55. package/dist/ssh/provisioner/reset.d.ts +13 -0
  56. package/dist/ssh/provisioner/reset.d.ts.map +1 -0
  57. package/dist/ssh/provisioner/reset.js +54 -0
  58. package/dist/ssh/provisioner/reset.js.map +1 -0
  59. package/dist/ssh/provisioner/reuse.d.ts +23 -0
  60. package/dist/ssh/provisioner/reuse.d.ts.map +1 -0
  61. package/dist/ssh/provisioner/reuse.js +111 -0
  62. package/dist/ssh/provisioner/reuse.js.map +1 -0
  63. package/dist/ssh/provisioner/starts.d.ts +8 -0
  64. package/dist/ssh/provisioner/starts.d.ts.map +1 -0
  65. package/dist/ssh/provisioner/starts.js +44 -0
  66. package/dist/ssh/provisioner/starts.js.map +1 -0
  67. package/dist/ssh/runtime.d.ts +13 -0
  68. package/dist/ssh/runtime.d.ts.map +1 -0
  69. package/dist/ssh/runtime.js +142 -0
  70. package/dist/ssh/runtime.js.map +1 -0
  71. package/dist/ssh/ssh.d.ts +1 -1
  72. package/dist/ssh/ssh.d.ts.map +1 -1
  73. package/dist/ssh/ssh.js +7 -4
  74. package/dist/ssh/ssh.js.map +1 -1
  75. package/package.json +6 -6
package/README.md CHANGED
@@ -67,6 +67,12 @@ A Claude check holds the worker's `ClaudeLoginLock` (`@usine/agents/runtime`) un
67
67
 
68
68
  It replaces exe.dev's `HarnessLoginCheck` and `harnessLoginChecks` options.
69
69
 
70
+ ### Rootless Podman on SSH workers
71
+
72
+ The SSH adapter selects the runtime from `/etc/usine/container-runtime` (`podman` or `docker`). Without the file, it selects installed Podman first, then Docker. Podman must run locally in rootless mode with cgroup v2, systemd delegation of CPU, memory, and PID controllers, subordinate UID/GID ranges, and lingering. Preflight verifies those prerequisites and reads the enforced limits through `exec`. It logs runtime, OCI runtime, kernel, and cgroup details; failures return `WorkerCapabilityError` with remediation.
73
+
74
+ Podman containers and helpers use `--userns=keep-id`; preflight requires matching host and image UID/GID. Attempts use a private cgroup namespace for OOM accounting and explicit proxy variables. Lifecycle, cancellation, salvage restart, and label-scoped cleanup use the selected runtime. Shared caches belong to that runtime's store. Drain attempts and rebuild the worker or snapshot when changing runtimes. See [Add a worker](https://docs.usine.dev/guides/add-a-worker/#move-a-worker-to-rootless-podman).
75
+
70
76
  ## Local worker
71
77
 
72
78
  For each attempt, `@usine/executor/local`:
@@ -138,29 +144,31 @@ Salvage inspection, staging, or snapshot failures keep the checkout, uncommitted
138
144
 
139
145
  ## SSH worker
140
146
 
141
- `@usine/executor/ssh` runs the same contract on any Linux machine that the orchestrator reaches over SSH ([ADR 0026](../../docs/adr/0026-eu-ssh-worker.md)); `infra/hetzner` creates one on Hetzner Cloud. Each worker has an SSH destination, an optional identity file and port, and a root under which it keeps `workers/<name>/repos`, `attempts`, and `credentials`. The machine needs Git, Docker, and the roster's harness logins for the SSH user.
147
+ `@usine/executor/ssh` runs the same contract on any Linux machine that the orchestrator reaches over SSH ([ADR 0026](../../docs/adr/0026-eu-ssh-worker.md)); `infra/hetzner` creates one on Hetzner Cloud. Each worker has an SSH destination, an optional identity file and port, and a root under which it keeps `workers/<name>/repos`, `attempts`, and `credentials`. The machine needs Git, rootless Podman or Docker, and the roster's harness logins for the SSH user.
142
148
 
143
- Preflight checks the SSH connection, a writable root, Git, memory for `maxConcurrentAttempts`, Docker, and the roster's harnesses where children run. With Docker, it pulls the attempt image, checks that the image's user has the SSH user's ID, finds the container limits, and probes the harnesses in a container from the image that removes itself. Without Docker, it probes them over SSH and reports the worker as degraded. A Docker that doesn't answer the SSH user, the `docker` group or a writable socket without the `docker` CLI, an image that can't be pulled and isn't on the machine, or another user ID is a `container` `WorkerCapabilityError`: an SSH user that can use Docker never runs an attempt.
149
+ Preflight checks the SSH connection, a writable root, Git, memory for `maxConcurrentAttempts`, the container runtime, and the roster's harnesses where children run. With a container runtime, it pulls the attempt image, checks that the image's user has the SSH user's ID, finds the container limits, and probes the harnesses in a container from the image that removes itself. Without either runtime, it probes them over SSH and reports the worker as degraded. A Docker that doesn't answer the SSH user, the `docker` group or a writable socket without the `docker` CLI, an image that can't be pulled and isn't on the machine, or another user ID is a `container` `WorkerCapabilityError`: an SSH user that can use Docker never runs an attempt.
144
150
 
145
151
  ### Attempt containers
146
152
 
147
- With Docker on the machine, each attempt runs in its own container from `SshWorkerAddress.container.image`, or `ATTEMPT_IMAGE`, the image of `infra/worker-image/Dockerfile` with this release's harness versions, with CPU, memory, and process limits. The container mounts the attempt's checkout and the SSH user's login files for the attempt's harness read-write, and its cached clone and credential directory read-only; behind a gateway, also gh's configuration directory and socket read-only. It uses the machine's network, and gets the attempt's variables, secrets included, on `docker run`'s standard input. Every command for the attempt runs in it through the shell's `container` (`docker exec -i <name> sh -c <command line>`): the children, the checkout's git, the harvest, the salvage, the pre-push hook, and the attempt's harness probe, which runs once the checkout exists. Only the container's start and removal and the cached clone's fetch run as the SSH user.
153
+ With a container runtime on the machine, each attempt runs in its own container from `SshWorkerAddress.container.image`, or `ATTEMPT_IMAGE`, the image of `infra/worker-image/Dockerfile` with this release's harness versions, with CPU, memory, and process limits. The container mounts the attempt's checkout and the SSH user's login files for the attempt's harness read-write, and its cached clone and credential directory read-only; behind a gateway, also gh's configuration directory and socket read-only. It uses the machine's network, and gets the attempt's variables, secrets included, on the runtime's `run` command's standard input. Every command for the attempt runs in it through the shell's `container` (`<runtime> exec -i <name> sh -c <command line>`): the children, the checkout's git, the harvest, the salvage, the pre-push hook, and the attempt's harness probe, which runs once the checkout exists. Only the container's start and removal and the cached clone's fetch run as the SSH user.
148
154
 
149
155
  `SshWorkerAddress.container` sets each limit as an `Option`. Preflight derives each one that is `None` from the machine: it runs `nproc` and reads `/proc/sys/kernel/threads-max`, `/proc/sys/kernel/pid_max`, and `/proc/meminfo` over SSH, and divides the machine's total, less a reserve for the machine's own processes, by `maxConcurrentAttempts`:
150
156
 
151
157
  | Limit | Machine total | Reserve | Rounded down to |
152
158
  | --- | --- | --- | --- |
153
- | `cpus` (`docker run --cpus`) | the CPUs that `nproc` counts | none | a hundredth of a CPU, at least 0.01 |
159
+ | `cpus` (`--cpus`) | the CPUs that `nproc` counts | none | a hundredth of a CPU, at least 0.01 |
154
160
  | `memoryMib` (`--memory`) | `MemTotal` | 1024 MiB | a MiB, at least 256 |
155
161
  | `pids` (`--pids-limit`) | the lower of `threads-max` and `pid_max` | 1024 tasks | a task, at least 64 |
156
162
 
157
163
  A machine with 4 CPUs and 8 GiB gets 4 CPUs and 7168 MiB with one slot, and 1.33 CPUs and 2389 MiB with three. Preflight reads the machine only if a limit is unset, and fails with a `container` `WorkerCapabilityError` if it can't. It logs the limits, which ones it derived, and the machine's totals with `SSH Worker runs each Attempt in its own container` and `SSH Worker preflight verified`, and returns them as the report's `containerLimits`. The worker's containers get these limits until its next preflight; a container started before any preflight on the worker, such as the recovery of a provisioned worker's machine, gets limits derived for one attempt on the machine, which `SSH Worker runs each Attempt in its own container` logs the same way.
158
164
 
159
- Preflight prepares `usine-pnpm-store`, a named Docker volume shared by every attempt container on the worker's machine, and logs its allocated size as `sizeKiB`. Containers mount it read-write at `/home/usine/.local/share/pnpm/store`. The image's default user must match the SSH user's UID. Volume preparation reads the image's `usine` UID and assigns it to an empty, root-owned volume. It refuses a volume owned by another UID and directs the operator to remove it with `docker volume rm usine-pnpm-store`. Preparation changes only the volume root and runs at first use on machines that skip full preflight. Later attempts on the same machine reuse that preparation. Failures at preflight are `container` capability errors. Attempt cleanup removes containers but preserves the volume.
165
+ Run cache commands as the SSH user, using `podman` on Podman workers and `docker` on Docker workers.
160
166
 
161
- Preflight also prepares `usine-turbo-cache` with the same ownership checks. Every attempt container mounts it read-write at `/home/usine/.cache/turbo`, the image's `TURBO_CACHE_DIR`, so concurrent and later attempts reuse task outputs. Both volumes survive container removal; reclaim the Turborepo cache with `docker volume rm usine-turbo-cache` after removing containers that reference it.
167
+ Preflight prepares `usine-pnpm-store`, a named volume shared by every attempt container on the worker's machine, and logs its allocated size as `sizeKiB`. Containers mount it read-write at `/home/usine/.local/share/pnpm/store`. The image's default user must match the SSH user's UID. Volume preparation reads the image's `usine` UID and assigns it to an empty, root-owned volume. It refuses a volume owned by another UID and directs the operator to remove it with `podman volume rm usine-pnpm-store`. Preparation changes only the volume root and runs at first use on machines that skip full preflight. Later attempts on the same machine reuse that preparation. Failures at preflight are `container` capability errors. Attempt cleanup removes containers but preserves the volume.
162
168
 
163
- The caches are trusted shared state across jobs and instances using the same Docker daemon. Provisioned workers delete them with their machine after each attempt. To reclaim disk space on a long-lived worker, finish its attempts, remove containers that reference the volume, and run `docker volume rm usine-pnpm-store` on that worker. Run preflight again after removal to recreate it. There is no automatic pruning or quota. See the [worker guide](https://docs.usine.dev/guides/add-a-worker/#shared-pnpm-store).
169
+ Preflight also prepares `usine-turbo-cache` with the same ownership checks. Every attempt container mounts it read-write at `/home/usine/.cache/turbo`, the image's `TURBO_CACHE_DIR`, so concurrent and later attempts reuse task outputs. Both volumes survive container removal; reclaim the Turborepo cache with `podman volume rm usine-turbo-cache` after removing containers that reference it.
170
+
171
+ The caches are trusted shared state across jobs and instances using the same runtime store. Provisioned workers delete them with their machine after each attempt. To reclaim disk space on a long-lived worker, finish its attempts, remove containers that reference the volume, and run `podman volume rm usine-pnpm-store` on that worker. Run preflight again after removal to recreate it. There is no automatic pruning or quota. See the [worker guide](https://docs.usine.dev/guides/add-a-worker/#shared-pnpm-store).
164
172
 
165
173
  The checkout is a repository of its own whose objects come from the cached clone through an alternate, so commits never write the read-only clone. The container is named `usine-<attempt id>` and labeled with `SshExecutorOptions.instance`, `SshExecutorOptions.instanceId`, the worker, and the attempt. It's removed after the checkout's release, which salvages in it, and before the credential. If the container stopped before the release, for example because the kernel killed it for memory or a command signaled its init, the release starts it again and salvages in it, and logs the container's status, exit code, and whether it was killed for memory. Before it removes the container, the release reads how many processes the kernel killed in it for memory: the `oom_kill` count of the container's cgroup in `/sys/fs/cgroup/memory.events`, plus one for each start after the kernel killed the container's init, since a start gives the container a new cgroup. A count above zero goes to `Sink.outOfMemory` with the container's ID and memory limit. The run store keeps the count of each container: a reattachment's new container adds its kills to those of the earlier one, and a second record of the same container replaces its count. A container that only a recovery started isn't read. A count that can't be read or recorded is logged as a warning, and the container is still removed. The salvage never runs git in the checkout as the SSH user. A process's first use of a worker removes the containers with both its instance labels that belong to that worker, or to a worker that started no container in this process, so a running attempt's container on a shared machine stays. Instances that share a GitHub App, and so `instance`, have different `instanceId`s, so they don't remove each other's containers. Before its first container starts, the executor writes `<root>/workers/<name>/container-checkouts/<attempt>`, outside every container's mounts, and removes it with the checkout. A reattachment or recovery reads that marker, never the checkout, which the attempt can change: with it, commands run in a new container; without it, as the SSH user, on a machine without Docker only. A mismatch, such as a checkout from before Docker on a machine that now has it, fails with an `ExecutorOperationError` and leaves the checkout.
166
174
 
@@ -176,7 +184,7 @@ The gateway command persists attachments, allowing requests immediately after a
176
184
 
177
185
  The cached clone fetches `http://git.<domain>/<repository>.git`. Children, harvesting, and the executor's git commands export settings that point git, gh, and package managers at the gateway: git sends the caller token only to `git.<domain>` and rewrites `https://github.com/` there, gh uses `git.<domain>` through the worker's socket with its config in `<root>/workers/<name>/gh`, and `HTTPS_PROXY` is the forward proxy.
178
186
 
179
- If the gateway has the Anthropic credential, Claude Code calls `llm.<domain>/anthropic`, and preflight checks only its binary. If it has the OpenAI credential, prepare writes Codex's `config.toml` to the attempt's Codex home, `<root>/workers/<name>/codex/<attempt>`, children get that directory as `CODEX_HOME`, and Codex sends the Responses API to `llm.<domain>/openai/v1` with the caller token from `USINE_GATEWAY_TOKEN`; preflight checks only its binary and version. The file has a `model_provider` and no token. Codex also writes its sessions there, so an attempt's container mounts the directory read-write, and cleanup removes it after the container. If the orchestrator crashes, the directory stays. `Executor.sweep` removes each Codex home on a worker with its own machine whose attempt has no checkout there and that no attempt in this process holds; an attempt holds its Codex home from before it's written until cleanup removes it. A checkout kept for a reattachment or with unpreserved work keeps its Codex home, and a later sweep removes it after the checkout is gone. The sweep visits only the workers the executor has. For a worker that `usine.yaml` no longer declares, `sshWorkerRecordsFor(directory).discard(worker, attempts)` removes the Codex homes of the attempts whose leftovers the operator discarded, over SSH with the worker's port and key from its record in `directory`, and never fails. Without a record, it removes nothing. Otherwise each harness uses the operator's login on the machine through the forward proxy: preflight checks the login as without a gateway, then that each of the login's hosts answers HTTP through the proxy (`api.anthropic.com` and `platform.claude.com`, or `chatgpt.com` and `auth.openai.com`). A refused host is a `gateway` capability error naming the host to add to the egress allowlist. The caller token is in no command line: each SSH command sends `GIT_CONFIG_VALUE_0`, `GH_ENTERPRISE_TOKEN`, `GH_TOKEN`, `ANTHROPIC_AUTH_TOKEN`, and `USINE_GATEWAY_TOKEN` from the client's environment (`SendEnv`), and the machine's sshd must accept them (`AcceptEnv`). With Docker, only the cached clone's fetch sends them; the attempt's container gets them when it starts.
187
+ If the gateway has the Anthropic credential, Claude Code calls `llm.<domain>/anthropic`, and preflight checks only its binary. If it has the OpenAI credential, prepare writes Codex's `config.toml` to the attempt's Codex home, `<root>/workers/<name>/codex/<attempt>`, children get that directory as `CODEX_HOME`, and Codex sends the Responses API to `llm.<domain>/openai/v1` with the caller token from `USINE_GATEWAY_TOKEN`; preflight checks only its binary and version. The file has a `model_provider` and no token. Codex also writes its sessions there, so an attempt's container mounts the directory read-write, and cleanup removes it after the container. If the orchestrator crashes, the directory stays. `Executor.sweep` removes each Codex home on a worker with its own machine whose attempt has no checkout there and that no attempt in this process holds; an attempt holds its Codex home from before it's written until cleanup removes it. A checkout kept for a reattachment or with unpreserved work keeps its Codex home, and a later sweep removes it after the checkout is gone. The sweep visits only the workers the executor has. For a worker that `usine.yaml` no longer declares, `sshWorkerRecordsFor(directory).discard(worker, attempts)` removes the Codex homes of the attempts whose leftovers the operator discarded, over SSH with the worker's port and key from its record in `directory`, and never fails. Without a record, it removes nothing. Otherwise each harness uses the operator's login on the machine through the forward proxy: preflight checks the login as without a gateway, then that each of the login's hosts answers HTTP through the proxy (`api.anthropic.com` and `platform.claude.com`, or `chatgpt.com` and `auth.openai.com`). A refused host is a `gateway` capability error naming the host to add to the egress allowlist. The caller token is in no command line: each SSH command sends `GIT_CONFIG_VALUE_0`, `GH_ENTERPRISE_TOKEN`, `GH_TOKEN`, `ANTHROPIC_AUTH_TOKEN`, and `USINE_GATEWAY_TOKEN` from the client's environment (`SendEnv`), and the machine's sshd must accept them (`AcceptEnv`). With a container runtime, only the cached clone's fetch sends them; the attempt's container gets them when it starts.
180
188
 
181
189
  The admin API listens on the gateway's loopback. With the first worker behind a gateway, the executor opens its own forward, `ssh -N -L 127.0.0.1:<port>:127.0.0.1:<adminPort> <destination>`, with the same SSH command and environment as its other clients, on a local port the kernel picks; workers behind that gateway share it. When the client exits, the executor starts another after a pause of one second, doubling up to one minute, and logs each open, exit, and reopen with the gateway's destination. An admin request that finds the forward closed, or gets no answer, reopens it at once and is sent once more. A second failure fails the request, with a message giving since when the forward has been closed, or, if it opens but the admin API doesn't answer, since when the API last answered through it. The forward closes when the last worker behind the gateway is removed, or with the layer.
182
190
 
@@ -190,13 +198,28 @@ A gateway released before that endpoint answers 404: the worker's first such pre
190
198
 
191
199
  Boat machine creation distinguishes concurrent sandbox, compute allowance, billing, and size plan limits from transient API rate limits. Quota failures preserve the provider message in `MachineUnavailableError`. Hetzner reports `resource_limit_exceeded` as a quota failure.
192
200
 
193
- A worker whose address has `machine: { _tag: "Provisioned" }` has no machine of its own: it creates a Hetzner Cloud server or a Boat sandbox for each attempt and deletes it afterwards ([#550](https://github.com/basaltbytes/usine/issues/550)). The layer provides `WorkerMachines` for the scheduler:
201
+ A worker whose address has `machine: { _tag: "Provisioned" }` has no machine of its own: it creates a Hetzner Cloud server or a Boat sandbox for each attempt and deletes it afterwards by default ([#550](https://github.com/basaltbytes/usine/issues/550)). The layer provides `WorkerMachines` for the scheduler:
194
202
 
195
- - `create(worker, runId, attemptId, brains)` creates the machine, tagged with `SshExecutorOptions.instance`, the worker, the run, the persisted attempt, and a random value of this process, and waits up to `machineReadyTimeout` (or `provisioner.timings.sshWait`, 600 seconds by default) until it answers over SSH. It then waits for cloud-init, creates the root, and waits for Docker. The worker's first machine after `provisioner.timings.machineCheckInterval` seconds since its last successful check, and its first after the layer starts, also gets the machine preflight with `brains`, whose failure is a `WorkerCapabilityError`. Each machine runs one attempt, so that preflight derives the unset container limits for one slot, and the worker's machines get them until the next such preflight. The grant's `checked` is then a `MachineCheck` with the brains and the limits. A provider's refusal, no capacity or quota, no answer, or a timeout is a `MachineUnavailableError` with its `reason`. On failure or interruption, the machine is deleted.
203
+ - `create(worker, runId, attemptId, brains)` reuses an eligible idle machine or creates one, tagged with `SshExecutorOptions.instance`, the worker, the run, the persisted attempt, and a random value of this process, and waits up to `machineReadyTimeout` (or `provisioner.timings.sshWait`, 600 seconds by default) until it answers over SSH. It then waits for cloud-init, creates the root, and waits for the selected container runtime. The worker's first machine after `provisioner.timings.machineCheckInterval` seconds since its last successful check, and its first after the layer starts, also gets the machine preflight with `brains`, whose failure is a `WorkerCapabilityError`. Each machine runs one attempt at a time, so that preflight derives the unset container limits for one slot, and the worker's machines get them until the next such preflight. The grant's `checked` is then a `MachineCheck` with the brains and the limits. A provider's refusal, no capacity or quota, no answer, or a timeout is a `MachineUnavailableError` with its `reason`. On failure or interruption, the machine is deleted.
196
204
  - `adopt(worker, attemptId)` holds the machine of an attempt from an earlier process, found by that tag in one listing per worker. If the provider can't be read, the hold still keeps `sweep` from deleting the machine, and the next use looks it up again.
197
- - `release(hold)` deletes the machine, unless it has the attempt's checkout: one kept for a reattachment, until its parent task's stop is confirmed, or with unpreserved work. That machine stays for the next process. A failed deletion is retried by `sweep`.
205
+ - `release(hold)` resets an eligible machine for reuse or deletes it, unless it has the attempt's checkout: one kept for a reattachment, until its parent task's stop is confirmed, or with unpreserved work. That machine stays for the next process. A failed deletion is retried by `sweep`.
198
206
  - `sweep` warns at startup about machines with the instance label whose worker is not configured, using the configured providers' credentials. It lists each provisioned worker's machines and deletes those that no hold or creation of this process has. The engine runs it after startup recovery and at each reconcile.
199
207
 
208
+ Set the provisioner's `reuse` to `Option.some(new ProvisionerReuse({ attempts, maxAge }))` to
209
+ reuse clean machines of the same worker. `attempts` includes the first assignment; `maxAge`
210
+ accepts positive compact durations such as `2h`, up to `24d`. Reuse requires Podman or Docker and runs
211
+ preflight before each assignment. Cleanup or gateway-detach failure retires the machine.
212
+ Idle machines retire at the age limit, on worker removal, or on orderly shutdown. An active
213
+ attempt can finish after the age limit. Provider metadata records the current attempt and
214
+ count for restart recovery. Older machines without a count are recovered but not reused.
215
+
216
+ Reset removes attempt containers and their anonymous volumes, checkouts, credentials, and
217
+ Codex homes. Shared pnpm and Turbo cache volumes and the pulled image remain.
218
+ `machines` includes idle machines, assignment counts, and creation times. `starts` returns
219
+ acknowledged provider creations by worker and UTC day, including failed preflights. The
220
+ counts persist in `machine-starts.json` under `knownHostsDirectory`; use a persistent directory
221
+ for counts to survive executor restarts, as the orchestrator does.
222
+
200
223
  `recover` finds an earlier attempt's machine by its tag, reconciles the checkout there, and deletes the machine unless the checkout stays.
201
224
 
202
225
  A Hetzner server is created from `image` with the project's SSH key, in `network` and with no public address behind a gateway, which the executor jumps through with `ssh -J <gateway.destination>`; without a gateway it has a public IPv4 address and `firewall`. Its `user_data` sets an Ed25519 host key that the executor generates for it. A Boat sandbox is created with `noEnv`, without snapshots or monitoring, and without automatic stop, and gets `<identity_file>.pub` through `POST /sandboxes/{id}/sshkey`, which returns its host key; a sandbox without one fails its creation. The executor writes each machine's host key to a file under `knownHostsDirectory` before the first connection, and connects with `StrictHostKeyChecking=yes`. A machine of an earlier process without a file there gets no connection. The sandbox name records the tags for recovery.
@@ -312,15 +312,15 @@ declare const MachineGrant_base: Schema.Class<MachineGrant, Schema.Struct<{
312
312
  export declare class MachineGrant extends MachineGrant_base {
313
313
  }
314
314
  /**
315
- * `creating` until the machine answers over SSH, `ready` while an Attempt holds it, and
315
+ * `creating` until the machine answers over SSH, `ready` while an attempt uses it, `idle` between attempts, and
316
316
  * `deleting` until its deletion succeeds.
317
317
  */
318
- export declare const MachineState: Schema.Literals<readonly ["creating", "ready", "deleting"]>;
318
+ export declare const MachineState: Schema.Literals<readonly ["creating", "ready", "idle", "deleting"]>;
319
319
  export type MachineState = typeof MachineState.Type;
320
320
  declare const MachineStatus_base: Schema.Class<MachineStatus, Schema.Struct<{
321
321
  readonly worker: Schema.brand<Schema.String, "WorkerName">;
322
322
  readonly provider: Schema.Literals<readonly ["hetzner", "boat"]>;
323
- readonly state: Schema.Literals<readonly ["creating", "ready", "deleting"]>;
323
+ readonly state: Schema.Literals<readonly ["creating", "ready", "idle", "deleting"]>;
324
324
  /** `None` until the provider accepts the creation. */
325
325
  readonly id: Schema.Option<Schema.brand<Schema.String, "MachineId">>;
326
326
  /** The Run the machine was created for, or `None` for a machine found after a restart. */
@@ -328,19 +328,30 @@ declare const MachineStatus_base: Schema.Class<MachineStatus, Schema.Struct<{
328
328
  readonly attemptId: Schema.Option<Schema.brand<Schema.NonEmptyString, "AttemptId">>;
329
329
  /** When the creation started, or when the provider created a machine found after a restart. */
330
330
  readonly since: Schema.DateTimeUtc;
331
+ /** Assigned attempts, or zero when an older provider record has no count. */
332
+ readonly attempts: Schema.withConstructorDefault<Schema.Int>;
331
333
  }>, {}>;
332
334
  /** A machine in flight on a provisioned Worker. */
333
335
  export declare class MachineStatus extends MachineStatus_base {
334
336
  }
337
+ declare const MachineStarts_base: Schema.Class<MachineStarts, Schema.Struct<{
338
+ readonly worker: Schema.brand<Schema.String, "WorkerName">;
339
+ readonly provider: Schema.Literals<readonly ["hetzner", "boat"]>;
340
+ readonly day: Schema.String;
341
+ readonly count: Schema.Int;
342
+ }>, {}>;
343
+ /** Accepted provider creations by worker and UTC day, including failed preflights. */
344
+ export declare class MachineStarts extends MachineStarts_base {
345
+ }
335
346
  declare const WorkerMachines_base: Context.ServiceClass<WorkerMachines, "@usine/executor/WorkerMachines", {
336
- /** Returns whether `worker` creates a machine for each Attempt. */
347
+ /** Returns whether `worker` uses provisioned machines. */
337
348
  readonly provisions: (worker: WorkerName) => Effect.Effect<boolean>;
338
349
  /**
339
- * Creates a machine on `worker` for the persisted `attemptId`, labeled with the instance,
350
+ * Reuses an eligible idle machine or creates one on `worker` for the persisted `attemptId`, labeled with the instance,
340
351
  * Worker, Run, and Attempt, and waits until it answers over SSH. The first machine after the configured
341
352
  * check interval also gets the preflight checks of `brains`, whose failure is a `WorkerCapabilityError`.
342
353
  * Call only before preparing the Attempt. A retry first deletes machines from its earlier failed creation.
343
- * On failure or interruption, deletes the machine.
354
+ * Reused machines always get preflight. On failure or interruption, deletes the machine.
344
355
  */
345
356
  readonly create: (worker: WorkerName, runId: RunId, attemptId: AttemptId, brains: ReadonlyArray<BrainSpec>) => Effect.Effect<MachineGrant, MachineUnavailableError | WorkerCapabilityError>;
346
357
  /**
@@ -350,7 +361,7 @@ declare const WorkerMachines_base: Context.ServiceClass<WorkerMachines, "@usine/
350
361
  * and a later use looks it up again.
351
362
  */
352
363
  readonly adopt: (worker: WorkerName, attemptId: AttemptId) => Effect.Effect<Option.Option<MachineHold>>;
353
- /** Deletes the held machine. Logs a failure, and each `sweep` tries again. */
364
+ /** Resets an eligible machine for reuse, or deletes it. Retained checkouts prevent both. Failed deletion is retried by `sweep`. */
354
365
  readonly release: (hold: MachineHold) => Effect.Effect<void>;
355
366
  /**
356
367
  * Lists each provisioned Worker's machines at its provider and deletes those that no
@@ -360,10 +371,11 @@ declare const WorkerMachines_base: Context.ServiceClass<WorkerMachines, "@usine/
360
371
  readonly sweep: Effect.Effect<void>;
361
372
  /** The machines in flight, oldest first. */
362
373
  readonly machines: Effect.Effect<ReadonlyArray<MachineStatus>>;
374
+ /** Persisted counts of acknowledged provider creations, including failed preflights. */
375
+ readonly starts: Effect.Effect<ReadonlyArray<MachineStarts>>;
363
376
  }>;
364
377
  /**
365
- * The machines of the provisioned Workers, which create one machine per Attempt and delete it
366
- * afterwards (#550). Only the SSH executor provides it.
378
+ * The provisioned workers' machines, with optional bounded reuse. Only the SSH executor provides it.
367
379
  */
368
380
  export declare class WorkerMachines extends WorkerMachines_base {
369
381
  }
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAmB,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAe,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAY,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAc,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAsB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,C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EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,KACjB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC9C,mIAAmI;sBACjH,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5D;;;;OAIG;oBACa,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnC,4CAA4C;uBACzB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAC9D,wFAAwF;qBACvE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;;AA1ChE;;GAEG;AACH,qBAAa,cAAe,SAAQ,mBAyCC;CAAG;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/executor.js CHANGED
@@ -252,10 +252,10 @@ export class MachineGrant extends Schema.Class("@usine/executor/MachineGrant")({
252
252
  }) {
253
253
  }
254
254
  /**
255
- * `creating` until the machine answers over SSH, `ready` while an Attempt holds it, and
255
+ * `creating` until the machine answers over SSH, `ready` while an attempt uses it, `idle` between attempts, and
256
256
  * `deleting` until its deletion succeeds.
257
257
  */
258
- export const MachineState = Schema.Literals(["creating", "ready", "deleting"]);
258
+ export const MachineState = Schema.Literals(["creating", "ready", "idle", "deleting"]);
259
259
  /** A machine in flight on a provisioned Worker. */
260
260
  export class MachineStatus extends Schema.Class("@usine/executor/MachineStatus")({
261
261
  worker: WorkerName,
@@ -268,11 +268,20 @@ export class MachineStatus extends Schema.Class("@usine/executor/MachineStatus")
268
268
  attemptId: Schema.Option(AttemptId),
269
269
  /** When the creation started, or when the provider created a machine found after a restart. */
270
270
  since: Schema.DateTimeUtc,
271
+ /** Assigned attempts, or zero when an older provider record has no count. */
272
+ attempts: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)).pipe(Schema.withConstructorDefault(Effect.succeed(0))),
273
+ }) {
274
+ }
275
+ /** Accepted provider creations by worker and UTC day, including failed preflights. */
276
+ export class MachineStarts extends Schema.Class("@usine/executor/MachineStarts")({
277
+ worker: WorkerName,
278
+ provider: MachineProvider,
279
+ day: Schema.String.check(Schema.isPattern(/^\d{4}-\d{2}-\d{2}$/u)),
280
+ count: Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)),
271
281
  }) {
272
282
  }
273
283
  /**
274
- * The machines of the provisioned Workers, which create one machine per Attempt and delete it
275
- * afterwards (#550). Only the SSH executor provides it.
284
+ * The provisioned workers' machines, with optional bounded reuse. Only the SSH executor provides it.
276
285
  */
277
286
  export class WorkerMachines extends Context.Service()("@usine/executor/WorkerMachines") {
278
287
  }
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAmB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,eAAe,EACf,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM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B,EAAE,MAAM,wBAAwB,CAAC"}
@@ -7,15 +7,15 @@ import { type ContainerImage, type ContainerLimits, type WorkerName } from "@usi
7
7
  import { Effect, Option, Redacted } from "effect";
8
8
  import { ExecutorOperationError } from "../executor.ts";
9
9
  import type { RemoteCommands } from "./commands.ts";
10
- /** The container CLI on the machine. */
11
- export declare const CONTAINER_RUNTIME = "docker";
10
+ import { type ContainerRuntime } from "./runtime.ts";
12
11
  export declare const PNPM_STORE_VOLUME = "usine-pnpm-store";
13
12
  export declare const PNPM_STORE_PATH = "/home/usine/.local/share/pnpm/store";
14
- export declare const PNPM_STORE_MOUNT = "type=volume,source=usine-pnpm-store,destination=/home/usine/.local/share/pnpm/store,volume-nocopy";
13
+ export declare const PNPM_STORE_MOUNT = "usine-pnpm-store:/home/usine/.local/share/pnpm/store:nocopy";
15
14
  /** Initializes volume `$3` using runtime `$1`, image `$2`, mount `$4`, and path `$5`. */
16
15
  export declare const PREPARE_CACHE_SCRIPT: string;
17
16
  /** The image and limits of each Attempt container on a Worker. */
18
17
  export interface ContainerSettings {
18
+ readonly runtime: ContainerRuntime;
19
19
  readonly hosts: Readonly<Record<string, string>>;
20
20
  readonly image: ContainerImage;
21
21
  readonly limits: ContainerLimits;
@@ -69,6 +69,12 @@ export interface ContainerSpec {
69
69
  /** Variables set in the container through the container CLI's standard input, never a command line. */
70
70
  readonly secrets: Readonly<Record<string, Redacted.Redacted<string>>>;
71
71
  }
72
+ /**
73
+ * A script that stops the children recorded in container `$2` for the checkout `$4` with the
74
+ * kill script `$3`. Prints `no-container` if the container doesn't exist and
75
+ * `container-stopped` if it doesn't run, since then no child can run in it.
76
+ */
77
+ export declare const STOP_CHILDREN_SCRIPT: string;
72
78
  /**
73
79
  * Returns the operations on the containers of a machine: start one for an Attempt or a
74
80
  * preflight, stop an Attempt's children in it, and remove the containers that an earlier
@@ -81,11 +87,11 @@ export declare const containersFor: (commands: RemoteCommands) => {
81
87
  recordTo: (record: Sink["outOfMemory"]) => Effect.Effect<void, never, never>;
82
88
  ensureRunning: Effect.Effect<boolean, ExecutorOperationError, never>;
83
89
  }, never, never>;
84
- stopChildren: (operation: "cancel" | "cleanup" | "launch" | "preflight" | "prepare", shell: RemoteShell, name: string, worktree: string) => Effect.Effect<void, ExecutorOperationError, never>;
85
- sweep: (shell: RemoteShell, instance: string, instanceId: string & import("effect/Brand").Brand<"InstanceId">, worker: string & import("effect/Brand").Brand<"WorkerName">, kept: ReadonlySet<string>) => Effect.Effect<string[], ExecutorOperationError, never>;
86
- remove: (shell: RemoteShell, name: string) => Effect.Effect<void, never, never>;
90
+ stopChildren: (operation: "cancel" | "cleanup" | "launch" | "preflight" | "prepare", shell: RemoteShell, name: string, worktree: string, runtime: "docker" | "podman") => Effect.Effect<void, ExecutorOperationError, never>;
91
+ sweep: (shell: RemoteShell, instance: string, instanceId: string & import("effect/Brand").Brand<"InstanceId">, worker: string & import("effect/Brand").Brand<"WorkerName">, kept: ReadonlySet<string>, runtime: "docker" | "podman") => Effect.Effect<string[], ExecutorOperationError, never>;
92
+ remove: (shell: RemoteShell, name: string, runtime: "docker" | "podman") => Effect.Effect<void, never, never>;
87
93
  mark: (operation: "cancel" | "cleanup" | "launch" | "preflight" | "prepare", shell: RemoteShell, marker: string) => Effect.Effect<void, ExecutorOperationError, never>;
88
94
  marked: (operation: "cancel" | "cleanup" | "launch" | "preflight" | "prepare", shell: RemoteShell, marker: string) => Effect.Effect<boolean, ExecutorOperationError, never>;
89
- prepareCaches: (operation: "cancel" | "cleanup" | "launch" | "preflight" | "prepare", shell: RemoteShell, image: string & import("effect/Brand").Brand<"ContainerImage">, worker: string & import("effect/Brand").Brand<"WorkerName">) => Effect.Effect<undefined, ExecutorOperationError, never>;
95
+ prepareCaches: (operation: "cancel" | "cleanup" | "launch" | "preflight" | "prepare", shell: RemoteShell, image: string & import("effect/Brand").Brand<"ContainerImage">, worker: string & import("effect/Brand").Brand<"WorkerName">, runtime: "docker" | "podman") => Effect.Effect<undefined, ExecutorOperationError, never>;
90
96
  };
91
97
  //# sourceMappingURL=container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/remote/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,WAAW,EAAuB,MAAM,0BAA0B,CAAC;AAC/F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAe,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAA0B,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,wCAAwC;AACxC,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAE1C,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AACpD,eAAO,MAAM,eAAe,wCAAwC,CAAC;AACrE,eAAO,MAAM,gBAAgB,sGAAyF,CAAC;AAcvH,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,QAczB,CAAC;AAiBT,kEAAkE;AAClE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,8FAA8F;IAC9F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8FAA8F;IAC9F,QAAQ,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