Ensure FromTrainRef merge strategy uses the correct SHAs
Problem to solve
In !125921 (merged), we introduced a potential data consistency issue: If the merge preferences used to create the train ref are different from the merge preferences at the time of the actual merge, then the recorded squash_commit_sha
and merge_commit_sha
can be incorrect. This is a bugfunctional, but left as a follo-up on purpose for iteration, and is safe because the changes are behind a feature flag that is disabled by default.
The chances of this causing problems are fairly slim, but it would be prohibitively expensive to fix this after the fact (and probably not possible to backfill with full accuracy).
Proposal
Option 1: Persist the params during ref creation and use (and verify) them during merge.
Option 2: Any time the squash or merge method preferences change, invalidate every running merge train.
Option 3: Prevent changing these settings while a merge train is running.