TORRENT_GAPS precursors called for unified engine profile persistence/validation before expanding tracker/NAT features.
Legacy per-field stored procedures risked drifting from the shared validator and API/runtime expectations.
Runtime → FFI mapping lived inline, making it harder to clamp unsafe values or extend with new options; native tests lacked a reusable harness.
Decision:
Retired the per-field engine profile update functions/procedures in favour of the single update_engine_profile entry point (migration 0005_engine_profile_cleanup), keeping DB/API validation aligned.
Introduced EngineOptionsPlan::from_runtime_config to clamp/disable invalid runtime values before crossing the FFI boundary and surface guard-rail warnings in the native session.
Added a reusable NativeSessionHarness (feature-gated) to spin up temp-backed libtorrent sessions for config application tests.