ADR 035 — Engine selection and registry
- Status: Accepted (2026-08-10) — ratified in chat / field ADR package (first-class module + Nautilus)
- Related: ADR 034, principal plan
Context
R1/R2 propose metaclass interception to rebind _run_engine. R3 and repo practice favor explicit composition:
- Backtests:
BaseBacktestEngine+EngineCapabilities+_ENGINE_SHORTCUTS. - Worker:
Executor(finalexecute) +ExecutorRouter.select_backend. - Components:
@register,RLComponent,InfrastructureProviderMeta, etc.
ExecutionProfile is duplicated: worker Enum vs orchestration PortableModel — medium translation gap.
Decision
- Engine selection uses explicit protocol + registry/factory/config (
batch/replay/paper/live/ profile enums). NoSimulationMeta. - New engines subclass existing bases and register; they implement only
_execute_impl/ enginerun— never fork risk/idempotency pipelines. - MONEY plane always routes to
NativeExecutor(existing rule) — never Ray/Dask/Spark. - Own a single ExecutionProfile translator (Phase 2) so worker and orchestration profiles remain interoperable without dual divergent enums forever. Prefer promoting a shared portable definition into
alphaswarm_coreor a facade module — not a third copy.
Consequences
- Typecheckers/DI/tests see the selected engine explicitly.
- Golden replay tests become the parity mechanism, not class-construction magic.
- CI should reject new
SimulationMetaintroductions.