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

ADR-0089: Bare toolchain names fail the gate in Prolog, and the C toolchain is one declared file

field value
Status Accepted
Date 2026-10-11
Register factory (docs/adr, 4-digit ids)
Source docs/adr/0089-bare-toolchain-names-fail-the-gate-in-prolog-and-the-c-toolchain-is-one-declared-file.md — permalink at d6bf58280 (unchanged on master since that commit)
Wiki register entry ADR-0089 (wiki status: Accepted)

← ADR-0088 · ADR-0090 →

The record

Status: Accepted · Date: 2026-10-11

Context

Two failures, measured on 2026-10-11, have one cause: a program named by a bare word is resolved from PATH, and on this host PATH does not point where the code assumes.

No mechanism could find these sites. The AST snapshot records each call's callee without its arguments, so the program a spawn runs was unrecoverable, and the Prolog gate (REQ-GATE-001) reads facts only from the snapshot.

Decision (Mohamed, verbatim)

"fix bare python make it prolog and atoms"

"make the gcc path a configuration and set it"

  1. The snapshot records the facts; it classifies nothing. Every module in plans/ast-ultimate.json carries argv_literals: each literal program token at a spawn-shaped call, recorded verbatim with its file, line, callee text and form (argv / exec / shell). The snapshot declares the per-module captures it performed (captures). That identity is part of the warm-start cache, so a snapshot lacking a capture is fully re-parsed and never read as "captured, none found".
  2. Prolog decides. code_facts.pl declares argv_literal/5 and snapshot_capture/1. gate_rules.pl names the toolchain programs as enumerated atoms (toolchain_program/2). The rule violation(bare_toolchain, File, Line, Detail) joins them with waived/2 and in_project/1. Severity is data in gate_severity.pl. A rule whose required capture the snapshot did not perform makes the gate INVALID, never PASS.
  3. One compiler declaration. env/toolchain.env (tracked) holds CC and CXX as absolute paths (/usr/bin/gcc, /usr/bin/g++ on this host). Every consumer reads it: .envrc (dotenv, last), deploy/toolchain.sh (installers), and scripts/worktree_toolchain.py (worktree provisioning, janus and tree-sitter builds). Every consumer refuses a missing, bare-named or non-executable declaration rather than fall back to PATH. A host that needs another compiler edits that file.

Alternatives rejected

Consequences

Provenance

No other ADR is named in this record.

Rulings cited

None.

Specs cited

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