Skip to content

fix(longbridge): change default strategy from tqqq_growth_income to soxl_soxx_trend_income#172

Merged
Pigbibi merged 2 commits into
mainfrom
fix/longbridge-default-strategy-soxl
Jul 7, 2026
Merged

fix(longbridge): change default strategy from tqqq_growth_income to soxl_soxx_trend_income#172
Pigbibi merged 2 commits into
mainfrom
fix/longbridge-default-strategy-soxl

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

问题

LongBridge 平台的实际运行策略是 tqqq_growth_income(纳斯达克增长收益),但用户期望的是 soxl_soxx_trend_income(半导体趋势收益)。

根因

platform-config.json 中 LongBridge 的 default_strategy_profile 自创建以来一直是 tqqq_growth_income,从未更新为 SOXL 策略。而 IBKR 和 Schwab 已经正确设置为 soxl_soxx_trend_income

运行时策略解析链:

Cloud Run → RUNTIME_TARGET_JSON env var → GitHub Environment variables → platform-config.json default

platform-config.json 是整个系统的单一真相来源,策略切换控制台和工作流都依赖它来确定默认策略。

改动

文件 改动
platform-config.json LongBridge default_strategy_profile: tqqq_growth_incomesoxl_soxx_trend_income
config.js 重新生成(构建产物)
index.html 重新生成(构建产物)
page_asset.js 重新生成(构建产物)
app.js 硬编码回退值更新为 soxl_soxx_trend_income
test_runtime_settings.py 更新 LongBridge 默认策略漂移检测的错误消息断言

其他平台检查

平台 platform-config.json 默认 .env.example 一致性
LongBridge tqqqsoxl soxl ✅ 已修复
IBKR soxl global_etf_rotation ⚠️ .env.example 不同(文档文件,不影响运行时)
Schwab soxl soxl
Firstrade ibit_smart_dca (空)
QMT cn_industry_etf_rotation cn_industry_etf_rotation
Binance crypto_live_pool_rotation (无)

后续操作

合并后需要:

  1. 部署策略切换控制台(触发 deploy-strategy-switch-console.yml
  2. 通过策略切换控制台发起一次 LongBridge sg 账户的策略切换,将 GitHub Environment 变量 RUNTIME_TARGET_JSON 中的 strategy_profile 更新为 soxl_soxx_trend_income

🤖 Generated with Claude Code

…oxl_soxx_trend_income

- Update platform-config.json: LongBridge default_strategy_profile tqqq → soxl
- Regenerate derived config files (config.js, index.html, page_asset.js)
- Update app.js hardcoded fallback to soxl_soxx_trend_income
- Update test assertions for LongBridge default strategy drift checks

Root cause: platform-config.json was the single source of truth but
LongBridge still had tqqq_growth_income as default while IBKR/Schwab
already used soxl_soxx_trend_income. The runtime reads RUNTIME_TARGET_JSON
from GitHub Environment variables, which was initially set to tqqq and
never updated via strategy switch.

Co-Authored-By: Claude <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🤖 Codex PR Review

⚠️ Human review required: The Codex review could not be completed.

No Codex service URL or API key configured. Set CODEX_AUDIT_SERVICE_URL, ANTHROPIC_API_KEY, or OPENAI_API_KEY.

Please ensure a human reviewer checks this PR before merging.

Co-Authored-By: Claude <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

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

ℹ️ 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".

}

function defaultStrategyForAccount(platform, account, fallback = "tqqq_growth_income") {
function defaultStrategyForAccount(platform, account, fallback = "soxl_soxx_trend_income") {

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 Regenerate the served JS asset

This updates the source app.js, but the Worker serves /app.js from the generated APP_JS module in web/strategy-switch-console/app_js.js; that generated file was not updated and still contains fallback = "tqqq_growth_income". In environments that use the checked-in Worker assets, the browser keeps running the old fallback, so this fallback change is not actually shipped until app_js.js is regenerated and committed.

Useful? React with 👍 / 👎.

@Pigbibi
Pigbibi merged commit d3f7fc5 into main Jul 7, 2026
10 of 11 checks passed
@Pigbibi
Pigbibi deleted the fix/longbridge-default-strategy-soxl branch July 7, 2026 20:43
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