mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #386] [MERGED] refactor: move layer references and volume backing out of snapshot #394
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#394
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/386
Author: @Primary33
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @yingdi-shan
Base:
main← Head:refactor/shared-layer-refs📝 Commits (1)
a79be73refactor: move layer references and volume backing out of snapshot📊 Changes
9 files changed (+205 additions, -188 deletions)
View changed files
➕
src/repository/layer_config.rs(+163 -0)📝
src/repository/mod.rs(+2 -0)📝
src/snapshot/resolver.rs(+8 -158)📝
src/snapshot/types/drive.rs(+1 -2)📝
src/snapshot/types/mod.rs(+5 -5)📝
src/snapshot/types/snapshot.rs(+1 -22)📝
src/types/mod.rs(+2 -0)➕
src/types/overlaybd_layer.rs(+22 -0)📝
src/volume/mod.rs(+1 -1)📄 Description
What
Move
OverlaybdLayerRef,ManagedLayer, andExternalLayerfromsnapshottocrate::types, and movematerialize_volume_backingwith its helpermanaged_layer_configfromsnapshot::resolvertocrate::repository. The code is moved without changes.snapshotkeeps re-exporting the types, so existing paths still work.Why
These types describe repository layers that snapshots, volumes, and, with #347, published images all store, and the volume backing config needs only the repository. While they live in
snapshot, any module that publishes layers has to depend onsnapshot; #347 needsimageto use them without a cycle between top-level modules (module_cycles). Split out of #347 during review so the move can be reviewed on its own.Related issue
N/A. Prerequisite for #347; design proposal: #378.
Scope and non-goals
Moves only. No behavior, API, or storage changes. The only caller outside
snapshotthat named the old path,VolumeManager, now callscrate::repository::materialize_volume_backing.Design and behavior changes
None.
Compatibility and operations
Validation
Based on
f7f478d. Run on a Linux test host as a non-root user with isolatedAENV_TEST_STATE_DIRandAENV_TEST_DEPS_PATH:make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons: integration tests, because only code moves; the moved unit test
materializes_volume_backing_with_backend_layer_urlsruns inmake test-unit. Noservices/, schema, or documented behavior changes. Benchmarks: not applicable.Risks and reviewer notes
src/types/overlaybd_layer.rsandsrc/repository/layer_config.rsare the code removed fromsrc/snapshot/types/snapshot.rsandsrc/snapshot/resolver.rs;git diff --color-movedshows the moves.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.