Skip to main content

Development, Hardware Tests, and Releasing

Toolchain​

Rust is pinned in rust-toolchain.toml (update it only in a dedicated commit). Native build dependencies live in the checked-in Mamba environment:

mamba env create --file environment.yml
mamba activate xprobe-dev
just build
just test

xprobe-dev provides Clang, CMake, Ninja, pkg-config, Just, Python, perf, py-spy, and the autotools needed for vendored libbpf/libelf/zlib (a system C compiler and Linux UAPI headers are also needed). CUDA is not installed in xprobe-dev; CI builds CUDA 12 and 13 Agents in pinned NVIDIA devel images, checks SONAMEs, and rejects build-time RPATHs. Local GPU tests run through Docker + NVIDIA Container Toolkit.

Test recipes​

Run just --list for the complete list. Key suites:

RecipeWhat it testsNotes
just testRust unit/integration tests, CTest, CLI/Skill checks, analyze_trace.py fixturesOffline, no GPU
just lint-commitsEmoji conventional commits ≤ 72 chars; bodies wrap at 80Checks origin/master..HEAD
just test-agent-contractPublic CLI shape, 26 schemas, Skill links/flags/fields, analyzer fixturesRun after CLI/schema/docs/Skill edits
just test-skill-installReal npx skills copy into isolated Codex, Claude Code, and Cursor homesNeeds Node.js
just test-installArchive install/uninstall, GLIBC_2.34 check, wheel/SBOM checksOffline
just test-bpfCompiles BPF objects without attachingOffline
just test-bpf-liveLive uprobe, syscall, tracepoint, CPython GC USDT, syscall aggregateDocker (minimal capabilities, no --privileged)
just test-cpu-liveLive CPU sampling (native + CPython 3.12+ -X perf)Host with perf permission
just test-python-sample-liveExternal CPython 3.9–3.14 stack/GIL/native-wait samplerHost/container with ptrace access
just gpu-smokeDocker + NVIDIA runtime check (pinned CUDA 13.3 base image)Needs GPU
just test-cupti-live / -cuda12 / -cuda12-minLive CUPTI ABI, kernel/memcpy/memset, and CUDA 12.0 min-compatPinned CUDA 13.3 / 12.9 / 12.0 images
just test-nvtx-live / -cuda12Startup NVTX injection, nested/process ranges, truncation, logical stop reusePinned CUDA 13 / 12 images
just test-injection-live / -cuda12Live ptrace injection, stop, and reactivation twiceAdds SYS_PTRACE, no --privileged
just test-multisource-live / -cuda12Combined host uprobe + CUPTI capture and repeated ARM/STOPNeeds GPU + BPF
just test-trigger-liveRing capture for idle, stream gap, duration, and latency triggersNeeds GPU
just test-pytorch-symbolsReal CPython / native extension / libtorch C++ symbol resolutionSet PYTORCH_PYTHON
just test-pytorch-live / test-pytorch-cuda-live / test-triage-liveLive PyTorch eager, compiled Triton, transfers, NVTX, and triageUses pinned PyTorch image or PYTORCH_ENV

Container rules for live tests​

  • Pin concrete image tags and digests in justfile; never use floating latest.
  • Mount the workspace read-only and compile fixtures in container-local temp directories.
  • Grant only the minimum capabilities a test needs (SYS_PTRACE for injection; BPF/PERFMON/SYS_ADMIN/SYS_RESOURCE for eBPF); never use --privileged.
  • Keep target and collector in the same container PID and mount namespaces.
  • CUDA fixtures query the actual GPU compute capability and compile matching SASS to avoid PTX JIT skew.

Releasing​

Work on a feature or fix branch, rebase-merge into master, then tag the merged commit:

  1. Bump versions: update Cargo.toml, CMakeLists.txt, install.sh, and versioned links in README.md, docs/installation.md, and docs/agent-integration.md. Verify with just test-agent-contract. Pre-releases use X.Y.Z-dev.N (PEP 440 X.Y.Z.devN for PyPI wheels).
  2. Run the full live hardware suite:
    mamba env create --file environment-pytorch.yml
    PYTORCH_ENV="$(mamba run -n xprobe-pytorch python -c 'import sys; print(sys.prefix)')" \
    just test-release-live
  3. Package and test locally (CUDA 12 + CUDA 13 Agents):
    CUDA_PATH=/opt/cuda-12 cmake -S . -B build/cuda12 -G Ninja \
    -DXPROBE_BUILD_BPF=OFF -DXPROBE_REQUIRE_CUPTI=ON -DXPROBE_CUDA_MAJOR=12
    cmake --build build/cuda12 --target xprobe-cupti

    CUDA_PATH=/opt/cuda-13 cmake -S . -B build/cuda13 -G Ninja \
    -DXPROBE_BUILD_BPF=OFF -DXPROBE_REQUIRE_CUPTI=ON -DXPROBE_CUDA_MAJOR=13
    cmake --build build/cuda13 --target xprobe-cupti

    scripts/package-release.sh
    tests/install/test_install.sh dist/xprobe-*-linux-x86_64.tar.gz
    On tag push, CI rebuilds both Agents on Ubuntu 22.04 with a GLIBC_2.34 ceiling, attests the archive + SPDX SBOM, publishes GitHub Releases, and publishes the wheel via PyPI OIDC.
  4. Verify the public release:
    scripts/verify-public-release.sh X.Y.Z
    Downloads the public archive and checksum, checks the SBOM, repeats the installation test, and inspects every shipped ELF against the GLIBC_2.34 ceiling.