Skip to content

snapshot: caller annotations on push, export the envelope marshal - #15

Merged
CMGS merged 1 commit into
mainfrom
push-annotations-envelope-marshal
Aug 3, 2026
Merged

snapshot: caller annotations on push, export the envelope marshal#15
CMGS merged 1 commit into
mainfrom
push-annotations-envelope-marshal

Conversation

@CMGS

@CMGS CMGS commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Two contract additions for the vk-cocoon peer-restore path (cocoonstack/vk-cocoon#63):

  • PushOptions.Annotations — caller-supplied annotations are merged into the manifest at build time. vk-cocoon currently stamps its from-node annotation by re-getting and re-putting the manifest after every hibernate push; with this field the stamp rides in the single push, closing the window where a concurrent wake reads an unstamped manifest.
  • MarshalEnvelope — exports the snapshot.json construction the pull path already uses internally. vk-cocoon's peer staging currently hand-copies the envelope schema; this gives both sides one source of truth.

Behavior of existing callers is unchanged: an empty Annotations map merges nothing, and writeSnapshotEnvelope now delegates to MarshalEnvelope with byte-identical output.

Verified: go test -race ./..., make lint (GOOS=linux+darwin, 0 issues), asl ./... clean.

PushOptions.Annotations rides into the manifest at build time so callers
stop amending the manifest in a second registry round trip after the
push. MarshalEnvelope exposes the snapshot.json construction pull
already used internally, so downstream stops hand-copying the schema.
@CMGS
CMGS merged commit 9bfeb8f into main Aug 3, 2026
4 checks passed
@CMGS
CMGS deleted the push-annotations-envelope-marshal branch August 3, 2026 11:23
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