Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0110
ADR-0110: The idle Prolog containers are retired from every fleet, and SWI-Prolog runs only embedded in the kernel
| field | value |
|---|---|
| Status | Accepted — Accepted (ruling, Mohamed, 2026-10-19, verbatim: "agree to all", then "yes and document the environments thoroughly") |
| Date | 2026-10-19 |
| Register | factory (docs/adr, 4-digit ids) |
| Source | docs/adr/0110-the-idle-prolog-containers-are-retired-from-every-fleet-and-swi-prolog-runs-only-embedded-in-the-kernel.md — permalink at 80c7135f0 (unchanged on master since that commit) |
| Wiki register entry | ADR-0110 (wiki status: Accepted) |
The record
Status: Accepted (ruling, Mohamed, 2026-10-19, verbatim: "agree to all", then "yes and document the environments thoroughly") · Date: 2026-10-19
Context
Five Incus containers exist only to hold an installed SWI-Prolog: prolog-node-1/2/3 in prod
(project default, 10.53.1.16/.17/.18), prolog in test (orchestrata-test, 10.53.2.12)
and prolog in dev (orchestrata-dev, 10.53.3.22). They are declared in
infra/terraform/prolog.tf, test_fleet.tf and dev_fleet.tf, created by
deploy/provision_environments.sh / deploy/orchestrata-test/provision_test_fleet.sh, and
"probed" by swipl --version inside each one.
Measured 2026-10-19 (session audit, read-only):
- Nothing talks to them. Each runs no service beyond the base OS;
ss -tnH state establishedinside every one returned 0 connections. No source module reads an endpoint for them:PROLOG_NODESis written only byinfra/gen_env.pyand read by nothing insrc/;scripts/gen_level0.pyfalls back to "(see INFRASTRUCTURE.md)" forPROLOG_HOSTS. The env profiles carry their addresses only in comments (env/prod.env:7,env/test.env:8,env/dev.env:5).prolog.tf's own header already says the nodes "are not currently wired into app config (governance runs an in-process janus-swi engine)". - Where Prolog actually executes. Inside the kernel process, through the vendored
free-threaded
janus_swifork, loading the rules insrc/orchestrata_ultimate/prolog/*.pl(29 files):- prod: user unit
orchestrata-kernel.serviceon the host,/opt/orchestrata/.venv/bin/python -m orchestrata_ultimate.agents.runtime_main(/opt/orchestrata@0faca7a7c);/proc/<pid>/mapsshowslibswipl.so.9.3.8. - test: the same unit inside the
appcontainer (10.53.2.13,/opt/orchestrata@22363abb2); its maps show the samelibswipl.so.9.3.8. - The gateway process maps no libswipl in either environment. The pytest suite and the code-intelligence tools also run Prolog in-process.
- prod: user unit
- The probe proves nothing.
swipl --versionin an unused container says nothing about the engine governance runs on; it gives the appearance of a "Prolog cluster" that does not exist (INFRASTRUCTURE.md,infra/README.mdandclaude/workflow/environments.mdall list one). - Cost. Five always-on containers (~3.7 GiB on the
t9-btrfspool plus RAM/CPU) and five addresses in the env-octet scheme.
ADR-0077 makes terraform the owner of every Incus environment, so deleting the containers by
hand would be undone by the next tofu apply.
Decision (Mohamed, 2026-10-19)
- Terraform stops declaring them.
infra/terraform/prolog.tfis deleted; theprolog_nodesvariable and output are removed; the"prolog"entries leave the test and dev fleet image and address maps.tofu applydestroys exactly these five instances, and the drift gate (scripts/check_infra_drift.py) is green at zero diff afterwards. The raw-machine and rehearsal templates (infra/rawmachine/,infra/rehearsal/) drop them too, so a rebuild reproduces the retired fleet, not the old one. - Provisioners stop creating and probing them.
deploy/provision_environments.sh(role_prolog, the launch loop, the threeswipl --versionprobes),deploy/orchestrata-test/provision_test_fleet.sh(provision_node prolog) andclaude-env/install-infra.shno longer touch Prolog containers.infra/gen_env.pyno longer emitsPROLOG_NODES. - The one place SWI-Prolog executes is in-process. The kernel (and test/tool processes)
load SWI-Prolog through the janus fork. The runtime is the project-owned prefix of ADR-0095.
Prolog's readiness and identity are the kernel's governance boot health line and the loaded
libswiplpath (ADR-0095's check), never a container probe. - The environment docs say so.
INFRASTRUCTURE.md,infra/README.md,claude/workflow/environments.md,deploy/orchestrata-test/README.mdand the env-profile comments drop the Prolog containers and state where Prolog runs. - An out-of-process Prolog service needs its own ADR. Nothing here forbids one. Reintroducing Prolog containers without a decision that wires and tests them is a drift finding.
Alternatives rejected
- Keep them (status quo). They cost resources, mislead every reader of the fleet docs, and the provisioning probe checks something no code depends on.
- Stop them but keep them declared. Terraform still owns them, so the drift gate either flags the stopped state or the next apply starts them; the docs stay wrong.
incus deleteby hand. Violates ADR-0077: the nexttofu applyrecreates all five.- Wire them as a real remote Prolog service. No requirement asks for it. In-process janus is the load-bearing design (ADR-0095 builds the runtime for exactly that), and a network hop on every governance verdict adds latency and a new failure mode for no gain.
Consequences
- Prod (
default):orchgraph-coord-1/2/3,orchgraph-data-1/2,redis-queue,prometheus-metrics. Test (orchestrata-test):app,memgraph,memgraph-ha-main,memgraph-ha-replica,redis,rh-coord-1/2/3,rh-data-1. Dev (orchestrata-dev):memgraph,redis. 10.53.1.16-18,10.53.2.12and10.53.3.22are free.- Tests that named the containers change with them:
tests/harness/test_incus_isolation.py,tests/scripts/test_container_cpu_accounting.py,tests/infra/test_gen_env.pyandtests/infra/test_gen_env_profiles.py. - Gates that must stay green:
check_infra_drift,check_env_fleet_agreement,check_env_subnet_scheme. - ADR-0077's rule (terraform owns every environment) stands. Only its fleet inventory changes.
Provenance
Audit run in the 2026-10-19 disk-and-fleet session (read-only measurements above). The question
put to Mohamed: "Retire prolog-node-1/2/3 (prod) and prolog (test and dev) properly? That
means an ADR plus changes to prolog.tf, variables.tf, the provisioning scripts and
test_incus_isolation.py. Recommended, now that the kernel is confirmed as the only place
Prolog runs." Mohamed, 2026-10-19, verbatim: "agree to all", then "yes and document the
environments thoroughly". Related: ADR-0077 (terraform owns every environment), ADR-0095 (the
SWI-Prolog runtime prefix).
Related ADRs
Rulings cited
None.
Specs cited
None (or no spec page exists for the ones named).