Skip to content

Expose disabled HK strategy profiles#107

Merged
Pigbibi merged 6 commits into
mainfrom
codex/hk-equity-strategy-integration
May 31, 2026
Merged

Expose disabled HK strategy profiles#107
Pigbibi merged 6 commits into
mainfrom
codex/hk-equity-strategy-integration

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expose HK market-history profiles as eligible but disabled in LongBridge runtime matrix
  • add disabled hk_listed_global_etf_rotation after the HK strategy package added the research candidate
  • update HK runtime docs and pin HkEquityStrategies to the new commit

Safety

  • HK profiles are not in enabled/supported runtime profiles
  • production STRATEGY_PROFILE remains rejected for HK research candidates
  • no Cloud Run env, secrets, or deployment config changed

Validation

  • PYTHONPATH=/Users/lisiyi/Projects/HkEquityStrategies/src:/tmp/qsl-hk-test-venv/lib/python3.12/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src /tmp/qsl-hk-test-venv/bin/python -m pytest tests/test_runtime_config_support.py -q -k 'not print_strategy_profile_status_json and not print_strategy_switch_env_plan' -> 33 passed, 8 deselected, 10 subtests passed
  • bash tests/test_sync_cloud_run_env_workflow.sh
  • PYTHONPATH=/Users/lisiyi/Projects/HkEquityStrategies/src:/tmp/qsl-hk-test-venv/lib/python3.12/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src /tmp/qsl-hk-test-venv/bin/python -m compileall -q . && git diff --check

Known local limitation: full subprocess-based strategy status tests are affected by sibling UsEquityStrategies/src path precedence on this machine; the targeted non-subprocess/runtime checks above passed.

@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: 5b4ca3dae6

ℹ️ 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 runtime_config_support.py
os.getenv("ACCOUNT_REGION"),
account_prefix=account_prefix,
)
market = infer_market(os.getenv("LONGBRIDGE_MARKET"), account_region=account_region)

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 Do not infer HK market from account region

When the longbridge-hk deployment runs any of the currently enabled US-equity profiles with LONGBRIDGE_MARKET unset, this fallback turns ACCOUNT_REGION=HK into the HK market defaults. In this commit the HK profiles are still disabled while the enabled profiles are US profiles, so the HK-region service will start using .HK symbols, HKD cash, and the XHKG calendar for symbols like SOXL/QQQ, causing quotes/orders to target the wrong market or see zero usable USD cash. The market should stay US unless an explicit market/profile selection requires HK.

Useful? React with 👍 / 👎.

@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: 8d35e1c588

ℹ️ 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 runtime_config_support.py
os.getenv("ACCOUNT_REGION"),
account_prefix=account_prefix,
)
market = infer_market(os.getenv("LONGBRIDGE_MARKET"), account_region=account_region)

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 Keep HK deployments on explicit US market defaults

When the HK Cloud Run environment does not define LONGBRIDGE_MARKET, this now derives market=HK solely from ACCOUNT_REGION=HK, even though the currently enabled LongBridge profiles are still US-equity profiles and the HK profiles remain disabled. The fresh evidence is that this commit also makes env sync remove LONGBRIDGE_MARKET when the GitHub variable is unset, so the HK service can start using .HK/HKD/XHKG defaults for profiles such as SOXL/QQQ after a sync. Please keep the market default tied to the selected strategy/domain, or require an explicit HK market/profile selection before switching defaults.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi merged commit 8de1480 into main May 31, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/hk-equity-strategy-integration branch May 31, 2026 20:08
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