Skip to content

Add SMS channel for crisis alerts#33

Merged
Pigbibi merged 1 commit into
mainfrom
add-crisis-alert-sms-channel
May 25, 2026
Merged

Add SMS channel for crisis alerts#33
Pigbibi merged 1 commit into
mainfrom
add-crisis-alert-sms-channel

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • wire strategy plugin crisis alerts to the new QuantPlatformKit SMS channel
  • add CRISIS_ALERT_SMS_* runtime settings and Cloud Run env sync support
  • bump QuantPlatformKit to d43800180aae1c7fe7051496a6af5d76f2c65879

Tests

  • PYTHONPATH=../QuantPlatformKit/src:../UsEquityStrategies/src:. .venv/bin/python -m pytest tests/test_runtime_config_support.py tests/test_rebalance_service.py tests/test_sync_cloud_run_env_workflow.py
  • ruff check .

@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: 4c28d9a8f4

ℹ️ 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 +291 to +295
sms_result = publish_strategy_plugin_sms_alerts(
signals,
sms_settings=settings,
translator=translator,
strategy_label=settings.strategy_profile,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Isolate SMS failures from email alert reporting

Publishing email and SMS alerts in a single call path means an exception from publish_strategy_plugin_sms_alerts aborts publish_strategy_plugin_alerts after email may already have been sent, and run_strategy_cycle then falls back to zero counts with strategy_plugin_alert_email_error. In environments where SMS credentials are missing or the SMS provider errors, this produces incorrect email telemetry and mislabels the failure channel, which can hide real deliveries and mislead incident response.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi force-pushed the add-crisis-alert-sms-channel branch from 4c28d9a to 434daf2 Compare May 25, 2026 12:06
@Pigbibi Pigbibi merged commit a53733b into main May 25, 2026
1 check passed
@Pigbibi Pigbibi deleted the add-crisis-alert-sms-channel branch May 25, 2026 12:07

@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: 434daf2831

ℹ️ 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 +291 to +299
sms_result = publish_strategy_plugin_sms_alerts(
signals,
sms_settings=settings,
translator=translator,
strategy_label=settings.strategy_profile,
context_label=build_strategy_plugin_alert_context_label(settings),
alert_store=build_strategy_plugin_sms_alert_store(settings, env_reader=env_reader),
log_message=log_message,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Isolate SMS publish failures from email reporting

Call failures from publish_strategy_plugin_sms_alerts currently abort publish_strategy_plugin_alerts after email may already have been sent, so run_strategy_cycle falls back to the zeroed alert fields and loses successful email delivery counts. This creates incorrect telemetry whenever SMS credentials/provider calls fail (for example, missing CRISIS_ALERT_SMS_AUTH_TOKEN), making alert-channel incidents harder to diagnose and masking real email sends.

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