Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

BinancePlatform is a QuantStrategyLab Binance crypto execution platform. It executes runtime-enabled crypto strategies through Binance-facing workflows and self-hosted orchestration.

It is an execution layer, not a strategy research repository. Strategy logic comes from `CryptoStrategies`; snapshot and validation artifacts come from `CryptoSnapshotPipelines` when a profile requires them.
It is an execution layer, not a strategy research repository. Strategy logic comes from `CryptoStrategies`; live-pool and validation artifacts come from `CryptoLivePoolPipelines` when a profile requires them.

## Runtime boundary

Expand All @@ -19,7 +19,7 @@ It is an execution layer, not a strategy research repository. Strategy logic com

## Direct vs snapshot-backed profiles

Direct runtime profiles can usually run from market history or portfolio state. Snapshot-backed profiles need a current artifact bundle from the matching snapshot pipeline before this platform should execute them. The platform should not invent strategy eligibility; it should consume the status and artifacts published by the strategy and snapshot repositories.
Direct runtime profiles can usually run from market history or portfolio state. Snapshot-backed profiles need a current artifact bundle from the matching live-pool pipeline before this platform should execute them. The platform should not invent strategy eligibility; it should consume the status and artifacts published by the strategy and live-pool repositories.

## Deploy safely

Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

BinancePlatform 是 QuantStrategyLab 的Binance 加密货币执行平台。通过面向 Binance 的 workflow 和 self-hosted 编排执行 runtime-enabled 加密货币策略。

它属于执行层,不是策略研究仓库。策略逻辑来自 `CryptoStrategies`;如果 profile 依赖 snapshot,验证和产物来自 `CryptoSnapshotPipelines`。
它属于执行层,不是策略研究仓库。策略逻辑来自 `CryptoStrategies`;如果 profile 依赖 live-pool,验证和产物来自 `CryptoLivePoolPipelines`。

## 运行边界

Expand All @@ -19,7 +19,7 @@ BinancePlatform 是 QuantStrategyLab 的Binance 加密货币执行平台。通

## 普通 profile 与 snapshot-backed profile

普通 runtime profile 通常可以直接基于 market history 或 portfolio state 执行。Snapshot-backed profile 需要先从对应 snapshot pipeline 获取当前 artifact bundle,平台才应该执行。平台不应该自行判断策略资格,而应消费策略仓和 snapshot 仓发布的状态与产物。
普通 runtime profile 通常可以直接基于 market history 或 portfolio state 执行。Snapshot-backed profile 需要先从对应 live-pool pipeline 获取当前 artifact bundle,平台才应该执行。平台不应该自行判断策略资格,而应消费策略仓和 live-pool 仓发布的状态与产物。

## 安全部署顺序

Expand Down
2 changes: 1 addition & 1 deletion docs/operator_runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Degraded mode:
Interpretation:

- `last_known_good` means fresh upstream validation failed, but a previously accepted upstream payload is still available in state
- `local_file` means upstream live access failed and the runtime fell back to a validated local file from the configured `STRATEGY_ARTIFACT_FILE`, the repo-local artifact, or a compatible `CryptoSnapshotPipelines` checkout
- `local_file` means upstream live access failed and the runtime fell back to a validated local file from the configured `STRATEGY_ARTIFACT_FILE`, the repo-local artifact, or a compatible `CryptoLivePoolPipelines` checkout
- `static` is emergency-only and should be treated as lowest-confidence operation

## Strategy Artifact Settings
Expand Down
9 changes: 9 additions & 0 deletions tests/test_trend_pool_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ def test_validate_trend_pool_payload_preserves_ordered_symbols_in_symbol_map(sel
self.assertEqual(list(result["symbol_map"]), payload["symbols"])
self.assertEqual(list(result["payload"]["symbol_map"]), payload["symbols"])

def test_default_live_pool_candidates_include_renamed_repo_checkout(self):
default_path = Path("/tmp/live_pool_legacy.json")

candidates = main.tp_get_default_live_pool_candidates(default_path)
candidate_text = [str(path) for path in candidates]

self.assertEqual(candidates[0], default_path)
self.assertTrue(any("CryptoLivePoolPipelines" in value for value in candidate_text))

def test_strategy_artifact_env_aliases_override_legacy_trend_pool_settings(self):
with patch.dict(
os.environ,
Expand Down
4 changes: 2 additions & 2 deletions trend_pool_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def get_default_live_pool_candidates(default_live_pool_legacy_path):
Path("/home/ubuntu"),
}
repo_names = (
"CryptoSnapshotPipelines",
"crypto-snapshot-pipelines",
"CryptoLivePoolPipelines",
"crypto-live-pool-pipelines",
"CryptoLeaderRotation",
"crypto-leader-rotation",
)
Expand Down