Files
leleka/.github/workflows/port.yml
T
Pavlo Ratushnyi 40896ba217 STRA-338 S24: peel the pure host-side models out of cuda-driver into leleka-cuda-model
New L1 crate crates/cuda-model (leleka-cuda-model, forbid(unsafe_code), depends on leleka-context only) holds:
Error/Result with Display, DenseFormat, RoutedFormat, ProjectionKind (+ layout/alignment/required_modes), ProjectionSpec,
the Bf16/Q5K/Q6K projection shapes, bringup_trace_enabled, and the modules serving_context, host_profile, command_profile,
original_mtp_loader, original_prefill_schedule, qsa_prompt_attention_select, original_expert_slots, native_flash_attn,
s_gemv_legacy, device_arena, mmq_original_prefill_misc (moved with git mv; code unchanged apart from pub visibility and
#[inline] on the tiny cached-switch readers, host_profile::add split into an inlined gate and a cold body).

leleka-cuda-driver re-exports every item at its old path, so no use path in the driver, engine-qwen35-cuda or
native-parity-bench changes. Tests moved with their modules; they read the .cu sources and oracle fixtures of the driver
through driver_source!; the one loader test that needs the driver's session geometry stays in the driver.

Housekeeping: workspace members/default-members, Cargo.lock, architecture.json (L1), hexagonal.md, ci-coverage.json,
check-local.sh, port.yml, linux-tests/run.sh, AGENTS.md. architecture-baseline.json: the source ratchets of the moved code
change crate key (dyn-trait driver 56 to 49 + model 3, env-read 72 to 67 + 5, process-global 110 to 99 + 11), regenerated
with --allow-increase for the new keys only; per-pattern totals do not rise. limits-baseline.json is unchanged: no moved
function is over a limit.
2026-11-07 17:40:24 +01:00

111 lines
5.7 KiB
YAML

name: Rust port
# Checks for the Rust port of the Original engine (docs/port-status.md). Everything here runs without a GPU, model
# weights or tokens. The existing "Linux" workflow is unchanged; the jobs below add the port-specific gates:
# port-fast fmt, Clippy and tests on the host-buildable crates (scripts/check-local.sh --fast)
# port-typecheck Linux-only crates (cuda-driver with the cuda-driver feature, leleka-runtime) type-checked, not run
# port-oracles CPU oracle differentials against the unmodified Python tools (needs pip and a pinned llama.cpp gguf-py)
# port-linux-tests Docker Linux harness (scripts/linux-tests/run.sh); optional until branch claude/port-linux-tests merges
# Type-checking is not execution: nothing here runs the Linux-gated tests or any GPU smoke.
on:
push:
branches: [main, 'claude/port-*']
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: never
RUST_BACKTRACE: '1'
jobs:
port-fast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake python3
- name: Install pinned Rust
run: scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
- name: Fast path (fmt, Clippy, tests on host-buildable crates)
# Known fmt/Clippy debt in leleka-model-format and the Linux-only crates is reported as warnings;
# set STRICT_DEBT=1 to make it fatal once the owners have cleaned it up.
run: scripts/check-local.sh --fast
port-typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake python3
- name: Install pinned Rust
run: scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy --target x86_64-unknown-linux-gnu
- name: Type-check the Linux-gated crates (no tests are run)
run: >-
cargo check --locked --target x86_64-unknown-linux-gnu --all-targets
-p leleka-cuda-model -p leleka-cuda-driver --features cuda-driver -p leleka-engine-qwen35-cuda -p leleka-runtime
- name: Format and Clippy debt report for the Linux-only crates (informational)
continue-on-error: true
run: |
cargo fmt -p leleka-cuda-model -p leleka-cuda-driver -p leleka-engine-qwen35-cuda -p leleka-native-cpu-expert --check
cargo clippy --locked --target x86_64-unknown-linux-gnu --no-deps -p leleka-cuda-model -p leleka-cuda-driver --features cuda-driver -p leleka-engine-qwen35-cuda -p leleka-runtime --all-targets -- -D warnings
port-oracles:
# CPU oracle differentials: the Rust side against the UNMODIFIED Python tools (docs/offline-port.md) and the
# sampler host shim. Optional until it has run green on the hosted runner; the committed goldens are replayed by
# port-fast regardless.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake git python3 python3-venv
- name: Install pinned Rust
run: scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
- name: Oracle Python environment (no model data)
run: |
python3 -m venv "$RUNNER_TEMP/oracle-venv"
"$RUNNER_TEMP/oracle-venv/bin/pip" install --disable-pip-version-check numpy==2.5.4 PyYAML==6.0.3 tqdm==4.70.1 Jinja2==3.1.6 regex==2026.9.10
- name: Fetch the pinned llama.cpp gguf-py
run: |
commit="$(sed -n 's/^LLAMA_CPP_COMMIT = "\(.*\)"$/\1/p' engine/strata/setup.py)"
test -n "$commit"
git init -q "$RUNNER_TEMP/llama.cpp"
git -C "$RUNNER_TEMP/llama.cpp" fetch --depth 1 https://github.com/ggml-org/llama.cpp "$commit"
git -C "$RUNNER_TEMP/llama.cpp" checkout -q FETCH_HEAD
- name: Port oracles (sampler shim and live Python differentials)
env:
OFFLINE_ORACLE_PYTHON: ${{ runner.temp }}/oracle-venv/bin/python
STRATA_GGUF_PY: ${{ runner.temp }}/llama.cpp/gguf-py
SKIP_LINUX_TYPECHECK: '1'
run: scripts/check-local.sh --port
port-linux-tests:
# Docker Linux harness that runs the Linux-gated tests of leleka-cuda-driver and leleka-runtime (mock driver, no
# GPU). The script is created on branch claude/port-linux-tests; until it is merged this job reports "absent"
# and stays green. Optional: a failure does not block the other jobs.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- id: present
run: |
if [ -x scripts/linux-tests/run.sh ]; then
echo 'present=true' >> "$GITHUB_OUTPUT"
else
echo 'present=false' >> "$GITHUB_OUTPUT"
echo 'scripts/linux-tests/run.sh is absent (branch claude/port-linux-tests is not merged); skipping'
fi
- name: Install Docker
if: steps.present.outputs.present == 'true'
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io
- name: Linux test harness
if: steps.present.outputs.present == 'true'
run: scripts/linux-tests/run.sh
- name: Fake-libcuda mock gates (CPU-only ELF protocol tests of the driver)
if: steps.present.outputs.present == 'true'
run: scripts/linux-tests/run.sh --mocks