Engine reference — generated from the canonical engineering source. Do not edit this page by hand.
Engine supply-chain provenance & receipts
The engine supply chain produces the artifacts every local-inference certification claim points at. This document is the contract for what makes an artifact — and a certification record — trustworthy: provenance is verified, not asserted; receipts are ZERG-produced; and every gate refuses typed when the evidence is missing.
Provenance chain at a glance:
scripts/engines/build.sh --ref <40-hex> (verifies HEAD == ref + clean tree;
│ builds the COMMITTED tree)
▼
engines/<class>.json (provenance manifest: source_verified,
│ source_head, manifest_hash, image_digest)
▼
scripts/engine-install.sh --expect-build/--expect-ref (flock'd, sha256+minisign,
│ canary, atomic flip, receipt)
▼
<root>/installed.json + <root>/<build>/.zerg-engine-receipt.json (the install receipt)
│
▼
scripts/lane-certify.sh → POST /lanes/:lane/validate (commit) (origin=zerg + CSV row_ref
│ + receipt + parity evidence)
▼
<data_dir>/lane-validation.json (the runtime record the gates consume)
1. Source provenance (build.sh --ref)
A pinned build must be exactly the pinned commit. For --class cuda_sm86|cpu_epyc with --ref owner/repo@<40-hex>, build.sh:
- refuses unless the commit object exists locally (one best-effort
git fetch origin <ref>first — air-gap hosts pre-seed the object); - asserts the checkout’s
HEAD == ref(a different tree can never be labeled with the ref); - asserts the working tree is clean (
git status --porcelainempty — a patched tree is refused by name, with the dirty listing printed); - builds the committed tree via
git archive <ref>staged into a clean directory — never the operator’s working copy; - records submodule SHAs (
source_submodules) when.gitmodulesexists.
The emitted engines/<class>.json row carries
"source_verified": true plus "source_head": <40-hex>. A build without
--ref (floating HEAD) emits source_verified: false and can never be
production: --production requires --ref, and
ci/engine_manifest.py validate refuses any state=built|installed
production row without verified provenance (promotion-set validates every
row before projecting it,, ). ci/engine_manifest_lint.py
enforces the same rule over the committed corpus.
Anti-root guard: build.sh refuses to run as root unless
ZERG_ENGINES_ALLOW_ROOT=1 is set inside a disposable container. The
refusal path and the exact cmake argv are contract-tested
(TestEngineSourcePin, TestEngineCmakeArgv).
2. Manifest truth and the promotion set
engines/<class>.json rows are validated by ci/engine_manifest.py and
gated by ci/engine_manifest_lint.py:
state=reference rows may carry manifest_hash: "unverified" — they
are honest build targets, never promotable;
state=built|installed rows need a real 64-hex manifest_hash, a real
image_digest (sha256:<64-hex>; the literal local only for
non-hermetic production=false builds) and verified source provenance —
the validator enforces the provenance rule on both states (,
promotion-set admits built|installed, so a hand-written
installed row without source_verified is refused and never
promotion-eligible);
promotion-set prints only PROMOTABLE rows (production + built|installed
- verified hash, after validating every row); reference rows print as
production-targets— “the production set” can no longer contain an engine that was never built.
Registry↔manifest drift is a hard lint (ci/engine_config_drift_lint.py):
every production => true engine row in the configs must match exactly
one engines/*.json production row by (ref, build) — and vice versa.
Certification records compare against the config ref, so a stale
manifest would silently invalidate the evidence chain; the lint reds that
class at the gate.
3. The install receipt
scripts/engine-install.sh writes two atomic receipts:
<root>/<build>/.zerg-engine-receipt.json — per-build record
(build, class, manifest_hash, installed_at, sha256,
verified_by);
<root>/installed.json — the current-build record the runtime reads
(the same shape).
The receipts record the verified manifest_hash of the installed tree
(ci/engine_manifest.py tree-hash) and the artifact sha256. Production
lanes consume only ZERG receipts: the validation evaluator
(sol_lane_validation) refuses no_receipt when
<inference_engine_root>/installed.json is absent and
unverified_manifest when the record’s hash is the unverified
placeholder — an engine installed by any other means, a deleted receipt,
or a same-build-id byte swap invalidates the lane on the next read
(there is no trusted “validated” flag; every read re-compares).
--expect-build/--expect-ref pin the install to the registry’s engine
row, and ZERG_ENGINE_REQUIRE_MINISIGN=1 (default off) upgrades every
unverified signature path — absent .minisig, absent minisign binary,
failed verify — from the loud warning to a refusal. :
the CD publish lane now attaches the llama-* triple (tarball + .sha256
.minisig) and asserts the release carries it, so the first signature-bearing release is machine-verified; setZERG_ENGINE_REQUIRE_MINISIGN=1for installs from that release onward. Rollback re-verifies the candidate’s own receipt against a freshly computed tree hash before flipping: a tampered or corrupt candidate is refused withcurrentuntouched, soinstalled.jsoncan never record a hash that does not describe the tree the runtime gate is about to trust.
4. Weight receipts
scripts/lane-model-sync.sh writes lane-model-receipt.json beside the
weights with per-file sha256, verified and byte size. The start
path (sol_registry:verify_lane_pin) is receipt-first — it never
re-hashes a 15.6 GB file — but it re-stats the file against the
receipt’s bytes, so a truncated or swapped GGUF refuses
(primary_pin_unverified) without the hash pass. Receipts without
bytes stay valid on the digest match.
The unhashed posture is explicit-only:
non-production lanes (the fixture) accept unhashed as before;
production lanes require the operator’s pin_ack => true in the lane
row — otherwise the start refuses unhashed_pin_without_ack;
every unhashed-ack start bumps
inference_lane_weights_unhashed_total{lane=...} so the posture stays
visible until the pins converge (provisioning task: run
lane-model-sync.sh per lane/host, then flip the lane rows to real
pins).
5. Certification evidence rules
The commit route binds a validation record to the artifact evidence:
origin=zerg, artifact-CSV membership of the claimed row_ref (config
lane_benchmark_csv; configured-but-unreadable is a fail-closed 503),
an install receipt with a real manifest hash, and a parity verdict —
pass, or single_host only with the explicit allow_single_host ack
(lane-certify.sh --allow-single-host forwards and records it). See the
runbook §6 for the exact typed refusals and the operational flow.
6. CI lanes
Required (CPU-only, always on):
engine_manifest_lint + engine_config_drift_lint (drift reds the
gate);
source-pin contract tests (dirty tree / HEAD mismatch refused;
verified clean tree emits source_verified);
cmake argv contract (PATH-shim capture of both classes’ flags) and the
root-refusal contract;
fixture double-build + sabotage repro gate;
install/rollback drill incl. the real-engine-shaped canary, the
concurrent-install flock case and the --expect-* pin cases;
lane-certify --plan + mock-Sol multi-lane commit + the
single-host-ack rule.
GPU lane (off the required checks by design): the CUDA double build runs
inside the wild hermetic image (WILD-; digest-pinned before CD
wiring), followed by the install canary and one real certify
commit/readback on a GPU host. : the image
digest is now pinned in .crow.yml (build-engines) and the CUDA
double-build runs as that step’s post-leg; WILD-/9 are closed by the
handoff record.
7. Per-target class matrix & self-contained artifacts
Never cross-compile targets — an artifact carries the target it was built for and the installer enforces it:
build.sh emits host_class + min_microarch + required_cpu_flags
in every built row (cpu_epyc = epyc-znver4/x86-64-v4; cpu_zen1 =
zen1-avx2/x86-64-v3; cuda_sm86 = gpu-sm86/x86-64-v2);
scripts/engine-install.sh reads those fields from the artifact’s
manifest sidecar and refuses a host that lacks the flags with the typed
incompatible_host_class reason (blue is Zen 1 — a znver4 artifact is
refused, not SIGILLed; ZERG_ENGINE_CPUINFO overrides the flags source
for tests);
the CPU lane binds cpu_zen1 (the Zen-1-safe class); cpu_epyc stays
registered as the Zen 4 CPU-host target;
artifacts are self-contained: the rpath includes $ORIGIN (this
llama.cpp installs its .so set into bin/, not lib/) and
scripts/engines/stage-runtime-libs.sh bundles the CUDA runtime
(libcudart/libcublas/libcublasLt) + libgomp into bin/ for
production builds (refusing when a required lib is missing), so a bare
host/container without the toolkit can run the engine;
the model catalog row is no longer a prerequisite for a lane start: when
discovery has no row, sol_registry synthesizes one from the lane’s
files.model manifest (weights path + declared pin.sha256 enforced
when it is a real digest) — a lane can still never start weights it does
not declare.
8. Non-llama engines: the Strata lane
The engine abstraction admits a non-llama runtime without changing the
llama path. sol_lane_registry engine kind strata binds a packaged
wrapper instead of bin/llama-server, and sol_lane_profile:engine_command/1
returns a style tag (llama | strata) that selects the argv contract:
Llama (unchanged): engine_command/1 → bin/llama-server, argv from
the ?LLAMA_FLAGS allowlist (build_command/1 is byte-identical).
Strata: engine_command/1 → <root>/<build>/<launcher> (default
bin/strata-server; a command spec [Executable | StaticArgs] is also
accepted), argv --config <template> --port N --host H [--model GGUF] [--ctx N]. lane_config/3 emits only the wrapper surface (config path,
effective ctx, slot cap, loading budget); the llama KV/FA/rope/MTP laws
do not apply to a strata lane.
Engine row keys (sys.config, owned by the catalogue):
strata_sm86 => #{kind => strata, class => gpu_3090, production => false,
ref => <<"Niko1221/Strata@296b59d2f73c8f04a805df29c2fa97655adace78">>,
build => <<"0.1.44.1">>,
launcher => <<"bin/strata-server">>,
runtime => <<"python3 / lib/strata/runtime">>,
config_template => <<"lib/strata/config/strata-coder-256k-batch4.json">>,
engine_version => <<"0.1.44.1">>,
health_path => <<"/health">>}
The installer canary is built from the manifest’s unit-relative
launcher + config_template inside the verified tree. The artifact
sidecar is DATA, not an execution authority: it is not covered by the
artifact signature or the bin/+lib/ tree hash, so an artifact
carrying a canary_cmd field is REFUSED rather than executed.
The lane row names its weights (files.model) and context as usual; the
wrapper maps --model onto the template’s --native argument and --ctx
onto --max-context. The standardized 256k/batch4/MTP/int8 template ships
in scripts/engines/strata-coder-256k-batch4.json; ${STRATA_DATA_DIR} /
${STRATA_MODEL_DIR} are supplied by the engine row’s env (defaults
/fun/models/strata and /fun/models/strata/gguf-coder).
Packaging (scripts/engines/build-strata.sh, reached through
build.sh --class strata_sm86) stages one bin/+lib/ unit:
bin/strata engine binary (pinned source)
bin/libstrata_kq.so K-quant library next to the engine
bin/strata-server wrapper (renders the template, execs the server)
lib/strata/serve/ Python OpenAI/Anthropic server
lib/strata/tools/ strata_tokenizer.py
lib/strata/config/ standardized config template
lib/strata/runtime/ optional pinned Python runtime
build-strata.sh verifies the source pin exactly like build.sh --ref
(HEAD == ref, clean tree), records source_verified/source_head, the
engine binary sha256 and engine_version, and emits a deterministic
strata-<build>.tar.gz + manifest. engines/strata_sm86.json is the
reference row (production=false, state=reference) until the zerg
certification rows and the hermetic runtime image land; the Python runtime
is source-local (STRATA_PYTHON / lib/strata/runtime/bin/python /
python3, pinned requirements) with the hermetic --runtime DIR successor
documented in the packaged runtime README. The reference build also expects
the host CUDA 13 runtime (libcudart/libcublas/libcublasLt) — bundling
those plus the Python runtime is the hermetic-image successor, not a
production claim of this pass.
Health and stop: the wrapper stays alive as the lane identity anchor
(argv carries the wrapper path, --model and the --port pair the lease
reaper matches) and waits on the Python server with a TERM trap. Sol’s
{group, 0} + kill_group exec seam signals the wrapper, the Python
server and the Strata engine tree together; /health is the probe (the
engine row’s health_path must be an absolute HTTP path). The installer/rollback detect the class from the
manifest/receipt (engine=strata or strata*), run
bin/strata-server --canary (mock engine — wrapper/template/runtime/health
proof without a GPU or model load), poll the declared path, and keep the
provenance row beside the installed tree (.zerg-engine-manifest.json).
No production flag flips until the zerg-side validation rows exist.
9. Catalogue provenance at (GSQ-RCO Coder / Strata)
The catalogue half records the P7 b11639 / Strata / GSQ-RCO facts:
the llama.cpp production rows (cuda_sm86_main, cpu_zen1, cpu_epyc)
are pinned to b11639 =
ggml-org/llama.cpp@a0e6dc7384edb8f5d927155e1d26c10b4a310e6d;
the strata_sm86 engine row (kind => strata, production => false) pins
Strata 0.1.44.1 =
Niko1221/Strata@296b59d2f73c8f04a805df29c2fa97655adace78;
the GSQ-RCO Coder pin
(ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-Coder-GGUF @
5348543e0147355ac9cbcb031184a3546350988e) is registered on both
engines: qwen38_gsq_coder (Strata, staged) and
qwen38_gsq_coder_llama (b11639, local but production => false).
Ghost provenance is frozen at P7 tag p7-strata-b11639-2026-10-18
(plan/fixtures/ghost-p7-standard-b0454f2.md): engine pins at
ghost/etc/model-pins.env:42 (llama.cpp), :47 (Strata) and :48
(GSQ-RCO). The benchmark rows for the two new lanes are origin=ghost
only; the zerg-side validation run is and remains pending, and
the two ghost gates (mmproj formal caption A/B; code/agentic tool-call
JSON spot-check) remain open. No default is flipped; both rows stay
production=false.
10. Bundle consumer for standalone / air-gap editor hosts
The engine lane’s distribution unit is also the standalone consumer unit.
scripts/engine-bundle-consumer.sh verifies a bundle fail-closed, checks
the host class, and delegates the atomic install/flip/receipt and rollback
to engine-install.sh / engine-rollback.sh — there is no Sol and no lane
registry in this path. The bundle is the artifact triple plus optional
signature/receipt:
<artifact>.tar.gz + .sha256 + .manifest.json (+ .minisig, bundle-receipt.json)
verify always checks sha256, the manifest build/class and a real
64-hex manifest_hash (the unverified placeholder is refused), and an
optional bundle-receipt.json (artifact/sha/build/manifest-hash
equality). Minisign is required by default; --allow-unsigned is the
loud fixture/local waiver, and a present-but-invalid signature is always
a refusal.
install/upgrade run the packaged canary, keep the previous build for
rollback, and write <root>/installed.json +
<root>/bundle-consumer.json (source, artifact sha256, manifest hash,
host class, previous build).
rollback re-verifies the candidate receipt against a freshly computed
tree hash and re-probes it before the current flip.
Host class: engine-install.sh still owns the per-target refusal
(incompatible_host_class, e.g. a cpu_zen1 host refusing a
cpu_epyc/AVX-512 artifact, ); the consumer adds
--host-class CLASS as an install-time expectation
(host_class_mismatch). Roots are host-checked as well: absolute paths,
system roots refused without ZERG_ENGINE_ALLOW_SYSTEM_ROOT=1.
fetch is the only network leg and is an explicit operator action
(--url), accepted over https or loopback http; side-loading the bundle
directory is the air-gap path. The editor/completion path never fetches.
Ownership split (standing): wild owns CD — images, builds, bundle
production and publishing. zerg owns the bundle format, this consumer
recipe, verification semantics and the operator docs. A wild change to the
artifact triple must update this contract and its fixture battery
(tests/test_engine_bundle_consumer.py).
Operator recipe: docs/local-inference-runbook.md
§11; air-gap acceptance transcript:
plan/standalone-airgap-acceptance.md.