fix: restore ea: bridge in config + wire optimizer_loop to EARegistry

Root cause: Removing ea: from config.yaml broke 4 call sites in
optimizer_loop.py (_execute_run, _build_components) and main.py that
still read cfg['ea']. Server started but MT5 never launched.

Fixes:
  config.yaml          - Restored ea: block as bridge for legacy callers
  optimizer_loop.py    - _build_components: loads EARegistry, creates
                         IniBuilder(schema=schema) instead of manifest path
                         _execute_run: uses self._profile.{name,symbol,tf}
                         instead of cfg['ea']; passes profile to runner.run()
  mt5/runner.py        - Validation + TradeLog now use EAProfile data when
                         profile is provided (legacy fallback preserved)

Tested:
  7/7 pre-flight checks pass (config, registry, schema, IniBuilder, runner,
  MutationEngine, OptimizerLoop._build_components)
  Live browser test: Start clicked → MT5 launched → logs appeared → Reports
  page loaded (9 cards) → Back to dashboard navigated in-tab
  System fully operational
This commit is contained in:
LEGSTECH Optimizer
2026-04-13 20:08:39 +00:00
parent d5a8973c05
commit c4b5fe0ad0
4 changed files with 53 additions and 9 deletions
+8 -2
View File
@@ -1,8 +1,14 @@
# MT5 EA Strategy Optimizer — Master Configuration
# EA identity (name, symbol, timeframe, .set file) is now managed
# in ea_registry.yaml via the EA Registry. See ea/registry.py.
# EA identity is managed in ea_registry.yaml (source of truth for new code).
# The ea: block below is kept as a bridge for legacy code paths.
# ─────────────────────────────────────────────
ea:
name: "LEGSTECH_EA_V2"
file: "LEGSTECH_EA_V2"
symbol: "XAUUSD"
timeframe: "H1"
periods:
train_start: "2022.01.01"
train_end: "2023.12.31"