[PR #397] [MERGED] feat: persist source sandbox user metadata in published snapshot records #404

Closed
opened 2026-10-29 14:23:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/397
Author: @guozy18
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @yingdi-shan

Base: main ← Head: sync/source-sandbox-metadata


📝 Commits (1)

  • 4dc7324 feat: persist source sandbox user metadata in published snapshot records

📊 Changes

9 files changed (+90 additions, -15 deletions)

View changed files

📝 crates/e2e-tests/tests/snapshot_oss_e2e_test.rs (+1 -0)
📝 src/api/impls/sandbox.rs (+1 -0)
📝 src/snapshot/backends/tests.rs (+7 -3)
📝 src/snapshot/catalog.rs (+9 -3)
📝 src/snapshot/types/snapshot.rs (+61 -7)
📝 tests/integration/orchestrator.rs (+8 -2)
📝 tests/integration/posix_startup_pack.rs (+1 -0)
📝 tests/integration/snapshot.rs (+1 -0)
📝 tests/integration/snapshot_attached_drive.rs (+1 -0)

📄 Description

What

Persist the source sandbox user metadata in SnapshotSource::Sandbox as informational provenance.

Why

Published snapshots currently retain the source sandbox ID but lose its user metadata.

N/A — synchronization of the existing implementation.

Scope and non-goals

Copy metadata at capture, persist it through the shared catalog, and keep source-ID filtering unchanged. Metadata does not affect launching or HTTP response models.

Design and behavior changes

The optional field defaults to None when reading legacy records and is omitted when absent. The upstream shared catalog replaces the source commit's separate POSIX/OSS changes. No standalone snapshot info tool is introduced.

Compatibility and operations

  • Public API or generated protocol: unchanged.
  • Configuration or defaults: unchanged.
  • Snapshot format: additive optional source_sandbox_metadata in the source record.
  • Upgrade and rollback: legacy records remain readable; absent metadata retains the old serialized shape.
  • Host requirements: unchanged.

Validation

Validated on upstream main 949cec2 plus this single commit, independently of the other synchronization PRs.

PASS: make fmt
PASS: cargo clippy --locked -p agentenv -p agentenv-e2e-tests --all-targets --all-features -- -D warnings
PASS: cargo test --locked -p agentenv --lib snapshot::types::snapshot::tests (16 tests)
PASS: cargo test --locked -p agentenv --lib snapshot::catalog::tests (9 tests)
PASS: cargo test --locked -p agentenv --lib snapshot::backends::tests (10 tests)
PASS: git diff --check

Clippy and all 35 focused tests ran on Linux as a non-root user. The backward-compatible metadata serde regression is included. E2E targets were compile-checked; full KVM/OSS E2E and the full workspace test suite were not rerun for this isolated branch.

Risks and reviewer notes

Source metadata is persisted only as provenance. The original author, author date and complete commit message are preserved. Full KVM capture/restore E2E was not rerun for this isolated branch.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/397 **Author:** [@guozy18](https://github.com/guozy18) **Created:** 10/20/2026 **Status:** ✅ Merged **Merged:** 10/20/2026 **Merged by:** [@yingdi-shan](https://github.com/yingdi-shan) **Base:** `main` ← **Head:** `sync/source-sandbox-metadata` --- ### 📝 Commits (1) - [`4dc7324`](https://github.com/kvcache-ai/AgentENV/commit/4dc73249b93de69ec4842a9f67e9c9178c278687) feat: persist source sandbox user metadata in published snapshot records ### 📊 Changes **9 files changed** (+90 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `crates/e2e-tests/tests/snapshot_oss_e2e_test.rs` (+1 -0) 📝 `src/api/impls/sandbox.rs` (+1 -0) 📝 `src/snapshot/backends/tests.rs` (+7 -3) 📝 `src/snapshot/catalog.rs` (+9 -3) 📝 `src/snapshot/types/snapshot.rs` (+61 -7) 📝 `tests/integration/orchestrator.rs` (+8 -2) 📝 `tests/integration/posix_startup_pack.rs` (+1 -0) 📝 `tests/integration/snapshot.rs` (+1 -0) 📝 `tests/integration/snapshot_attached_drive.rs` (+1 -0) </details> ### 📄 Description ## What Persist the source sandbox user metadata in SnapshotSource::Sandbox as informational provenance. ## Why Published snapshots currently retain the source sandbox ID but lose its user metadata. ## Related issue N/A — synchronization of the existing implementation. ## Scope and non-goals Copy metadata at capture, persist it through the shared catalog, and keep source-ID filtering unchanged. Metadata does not affect launching or HTTP response models. ## Design and behavior changes The optional field defaults to None when reading legacy records and is omitted when absent. The upstream shared catalog replaces the source commit's separate POSIX/OSS changes. No standalone snapshot info tool is introduced. ## Compatibility and operations - Public API or generated protocol: unchanged. - Configuration or defaults: unchanged. - Snapshot format: additive optional source_sandbox_metadata in the source record. - Upgrade and rollback: legacy records remain readable; absent metadata retains the old serialized shape. - Host requirements: unchanged. ## Validation Validated on upstream main `949cec2` plus this single commit, independently of the other synchronization PRs. ```text PASS: make fmt PASS: cargo clippy --locked -p agentenv -p agentenv-e2e-tests --all-targets --all-features -- -D warnings PASS: cargo test --locked -p agentenv --lib snapshot::types::snapshot::tests (16 tests) PASS: cargo test --locked -p agentenv --lib snapshot::catalog::tests (9 tests) PASS: cargo test --locked -p agentenv --lib snapshot::backends::tests (10 tests) PASS: git diff --check ``` Clippy and all 35 focused tests ran on Linux as a non-root user. The backward-compatible metadata serde regression is included. E2E targets were compile-checked; full KVM/OSS E2E and the full workspace test suite were not rerun for this isolated branch. ## Risks and reviewer notes Source metadata is persisted only as provenance. The original author, author date and complete commit message are preserved. Full KVM capture/restore E2E was not rerun for this isolated branch. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:23:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#404
No description provided.