mirror of
https://github.com/docker/compose.git
synced 2026-10-12 02:13:08 +00:00
Move volume divergence detection and recreation out of the imperative pre-reconcile path (ensureVolume/removeDivergedVolume) and into the reconciliation plan, activating the dormant planRecreateVolume seam. A diverged volume now produces an explicit, forward-only sequence: stop containers -> remove containers -> remove volume -> create volume -> create containers. Container re-creation is delegated to reconcileContainers (affected services are cleared from the observed snapshot so they are scheduled fresh, gated on the CreateVolume node), and the recreation cascades to namespace/volume-sharing dependents. User confirmation (recreate, data will be lost) is consulted while building the plan via reconciler.prompt; declining leaves the volume untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Nicolas De Loof <[email protected]>