// tell previous ramping version, if present, that it's no longer ramping
if prevRampingVersion != "" && prevRampingVersion != newRampingVersion {
commitRoutingFirst := workflow.GetVersion(ctx, "commit-routing-first", workflow.DefaultVersion, 0) >= 0
workflow.go
if asyncMode && commitRoutingFirst {
// Commit routing config before demoting prev ramp to avoid partial state on failure.
d.State.RoutingConfig = pendingRoutingConfig