feat(deploy): coordinator/API backwards-image-update guard (reject backwards pins + hide backwards updates) #157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/no-backwards-updates-coordinator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes the backwards-image-update guard on the coordinator/API side (guard #1, the sidecar, shipped in #156).
What
Three coordinated parts that prevent the deploy plane from ever pinning or advertising an image older than what's running:
docker-registry-client.ts):fetchImageCreated(ref, digest)resolves an image's OCI config.createdbuild-time (manifest → config blob, manifest-list aware, 401→bearer retry, immutable by-digest cache).peekImageCreatedis the sync cache peek.isStrictlyNewer(target, running)fails open — returnstruewhenever either timestamp is null/unparseable;falseonly when both are known and target ≤ running.members.tsupdate-image,mesh-hosts.tsupdate-sidecar): reject a backwards pin with 409 before writingdesired_image_digest/desired_sidecar_image_digest. Skipped entirely when running digest is unknown; any registry error falls through to allow.members.tslist /docker-registry-image-poller.ts): the members list hideslatest_image_digest(nulls it) when it is not strictly newer than running, so the UI never shows a backwards "update available". Hot path uses only the synchronous cache peek + fire-and-forget warm — never awaits a registry fetch.Safety
Tests
47 pass / 0 fail across the three suites (registry created-fetch, update-image backwards-guard, members-list backwards-hide).
Follow-ups (non-blocking, noted in review)
git.forked.io, unaffected.GET /members/:idnot gated — visual only; the update button hits the 409-guarded route.🤖 Generated with Claude Code