Skip to content

Add API for Snapshot metadata - #1860

Merged
ludfjig merged 2 commits into
hyperlight-dev:mainfrom
ludfjig:snapshot-metadata
Sep 29, 2026
Merged

ludfjig merged 2 commits into
hyperlight-dev:mainfrom
ludfjig:snapshot-metadata

Conversation

@ludfjig

@ludfjig ludfjig commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds api to store arbitrary Serilaize into a snapshot. This is persisted on disk as json. Useful for hyperlight-wasm and js to tag snapshtos and embed extra data needed.

First commit is a refactor to keep immutable state in it's own arc, second commit adds the feature. Snapshots are still immutable

Closes #1860

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Older v3 readers may reject metadata-bearing snapshots due to the expanded config schema.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Adds immutable, namespaced JSON metadata APIs for snapshots, persisted through OCI config blobs.

Changes:

  • Adds metadata read/write APIs.
  • Shares immutable snapshot state through Arc.
  • Adds persistence tests, documentation, and changelog updates.
File Summary
src/​hyperlight_host/​src/​sandbox/​snapshot/​mod.rs Snapshot state sharing and metadata APIs
src/​hyperlight_host/​src/​sandbox/​snapshot/​file/​mod.rs Metadata serialization and loading
src/​hyperlight_host/​src/​sandbox/​snapshot/​file/​config.rs OCI config metadata field
src/​hyperlight_host/​src/​sandbox/​snapshot/​file_tests.rs Metadata behavior and persistence tests
docs/​snapshot-versioning.md Compatibility documentation
docs/​snapshot-oci-format.md OCI metadata format documentation
CHANGELOG.md User-facing feature entry

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/hyperlight_host/src/sandbox/snapshot/file/config.rs
@ludfjig
ludfjig force-pushed the snapshot-metadata branch 2 times, most recently from 5c441b1 to 84a39e6 Compare September 28, 2026 18:40
@ludfjig ludfjig added kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. ready-for-review PR is ready for (re-)review labels Sep 28, 2026
Comment thread src/hyperlight_host/src/sandbox/snapshot/file/mod.rs
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>

@jprendes jprendes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread docs/snapshot-oci-format.md
@github-actions github-actions Bot removed the ready-for-review PR is ready for (re-)review label Sep 28, 2026
@ludfjig
ludfjig merged commit fe19bf0 into hyperlight-dev:main Sep 29, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants