//! SP15 Phase 2B Group 1 — trend market should produce ≥70% direction-of-trend.
//! Anchor for: Phase 1+3 (cost + trader teachings).

use crate::synthetic_markets::drift_market;
use crate::harness::{evaluate_policy_on_market, BehavioralResult};

#[test]
#[ignore = "Phase 2B contract — green when Phase 1+3 land"]
fn test_2_2_trend_market_directional() {
    let bars = drift_market(10_000, 0.5, 0.1, 0.25, 42);
    let mut trainer = ();
    let result: BehavioralResult = evaluate_policy_on_market(&mut trainer, &bars[5_000..], 0);

    let long_pct: f32 = result.action_dist.iter()
        .filter(|(k, _)| k.starts_with("long_"))
        .map(|(_, v)| *v)
        .sum();
    assert!(long_pct >= 0.70,
        "test 2.2 FAIL: trend market Long rate = {:.2}, expected >= 0.70 on +drift", long_pct);
}
