feat(sidecar): refuse backwards image swaps (never downgrade below running) #156

Merged
charles merged 1 commit from feat/no-backwards-image-updates into main 2026-08-27 18:22:49 +00:00
Owner

Guard #1 of the no-backwards-updates work: the mesh-sidecar refuses to swap a container to an image whose .Created is not strictly newer than the running image. Fail-open on missing timestamps. Prevents the stale-desired/cache downgrade that hit db1 live. Coordinator-side don`t-show/offer guards (#2/#3) to follow.

Guard #1 of the no-backwards-updates work: the mesh-sidecar refuses to swap a container to an image whose .Created is not strictly newer than the running image. Fail-open on missing timestamps. Prevents the stale-desired/cache downgrade that hit db1 live. Coordinator-side don`t-show/offer guards (#2/#3) to follow.
Add _image_is_strictly_newer() helper that compares image .Created timestamps
and wire it into _reconcile_one (member containers) and reconcile_coordinator_swap
(coordinator in-place swap). Returns False (block) when target is same-age or
older, None (fail-open, allow) when either timestamp is missing/unparseable.
17 new tests, 205 total passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXQLnx5xqLwiNChwcj3N27
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/projectoctet!156
No description provided.