Skip to content

Show strategy plugin load errors in notifications#102

Merged
Pigbibi merged 1 commit into
mainfrom
codex/plugin-error-notice
Jun 18, 2026
Merged

Show strategy plugin load errors in notifications#102
Pigbibi merged 1 commit into
mainfrom
codex/plugin-error-notice

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add localized strategy plugin load-error notification lines
  • map common Python load errors to Chinese/English operator-facing summaries
  • keep raw exception details in execution diagnostics while avoiding mixed-language notification text

Tests

  • PYTHONPATH=/home/ubuntu/Projects/QuantPlatformKit/src pytest -q tests/test_strategy_plugins.py

@Pigbibi Pigbibi merged commit 1a31ddd into main Jun 18, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/plugin-error-notice branch June 18, 2026 09:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e8199d718

ℹ️ 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".

Comment on lines +956 to +960
detail = _compact_strategy_plugin_error(error)
if not detail:
return ""
error_type = detail.split(":", 1)[0].rsplit(".", 1)[-1].strip()
reason_key = f"strategy_plugin_error_reason_{error_type}" if error_type else ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use exception classes for load-error mapping

When callers pass the caught exception object from load_strategy_plugin_signal or parse_strategy_plugin_mounts (for example except ValueError as exc), str(exc) contains only the message, so these lines derive error_type from words in the message rather than from ValueError, JSONDecodeError, FileNotFoundError, etc. In that common exception-object path none of the new localized strategy_plugin_error_reason_* keys match, so Chinese notifications can still include raw English error details instead of the intended operator-facing summary; use type(error).__name__ for BaseException values before falling back to preformatted strings.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant