0ef5fcb1c5
Docker / docker-build (map[name:arm64 platform:linux/arm64 runs_on:ubuntu-24.04-arm], map[bake_target:runtime-code-nonroot name:code-nonroot]) (push) Waiting to run
Docker / docker-build (map[name:arm64 platform:linux/arm64 runs_on:ubuntu-24.04-arm], map[bake_target:runtime-code-slim name:code-slim]) (push) Waiting to run
Docker / docker-build (map[name:arm64 platform:linux/arm64 runs_on:ubuntu-24.04-arm], map[bake_target:runtime-code-slim-nonroot name:code-slim-nonroot]) (push) Waiting to run
Docker / docker-build (map[name:arm64 platform:linux/arm64 runs_on:ubuntu-24.04-arm], map[bake_target:runtime-nonroot name:nonroot]) (push) Waiting to run
Docker / docker-build (map[name:arm64 platform:linux/arm64 runs_on:ubuntu-24.04-arm], map[bake_target:runtime-slim name:slim]) (push) Waiting to run
Docker / docker-build (map[name:arm64 platform:linux/arm64 runs_on:ubuntu-24.04-arm], map[bake_target:runtime-slim-nonroot name:slim-nonroot]) (push) Waiting to run
Docker / docker-manifest (map[bake_target:runtime name:]) (push) Blocked by required conditions
Docker / docker-manifest (map[bake_target:runtime-code name:code]) (push) Blocked by required conditions
Docker / docker-manifest (map[bake_target:runtime-code-nonroot name:code-nonroot]) (push) Blocked by required conditions
Docker / docker-manifest (map[bake_target:runtime-code-slim name:code-slim]) (push) Blocked by required conditions
Docker / docker-manifest (map[bake_target:runtime-code-slim-nonroot name:code-slim-nonroot]) (push) Blocked by required conditions
Docker / docker-manifest (map[bake_target:runtime-nonroot name:nonroot]) (push) Blocked by required conditions
Docker / docker-manifest (map[bake_target:runtime-slim name:slim]) (push) Blocked by required conditions
Docker / docker-manifest (map[bake_target:runtime-slim-nonroot name:slim-nonroot]) (push) Blocked by required conditions
Docker / docker-build (map[name:amd64 platform:linux/amd64 runs_on:ubuntu-24.04], map[bake_target:runtime name:]) (push) Waiting to run
Docker / docker-build (map[name:amd64 platform:linux/amd64 runs_on:ubuntu-24.04], map[bake_target:runtime-code name:code]) (push) Waiting to run
Docker / docker-build (map[name:amd64 platform:linux/amd64 runs_on:ubuntu-24.04], map[bake_target:runtime-code-nonroot name:code-nonroot]) (push) Waiting to run
Docker / docker-build (map[name:amd64 platform:linux/amd64 runs_on:ubuntu-24.04], map[bake_target:runtime-code-slim name:code-slim]) (push) Waiting to run
Docker / docker-build (map[name:amd64 platform:linux/amd64 runs_on:ubuntu-24.04], map[bake_target:runtime-code-slim-nonroot name:code-slim-nonroot]) (push) Waiting to run
Docker / docker-build (map[name:amd64 platform:linux/amd64 runs_on:ubuntu-24.04], map[bake_target:runtime-nonroot name:nonroot]) (push) Waiting to run
Docker / docker-build (map[name:amd64 platform:linux/amd64 runs_on:ubuntu-24.04], map[bake_target:runtime-slim name:slim]) (push) Waiting to run
Docker / docker-build (map[name:amd64 platform:linux/amd64 runs_on:ubuntu-24.04], map[bake_target:runtime-slim-nonroot name:slim-nonroot]) (push) Waiting to run
Docker / docker-build (map[name:arm64 platform:linux/arm64 runs_on:ubuntu-24.04-arm], map[bake_target:runtime name:]) (push) Waiting to run
Docker / docker-build (map[name:arm64 platform:linux/arm64 runs_on:ubuntu-24.04-arm], map[bake_target:runtime-code name:code]) (push) Waiting to run
Docker / promote-latest (push) Blocked by required conditions
Init Native E2E / init-native (macos-latest, claude) (push) Waiting to run
Init Native E2E / init-native (macos-latest, codex) (push) Waiting to run
Init Native E2E / init-native (macos-latest, copilot) (push) Waiting to run
Install Native E2E / install-native (macos-latest) (push) Waiting to run
Wrap Native E2E / wrap-native (macos-latest) (push) Waiting to run
Security / Dependency audit (pip-audit) (push) Has been cancelled
Security / CodeQL (javascript-typescript) (push) Has been cancelled
Security / CodeQL (python) (push) Has been cancelled
Security / Secret scan (gitleaks) (push) Has been cancelled
rust / test (ubuntu) (push) Has been cancelled
rust / simulator e2e (macos-latest) (push) Has been cancelled
rust / simulator e2e (ubuntu-latest) (push) Has been cancelled
rust / simulator e2e (windows-latest) (push) Has been cancelled
rust / wheels (aarch64-apple-darwin) (push) Has been cancelled
rust / wheels (x86_64-unknown-linux-gnu) (push) Has been cancelled
rust / wheels (x86_64-apple-darwin) (push) Has been cancelled
rust / audit (push) Has been cancelled
rust / parity (nightly, allowed to fail during Phase 0) (push) Has been cancelled
CI / commitlint (push) Has been skipped
Dev Containers / validate (.devcontainer/devcontainer.json, default) (push) Failing after 0s
Dev Containers / validate (.devcontainer/memory-stack/devcontainer.json, memory-stack) (push) Failing after 0s
Dev Containers / validate-worktree (push) Failing after 0s
CI / changes (push) Failing after 4s
Deploy Documentation / validate (push) Has been skipped
Deploy Documentation / deploy (push) Failing after 1s
Init Native E2E / init-native (ubuntu-latest, claude) (push) Failing after 1s
Init Native E2E / init-native (ubuntu-latest, codex) (push) Failing after 1s
Install Native E2E / install-native (ubuntu-latest) (push) Failing after 1s
OpenCode Plugin / typecheck + build + test (push) Failing after 1s
Init Native E2E / init-native (ubuntu-latest, copilot) (push) Failing after 1s
Release Please / release-please (push) Failing after 1s
Wrap E2E / docker-wrap-e2e (push) Failing after 1s
Wrap Native E2E / wrap-native (ubuntu-latest) (push) Failing after 1s
Init E2E / docker-init-e2e (push) Failing after 4s
Merge Conflicts / merge-conflicts (push) Failing after 4s
CI / lint (push) Has been cancelled
CI / build-wheel (push) Has been cancelled
CI / build-wheel-windows (push) Has been cancelled
CI / prefetch-model (push) Has been cancelled
CI / test-dashboard-ui (push) Has been cancelled
CI / test (1) (push) Has been cancelled
CI / test (2) (push) Has been cancelled
CI / test (3) (push) Has been cancelled
CI / test (4) (push) Has been cancelled
CI / test-extras (push) Has been cancelled
CI / test-agno (push) Has been cancelled
CI / build (push) Has been cancelled
CI / workflow-validation (push) Has been cancelled
CI / docker-native-e2e (push) Has been cancelled
CI / windows-native-wrapper (push) Has been cancelled
CI / macos-native-wrapper (push) Has been cancelled
158 lines
6.6 KiB
Makefile
158 lines
6.6 KiB
Makefile
# Headroom Rust build targets. `just` is not installed on dev boxes; this
|
|
# Makefile is the source of truth and is mirrored by .github/workflows/rust.yml.
|
|
|
|
SHELL := /bin/bash
|
|
CARGO ?= cargo
|
|
MATURIN ?= maturin
|
|
PYTHON ?= python3
|
|
FIXTURES ?= tests/parity/fixtures
|
|
|
|
.PHONY: help test test-parity bench build-proxy build-wheel fmt fmt-check lint clippy clean ci-precheck ci-precheck-rust ci-precheck-python ci-precheck-commitlint install-git-hooks verify-rust-core
|
|
|
|
help:
|
|
@echo "Headroom Rust targets:"
|
|
@echo " make test - cargo test --workspace"
|
|
@echo " make test-parity - maturin develop + parity-run against fixtures"
|
|
@echo " make bench - cargo bench --workspace"
|
|
@echo " make build-proxy - release build + strip headroom-proxy, print size"
|
|
@echo " make build-wheel - release wheel for headroom-py"
|
|
@echo " make verify-rust-core - build + install + import-verify headroom._core"
|
|
@echo " make fmt - cargo fmt --all"
|
|
@echo " make fmt-check - cargo fmt --all -- --check"
|
|
@echo " make lint - cargo clippy --workspace -- -D warnings"
|
|
@echo " make clean - cargo clean"
|
|
@echo ""
|
|
@echo "E2e targets:"
|
|
@echo " make build-e2e-wrap - build the wrap-e2e Docker image"
|
|
@echo " make run-e2e-wrap - build + run the wrap-e2e Docker container"
|
|
@echo ""
|
|
@echo "Pre-push verification (run BEFORE git push to catch CI failures locally):"
|
|
@echo " make ci-precheck - run all CI gates (rust + python + commitlint)"
|
|
@echo " make ci-precheck-rust - cargo fmt --check + clippy + test"
|
|
@echo " make ci-precheck-python - smart_crusher-affected python tests"
|
|
@echo " make ci-precheck-commitlint - lint commits since origin/main"
|
|
@echo " make install-git-hooks - install pre-commit, commit-msg, and pre-push hooks"
|
|
|
|
test:
|
|
$(CARGO) test --workspace
|
|
|
|
test-parity:
|
|
@if [ -z "$$VIRTUAL_ENV" ]; then \
|
|
echo "error: activate a venv first (e.g. source .venv/bin/activate)"; \
|
|
exit 1; \
|
|
fi
|
|
$(MATURIN) develop -m crates/headroom-py/Cargo.toml
|
|
$(CARGO) run -p headroom-parity -- run --fixtures $(FIXTURES)
|
|
|
|
bench:
|
|
$(CARGO) bench --workspace
|
|
|
|
build-proxy:
|
|
$(CARGO) build --release -p headroom-proxy
|
|
@BIN=target/release/headroom-proxy; \
|
|
if command -v strip >/dev/null 2>&1; then strip "$$BIN" || true; fi; \
|
|
SIZE=$$(wc -c < "$$BIN"); \
|
|
printf 'headroom-proxy: %s bytes (%.1f MiB)\n' "$$SIZE" "$$(echo "$$SIZE / 1048576" | bc -l)"
|
|
|
|
build-wheel:
|
|
$(MATURIN) build --release -m crates/headroom-py/Cargo.toml
|
|
|
|
# Hotfix-A0: maturin-develop + symlink + import-verify in one shot. Run this
|
|
# any time you suspect the proxy is silently falling back to Python-only
|
|
# mode (Finding #2 in HEADROOM_PROXY_LOG_FINDINGS_2026_05_03.md). The
|
|
# proxy itself runs the same check at lifespan startup; this target
|
|
# exposes it as a developer-facing one-liner.
|
|
verify-rust-core:
|
|
@if [ -z "$$VIRTUAL_ENV" ]; then \
|
|
echo "error: activate a venv first (e.g. source .venv/bin/activate)"; \
|
|
exit 1; \
|
|
fi
|
|
bash scripts/build_rust_extension.sh
|
|
|
|
fmt:
|
|
$(CARGO) fmt --all
|
|
|
|
fmt-check:
|
|
$(CARGO) fmt --all -- --check
|
|
|
|
clippy lint:
|
|
$(CARGO) clippy --workspace -- -D warnings
|
|
|
|
clean:
|
|
$(CARGO) clean
|
|
|
|
# ─── Pre-push CI gate ──────────────────────────────────────────────────────
|
|
#
|
|
# These targets run the same checks GitHub Actions runs, locally. The intent
|
|
# is: if `make ci-precheck` is green, `git push` will not turn red. The
|
|
# 2026-04-27 push surfaced five CI breaks (cargo fmt drift, x86_64-apple-
|
|
# darwin wheel, headroom._core not built in test-extras + smoke-test,
|
|
# commitlint footer-leading-blank). The first three are caught by the gates
|
|
# below; the last two are caught by the workflow fixes themselves.
|
|
#
|
|
# Run before EVERY `git push`. Install the git hook (one-time) with:
|
|
# make install-git-hooks
|
|
|
|
ci-precheck: ci-precheck-rust ci-precheck-python ci-precheck-commitlint
|
|
@echo ""
|
|
@echo "✅ ci-precheck PASSED — safe to push."
|
|
|
|
ci-precheck-rust:
|
|
@echo "── ci-precheck-rust ────────────────────────────────────────────"
|
|
$(CARGO) fmt --all -- --check
|
|
$(CARGO) clippy --workspace -- -D warnings
|
|
$(CARGO) test --workspace
|
|
|
|
# Mirrors the smart_crusher-affected test files we expect green on every
|
|
# push. Builds the Rust extension first because most of these tests
|
|
# instantiate `SmartCrusher`, which hard-imports `headroom._core`.
|
|
ci-precheck-python:
|
|
@echo "── ci-precheck-python ─────────────────────────────────────────"
|
|
@if [ -z "$$VIRTUAL_ENV" ]; then \
|
|
echo "error: activate a venv first (e.g. source .venv/bin/activate)"; \
|
|
exit 1; \
|
|
fi
|
|
bash scripts/build_rust_extension.sh
|
|
$(PYTHON) -m pytest -q \
|
|
tests/test_transforms/test_smart_crusher_bugs.py \
|
|
tests/test_transforms/test_smart_crusher_rust_parity.py \
|
|
tests/test_transforms/test_diff_compressor.py \
|
|
tests/test_transforms/test_diff_compressor_rust_parity.py \
|
|
tests/test_relevance.py \
|
|
tests/test_relevance_extra.py \
|
|
tests/test_ccr.py \
|
|
tests/test_acceptance.py \
|
|
tests/test_critical_fixes.py \
|
|
tests/test_quality_retention.py \
|
|
tests/test_toin_integration.py
|
|
|
|
# Lint commits since `origin/main`. Requires npx (Node 18+) on PATH.
|
|
ci-precheck-commitlint:
|
|
@echo "── ci-precheck-commitlint ─────────────────────────────────────"
|
|
@if ! command -v npx >/dev/null 2>&1; then \
|
|
echo "error: npx not on PATH (install Node 18+ to enable commitlint checks)"; \
|
|
exit 1; \
|
|
fi
|
|
@if ! git rev-parse --verify origin/main >/dev/null 2>&1; then \
|
|
echo "error: origin/main not fetched (run 'git fetch origin main')"; \
|
|
exit 1; \
|
|
fi
|
|
npx --yes --package=@commitlint/cli --package=@commitlint/config-conventional -- \
|
|
commitlint --from origin/main --to HEAD --config .commitlintrc.json
|
|
|
|
install-git-hooks:
|
|
@scripts/install-git-hooks.sh
|
|
|
|
# ─── E2e Docker targets ────────────────────────────────────────────────────
|
|
#
|
|
# The wrap-e2e Dockerfile uses manylinux_2_28_x86_64 as its builder stage,
|
|
# which only ships amd64 binaries. Pass --platform linux/amd64 explicitly
|
|
# so the build works on Apple Silicon (requires QEMU emulation). On native
|
|
# x86_64 hosts the flag is harmless and matches CI behaviour.
|
|
|
|
build-e2e-wrap:
|
|
docker build --platform linux/amd64 -f e2e/wrap/Dockerfile -t headroom-wrap-e2e .
|
|
|
|
run-e2e-wrap: build-e2e-wrap
|
|
docker run --rm headroom-wrap-e2e
|