fix: retain scheduled decision diagnostics
This commit is contained in:
@@ -2997,6 +2997,13 @@ where
|
||||
&mut minute_report.process_events,
|
||||
)?;
|
||||
merge_broker_report(&mut report, minute_report);
|
||||
decision.notes.append(&mut minute_decision.notes);
|
||||
decision
|
||||
.diagnostics
|
||||
.append(&mut minute_decision.diagnostics);
|
||||
decision
|
||||
.risk_decisions
|
||||
.append(&mut minute_decision.risk_decisions);
|
||||
publish_phase_event(
|
||||
&mut self.strategy,
|
||||
&mut self.process_event_bus,
|
||||
@@ -4925,6 +4932,8 @@ mod tests {
|
||||
quantity: 100,
|
||||
reason: rule.name.clone(),
|
||||
}],
|
||||
notes: vec![format!("note:{}", rule.name)],
|
||||
diagnostics: vec![format!("diagnostic:{}", rule.name)],
|
||||
..StrategyDecision::default()
|
||||
})
|
||||
}
|
||||
@@ -5702,6 +5711,14 @@ mod tests {
|
||||
assert_eq!(result.fills[1].price, 10.0);
|
||||
assert_eq!(result.fills[0].reason, "morning");
|
||||
assert_eq!(result.fills[1].reason, "post_close");
|
||||
assert_eq!(
|
||||
result.equity_curve[0].notes,
|
||||
"note:morning | note:post_close"
|
||||
);
|
||||
assert_eq!(
|
||||
result.equity_curve[0].diagnostics,
|
||||
"diagnostic:morning | diagnostic:post_close"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user