Skip to content

[codex] Add LongBridge dry-run report summary#122

Merged
Pigbibi merged 4 commits into
mainfrom
codex/longbridge-dry-run-report-summary
Jun 3, 2026
Merged

[codex] Add LongBridge dry-run report summary#122
Pigbibi merged 4 commits into
mainfrom
codex/longbridge-dry-run-report-summary

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a machine-readable execution summary to LongBridge runtime reports.
  • Include dry-run order preview counts, skipped count, note count, and preview availability without recording broker order IDs or sensitive order details.
  • Add a focused request-handling test for the report summary helper.

Validation

  • PYTHONPATH="/Users/lisiyi/Projects/LongBridgePlatform/.venv/lib/python3.13/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src" .venv/bin/python -m pytest -q tests/test_request_handling.py tests/test_runtime_reporting_adapters.py16 passed

Known unrelated local verification issue

A broader local run including tests/test_runtime_config_support.py and tests/test_notifications.py had 6 failures because the local /Users/lisiyi/Projects/QuantPlatformKit checkout is stale/diverged and shadows the installed package/profile registry in some test paths. The failures are profile-registry/translation mismatches unrelated to this report-summary change.

@Pigbibi Pigbibi marked this pull request as ready for review June 3, 2026 04:09
@Pigbibi Pigbibi merged commit f447f8d into main Jun 3, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/longbridge-dry-run-report-summary branch June 3, 2026 04:09

@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: bdb850af76

ℹ️ 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 +54 to +59
send_message(message)
compact = str(message or "")
recorded_delivery_events.append(
{
"sink": "telegram",
"delivery_status": "sent",

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 Don't mark no-op Telegram sends as sent

When the default LongBridge sender is used with missing Telegram credentials (or when it swallows a post failure), send_message returns normally without delivering anything (notifications/telegram.py returns early for empty token/chat and catches exceptions). Because this wrapper unconditionally appends delivery_status: "sent" after any normal return, a dry-run report can claim validation_status: passed and include a sent delivery event even though no notification left the process; the delivery log should only record sent after the sender can confirm delivery, or should distinguish attempted/skipped/failed 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