Skip to content

Make containers the default Run executor (ADR 0005) - #70

Open
wilke wants to merge 1 commit into
chian:mainfrom
wilke:feat/container-default-executor
Open

wilke wants to merge 1 commit into
chian:mainfrom
wilke:feat/container-default-executor

Conversation

@wilke

@wilke wilke commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Implements the pending default switch in ADR 0005 ("Containers are the default; systemd is an explicitly selectable option … The presence or version of host systemd-run must not select the normal Run backend"). Follow-up to the design deck review §7 "Execution backends".

Change

  • episode_runtime/executor_selection.py: auto (the default) now resolves to container on every platform. systemd runs only when selected with OPENCHIA_RUN_EXECUTOR=systemd or resolve_executor_backend("systemd"). The platform / systemd_available host-fact parameters are removed; only the selection test used them.
  • tests/episode_runtime/test_container_executor.py::test_backend_selection covers the default, an explicit request, and the environment override.
  • README, the CLI docstring (openchia_cli/duet_cli.py) and ADR 0005's implementation line now describe the default.

⚠️ Behaviour change on Linux hosts

Linux hosts that used to get systemd automatically now get the container backend. The container worker needs Landlock ABI 7, i.e. Linux ≥ 6.15, because containers share the host kernel (README), plus a Docker-compatible runtime. Ubuntu 24.04's stock kernel (6.8) does not meet the Landlock requirement. On such hosts, Runs fail at setup with the unmet prerequisite, as ADR 0005 requires (no silent fallback), until the host opts in:

export OPENCHIA_RUN_EXECUTOR=systemd

If you'd rather keep systemd as the effective default on older Linux kernels, the alternative is a capability check that errors with that hint. A capability check fits ADR 0005; using the presence of systemd-run does not. Happy to adjust.

Tests: tests/episode_runtime/test_container_executor.py, 17 passed. macOS behaviour is unchanged (it was already container).

🤖 Generated with Claude Code

ADR 0005 (Accepted 2026-10-03) makes the container executor the default
Target Workflow backend on Linux and macOS, with systemd an explicitly
selectable Linux option, and states that the presence of host systemd-run
must not select the backend. The selector still chose systemd on any Linux
host with /usr/bin/systemd-run.

- resolve_executor_backend(): auto -> container on every platform; systemd
  only via OPENCHIA_RUN_EXECUTOR=systemd or an explicit request. The unused
  host-fact parameters are removed (only the selection test used them).
- README, the CLI docstring and ADR 0005's implementation status describe the
  new default and when to select systemd (kernel < 6.15 without Landlock ABI 7
  for containers, or no container runtime). Missing prerequisites fail at Run
  setup; there is no silent fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant