Skip to content

meta: a pod annotation carries caller OCI annotations for its pushed snapshots - #36

Merged
CMGS merged 1 commit into
mainfrom
snapshot-annotations
Sep 28, 2026
Merged

CMGS merged 1 commit into
mainfrom
snapshot-annotations

Conversation

@CMGS

@CMGS CMGS commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

What

  • meta.AnnotationSnapshotAnnotations = vm.cocoonstack.io/snapshot-annotations: a JSON object of OCI annotations that vk-cocoon stamps on every snapshot it pushes for the pod (the hibernate push and the delete-time latest push).
  • meta.ReadSnapshotAnnotations(pod): the typed reader. Absent or empty means no annotations; a malformed value, a non-string value, or any key under the cocoonstack. prefix is an error.
  • docs/meta.md: the key in the vm.cocoonstack.io/ row and one paragraph in the snapshot contract.

Why

snapshot.PushOptions.Annotations already lets a caller stamp manifest annotations, but vk-cocoon pushes hibernate and latest snapshots on its own, so a business layer that creates the pod had no way to put its own metadata (owner, lineage, manifest hash) on those artifacts. The engine stays a carrier: it copies the values and never reads them. The cocoonstack. prefix is reserved because the wire format already uses it for cocoonstack.snapshot.baseimage (the wake identity guard) and vk-cocoon for cocoonstack.snapshot.from-node (peer discovery); a caller must not be able to override either.

Consumer

vk-cocoon PR to follow, pinned to this branch's commit until this merges.

Gates

make lint 0 issues on linux and darwin, make fmt-check clean, asl ./... clean on both GOOS, go test -race ./... green (GOWORK=off). Hot path: none; the reader runs once per snapshot push.

…snapshots

vm.cocoonstack.io/snapshot-annotations holds a JSON object that the pusher
stamps on every snapshot it publishes for the pod. The business layer owns the
keys (owner, lineage, manifest hash) and reads them back from the registry; the
engine never interprets them. Keys under cocoonstack. stay reserved so a caller
cannot override the baseimage identity guard or the peer-discovery hint.
@CMGS
CMGS merged commit f04bdda into main Sep 28, 2026
4 checks passed
@CMGS
CMGS deleted the snapshot-annotations branch September 28, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant