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.

Claude-Session: https://claude.ai/code/session_0156YhogLytzj9P2iH1skGbL
This commit is contained in:
Harwinder Sekhon
2026-09-06 16:57:40 -04:00
parent 04bdc1737f
commit 2502bcc396
4 changed files with 3 additions and 6 deletions
-1
View File
@@ -220,7 +220,6 @@ def run_diagnosis(
platform_cfg = PlatformConfig( platform_cfg = PlatformConfig(
symbol=pair, symbol=pair,
display_name=display, display_name=display,
pip_value=pair_info["pip_value"],
primary_timeframe=primary_tf, primary_timeframe=primary_tf,
confirmation_timeframes=list(confirm_tfs), confirmation_timeframes=list(confirm_tfs),
) )
-2
View File
@@ -1763,7 +1763,6 @@ def run_backtest(
platform_cfg = PlatformConfig( platform_cfg = PlatformConfig(
symbol=bt_cfg.pair, symbol=bt_cfg.pair,
display_name=PAIR_INFO[bt_cfg.pair]["display"], display_name=PAIR_INFO[bt_cfg.pair]["display"],
pip_value=PAIR_INFO[bt_cfg.pair]["pip_value"],
primary_timeframe=bt_cfg.primary_tf, primary_timeframe=bt_cfg.primary_tf,
confirmation_timeframes=list(bt_cfg.confirmation_tfs), confirmation_timeframes=list(bt_cfg.confirmation_tfs),
) )
@@ -2402,7 +2401,6 @@ def main(argv: Optional[List[str]] = None) -> int:
platform_cfg = PlatformConfig( platform_cfg = PlatformConfig(
symbol=pair, symbol=pair,
display_name=PAIR_INFO[pair]["display"], display_name=PAIR_INFO[pair]["display"],
pip_value=PAIR_INFO[pair]["pip_value"],
primary_timeframe=primary_tf, primary_timeframe=primary_tf,
confirmation_timeframes=confirm_tfs or [Timeframe.H1, Timeframe.H4], confirmation_timeframes=confirm_tfs or [Timeframe.H1, Timeframe.H4],
) )
-1
View File
@@ -332,7 +332,6 @@ class PlatformConfig:
symbol: str = XAUUSD symbol: str = XAUUSD
display_name: str = "XAU/USD" display_name: str = "XAU/USD"
pip_value: float = 0.10
primary_timeframe: Timeframe = Timeframe.H1 primary_timeframe: Timeframe = Timeframe.H1
confirmation_timeframes: List[Timeframe] = field( confirmation_timeframes: List[Timeframe] = field(
+3 -2
View File
@@ -2072,7 +2072,6 @@ def _():
inline_cfg = PlatformConfig( inline_cfg = PlatformConfig(
symbol=XAUUSD, symbol=XAUUSD,
display_name="XAU/USD", display_name="XAU/USD",
pip_value=0.10,
primary_timeframe=tf, primary_timeframe=tf,
confirmation_timeframes=ctfs, confirmation_timeframes=ctfs,
) )
@@ -3259,10 +3258,12 @@ def _():
assert deepseek_api_key(AppConfig()) == "" 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 _(): def _():
assert not hasattr(PlatformConfig(), "twelve_data_api_key"), \ assert not hasattr(PlatformConfig(), "twelve_data_api_key"), \
"credentials must not live in committed source" "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") @test("telegram_bot: credentials, quality, pairs, loops from app_config")