Repository navigation
fix(cleanup): compare container mounts as a set (restored from #614) - #626
Merged
Merged
Conversation
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The docker-container action records `docker inspect` identity at plan time and compares it at apply time and again after recovery capture. Docker returns `Mounts` in no fixed order, so an untouched exited container was refused with "Container identity or execution state changed since plan" (reproduced 2026-11-06 in the PostgreSQL round-2 cleanup, where the plan and a fresh inspect differed only in mount order). identity() now sorts Mounts by type, name, source and destination, and both checks compare through same(), which normalizes the recorded side too, so plans written before this change still apply. A changed image, state, mount set or new process still refuses. Tests: two inspect payloads that differ only in mount order pass the apply check (new and old-format plans); a changed, missing or replaced mount, a changed image or a changed state refuses before any Docker command. The order test fails on the previous code. Full tools/test_cleanup.py: 46 OK. docs/general/cleanup.md describes the identity comparison. Production LOC: 102831 -> 102831 (delta 0) Scope: tools/production_loc.py at the parent and staged tree (core 38395, engine 61777, api 2659, dsh 0); tools-, test- and docs-only change. Reference absent (retired R9c; last counted 65,417 at tree 498dd19). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restored PR from #614 targeting layerfs_v2_0_0. Fixes cleanup script comparing container mounts without ordering.