Files
foxhunt/crates/common
jgrusewski 6ddcb52825 perf(ci): fix full workspace rebuild — move version from compile-time to runtime
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>
2026-03-11 02:10:20 +01:00
..

common

Shared types, error handling, and utilities for the Foxhunt HFT ecosystem.

Key Types

  • FoxhuntError — unified error enum with Result alias
  • ModelType — canonical ML model enum (10 primary variants)
  • CircuitBreakerTrait — async circuit breaker interface
  • TlsProtocolVersion, ClientIdentity — TLS configuration types
  • Market data types (Tick, OrderBook) and order types (LimitOrder, MarketOrder)

Modules

  • model_types — canonical ModelType enum re-exported by ml/ and model_loader/
  • resilienceCircuitBreakerTrait async trait
  • tls — TLS types and configuration
  • questdb — QuestDB client configuration

Usage

use common::{FoxhuntError, ModelType};