Skip to content

Require LongBridge runtime target JSON#56

Merged
Pigbibi merged 3 commits into
mainfrom
chore/longbridge-runtime-target-json
May 10, 2026
Merged

Require LongBridge runtime target JSON#56
Pigbibi merged 3 commits into
mainfrom
chore/longbridge-runtime-target-json

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • move LongBridge runtime settings and env sync to structured RUNTIME_TARGET_JSON
  • keep strategy-specific envs as explicit overrides and update account-service docs
  • pin QuantPlatformKit to the runtime-target JSON contract commit

Tests

  • PYTHONPATH=.:../QuantPlatformKit/src /home/ubuntu/Projects/LongBridgePlatform/.venv/bin/python -m pytest tests/test_runtime_config_support.py tests/test_notifications.py -q
  • bash tests/test_sync_cloud_run_env_workflow.sh

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

ℹ️ 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 README.md
| `LONGPORT_SECRET_NAME` | No | Secret Manager secret name for LongPort token (default: `longport_token_hk`) |
| `LONGPORT_APP_KEY` | Yes | LongPort OpenAPI app key (for token refresh); recommended to inject from the region-specific Secret Manager secret for this deployment, such as `longport-app-key-paper` / `longport-app-key-hk` / `longport-app-key-sg` |
| `LONGPORT_APP_SECRET` | Yes | LongPort OpenAPI app secret (for token refresh); recommended to inject from the region-specific Secret Manager secret for this deployment, such as `longport-app-secret-paper` / `longport-app-secret-hk` / `longport-app-secret-sg` |
| `LONGPORT_SECRET_NAME` | No | Secret Manager secret name for LongPort token (default: `longport_token_paper`) |

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 Align documented default token secret with runtime fallback

The new docs now state that LONGPORT_SECRET_NAME defaults to longport_token_paper, but the runtime fallback is still longport_token_hk (runtime_config_support.py, DEFAULT_LONGPORT_SECRET_NAME). In deployments that rely on the default (for example local/manual runs or any path that doesn't force LONGPORT_SECRET_NAME), this can silently point the PAPER service at the HK token secret and execute against the wrong account context.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi merged commit bdddd62 into main May 10, 2026
1 check passed
@Pigbibi Pigbibi deleted the chore/longbridge-runtime-target-json branch May 10, 2026 07:18
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