config: remove the never-read PlatformConfig.pip_value (rule 8)
Every live reader of a pip value goes through PAIR_INFO[...]["pip_value"] (signal_aggregator, gpu_backtest, diagnose_filters) or TradeSetup.pip_value; no code read the PlatformConfig field. The three PlatformConfig(...) constructions that passed it (gpu_backtest x2, diagnose_filters) and the inline construction in the factory-equivalence test drop the kwarg. Neither config fingerprint hashes the field, so logged fingerprints are unchanged. The removed-field test now also asserts pip_value stays gone. Parity: 12-month M5 and H1 books regenerated byte-identical (md5 a28fed4becd056466c26d6a947e1a0e5 / d20405ef64f069770c258bb9bed1ac90). Suite: 461 passed, 0 failed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156YhogLytzj9P2iH1skGbL
This commit is contained in:
+3
-2
@@ -2072,7 +2072,6 @@ def _():
|
||||
inline_cfg = PlatformConfig(
|
||||
symbol=XAUUSD,
|
||||
display_name="XAU/USD",
|
||||
pip_value=0.10,
|
||||
primary_timeframe=tf,
|
||||
confirmation_timeframes=ctfs,
|
||||
)
|
||||
@@ -3259,10 +3258,12 @@ def _():
|
||||
assert deepseek_api_key(AppConfig()) == ""
|
||||
|
||||
|
||||
@test("config.py: hardcoded twelve_data_api_key field is gone")
|
||||
@test("config.py: removed PlatformConfig fields stay gone (twelve_data_api_key, pip_value)")
|
||||
def _():
|
||||
assert not hasattr(PlatformConfig(), "twelve_data_api_key"), \
|
||||
"credentials must not live in committed source"
|
||||
# pip value comes from PAIR_INFO; the config field was never read (2026-09-06).
|
||||
assert not hasattr(PlatformConfig(), "pip_value")
|
||||
|
||||
|
||||
@test("telegram_bot: credentials, quality, pairs, loops from app_config")
|
||||
|
||||
Reference in New Issue
Block a user