Add standard signal snapshots#49
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da5c57e1cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| strategy_profile=strategy_runtime.profile, | ||
| execution={ | ||
| **dict(plan.get("execution", {}) or {}), | ||
| "latest_price_source": "firstrade_ohlc_with_live_quote_overlay", |
There was a problem hiding this comment.
Record whether the quote overlay was actually used
When a Firstrade quote lookup fails or returns an unusable quote, build_market_data_port() catches that exception and evaluates the strategy with OHLC history only, but this hard-coded source still records every snapshot as firstrade_ohlc_with_live_quote_overlay. In those fallback runs the JSON result, log line, and Telegram summary all claim a live quote overlay influenced the signal even though it did not, which undermines the snapshot's audit value; the market data adapter needs to expose whether the overlay was applied instead of setting this unconditionally.
Useful? React with 👍 / 👎.
| "latest_price_source": "firstrade_ohlc_with_live_quote_overlay", | ||
| }, | ||
| allocation=plan.get("allocation", {}), | ||
| metadata=getattr(evaluation, "metadata", None), |
There was a problem hiding this comment.
Include decision diagnostics in signal snapshots
For strategies that emit standard indicators in evaluation.decision.diagnostics (for example trend_ma20, trend_rsi14, or blend_gate_volatility_delever_triggered), this call never passes those diagnostics to build_signal_snapshot(). The value-target plan only carries the execution annotation subset, so these indicator fields are silently omitted from signal_snapshot.v1 even though the snapshot helper explicitly supports a diagnostics source; pass the decision diagnostics here as well.
Useful? React with 👍 / 👎.
Summary
Tests