Files
engine/hanzo.yml
11951ef59d
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
Hanzo CI/CD / test-amd64 (push) Successful in 6m42s
Hanzo CI/CD / cicd (push) Successful in 1m1s
Hanzo CI/CD / verify (push) Skipped
CI/CD / cicd (push) Successful in 7m50s
fix(server-core, router): scope stored Responses to the caller's org; salt replicas' prefix caches per org (#126)
The Responses API's stored responses, conversation histories and background
tasks were keyed by response ID alone, so GET, DELETE, cancel and
previous_response_id served whoever held an ID. Each entry now belongs to the
org in X-Org-Id and every lookup names the caller's org; another org's ID
answers 404.

hanzo-router passed chat and completions bodies to vLLM with no cache_salt,
so every org shared the replicas' prefix cache. It now sets cache_salt from
x-org-id and the client's own salt, encoded as Hanzo Engine encodes them.

The kv-isolation gate covers both and now builds hanzo-router with its proxy
feature.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-20 02:12:33 -05:00

44 lines
2.1 KiB
YAML

# Canonical CI/CD config for hanzoai/engine — read by the hanzoai/ci reusable
# (.hanzo/workflows/cicd.yml) and by platform.hanzo.ai.
#
# The Zen inference engine: a 23-crate Rust workspace.
#
# The image is declared at the end of this file and built by the build door;
# it is the Dockerfile's one builder. The GPU/FFI/release lanes sit beside it.
#
# `rustup component add rustfmt` first: the toolchain this workflow provisions
# (dtolnay/rust-toolchain@stable) installs the compiler ALONE, so `cargo fmt`
# dies with "'cargo-fmt' is not installed for the toolchain" before reading a
# line of code — a red run that says nothing about the repo. ci.yml buys this
# with `components:` on the toolchain action; the provision step above is not
# ours to configure, so the gate buys it itself. It is idempotent.
#
# The gates are the repo's own (.hanzo/workflows/ci.yml), cheapest first: fmt
# is seconds and catches what needs no compiler, then a full type-check of every
# member. `cargo check` — not `cargo build` — because nothing here consumes a
# binary; the question this gate asks is whether the workspace still compiles.
test:
# Every first-party path is /v1/...; a quoted "/api/" or a joined `}api/`
# outside Markdown (prose that cites third-party APIs) is a regression.
- name: v1-only
run: |
! git grep -nE -e '["(`]/api/' -e "'/api/" -e '}api/' -- ':!*.md' ':!hanzo.yml'
- name: fmt
run: rustup component add rustfmt && cargo fmt --all -- --check
# Prefix-cache tenant isolation: no request decodes against another tenant's KV or against KV no
# forward wrote. A security boundary, so it runs before the workspace-wide check, which a crate
# it does not build could turn red.
- name: kv-isolation
run: cargo test -p hanzo-engine -p hanzo-server-core -p hanzo-router --features hanzo-router/proxy --lib -- kv_isolation tenant::tests
- name: check
run: cargo check --workspace
# Built by the build door, one BuildKit Job per platform.
images:
- name: engine
context: .
dockerfile: Dockerfile
repo: ghcr.io/hanzoai/engine
platforms: [linux/amd64]