Files
leleka/.github/workflows/linux.yml
T
Pavlo Ratushnyi 056ab3d689 Retire the oracles, generators and scripts that only worked against the vendored Strata tree (STRA-406)
The vendored Strata tree engine/strata is removed for good (owner decision 2026-11-23): Leleka never builds or runs it, the vanilla
benchmark builds from its own checkout, the comparison measurements are finished and the CUDA ports are frozen. Everything below
compiled or read that tree, so it cannot run without it and is retired (the tree stays in git history, see third_party/strata/UPSTREAM.md).
Checked-in fixtures, golden JSON, sealed PTX, seal plans and MANIFEST hashes are untouched and keep being replayed by the cargo tests.

Drift guard
- crates/experimental-ref/tests/literal_port.rs: include_str! of the Original .cu files compared with the checked-in experimental ports.

Oracle generators and builders (they compile or extract from the Strata C++/Python sources; their outputs are the checked-in goldens)
- crates/experimental-ref/oracle/gen_{cvec,kv,remote,stream}_golden.{cpp,sh}, gen_seal_additions.py and the cuda_runtime stub they used
- crates/sampler-ref/oracle/build_oracle.sh, gen_fixtures.cpp, gen_sampling_keys.py, stub/ (run_port_host_tests.sh and the fixtures stay)
- crates/serving-policy/oracle/ (build_oracle.sh, gen_{host,cvec,vision}_fixtures.cpp)
- crates/context/tests/rope_plan_golden/gen_* (plan, rope, kv pool)
- crates/engine-core/src/conversation/golden/gen*.{sh,cpp} and stub/
- crates/cuda-driver/oracle/gen_prefill_ring_trace.py and drivers/prefill_ring_trace.cpp (extracted prefill.cpp), check_cu_syntax.sh
- crates/engine-qwen35-cuda/tests/stra161_reference/reference.py (fixtures.json and the Rust constants stay)
- control-plane/tests/golden/gen_goldens.py, scripts/offline/ (Python differentials and golden generators against the Strata Python tools)

Source-compiling CUDA oracles and builders
- scripts/build-cuda-{projection-family,q5,q6,qsa}-oracle.sh with scripts/cuda-{projection-family,q5,q6,qsa}-oracle/ (include the Original .cu; sha256 pins of them)
- scripts/build-original-verify-ptx.sh, scripts/q8/rebuild_quantizer_ptx.sh, scripts/decode-sm120/make_iq_prefix.py (needs engine/strata/include)
- scripts/cuda-stubs/ (check-cu.py and literal_diff.py need the strata headers and the Original sources; the stub headers served only them)
- tools/chain-probe/build.sh, tools/kernel-ab/{cpp,aa.sh,smoke.sh,time_smoke.sh} (the C++ comparator is built from the Strata CPU kernels; verify_manifest.py stays)
- scripts/e2e/codex/speed/verify-hc-down-kernel-microbench-vs-upstream/ (compiles the upstream kernel from the tree)

Engine builds and Python smokes that need the tree
- scripts/build-cpu.sh, scripts/build-static-cuda.sh, scripts/check-keyless-gpu.sh, scripts/test-static-cuda-profile.py (CMake of engine/strata)
- scripts/compare-real-tokenizer.py, scripts/smoke-mtp-pack.py (reads src/core/mtp.cpp and a bench manifest), scripts/prepare-keyless-routing.py and its test
- scripts/smoke-native-pack.py became scripts/native-pack-fixture.py: the synthetic GGUF fixtures the four other smokes import stay, the iq_pack.py oracle comparison goes

Gates and CI
- scripts/check-local.sh: no live Python oracle differentials, no literal_port note, no check-cu, no build-cpu, no retired test scripts
- .github/workflows/linux.yml: the keyless-cuda, static-cuda-package and hosted-cuda-package jobs (they built the engine from the tree) and their dispatch
  inputs, and the two oracle smoke steps; .github/workflows/port.yml: the Python oracle environment and the llama.cpp fetch of port-oracles
  (the sampler host shim still runs)
- limits.json and scripts/check_limits_test.py exclude third_party/strata/ instead of engine/strata/

Documentation and comments: README.md names third_party/strata and the pin; deploy/README.md marks the retired build and smoke commands; comments
in Rust, Python and Markdown that named engine/strata/... now name "Strata 41cf05a0, ..."; the gpu-bringup scratch-copy test no longer copies the
removed include directories. Stale engine/strata paths in sealed .cu, .ptx, seal-plan and MANIFEST files are left as they are (hashes may depend on the bytes).
2026-11-23 21:19:11 +01:00

268 lines
15 KiB
YAML

name: Linux
on:
push:
branches: [main]
tags: ['v*']
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y cmake ninja-build g++ python3-numpy docker.io
- name: Install pinned Rust
run: scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
- name: Local checks
run: scripts/check-local.sh
- name: GPU-hidden fixed PTX assembly
run: scripts/test-cuda-fixed-ptx.sh
linux-static-cli:
permissions:
contents: read
releases: write
needs: verify
runs-on: ubuntu-latest
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/control-plane/target
steps:
- uses: actions/checkout@v4
- name: Install musl toolchain
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y musl-tools cmake binutils python3-numpy docker.io docker-buildx systemd
- name: Install pinned Rust and target
run: |
scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --target x86_64-unknown-linux-musl
- name: Build static CLI
run: cargo build --manifest-path control-plane/Cargo.toml --locked --release --target x86_64-unknown-linux-musl --bin leleka-api
- name: Verify ELF and checksum
run: |
binary=control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
if readelf -l "$binary" | grep -q INTERP; then
echo 'ELF has a dynamic interpreter' >&2
exit 1
fi
if readelf -d "$binary" | grep -q NEEDED; then
echo 'ELF has a dynamic library dependency' >&2
exit 1
fi
"$binary" --version
mkdir -p dist
cp "$binary" dist/leleka-api-linux-x86_64-musl
{
echo "Commit: $GITHUB_SHA"
echo "Workflow: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
rustc --version
cargo --version
musl-gcc --version
readelf --version
} > dist/BUILD-PROVENANCE.txt
{
readelf -h "$binary"
readelf -l "$binary"
readelf -d "$binary"
} > dist/ELF-AUDIT.txt
cd dist
sha256sum leleka-api-linux-x86_64-musl BUILD-PROVENANCE.txt ELF-AUDIT.txt > SHA256SUMS
- name: Static CLI model smoke
run: python3 scripts/smoke-static-cli.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Engine loader probe before model acquisition
run: python3 scripts/smoke-engine-probe.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Explicit GPU profile driver policy without GPU
run: python3 scripts/smoke-gpu-requirement.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Declared GPU memory admission and child UUID pin without GPU
run: python3 scripts/smoke-cuda-memory.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Atomic pinned assets before native serving
run: python3 scripts/smoke-asset-bootstrap.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native fetch prepare serve and verified offline reuse
run: python3 scripts/smoke-native-bootstrap.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native runtime profile metadata admission
run: python3 scripts/smoke-runtime-profile.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native systemd unit syntax and path safety
run: python3 scripts/smoke-service-unit.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native installer with actual isolated systemd user service
run: |
python3 scripts/smoke-systemd-manager.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native deployment configuration without worker launch
run: python3 scripts/smoke-config-check.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native deployment readiness deadline without GPU
run: python3 scripts/smoke-wait-ready.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native API authentication without GPU
run: python3 scripts/smoke-native-auth.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native custom text and regex tools without GPU
run: python3 scripts/smoke-custom-tools.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native auto/none/required/forced tool policy without GPU
run: python3 scripts/smoke-tool-policy.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Live Responses replay and corrupt SSE evidence without GPU
run: PYTHONDONTWRITEBYTECODE=1 python3 scripts/test-live-responses-replay.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Input token count exact GEN wire parity without inference
run: python3 scripts/smoke-input-tokens.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Chat Completions live protocol and wire parity
run: python3 scripts/smoke-chat-completions.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Messages named SSE and tool protocol without GPU
run: python3 scripts/smoke-messages.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: SSE idle keep-alive, terminal parity and disconnect without GPU
run: PYTHONDONTWRITEBYTECODE=1 python3 scripts/smoke-sse-keepalive.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Stored Responses retrieval and deletion without GPU
run: python3 scripts/smoke-response-history.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Durable Responses restart and disk failure gate
run: python3 scripts/smoke-response-history.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api --durable
- name: Native drain and resume without GPU
run: python3 scripts/smoke-native-drain.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native signal shutdown grace without GPU
run: python3 scripts/smoke-signal-drain.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native generation deadline and recovery without GPU
run: python3 scripts/smoke-generation-deadline.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Native queue deadline without expiring active work
run: python3 scripts/smoke-queue-deadline.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Static CLI HTTP cancellation failure isolation
run: python3 scripts/smoke-worker-cancel.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
- name: Static CLI HTTP crash recovery without request replay
run: python3 scripts/smoke-worker-cancel.py control-plane/target/x86_64-unknown-linux-musl/release/leleka-api --restart
- name: Embedded CPU worker packaging without GPU
run: |
musl-gcc -O2 -static scripts/fixtures/embedded-worker.c -o "$RUNNER_TEMP/embedded-worker"
python3 scripts/build-linux-package.py --cpu-fixture --engine "$RUNNER_TEMP/embedded-worker" \
--sha256 "$(sha256sum "$RUNNER_TEMP/embedded-worker" | cut -d ' ' -f 1)" --revision "$GITHUB_SHA" \
--cargo-target-dir control-plane/target --output "$RUNNER_TEMP/combined-fixture"
cd "$RUNNER_TEMP/combined-fixture"
sha256sum -c SHA256SUMS
cd "$GITHUB_WORKSPACE"
python3 scripts/smoke-embedded-engine.py "$RUNNER_TEMP/combined-fixture/leleka-api-linux-x86_64-musl" "$RUNNER_TEMP/embedded-worker"
python3 scripts/smoke-controller-deployment.py "$RUNNER_TEMP/combined-fixture/leleka-api-linux-x86_64-musl"
python3 scripts/build-runtime-image.py --cpu-fixture --package "$RUNNER_TEMP/combined-fixture" \
--receipt-sha256 "$(sha256sum "$RUNNER_TEMP/combined-fixture/SHA256SUMS" | cut -d ' ' -f 1)" \
> "$RUNNER_TEMP/combined-image.json"
python3 scripts/smoke-runtime-image.py "$RUNNER_TEMP/combined-image.json"
rm "$RUNNER_TEMP/embedded-worker"
- name: Remove owned CPU fixture image
if: always()
run: |
receipt="$RUNNER_TEMP/combined-image.json"
if test -s "$receipt"; then
image="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["image"])' "$receipt")"
docker image rm "$image"
rm "$receipt"
fi
- name: Publish exact four-file CLI preview through Gitea
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
python3 scripts/publish-gitea-release.py --api-url https://git.vezha.io/api/v1 \
--repository "$GITHUB_REPOSITORY" --profile cli \
--tag "cli-preview-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" --target "$GITHUB_SHA" \
--title "CLI preview ${GITHUB_RUN_ID}.${GITHUB_RUN_ATTEMPT}" \
--notes 'CLI/control-plane preview. CUDA engine and model files are not included.' --directory dist
linux-cli-container:
needs: verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Docker CLI and verify runner daemon
run: |
command -v docker >/dev/null 2>&1 || { apt-get update -qq; DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker.io; }
docker version
- name: Build actual CLI-only scratch image
run: |
set -euo pipefail
owned_dir="$(mktemp -d "$RUNNER_TEMP/leleka-cli-check-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-XXXXXX")"
image_tag="leleka-cli-check:${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${owned_dir##*-}"
printf '%s\n' "CLI_CHECK_DIR=$owned_dir" "CLI_CHECK_TAG=$image_tag" >> "$GITHUB_ENV"
# The nonce label makes identical builds distinct image configs on the shared daemon.
docker build --file deploy/Dockerfile.static-cli --tag "$image_tag" \
--label "io.leleka.ci.cli-check-owner=$image_tag" --iidfile "$owned_dir/image.iid" .
image="$(cat "$owned_dir/image.iid")"
[[ "$image" =~ ^sha256:[0-9a-f]{64}$ ]]
test "$(docker image inspect --format '{{ index .Config.Labels "io.leleka.ci.cli-check-owner" }}' "$image")" = "$image_tag"
- name: Check isolated CLI container startup and shutdown
run: |
set -euo pipefail
image="$(cat "$CLI_CHECK_DIR/image.iid")"
[[ "$image" =~ ^sha256:[0-9a-f]{64}$ ]]
test "$(docker image inspect --format '{{ index .Config.Labels "io.leleka.ci.cli-check-owner" }}' "$image")" = "$CLI_CHECK_TAG"
python3 scripts/smoke-cli-container.py "$image"
- name: Remove test image
if: always()
run: |
set -euo pipefail
test -n "${CLI_CHECK_DIR:-}" || exit 0
trap 'rm -f -- "$CLI_CHECK_DIR/image.iid"; rmdir -- "$CLI_CHECK_DIR"' EXIT
if test -s "$CLI_CHECK_DIR/image.iid"; then
image="$(cat "$CLI_CHECK_DIR/image.iid")"
else
# A failed build may leave the owned tag without writing an IID receipt.
image="$(docker image inspect --format '{{.Id}}' "$CLI_CHECK_TAG" 2>/dev/null || true)"
fi
test -n "$image" || exit 0
[[ "$image" =~ ^sha256:[0-9a-f]{64}$ ]]
test "$(docker image inspect --format '{{ index .Config.Labels "io.leleka.ci.cli-check-owner" }}' "$image")" = "$CLI_CHECK_TAG"
# No force or parent pruning: cleanup cannot remove other jobs' references or cache.
docker image rm --no-prune "$image"
release-cli:
permissions:
contents: read
releases: write
if: startsWith(github.ref, 'refs/tags/v')
needs: [linux-static-cli, linux-cli-container]
runs-on: ubuntu-latest
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/control-plane/target
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Require the exact gated tag commit
run: test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
- name: Install musl toolchain
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y musl-tools cmake binutils python3
- name: Install pinned Rust and target
run: scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --target x86_64-unknown-linux-musl
- name: Rebuild static CLI at the exact gated tag
run: cargo build --manifest-path control-plane/Cargo.toml --locked --release --target x86_64-unknown-linux-musl --bin leleka-api
- name: Verify ELF and checksum
run: |
binary=control-plane/target/x86_64-unknown-linux-musl/release/leleka-api
if readelf -l "$binary" | grep -q INTERP; then
echo 'ELF has a dynamic interpreter' >&2
exit 1
fi
if readelf -d "$binary" | grep -q NEEDED; then
echo 'ELF has a dynamic library dependency' >&2
exit 1
fi
"$binary" --version
mkdir -p dist
cp "$binary" dist/leleka-api-linux-x86_64-musl
{
echo "Commit: $GITHUB_SHA"
echo "Workflow: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
rustc --version
cargo --version
musl-gcc --version
readelf --version
} > dist/BUILD-PROVENANCE.txt
{
readelf -h "$binary"
readelf -l "$binary"
readelf -d "$binary"
} > dist/ELF-AUDIT.txt
cd dist
sha256sum leleka-api-linux-x86_64-musl BUILD-PROVENANCE.txt ELF-AUDIT.txt > SHA256SUMS
- name: Publish verified tagged CLI preview through Gitea
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
python3 scripts/publish-gitea-release.py --api-url https://git.vezha.io/api/v1 \
--repository "$GITHUB_REPOSITORY" --profile cli --tag "$GITHUB_REF_NAME" --target "$GITHUB_SHA" \
--title "Strata Next ${GITHUB_REF_NAME}" \
--notes 'CLI/control-plane preview rebuilt at the exact tag after CLI and container gates passed. CUDA engine and model files are not included.' \
--directory dist