mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #289] [MERGED] Enhance tools with versioned releases and lifecycle test coverage #319
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#319
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/289
Author: @guozy18
Created: 9/14/2026
Status: ✅ Merged
Merged: 9/16/2026
Merged by: @yingdi-shan
Base:
main← Head:main📝 Commits (3)
733ed8efeat(tools): resolve immutable releases for launch and restore37edd3dtest(tools): cover sharing and version retention in lifecycle tests1e8dfd3feat(tools): support reproducible OCI tools releases📊 Changes
22 files changed (+845 additions, -207 deletions)
View changed files
📝
.github/actions/sandbox-ci-setup/action.yml(+5 -1)📝
.github/workflows/release.yml(+3 -0)📝
deploy/docker/Dockerfile.agentenv(+7 -10)📝
docs/src/configuration/reference.md(+17 -5)📝
docs/src/internals/sandbox-testing.md(+1 -1)📝
src/image/oci_image.rs(+3 -2)📝
src/image/resolver.rs(+49 -0)📝
src/sandbox/firecracker/config.rs(+1 -16)📝
src/sandbox/firecracker/sandbox.rs(+53 -14)📝
src/sandbox/ublk/device.rs(+120 -43)📝
src/sandbox/ublk/mod.rs(+1 -1)📝
src/setup/deps.rs(+210 -20)📝
src/setup/mod.rs(+6 -2)📝
src/setup/overlaybd.rs(+101 -0)📝
storage/ublk-daemon/src/client.rs(+1 -1)📝
storage/ublk-daemon/src/protocol.rs(+4 -3)📝
storage/ublk-daemon/src/server.rs(+9 -7)📝
storage/ublk-daemon/tests/ublk_daemon_test.rs(+10 -5)📝
tests/integration/fc.rs(+179 -0)📝
tools-image/Dockerfile(+12 -40)...and 2 more files
📄 Description
What
Publish tools as ordinary OCI rootfs images and load immutable tools releases through shared read-only ublk devices. Snapshots continue to store only
tools_drive_version.For example, after the default changes from
0.1.0to0.1.1, new sandboxes use0.1.1. A cold node restoring a snapshot created with0.1.0fetches that recorded release instead of requiring an operator to preinstall its tools drive.Why
Tools updates should follow normal runtime deployments while retaining old snapshot behavior. Publishers should not have to produce OverlayBD-native images, and snapshot storage should not contain duplicate tools layers.
Related issue
Implements the tools release and snapshot restore design discussed for this change; no linked issue.
Scope and non-goals
Includes tools image publication, dependency preparation, shared device lifecycle, and launch/restore resolution. Running and paused sandboxes retain their original tools version. This PR does not publish a tools release or change the bundled default version.
Design and behavior changes
io.agentenv.tools-drive.format=oci-rootfs-v1. v1 fixes the OverlayBD converter atv1.0.18-aenv.1, layer identity, and sparse 64 GiB geometry so old releases can be reconstructed after runtime upgrades. The virtual capacity is not a 64 GiB download or allocation.--setup-onlyprepares the default tools release during packaging.Compatibility and operations
config/default.tomlis unchanged, and the bundled tools release remains0.1.0.[tools].versioninconfig/deps_manifest.tomlfor the next runtime build. During the first mixed-runtime rollout, keep deployments on the old tools release until every node supportsoci-rootfs-v1, then switch the default.Validation
Validated after rebasing onto
mainat715a4f6, in an isolated Linux environment with a non-root runtime user.cargo fmt --all -- --checkcargo clippy --offline --locked --workspace --all-targets --all-features -- -D warningscargo test --offline --locked -p agentenv --lib -- --test-threads=1: 886 passed, 4 ignored; includes BuildKit, image resolution, tools installation, and snapshot tests.cargo test --offline --locked -p uvm-ublk-daemon --test ublk_daemon_test acquire_overlaybd: 3 passed.The OCI tools integration test is part of the existing
tests/integration/fc.rssuite and uses a local image fixture. It checks a real block device, sharing, read-only access, continued use after a peer stops, and version/device retention across pause/resume. The converter regression reproduces the concurrent-install failure without the lock and verifies one download with the lock.Four existing ignored library tests remain skipped. No new performance comparison or full BuildKit CLI E2E run is claimed. Go services and generated API schemas are unchanged by this PR.
Risks and reviewer notes
Review tools resolver isolation, converter installation/reproducibility, and shared-device release ordering. Restoring an old release depends on retaining its source image; there is intentionally no snapshot-storage fallback for tools.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.