mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #32] [CLOSED] fix(snapshot): isolate registry publications on delete #130
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/32
Author: @catyans
Created: 7/28/2026
Status: ❌ Closed
Base:
main← Head:fix/snapshot-publication-delete-safety-pr📝 Commits (2)
ab03c3cfix(snapshot): isolate registry publications on delete3780276fix(snapshot): hide durable deletion tombstones📊 Changes
6 files changed (+182 additions, -58 deletions)
View changed files
📝
src/snapshot/repository/backends/common/acr/manifest.rs(+31 -0)📝
src/snapshot/repository/backends/common/acr/publisher.rs(+28 -9)📝
src/snapshot/repository/backends/oss/repository.rs(+87 -49)📝
src/snapshot/repository/backends/posixfs/catalog.rs(+1 -0)📝
src/snapshot/repository/interfaces.rs(+4 -0)📝
src/snapshot/types/snapshot.rs(+31 -0)📄 Description
Summary
repoBlobUrlmetadata instead of treating cleanup as successful.Motivation
OCI registries delete manifests by content digest. Previously, two snapshot
publications with the same config and OverlayBD layer descriptors produced the
same manifest bytes and digest. Deleting either publication by digest could
therefore invalidate tags owned by another snapshot.
The manifest now includes:
Attached drives use their complete generated publication tag. Only the small
manifest object becomes unique; config and layer blobs remain content-addressed
and shared.
Deletion semantics
Before external cleanup begins, the OSS record is durably marked
deleting.Public
get,list, and alias resolution hide this tombstone, while internaldeletion lookup retains access by ID or alias to the publication metadata
needed for retry. Manifest deletion already treats registry
404 Not Foundassuccess, so retries after partially completed cleanup remain idempotent.
If external cleanup fails, the alias, tombstoned catalog record, and snapshot
artifacts are retained. The alias is removed only after external cleanup and
catalog deletion succeed.
Verification
Validated on an Alibaba Cloud Linux 3 node with Rust 1.97.1:
The new tests verify that identical layers with different publication tags
produce different manifest digests, invalid persisted repository metadata fails
cleanup, legacy records deserialize without a tombstone, and deleting records
are hidden from readers.
Fixes #16.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.