fix(cli): thread the resolved pip into wrap_r so real-data runs hit the graph broker
wrap_r hardwired SimBroker::builder(SYNTHETIC_PIP_SIZE); the resolved geometry-sidecar pip reached only the manifest broker label, so every real-data run computed total_pips/max_drawdown at 0.0001 regardless of instrument (GER40 pip=1: inflated 10^4) while the label claimed the real pip. wrap_r now takes pip_size. Real-pip call sites pass the resolved pip: run_signal_r (resolve_run_data reordered before the wrap), run_blueprint_member, and the campaign trace re-run in persist_campaign_traces (instrument_geometry lookup mirroring the run_member refusal — required so the C1 drift alarm compares re-run and nominee at the same pip). Probe-only call sites (param-space and axis probes; metrics discarded) keep SYNTHETIC_PIP_SIZE explicitly. The two golden stitched_total_pips pins in cli_run.rs rescaled by exactly the 10^4 bug factor while n_trades/expectancy_r stayed byte-identical — confirming R metrics were never pip-contaminated. Alternative rejected: dropping pip-denominated metrics from real-data reports — the manifest already stamps the resolved pip, so running the graph at it restores label truthfulness without shrinking the report. Verified: full workspace suite green (0 failed incl. the real-data e2e suite), clippy -D warnings clean. closes #232
This commit is contained in:
@@ -1952,7 +1952,7 @@ fn walkforward_real_e2e_pins_the_exact_current_grade() {
|
||||
assert_eq!(wf["windows"].as_u64(), Some(9), "window count: {grade_line}");
|
||||
// EXACT floats -- the byte-identity anchor the dissolution must preserve.
|
||||
// stitched_total_pips is retained only if the campaign runner keeps the OOS curve.
|
||||
assert_eq!(wf["stitched_total_pips"].as_f64(), Some(-10398606.666650848), "stitched OOS pips: {grade_line}");
|
||||
assert_eq!(wf["stitched_total_pips"].as_f64(), Some(-1039.8606666650755), "stitched OOS pips: {grade_line}");
|
||||
let r = &wf["oos_r"];
|
||||
assert_eq!(r["n_trades"].as_u64(), Some(20681), "pooled OOS trade count: {grade_line}");
|
||||
assert_eq!(r["expectancy_r"].as_f64(), Some(-0.002397100685333715), "pooled OOS expectancy R: {grade_line}");
|
||||
@@ -2119,7 +2119,7 @@ fn walkforward_real_e2e_pins_the_exact_current_plateau_grade() {
|
||||
let wf = &v["walkforward"];
|
||||
assert_eq!(wf["windows"].as_u64(), Some(9), "window count: {grade_line}");
|
||||
// EXACT floats -- the byte-identity anchor a plateau-vs-argmax regression must preserve.
|
||||
assert_eq!(wf["stitched_total_pips"].as_f64(), Some(-9683776.66663749), "stitched OOS pips: {grade_line}");
|
||||
assert_eq!(wf["stitched_total_pips"].as_f64(), Some(-968.3776666637464), "stitched OOS pips: {grade_line}");
|
||||
let r = &wf["oos_r"];
|
||||
assert_eq!(r["n_trades"].as_u64(), Some(20667), "pooled OOS trade count: {grade_line}");
|
||||
assert_eq!(r["expectancy_r"].as_f64(), Some(0.007635120926372627), "pooled OOS expectancy R: {grade_line}");
|
||||
|
||||
Reference in New Issue
Block a user