Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0095

ADR-0095: SWI-Prolog is built from pinned source into a fixed project-owned prefix, and the runtime path leaves guix

field value
Status Accepted
Date 2026-10-12
Register factory (docs/adr, 4-digit ids)
Source docs/adr/0095-swi-prolog-is-built-from-pinned-source-into-a-fixed-project-owned-prefix-and-the-runtime-path-leaves-guix.md — recorded on branch docs/adr-register-0080-0085 at 3f68a11a5, not yet on master
Wiki register entry ADR-0095 (wiki status: Accepted)

← ADR-0094 · ADR-0096 →

The record

Status: Accepted · Date: 2026-10-12 · Ruled: 2026-10-12 (Mohamed: "agreed")

Context

Decision (proposed)

  1. Own the SWI build.
    • Build SWI-Prolog 9.3.8 from the pinned tag and submodules into a fixed, versioned, read-only prefix outside every deploy root: /opt/orchestrata-toolchain/swipl-9.3.8.
    • Set CMAKE_INSTALL_PREFIX to that final path, with the REPORT.md §3.3 flags.
    • Mirror the source archive and record its sha256 in a committed pin file.
    • A committed toolchain script builds and verifies the prefix (version, pin, checksum). The installers refuse to proceed when it is absent or does not match.
  2. Declare it. env/toolchain.env SWIPL names the prefix's bin/swipl. janus is rebuilt everywhere; scripts/_janus_patched/setup.py keeps its absolute RUNPATH.
  3. Make the SWI home unambiguous.
    • Every unit and container override puts the prefix bin first on PATH.
    • The kernel unit also sets SWI_HOME_DIR to the prefix's lib/swipl.
    • A test asserts the home janus resolves equals the declared prefix.
  4. age and direnv come from the pinned upstream static binaries (sha256 in REPORT.md §2). The install hints in pyproject.toml:146,148 and scripts/install_janus_ft.sh:207 are updated.
  5. Test container.
    • The same prefix sits at the same path in the container, copied in the way D44 copies the code.
    • The guixstore and guixprofile devices, their allow-list entries and GUIX_PATH_PREFIX are removed.
    • The Arch swi-prolog package no longer decides anything, because the prefix bin comes first.
  6. incusd stays on guix as a scoped exception until a separate ADR decides its source. No guix-free option was measured for it.
  7. SWI 10.x is a separate, measured upgrade. REPORT.md §3.11 shows the janus tests also pass on 10.0.2, with two observed behaviour differences.

If accepted, this supersedes ADR-0091 for SWI-Prolog.

Alternatives rejected

Consequences

Provenance

Relations of ADR-0095

Rulings cited

None.

Specs cited

None (or no spec page exists for the ones named).