This document records the original release bundle and first cutover sequence. For the current day-to-day live switch or rollback procedure, use
docs/us_equity_live_switch_runbook.md.
This document is the operational follow-up to:
docs/us_equity_cross_platform_strategy_spec.mddocs/us_equity_execution_translation_spec.md
It focuses on one thing only:
- how to release the shared packages safely
- how to move the live platform services to the intended strategy profiles
It does not redefine strategy formulas.
The local refactor now spans three repositories and two shared packages:
QuantPlatformKitUsEquityStrategiesInteractiveBrokersPlatformCharlesSchwabPlatformLongBridgePlatform
The platform services do not install local sibling checkouts directly. They install fixed Git tags from:
quant-platform-kitus-equity-strategies
That means Cloud Run cutover must happen in this order:
- release shared packages
- update platform dependency pins
- deploy platform repos
- change live strategy profiles only after the new code is actually live
QuantPlatformKit:0.7.8UsEquityStrategies:0.7.11
| Repository | quant-platform-kit |
us-equity-strategies |
|---|---|---|
InteractiveBrokersPlatform |
v0.7.7 |
v0.7.7 |
CharlesSchwabPlatform |
v0.7.8 |
v0.7.10 |
LongBridgePlatform |
v0.7.8 |
v0.7.11 |
This mismatch is the main release risk. The local runtime refactor is already ahead of the deployed tags.
Recommended target tags for the next bundle:
QuantPlatformKit->v0.7.10UsEquityStrategies->v0.7.13
Reason:
UsEquityStrategiesdepends onQuantPlatformKit- the new runtime and execution helpers live in
QuantPlatformKit UsEquityStrategiesshould only move after the new QPK tag exists
Expected contents:
- execution translation helpers
- feature snapshot shared loader
- cross-platform runtime input helpers
- IBKR runtime input helpers
Output:
- tag
v0.7.10
Change:
- bump its QPK dependency to
quant-platform-kit @ ...@v0.7.10
Output:
- tag
v0.7.13
After both tags exist, update all three platform repos to:
| Repository | quant-platform-kit |
us-equity-strategies |
|---|---|---|
InteractiveBrokersPlatform |
v0.7.10 |
v0.7.13 |
CharlesSchwabPlatform |
v0.7.10 |
v0.7.13 |
LongBridgePlatform |
v0.7.10 |
v0.7.13 |
Important:
- do not point requirements at tags that do not exist yet
- do not cut live env first and hope deployment catches up later
Deploy each platform repo after its requirements are updated and merged.
Minimum deployment rule:
- the deployed commit must contain the new requirement pins
- the deployed image must be confirmed before changing live strategy env
Use this sequence as-is, with commits reviewed before tagging.
cd /Users/lisiyi/Projects/QuantPlatformKit
git diff --check
./.venv/bin/python -m unittest tests.test_strategy_contracts
PYTHONPATH=src /Users/lisiyi/Projects/LongBridgePlatform/.venv/bin/python -m unittest \
tests.test_strategy_contracts \
tests.test_ibkr_runtime_inputs \
tests.test_longbridge_portfolio
git add README.md README.zh-CN.md pyproject.toml src tests docs
git commit -m "Prepare v0.7.10 release"
git tag v0.7.10
git push origin HEAD
git push origin v0.7.10cd /Users/lisiyi/Projects/UsEquityStrategies
git diff --check
PYTHONPATH=/Users/lisiyi/Projects/QuantPlatformKit/src:src \
/Users/lisiyi/Projects/LongBridgePlatform/.venv/bin/python -m unittest \
tests.test_catalog \
tests.test_entrypoints \
tests.test_platform_registry_support
git add README.md pyproject.toml src tests docs
git commit -m "Prepare v0.7.13 release"
git tag v0.7.13
git push origin HEAD
git push origin v0.7.13cd /Users/lisiyi/Projects/InteractiveBrokersPlatform
git diff --check
git add requirements.txt
git commit -m "Bump shared strategy package pins"
git push origin HEAD
cd /Users/lisiyi/Projects/CharlesSchwabPlatform
git diff --check
git add requirements.txt
git commit -m "Bump shared strategy package pins"
git push origin HEAD
cd /Users/lisiyi/Projects/LongBridgePlatform
git diff --check
git add requirements.txt
git commit -m "Bump shared strategy package pins"
git push origin HEADIf any repo still has unrelated local edits, split or stash them before creating the release commit.
This public runbook does not pin any account or service to a current strategy profile. Choose the target profile from the supported platform matrix, then apply the matching input mode below.
| Service family | Strategy selector | Direct-runtime profile inputs | Snapshot-backed profile inputs |
|---|---|---|---|
| Schwab Cloud Run service | STRATEGY_PROFILE=<runtime_enabled us_equity profile> |
market / benchmark history and portfolio snapshot from the runtime | feature snapshot path, manifest path, and optional strategy config path |
| IBKR Cloud Run service | STRATEGY_PROFILE=<runtime_enabled us_equity profile> |
market / benchmark history and portfolio snapshot from the runtime | feature snapshot path, manifest path, optional strategy config path, and reconciliation output path |
| LongBridge regional service | STRATEGY_PROFILE=<runtime_enabled us_equity profile> |
market / benchmark history and portfolio snapshot from the runtime | feature snapshot path, manifest path, and optional strategy config path |
Set:
STRATEGY_PROFILE=<direct-runtime profile>
Remove stale snapshot envs if present:
*_FEATURE_SNAPSHOT_PATH*_FEATURE_SNAPSHOT_MANIFEST_PATH*_STRATEGY_CONFIG_PATH*_RECONCILIATION_OUTPUT_PATHwhere the platform owns reconciliation output
Keep execution-mode or dry-run flags unchanged unless the rollout decision explicitly changes them.
Set:
STRATEGY_PROFILE=<snapshot-backed profile><PLATFORM>_FEATURE_SNAPSHOT_PATH<PLATFORM>_FEATURE_SNAPSHOT_MANIFEST_PATH<PLATFORM>_STRATEGY_CONFIG_PATHif the profile needs an external config file
Reason:
- snapshot-backed profiles consume a published artifact from
UsEquitySnapshotPipelines - direct-runtime profiles do not need the feature snapshot artifact chain
Set per regional service:
ACCOUNT_PREFIX=HK|SGACCOUNT_REGION=HK|SGSTRATEGY_PROFILE=<runtime_enabled us_equity profile>LONGPORT_SECRET_NAME=<region token secret>
Do not change service names as part of a strategy switch.
For each platform repo:
- verify
requirements.txtpins the intended QPK / UES tags - run the platform test subset most relevant to strategy runtime
- deploy
- verify the new commit SHA is actually on Cloud Run
Verify with gcloud run services describe ...:
CLOUD_RUN_SERVICEpoints to the intended serviceSTRATEGY_PROFILEmatches the intended profile- feature snapshot envs exist only where needed
- stale feature snapshot envs are removed from services that no longer use them
Then verify the first heartbeat / execution notification:
- strategy display name matches the selected profile
- input-mode diagnostics match the selected profile type
- stale snapshot envs are absent for direct-runtime profiles
- snapshot-backed profiles can load the expected artifact manifest
Rollback should happen in the reverse order:
- revert live env if the deployed runtime is wrong
- revert platform repo requirements if the package bundle is bad
- only then consider rolling back shared package tags by releasing a newer fix tag
Do not reuse old service names or old strategy-coded service naming as a rollback mechanism.