Skip to content

fix: prefix ibkr telegram notifications with account - #287

Merged
Pigbibi merged 1 commit into
mainfrom
codex/fix-ibkr-telegram-u-account-prefix-20260703
Jul 3, 2026
Merged

fix: prefix ibkr telegram notifications with account#287
Pigbibi merged 1 commit into
mainfrom
codex/fix-ibkr-telegram-u-account-prefix-20260703

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary\n- prefix IBKR Telegram cycle/error notifications with the active account selector when multi-account runtime targets are used\n- derive labels from U-account selectors first, then fallback from live-u account scope\n- keep default/single-account notifications unprefixed\n\n## Tests\n- python3 -m pytest tests/test_request_handling.py::test_platform_notification_prefix_stays_empty_for_default_account tests/test_request_handling.py::test_platform_notification_prefix_uses_ibkr_account_scope tests/test_request_handling.py::test_handle_request_runtime_error_fallback_prefixes_account_scope tests/test_request_handling.py::test_handle_request_runtime_error_fallback_sends_telegram tests/test_runtime_composer.py::test_runtime_composer_builds_runtime_and_config_from_local_builders -q\n- python3 -m ruff check main.py tests/test_request_handling.py\n- git diff --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: 09026b6b4f

ℹ️ 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 thread main.py
webhook_url=_NOTIFICATION_WEBHOOK_URL,
)
sender(message)
sender(_with_platform_notification_prefix(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.

P2 Badge Record hashes for the prefixed notification text

When a normal cycle is run with notification_delivery_events, application/runtime_notification_adapters.py:38-46 records compact_text_sha256 and compact_text_length from the original message after calling send_message. Prefixing only inside send_tg_message means Telegram receives [acct] ..., but the report's delivery event still hashes and sizes the unprefixed text, so account-scoped dry-run delivery logs become unverifiable/inaccurate while claiming only hash and length are persisted. Apply the prefix before the adapter records the delivery metadata, or have the adapter record the actual text passed to the sink.

Useful? React with 👍 / 👎.

@Pigbibi
Pigbibi enabled auto-merge (squash) July 3, 2026 04:45
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi force-pushed the codex/fix-ibkr-telegram-u-account-prefix-20260703 branch from 09026b6 to 804d9dc Compare July 3, 2026 04:45
@Pigbibi
Pigbibi merged commit e00263e into main Jul 3, 2026
2 checks passed
@Pigbibi
Pigbibi deleted the codex/fix-ibkr-telegram-u-account-prefix-20260703 branch July 3, 2026 04:46
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