From 27d6740dc5db1f2673ece39c49fe3cbd3e49fb1b Mon Sep 17 00:00:00 2001 From: boris Date: Fri, 3 Jul 2026 07:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E9=BD=90=E5=9B=9E=E6=B5=8B=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E8=9E=8D=E5=90=88=E8=A1=A8=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E5=AE=88=E5=8D=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/verify-no-legacy-data-source.sh | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/scripts/verify-no-legacy-data-source.sh b/scripts/verify-no-legacy-data-source.sh index 23c812e..097bf7d 100755 --- a/scripts/verify-no-legacy-data-source.sh +++ b/scripts/verify-no-legacy-data-source.sh @@ -41,4 +41,42 @@ if [[ -n "$manifest_hits" ]]; then fail "legacy database dependencies are not allowed in fidc-backtest-engine manifests" "$manifest_hits" 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'