From b442260cc32610c84460aaa9c9d735b5c0d8afa1 Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Thu, 9 Jul 2026 23:29:57 +0800 Subject: [PATCH] feat(telemetry): record platform executions in PerformanceMonitor Wire try_record_platform_execution on rebalance cycle completion so live runs feed QPK drift/performance pipelines (roadmap task 5). Co-Authored-By: Claude Co-authored-by: Cursor --- application/rebalance_service.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/application/rebalance_service.py b/application/rebalance_service.py index 8f8c8d7..4483082 100644 --- a/application/rebalance_service.py +++ b/application/rebalance_service.py @@ -60,6 +60,7 @@ publish_strategy_plugin_alerts as dispatch_strategy_plugin_alerts, ) from quant_platform_kit.strategy_contracts import build_strategy_evaluation_inputs +from quant_platform_kit.strategy_lifecycle.performance_monitor import try_record_platform_execution from runtime_config_support import IBIT_SMART_DCA_PROFILE, PlatformRuntimeSettings, load_platform_runtime_settings from runtime_execution_policy import dca_execution_unsupported_reason, notional_buy_execution_enabled from us_equity_strategies.signals import resolve_external_market_signal_inputs @@ -730,4 +731,16 @@ def log_message(message: str) -> None: else: result["notification_sent"] = False result["notification_suppressed"] = True + try_record_platform_execution( + strategy_runtime.profile, + { + "platform": "firstrade", + "action_done": result.get("action_done"), + "strategy_run_stage": result.get("strategy_run_stage"), + "dry_run_only": settings.dry_run_only, + "submitted_orders": result.get("submitted_orders"), + "skipped_orders": result.get("skipped_orders"), + "error": result.get("error"), + }, + ) return result