[codex] Humanize plugin alert messages#99
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84443f864f
ℹ️ 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".
| log_record = payload.get("log_record") | ||
| if isinstance(log_record, Mapping): | ||
| reason_codes = log_record.get("reason_codes") |
There was a problem hiding this comment.
Honor top-level reason_codes in alert summaries
When a plugin artifact supplies machine reason_codes at the top level (the runtime contract lists them alongside canonical_route and suggested_action), this new fallback never reads them; it only checks log_record.reason_codes and position_control.reason_codes. Those alerts will say no explicit reason provided, so operators lose the trigger reason unless the artifact duplicates the codes into one of these nested sections. Please check payload.get("reason_codes") before the nested fallbacks.
Useful? React with 👍 / 👎.
Summary
market_regime_notificationas a user-facing unified market-regime notification targetValidation
PYTHONPATH=src python -m pytest tests/test_strategy_plugins.pygit diff --check