Root cause: `option_env!("FOXHUNT_BUILD_VERSION")` in common/build_info.rs
was a compile-time macro tracked by cargo fingerprints (Rust 1.80+). Every
pipeline run with a new tag invalidated `common` → cascading rebuild of all
38 dependent workspace crates, even when zero source files changed.
Fix: replace `option_env!()` with `std::env::var()` (runtime LazyLock). Cargo
no longer tracks the version env var, so `common` only recompiles when its
source actually changes.
Also: skip git checkout when HEAD already matches target SHA (zero mtime
changes), and drop `-x` from git clean to preserve gitignored files.
Expected: ~3.7min → <1min for unchanged-crate rebuilds on warm PVC.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
common
Shared types, error handling, and utilities for the Foxhunt HFT ecosystem.
Key Types
FoxhuntError— unified error enum withResultaliasModelType— canonical ML model enum (10 primary variants)CircuitBreakerTrait— async circuit breaker interfaceTlsProtocolVersion,ClientIdentity— TLS configuration types- Market data types (
Tick,OrderBook) and order types (LimitOrder,MarketOrder)
Modules
model_types— canonicalModelTypeenum re-exported by ml/ and model_loader/resilience—CircuitBreakerTraitasync traittls— TLS types and configurationquestdb— QuestDB client configuration
Usage
use common::{FoxhuntError, ModelType};