//! Per-leaf sizing policy id. See spec §5.

use serde::{Deserialize, Serialize};

#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum SizingPolicyId {
    /// Per-horizon adaptive Kelly with ISV-driven cap (see spec §5).
    IsvKelly,
    /// Constant lot count regardless of signal magnitude. Useful for
    /// fixture testing and as a baseline sanity check vs IsvKelly.
    FixedLots(u16),
}

/// Host-side mirror of cuda/lob_state.cuh IsvKellyState.
/// Used by the harness for warm-start file I/O + tests.
#[repr(C)]
#[derive(
    Clone, Copy, Debug, Default, bytemuck::Pod, bytemuck::Zeroable, Serialize, Deserialize,
)]
pub struct IsvKellyStateHost {
    pub pnl_ema_win: f32,
    pub pnl_ema_loss: f32,
    pub win_rate_ema: f32,
    pub n_trades_seen: u32,
    pub realised_return_var: f32,
    pub recent_sharpe: f32,
}
