Support strategy plugin notification targets#74
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd2ae0a5e8
ℹ️ 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".
| validate_strategy_plugin_notification_target( | ||
| notification_target=notification_target, | ||
| plugin=plugin, | ||
| source="artifact", | ||
| ) |
There was a problem hiding this comment.
Reject runtime metadata controls on notification targets
For notification-target artifacts, this branch only validates the target and then preserves the artifact's execution_controls; if such an artifact sets strategy_runtime_metadata_allowed: true, build_strategy_plugin_metadata() will still attach its payload under the plugin name, despite the new contract saying notification targets are alert-only and must never attach position controls to a strategy runtime. Please reject or strip runtime-metadata controls for target_type == "notification_target" before returning the signal.
Useful? React with 👍 / 👎.
| target_type = str(getattr(signal, "target_type", None) or "strategy").strip() | ||
| strategy = str(strategy_label or getattr(signal, "strategy", None) or "").strip() | ||
| notification_target = str(getattr(signal, "notification_target", None) or "").strip() | ||
| target_label = strategy or notification_target or "unknown" | ||
| target_name = "Notification target" if target_type == "notification_target" else "Strategy" |
There was a problem hiding this comment.
Prefer notification target labels for target alerts
When an existing caller passes strategy_label while building alerts, notification-target signals are labeled with that strategy instead of their notification_target, so a general market_regime_notification alert can be rendered and recorded as a strategy alert for the caller's current strategy. For target_type == "notification_target", ignore strategy_label/signal.strategy when computing target_label so these general alerts remain scoped to the notification target.
Useful? React with 👍 / 👎.
Summary
Verification