Skip to content

Remote Execution & Pools

When running several worktrees or heavy test suites on a laptop, Squeal can offload validation lanes to remote machines while keeping strict file-byte and environment provenance.

Remote execution is configured per user (never committed) in ~/.config/squeal/remote.json (or $XDG_CONFIG_HOME/squeal/remote.json). Repositories can opt out completely by setting "remote": { "allowed": false } in squeal.config.json.

{
"repositories": {
"/home/user/app": {
"target": "build-box"
}
}
}

By default this uses your SSH config (ssh in batch mode) and offloads background Vitest runs (baselines and backlog) while keeping edit-time runs local.

Each test run belongs to one of four lanes:

  • background: start/restart baselines and backlog work
  • edit: edit tiers, focused tiers, and named waits
  • slow: slow-tier files
  • group: named check groups (such as squeal run <check>)

Supported provider values:

  • "ssh": any SSH host in your SSH config or user@host
  • "command": custom acquire/select commands (providerConfig.acquire)
  • "agent37": provisions an Agent37 VM per worktree (supports template, region, vcpu, memoryGb, diskGb, autoSleepMinutes, apiKeyEnv, and proxy config)
  • "proxmox": clones a guest on your Proxmox VE host from a template, shared across worktrees of a repository

Define shared pools across repositories and assign each repository a stack tried in order:

{
"pools": {
"local": { "provider": "local", "maxLeases": 2 },
"lan-1": { "provider": "ssh", "target": "build-box", "maxLeases": 2 },
"cloud": { "provider": "agent37", "maxLeases": 6 }
},
"repositories": {
"/home/user/app": {
"stack": ["local", "lan-1", "cloud"],
"whenFull": "wait"
}
}
}

Squeal syncs tracked and non-ignored files to the remote, installs dependencies from the lockfile, and keeps a remote result only if file bytes matched before and after the run.

  • environmentMode: "remote-key" (default): stores remote results under the remote’s own platform/architecture/Node key so a Linux build box serving a macOS laptop never cross-contaminates local results.
  • environmentMode: "match-local": requires the remote’s platform, Node version, dependencies, and Vitest config to match your machine, sharing results directly with local runs.
  • whenLost: "local" (default) falls back to running locally if the remote is unreachable or refused; "not-run" leaves those checks unknown.

In squeal.config.json, repositories declare what remote hosts need:

  • remote.setup: path to an executable setup script (e.g. ".squeal/remote-setup.sh") that installs system packages (browsers, Python tools, etc.) before dependency install. Content-hashed by SHA-256 so it re-runs only when edited.
  • requires.commands: required PATH binaries (globally or per test-file glob, optionally with a --version check). Missing global commands refuse the remote at connect; missing glob-scoped commands keep only those test files local.
  • remote.needsRepository: globs of tests that inspect .git; run locally unless the remote has a current Git tree.
  • remote.alwaysLocal: globs of tests that inspect the local host itself (kernel, /proc, local sockets) and never run remotely.