Verified snapshot: 2026-04-07
This document pre-splits the next compatibility-window cleanup into small PR-sized batches.
It is a planning document only. Do not merge these removals early. The current window still intentionally keeps rollback hooks.
Remove only migration-window compatibility layers that were kept during PR1-PR6.
Do not use this cleanup window to:
- change any strategy formulas
- change thresholds or risk semantics
- refactor broker integrations beyond the boundary-removal work
- mix feature work into cleanup PRs
Every removal PR below should wait until all of these are true:
- the unified-entrypoint mainline has shipped for at least one stable release window
- rollback to the previous release tag is still possible during the cutover
- regression tests for the affected repo are green on the unified path
rgshows the legacy symbol is only referenced in the files being deleted or updated in that PR- any research or test-only imports have been moved off the compatibility shim first
NW1QuantPlatformKit deprecated helper removal - doneNW2LongBridgePlatform allocation-loader removal - doneNW3CharlesSchwabPlatform allocation-loader removal - doneNW4UsEquityStrategies metadata lift for IB cleanup - doneNW5InteractiveBrokersPlatform legacy-module bridge removal - doneNW6BinancePlatform direct component-loader and main-wrapper removal - done
This order keeps the easy and low-coupling deletions first, and leaves the IB / Binance boundary cleanup for after their remaining test and adapter dependencies are gone.
- Completed on the current branch:
NW1,NW2,NW3,NW4,NW5,NW6 - Remaining planned batch after that: none
Status: completed on the current branch.
Delete the migration-window helpers that were superseded by StrategyCatalog + PlatformStrategyPolicy.
QuantPlatformKit
src/quant_platform_kit/common/strategies.pyget_supported_profiles_for_platform(...)resolve_strategy_definition(...)- the deprecation warning strings and legacy call path that support them
src/quant_platform_kit/__init__.py- legacy exports for the two deprecated helpers
- tests and docs that still assert the deprecated flow
resolve_platform_strategy_definition(...)get_enabled_profiles_for_platform(...)build_platform_profile_matrix(...)- platform-local
strategy_registry.pywrappers that already sit on top of the new policy/catalog API
src/quant_platform_kit/common/strategies.pysrc/quant_platform_kit/__init__.pytests/test_strategies.pytests/test_strategy_contracts.pydocs/strategy_contract_migration.md
rg -n "resolve_strategy_definition\(|get_supported_profiles_for_platform\(" .inQuantPlatformKitonly finds historical notes that were intentionally rewritten, or finds no runtime code at all- tests cover only the catalog/policy path
cd /Users/lisiyi/Projects/QuantPlatformKit
python3 -m ruff check src tests
PYTHONPATH=src python3 -m unittest tests.test_strategy_contracts tests.test_strategies tests.test_models -vStatus: completed on the current branch.
Delete the last platform-local allocation shim API now that main.py already runs through strategy_runtime + unified entrypoint.
LongBridgePlatform
strategy_loader.pyload_allocation_module(...)
- tests that still verify allocation-module loading
strategy_loader.pytests/test_strategy_loader.py
None beyond the common release gates.
The mainline path is already on load_strategy_entrypoint_for_profile(...).
rg -n "load_allocation_module\(" .inLongBridgePlatformreturns no matches- loader tests only assert unified entrypoint loading
cd /Users/lisiyi/Projects/LongBridgePlatform
python3 -m ruff check strategy_loader.py tests/test_strategy_loader.py tests/test_strategy_runtime.py
PYTHONPATH=.:/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/UsEquityStrategies/src python -m unittest \
tests.test_strategy_loader tests.test_strategy_runtime tests.test_rebalance_service tests.test_request_handling -vStatus: completed on the current branch.
Do the same cleanup as LongBridge, but in the Schwab runtime.
CharlesSchwabPlatform
strategy_loader.pyload_allocation_module(...)
- tests that still verify allocation-module loading
strategy_loader.pytests/test_strategy_loader.py
None beyond the common release gates.
The mainline path is already on load_strategy_entrypoint_for_profile(...).
rg -n "load_allocation_module\(" .inCharlesSchwabPlatformreturns no matches- loader tests only assert unified entrypoint loading
cd /Users/lisiyi/Projects/CharlesSchwabPlatform
python3 -m ruff check strategy_loader.py tests/test_strategy_loader.py tests/test_strategy_runtime.py
PYTHONPATH=.:/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/UsEquityStrategies/src python -m unittest \
tests.test_strategy_loader tests.test_strategy_runtime tests.test_rebalance_service tests.test_request_handling -vStatus: completed on the current branch. A typed runtime adapter now exists in UsEquityStrategies, and InteractiveBrokersPlatform now consumes it without the legacy signal-module fallback.
Move the last strategy-side metadata that IB still reads through the legacy signal module into the unified side, so the platform can delete the legacy bridge in the next PR.
UsEquityStrategies- possibly
QuantPlatformKitonly if the existing manifest/default-config shape proves insufficient
InteractiveBrokersPlatform/strategy_runtime.py still reads these through legacy_module:
STATUS_ICONload_runtime_parameters(...)REQUIRED_FEATURE_COLUMNSSNAPSHOT_DATE_COLUMNSMAX_SNAPSHOT_MONTH_LAGREQUIRE_SNAPSHOT_MANIFESTSNAPSHOT_CONTRACT_VERSIONextract_managed_symbols(...)
Prefer one of these, in this order:
- move the data into
manifest.default_configwhen it is declarative - expose a strategy-side adapter object next to the unified entrypoint for IB-only snapshot/runtime metadata
- only extend QuantPlatformKit contract types if the first two options are clearly not enough
Do not reintroduce platform-shaped return payloads into StrategyDecision.
- IB runtime can build snapshot guards and managed-symbol metadata without importing the legacy signal module
- the strategy-side contract remains formula-neutral
- there is a regression test in
UsEquityStrategiesfor the new metadata path
cd /Users/lisiyi/Projects/UsEquityStrategies
python3 -m ruff check src tests
PYTHONPATH=src:/Users/lisiyi/Projects/QuantPlatformKit/src python -m unittest tests.test_entrypoints tests.test_catalog -vDelete the remaining platform-side bridge to legacy signal modules after NW4 has moved the required metadata to the unified side.
InteractiveBrokersPlatform- depends on
UsEquityStrategieswork fromNW4
strategy_loader.pyload_signal_logic_module(...)
strategy_runtime.pylegacy_modulefield onLoadedStrategyRuntime- all
getattr(..., legacy_module, ...)snapshot/runtime fallbacks - direct
load_runtime_parameters(...)call through the legacy module
main.pySTRATEGY_LOGICstrategy_check_smastrategy_compute_13612w_momentumstrategy_compute_signals(currently dead)- any wrapper logic that only exists to proxy legacy module helpers
- tests that still exercise
load_signal_logic_module(...)
strategy_loader.pystrategy_runtime.pymain.pytests/test_strategy_loader.py
compute_signals(...) stays.
It is the platform mainline entry into STRATEGY_RUNTIME.evaluate(...) and decision_mapper.map_strategy_decision(...).
Only the legacy module bridge should go away.
rg -n "load_signal_logic_module\(|\bSTRATEGY_LOGIC\b" .inInteractiveBrokersPlatformreturns no runtime matches- snapshot guard configuration comes from the unified side only
- IB smoke/regression tests still pass with no behavior drift
cd /Users/lisiyi/Projects/InteractiveBrokersPlatform
python3 -m ruff check main.py strategy_loader.py strategy_runtime.py tests/test_strategy_loader.py tests/test_strategy_runtime.py
PYTHONPATH=.:/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/UsEquityStrategies/src ./.venv/bin/python -m pytest \
tests/test_strategy_loader.py \
tests/test_strategy_runtime.py \
tests/test_decision_mapper.py \
tests/test_rebalance_service.py \
tests/test_request_handling.py \
tests/test_runtime_config_support.py -qNW6 - BinancePlatform: remove direct core/rotation component loading and main-level compatibility wrappers
Status: completed on the current branch.
Finish the platform-side cleanup so Binance only loads the unified entrypoint and decision mappers, while research/tests use either unified runtime outputs or explicit upstream strategy imports.
BinancePlatform- optional follow-up in
CryptoStrategiesonly if an extra typed helper is still missing
strategy_loader.pyload_strategy_component(...)
strategy_runtime.pycore_modulerotation_module- temporary helper methods:
compute_allocation_budgets(...)get_dynamic_btc_base_order(...)allocate_trend_buy_budget(...)refresh_rotation_pool(...)
main.pyget_dynamic_btc_target_ratio(...)get_dynamic_btc_base_order(...)rank_normalize(...)build_stable_quality_pool(...)refresh_rotation_pool(...)select_rotation_weights(...)allocate_trend_buy_budget(...)
tests/test_strategy_loader.py- currently still asserts
load_strategy_component(...)
- currently still asserts
tests/test_trend_pool_loading.py- currently patches
main.build_stable_quality_pool(...)and callsmain.refresh_rotation_pool(...)
- currently patches
research/backtest.py- still calls
get_dynamic_btc_base_order(...)
- still calls
- any remaining tests that import main-level compatibility wrappers instead of using unified runtime output or explicit
crypto_strategiesimports
- use
StrategyDecision.diagnosticsfor runtime-facing BTC / trend-rotation facts - import explicit upstream modules from
CryptoStrategiesin research-only code when a helper is intentionally research-only - keep platform runtime code on
load_strategy_entrypoint_for_profile(...)only
rg -n "load_strategy_component\(|get_dynamic_btc_target_ratio\(|get_dynamic_btc_base_order\(|build_stable_quality_pool\(|refresh_rotation_pool\(|select_rotation_weights\(|allocate_trend_buy_budget\(" .inBinancePlatformonly finds intended research-side upstream imports or returns no matches for platform runtime codestrategy_runtime.pyloads the unified entrypoint only- loader tests no longer assert direct
core/rotationmodule resolution
cd /Users/lisiyi/Projects/BinancePlatform
python3 -m ruff check main.py strategy_loader.py strategy_runtime.py research/backtest.py tests
PYTHONPATH=.:/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/CryptoStrategies/src python -m unittest discover -s tests -p 'test_*.py' -vUse these quick checks before starting each deletion batch:
for repo in QuantPlatformKit InteractiveBrokersPlatform LongBridgePlatform CharlesSchwabPlatform BinancePlatform; do
echo "===== $repo ====="
cd /Users/lisiyi/Projects/$repo || exit 1
rg -n "resolve_strategy_definition\(|get_supported_profiles_for_platform\(|load_signal_logic_module\(|STRATEGY_LOGIC\b|load_allocation_module\(|load_strategy_component\(|get_dynamic_btc_target_ratio\(|get_dynamic_btc_base_order\(|build_stable_quality_pool\(|refresh_rotation_pool\(|select_rotation_weights\(|allocate_trend_buy_budget\(" . --glob '!**/__pycache__/**'
echo
doneIf that output still shows runtime or test references outside the PR scope, split again before deleting.