Consumer acceptance before an image tag moves#
build-runtime-manifest.sh --push publishes candidate-<run-id> after the existing
environment, ancestry, completeness and wrapper-generation gates. It resolves that index
to a SHA-256 reference, runs the declared consumer checks, and promotes those exact index
bytes to the requested tag only when every consumer passes. :latest and workflow
@develop remain the family’s public entry points.
--gates-only runs the existing wrapper and runtime gates, then exits without building,
creating a candidate, running consumer acceptance or promoting a tag. It takes precedence
over publication flags in either order; publishing later still requires full acceptance.
The plan is shared/config/image-consumers.json.
It declares the Linux test platform, timeout, repository branch and argument array for
each check: C++/GStreamer inference, Rust tests, ANThology, both Flutter apps and WebDAV.
Consumers run serially, in disposable containers, against the same immutable digest.
The C++ check uses the existing GCC lane; Clang fuzzing and TSan stay in its normal CI,
whose TSan runtime needs privileged container settings. Rust’s test step fetches its
model and starts Xvfb for the required GPU/GTK checks. Flutter checks prepare the existing
lane environment first, register the mounted Git checkout, and resolve package dependencies.
The app checks use their own helpers to include ANThology or the native plugin package.
These Flutter checks use the VM; browser, native build and packaging lanes stay in CI.
Their own recorded submodules supply their tools; ANThology uses the receipt’s hub
checkout because that library has no hub submodule. Linux containers run as UID 0 so
the SDK and mounted checkout are writable; rootful runs restore the host’s checkout
ownership during cleanup. Rootless runs follow the documented uid/tar policy in
linux-build-basics.md.
Ownership restoration still runs if removing the consumer container times out.
A container-removal or ownership-restoration error keeps the receipt failed.
After each removal attempt, a checked engine query must show the exact name absent. A nonzero
removal result is harmless only when that successful query proves automatic removal already
completed. Partial name matches do not count as the removed container. The same check covers
the temporary ownership container. Both raw statuses and stdout/stderr are appended to the
consumer log before its receipt hash is computed. This proves the engine’s reported state;
it does not independently prove host-process reaping.
The receipt lands at logs/image-acceptance/<run-id>/receipt.json, beside consumer logs.
It records the image digest, platform, clean hub SHA, exact plan hash, consumer SHAs,
recursive submodule status, model/asset lock hashes, resolved Cargo/pub/uv locks and
their contents, exit statuses, log hashes, pull time and check durations. Timeouts keep
a failed receipt with exit status 124 and remove the named test container. A failure
stops the gate before promotion; a failed candidate remains available for diagnosis.
Check an existing immutable image#
Commit the hub tooling first. Each new workspace clones the consumer refs once; an existing workspace must still have clean sources and their recorded submodules. Commands must leave tracked files and submodules unchanged; generated build output and new dependency locks may live in ignored paths. A command that exits successfully but changes tracked sources still produces a failed receipt with those changes recorded.
image=ghcr.io/kataglyphis/kataglyphis_beschleuniger@sha256:<index-digest>
python3 linux/scripts/image-acceptance.py check --image "$image" \
--workspace out/acceptance/manual/consumers --receipt out/acceptance/manual/receipt.json
The engine defaults to NERDCTL_BIN or nerdctl; --engine accepts another compatible
executable. Logs contain the actual consumer output. Each consumer that passes loses its build
outputs at once: a Git clean in its checkout and every submodule removes untracked files only.
Its versioned sources, Git stores and log stay. OxidANT’s build tree alone is 49 GB, and three
runs that kept theirs filled the disk of the next one. A failed consumer keeps its build outputs
for inspection, and --keep-build-outputs keeps the passed ones too.
A consumer whose command exits nonzero runs once more without its build outputs. A GitHub 500 during a dependency download had failed a whole acceptance. The receipt keeps the first attempt with its exit code, duration, log and hash. Changed tracked sources, cleanup errors and timeouts are not retried. A passed receipt is required for:
python3 linux/scripts/image-acceptance.py promote \
--receipt out/acceptance/manual/receipt.json \
--target ghcr.io/kataglyphis/kataglyphis_beschleuniger:latest
Promotion uses GHCR_TOKEN and GITHUB_ACTOR, or the existing Docker GHCR login and
credential helper. Credentials never become command arguments. The target must be in
the source repository. The registry PUT sends the tested raw multi-platform index;
the resulting tag is read back and must match its digest. Before the PUT, promotion
checks that the index contains the tested platform, has no duplicate runtime platforms
and preserves every platform currently published at the target tag. Explicit BuildKit
attestations bound to an included runtime manifest are excluded from platform counts.
Only a registry HTTP 404 permits creating an absent tag; authentication and network
failures stop promotion.
Check an unpublished local FINAL wrapper#
After a normal Linux runtime actually succeeds, preserve its loaded successful producer unit, source/full-preflight receipt and original Android evidence. If systemd has already unloaded that successful producer, recovery additionally requires its sealed canonical storage guardian and a fresh journal query from the current boot. The four ordered manager lifecycle records must bind the same unit, invocation, UID, manager PID, exact driver and successful start/stop jobs. The retained actual process-exit clock remains distinct from the journal finish clock. Runtime creation must fall within that same boot, bounded by the trusted start event’s wall and monotonic clocks. An absent unit alone cannot establish success; an unguarded or previous-boot producer cannot use this recovery path. Run its exact invocation-owned cleanup command and independently prove every owned container absent. A live or failed producer, changed source/worker bytes, missing cleanup, a base/package image or a foreign manifest/config cannot qualify.
Both canonical wheelhouse modes, image and export, retain the same required runtime gates. The unit may use the historical architecture-only name or include its exact default, rocm or nvidia lane; a different lane or architecture refuses. Host-tool identity comes from the complete recorded runtime-worker mapping and its clean pinned checkout. An owned engine wrapper located in another clean checkout must match every selected wrapper companion byte. Missing, duplicate or unsupported mode flags, changed wrapper bytes and a different ownership environment refuse before consumer execution. These transport checks do not replace the actual successful producer, original Android ancestry, complete source proof or cleanup.
An ordinary Android invocation may omit the redundant stage label. In that format the checker requires the exact build-cross-stage.sh --stage android argument array, matching architecture, local image repository, output log directory, a single matching unit and variant flag, literal transport, unpublished successful launch and the complete hash-bound clean source proof. Only the local parsed view gains stage=android; original invocation bytes and their hashes stay unchanged. An existing incorrect stage label still fails, and this inference does not replace the sealed native Android/Media ancestry or prove consumer execution.
Commit the acceptance tooling, then use a fresh workspace and receipt. The bounded host launcher, linux/scripts/launch-local-final.py, installs invocation-owned cleanup before all six consumers and requires a stopped proof with independent container absence. Its explicit scheduling companion launch-normal-runtime.py --serial-smoke preserves the runtime’s same required smoke while reducing concurrent context materialization. The direct runner remains:
python3 linux/scripts/image-acceptance.py check \
--image docker.io/ant-local/webgpu-NAME@sha256:WRAPPER_MANIFEST \
--local-runtime-invocation logs/RUN/invocation.json \
--workspace out/acceptance/local/consumers \
--receipt logs/image-acceptance/LOCAL_RUN/receipt.json
The mode uses the complete canonical consumer list, commands, refs and timeout; only its supported Linux platform may differ. Its lane schemas cover default amd64/arm64/riscv64, ROCm amd64 and NVIDIA amd64/arm64. This schema support and its synthetic fixtures prove no actual execution on another architecture or GPU. Use the ordinary platform-plan command above for a retained non-amd64 plan.
The same consumer runner freezes sources, recursive submodules, data and dependency locks, preserves command statuses/logs and checks tracked-source cleanliness and container/ownership cleanup. Both registry and local runs retain every successful versioned checkout, recursive Git store and log; a passed receipt does not delete those sources. The owner decided the build outputs’ cleanup on 2026-11-27: only untracked files go, after the consumer passed. It uses the checked local digest alias with pull disabled; it never invents a GHCR reference or intercepts a pull. Before alias preparation it verifies the original runtime unit, exact complete source proof, full host-worker closure and original Android receipt hashes, platform, run/app/parent labels and immutable manifest/config. The alias uses the actual source tag and is read back through the shared metadata helper. A fresh post-consumer observation must match before the receipt can pass.
Local receipts use schema 2 and explicit local transport and retain the alias
receipt/hash and both producer/image observations. Keep those files, all versioned consumer
checkouts with their recursive Git stores, all consumer
logs and the original producer/source/parent evidence. Replay uses the same
--local-runtime-invocation, --replay and another fresh workspace; its hub revision,
image, original producer and complete consumer source/lock bindings must match.
The original local image and successful producer evidence must still be available.
Recovered receipts explicitly label the historical guardian observation and bind
its original source, authorization, invocation, seal, cleanup proofs and fresh
journal. Both observations must remain identical across the complete consumer run.
A local receipt cannot authorize registry promotion. The public path rejects local schema/transport/origin fields before any registry access and retains its normal schema-1 immutable GHCR-index and published-platform checks. Local checks do not authenticate supplied receipts, independently reconstruct binary ancestry, prove full binary licences, provider placement or finished GPU-app parity. Those actual checks remain separate obligations.
Copies using the local mode carry image_acceptance_local.py, its
source_ci.common helper and the existing native/source/runtime profile closure
under local-proof/. Required companions fail rather than falling back to another
checkout. Registry mode remains available without loading the local profiles.
The local companion joins strict ty and parameter/return-annotation scans; isolated
mutation fixtures prove both scopes. Receipt validation runs before successful
checkout pruning, so invalid result metadata keeps failed evidence and sources.
Native CI proofs#
linux-arm64-image-acceptance.yml
runs the complete contract on ubuntu-26.04-arm. Apply native-image-proof to a
same-repository pull request that changes this lane, its driver or its proof configuration.
Remove the label after the job starts when later PR updates should not queue another complete
proof; removing it leaves the running attempt active.
After the workflow is on the default branch, workflow_dispatch runs that branch’s
versioned configuration too. The workflow has read-only repository permissions and
publishes evidence; tag promotion remains the separate receipt-gated command above.
shared/config/native-image-proof.json pins
the immutable image index, a full hub commit, the test platform and every consumer’s
revision, recursive submodule state and data-lock hashes. The driver rejects a different
host architecture before preparation, checks out the exact clean tooling separately and
uses that tooling’s full plan with only platform changed. It verifies the source bindings
and checks that the generated commands and timeout are unchanged before consumer work.
The normal host prologue retains its disk admission and cleanup policy.
The native runner must still execute all six consumers successfully. Unit fixtures and mutation controls exercise input, receipt and cleanup refusal; they do not prove real ARM execution, model inference or a working container image. The failed qemu-user attempt below remains preserved as failed; each native attempt supplies its own original receipt.
Each attempt’s native-image-proof-candidate-<run>-<attempt> artifact preserves the
original receipt, platform plan, actual consumer logs and native-job.json with host/source bindings, log hashes and a checked final engine query.
The metadata includes artifact-relative log paths without rewriting paths in the original
receipt. Review both the receipt and job verdict, verify downloaded log hashes and inspect
real tests before promotion. Neither an outer green step nor metadata replaces the receipt.
A failed engine query or a reported remaining container keeps the native job failed.
Preserve a platform-specific plan#
The default consumer plan selects linux/amd64. Generate a retained plan for another supported
Linux platform without rewriting the consumer list, arguments, branches or timeouts:
python3 linux/scripts/image-acceptance.py plan --platform linux/arm64 \
--output logs/image-acceptance/plans/linux-arm64.json
python3 linux/scripts/image-acceptance.py check --image "$image" \
--plan logs/image-acceptance/plans/linux-arm64.json \
--workspace out/acceptance/arm64/consumers --receipt logs/image-acceptance/arm64/receipt.json
plan accepts an optional --plan source and validates it before changing only platform.
It refuses unsupported targets and existing output files. Preserve the generated plan with its
receipt and supply it again for replay. Generating a plan executes no consumer and proves no
platform support; only an actual successful check produces that platform’s acceptance evidence.
Repeat an older acceptance run#
Check out the receipt’s hub_revision, keep that revision’s plan, and use a fresh
workspace. Supply the original digest and receipt:
python3 linux/scripts/image-acceptance.py check --image "$image" \
--replay /path/to/original-receipt.json \
--workspace out/acceptance/replay/consumers --receipt out/acceptance/replay/receipt.json
Replay fetches the recorded consumer SHAs, verifies their recursive pins and data locks, restores the recorded dependency locks and rejects changed resolution. The lock payload and its hash preserve the original UTF-8 bytes, including CRLF line endings. The source commits, registry layers and dependency archives must still be available. Commit and publish dependency branches before consumers pin new shared code; a local commit alone cannot be fetched by a fresh acceptance run.
Evidence and limits#
The plugin-only ROCm proof run 20261109-081137-973f29cc completed on 2026-11-09 from hub
7f97f31c122241a6eea8ba62229bbbc56c00444c. Its amd64 wrapper is
sha256:e9fc824e6129670a06a4e81980676e4d7a1effb3013726f844cd12d5d097c55f; the accepted index is
sha256:4e76aa2a75e104570794be965034bcc3276bb5ba78c98ab863659ed6630ca8de, now at :latest-rocm.
All six default consumers passed on linux/amd64, recorded in
logs/image-acceptance/20261109-081137-973f29cc/receipt.json; the recorded log hashes were
independently matched and a post-run engine query found no container under this run’s exact
name prefix. This run used the earlier helper, before the checked-removal fix described above.
No fresh hardware inference, NVIDIA wrapper or ARM64 consumer receipt is inferred from it.
NVIDIA run 20261110-013045-b0a6f8cb from hub
9f4e6bd2c0d416057224c585d5a34b7abbdb813d published candidate index
sha256:d2df9e170fadc7f2abbc22e004b615a7f8a4f41ee9c810c4f06ad7229ecace70.
Its independently matched remote wrapper children are:
Platform |
Wrapper manifest |
|---|---|
|
|
|
|
All six amd64 consumers passed, with the receipt at
logs/image-acceptance/20261110-013045-b0a6f8cb/receipt.json.
An independent audit matched its log and lock hashes, checked cleanup records and remote
index children, then found every exact test container name absent. The initial ARM attempt
on this same immutable index compiled its first consumer, then failed GoogleTest discovery
with LeakSanitizer’s QEMU fatal error at 2026-11-10T05:58Z. Its failed receipt remains
logs/image-acceptance/20261110-013045-b0a6f8cb-arm64/receipt.json;
diagnosis.
Native ARM run 42781812889, attempt 1 then passed all six consumers
on ubuntu-26.04-arm with the same image, clean producer hub and frozen source snapshots.
The platform plan preserves every original command and timeout. Its original receipt is
logs/image-acceptance/20261110-013045-b0a6f8cb-arm64-native-42781812889-1/receipt.json,
SHA-256 273d04ddb2ad00c0aeada936a969682cb85c14dcaaa002be5b520a08b6469359. The downloaded artifact
native-image-proof-candidate-42781812889-1 (ID 13747964666) matches
sha256:065c3aee5798015d690ff29cbe69215515a585c0af45ca690484bf90dc6ecf1d. The local receipt copy and logs retain
their original bytes; use native-job.json for artifact-relative paths.
The native logs prove 215 C++ tests with no skips and observed AddressSanitizer compile flags, 875 Rust tests with none ignored or filtered, and detector parity checks in both consumers. DNNL is explicitly classified as unavailable on ARM. Flutter reports 164 ANThology tests, 267 OmniAccelerANT tests plus four native-plugin tests, and 122 jotrockenmitlocken tests. WebDavClient’s stable Python has 49 passed / two skipped and a passed benchmark; its advisory free-threaded mode has 50 passed / one skipped and a passed benchmark. These retain the original contract, including advisory profiling. Source/lock/log bindings, twelve checked cleanup records and the final successful empty remote engine query were audited. That recorded query does not establish independent host-process reaping.
After both platform receipts passed, the canonical promotion moved :latest-nvidia at
2026-11-10T09:09:51Z. Independent public readback matched the exact index and both wrapper
children with amd64 and arm64 preserved. Physical NVIDIA inference remains open.
Raw producer evidence stays in logs/test-results/plugin-proof-nvidia-runtime-9f4e6bd2/;
native archive, original logs, receipt audits and publication evidence are retained in
logs/test-results/plugin-proof-nvidia-native-ci-route-20261110/.
The default plan tests linux/amd64; native CI preserves that contract for linux/arm64.
The existing image gates own other architectures; these receipts add no riscv64 consumer claim.
Each receipt identifies the tested platform and pinned consumer scripts. Coverage of each
consumer’s full CI workflow, packaging, camera behavior and physical GPU inference requires
separate checks. The receipts remain unsigned local release evidence.
tests/test-image-acceptance.sh exercises incomplete, failed and mismatched receipts,
timeouts, exact index promotion and replay lock validation. Its registry calls are
doubles; the suite performs no publication.
The cleanup cases also cover ordinary nonzero removal, zero exit with a remaining container,
failed queries, exact names and both ownership/removal failures; eleven mutations prove them.
tests/test-manifest-acceptance.sh checks
the actual manifest path refuses promotion after a failed consumer gate.
tests/test-image-consumer-bootstrap.sh executes the plan’s Flutter commands against
the existing prologue/check drivers, checking Git registration and every package’s
dependency preparation without downloading an SDK or starting browser/native builds.
After a publish, the consumers’ lanes run on it#
Acceptance runs six Linux amd64 checks; the consumers’ arm64, riscv64, Windows, Android, web and
GPU lanes ran on a new image only at their next [ci <lane>] request. On 2026-11-12 five of them
were red with one cause, an image that had moved ahead of them, and nothing had said so (BACKLOG
CON236). Owner decision 2026-11-13: after each publish, every consumer’s lanes run once on it.
linux/scripts/dispatch-consumer-lanes.sh --tag TAG does that through the GitHub CLI.
build-runtime-manifest.sh calls it right after a promotion. The plan is
shared/config/image-consumer-lanes.json: the
consumers that have an on-request.yml, and per published tag the lane words it sends
(:latest the Linux, Android and web lanes and each consumer’s linux-x64.yml; the GPU and
Windows tags their own lanes). A tag without a row dispatches nothing. A dispatch that is refused
makes the script exit 1 after the others were sent and print its command for a run by hand;
build-runtime-manifest.sh then warns and goes on, since the promotion has already happened. --dry-run prints the commands. It needs a gh that may dispatch in
the consumers, which the publishing host’s login is. The Windows images (:winamd64, :winarm64 and
their GPU tags) are published by windows/Build-Buildkit.ps1 -PushRef, which calls the same script
after its final push through Invoke-BkConsumerDispatch (WindowsBuildKit.Common.psm1): Git Bash
at C:\Program Files\Git\usr\bin\bash.exe as a login shell, so that host’s gh and python3 must be on
its PATH. No Git Bash, a ref without a tag or a refused dispatch only warns with the command to
run by hand; the push stands. Tests: linux/scripts/tests/test-dispatch-consumer-lanes.sh, recipes
dispatch-lanes.*; the Windows call windows/scripts/tests/BuildKit.ConsumerDispatch.Tests.ps1.
A promotion error stops before any consumer dispatch, including when the caller tests the function conditionally. The fixture proves this refusal and post-promotion warning policy with stubs; it does not prove live API permissions, consumer execution or which digest those workflows select.
Acceptance invariants#
Rules for consumer acceptance, promotion and the handoffs it checks. Each item is one rule.
Image publication also requires the digest-specific consumer receipt before a public tag moves. This page covers replay and its coverage limits.
Dispatch consumer lanes only after promotion succeeds. A refused post-publish dispatch remains advisory and preserves the completed promotion.
Successful consumers retain their versioned checkouts, recursive Git stores and logs. Safe layer cleanup must not delete them. Their untracked build outputs are removed after they pass.
Working-source copies retain the selected base and exact staged index, including staged gitlinks. An independently checked-out child must not replace that index. Bind actual child trees separately, and keep committed-tree acceptance strict.
Independent Git copies retain configured origin URLs and their order. Local cloning must not replace repository identity. Origin metadata does not authenticate sources or qualify workflows.
Independent source copies wait for the consumer log and recheck clean bytes and independent objects on reuse. Manual promotion also preserves the target’s runtime platforms. An early shell-gate override cannot bypass acceptance.
Native consumer CI pins the image, exact clean tooling and all recursive source snapshots. Its plan changes only platform. Require a matching host and checked cleanup. Job metadata never replaces the original receipt or proves physical GPU inference. Keep transported receipts byte-identical and map downloaded logs through their artifact-relative metadata paths.
--gates-onlyexits before builds, candidate creation and promotion, including when combined with push flags. It provides no consumer acceptance receipt.Explicit local FINAL acceptance retains the complete canonical consumer plan, its own immutable manifest/config and successful producer/source/cleanup bindings before and after checks. Its schema-2 receipt cannot promote a registry tag. Validate receipts before pruning checkouts.
Keep lane-bound runtime identities and exact selected host-worker closures. Image and export wheelhouses retain the same gates, and separately located owned wrappers match every selected companion byte.
A missing Android stage label requires its exact unpublished Android driver, lane, transport and complete source proof. Derive only a local view and preserve the original receipt bytes.
Linux acceptance restores disposable rootful checkout ownership on every exit. Failed container cleanup or ownership restoration cannot produce a passed receipt.
Combined WebGPU media factory acceptance requires native/GIL/FT plus fresh Asyncify and JSPI replay at one exact ORT revision. Partial receipts cannot stand for the combined result.
Six-lane Media command preparation keeps SDK parents for default targets and GPU parents for accelerators. NVIDIA arm64 requires SBSA. Prepared commands do not qualify parent ancestry or authorize a launch.
Default Media launches match the SDK target and recheck exact source and compiler ancestry before shared idle-host admission. Retain the 300 GiB minimum and both required Wasm modes.
NVIDIA amd64 and arm64/SBSA GPU, Media and Android handoffs require the same-target SDK, verified native OCI ancestry, baked CUDA/TensorRT environment and both Media Wasm modes. Carry
nvidia_handoff_profile.pywith the shared export worker and preserve the target suffix on the Android context.Local command seals preserve raw command/cache-capture status and owned cleanup identity. An existing exclusive cleanup must never run again, and marker matches do not confer artifact acceptance.
Require a successful engine query to prove every consumer and ownership-helper container absent. Retain both removal and query statuses and diagnostics, including already-auto-removed containers.
Default runtime handoffs retain the exact Android/source receipt and 300-GiB admission. A local OCI wheel export selects the Android build-host platform. The wrapper keeps the target architecture. Local FINAL binds the same Android receipt and runtime worker closure.
NVIDIA runtime and local FINAL bind the exact same-target stopped Android export, its Media receipt and its OCI index. Preserve the CUDA backend, SBSA selection, amd64 wheel export, target wrapper and 300-GiB admission. FINAL requires these flags as actual systemd environment arguments.