补齐回测引擎融合表数据源守卫

This commit is contained in:
boris
2026-07-03 07:08:38 +08:00
parent cab7c605dc
commit 27d6740dc5
+38
View File
@@ -41,4 +41,42 @@ if [[ -n "$manifest_hits" ]]; then
fail "legacy database dependencies are not allowed in fidc-backtest-engine manifests" "$manifest_hits" fail "legacy database dependencies are not allowed in fidc-backtest-engine manifests" "$manifest_hits"
fi fi
local_only_hits="$(
rg -n \
--glob '!**/.git/**' \
--glob '!**/target/**' \
--glob '!**/docs/**' \
--glob '!**/*.md' \
--glob '!**/tests/**' \
--glob '!**/*test*.rs' \
--glob '!crates/fidc-core/src/strategy_ai.rs' \
--glob '!scripts/verify-no-legacy-data-source.sh' \
'FICLAW_DATA_AGENT_URL|ficlaw_data\.source_rows_v1|strategy-factory-source-lake://local' \
crates Cargo.toml \
2>/dev/null || true
)"
if [[ -n "$local_only_hits" ]]; then
fail "legacy or local-only data source references are not allowed in fidc-backtest-engine runtime" "$local_only_hits"
fi
fused_hits="$(
rg -n \
--glob '!**/.git/**' \
--glob '!**/target/**' \
--glob '!**/docs/**' \
--glob '!**/*.md' \
--glob '!**/tests/**' \
--glob '!**/*test*.rs' \
--glob '!crates/fidc-core/src/strategy_ai.rs' \
--glob '!scripts/verify-no-legacy-data-source.sh' \
'exported_fused|fidc_fused|fusion|fused' \
crates Cargo.toml \
2>/dev/null || true
)"
if [[ -n "$fused_hits" ]]; then
fail "exported fused tables are not allowed in fidc-backtest-engine runtime; use Strategy Factory Source Lake source rows directly" "$fused_hits"
fi
printf '[OK] fidc-backtest-engine has no legacy runtime data-source references\n' printf '[OK] fidc-backtest-engine has no legacy runtime data-source references\n'