mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #324] fix(p2p): resolve OSS layers through digest facade #349
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#349
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/324
Author: @WindSongShaoGe
Created: 9/28/2026
Status: 🔄 Open
Base:
main← Head:fix/p2p-digest-oss-read📝 Commits (1)
c081818fix(p2p): resolve OSS layers through digest facade📊 Changes
4 files changed (+585 additions, -21 deletions)
View changed files
📝
docs/src/internals/p2p-design.md(+3 -1)📝
src/overlaybd/p2p/facade.rs(+144 -13)📝
storage/overlaybd/src/image/image_file.rs(+367 -6)📝
storage/overlaybd/src/image/image_service.rs(+71 -1)📄 Description
What
Resolve digest-only OSS snapshot layers through the P2P facade. Preserve UUID-first reads and fall back to the origin when peer opens or subsequent reads fail.
Why
PR #304 publishes layers under their committed digest, including compressed and descriptorless uploads. Consumers still only try the UUID facade before opening OSS, so layers without a UUID cannot use those providers. A successful peer open also needs origin fallback if later reads fail.
Related issue
Follow-up to #304. No issue-closing claim.
Scope and non-goals
Includes the digest read route, lazy origin fallback, focused regression tests, and design documentation. The dedicated two-node full-chain test harness will be submitted separately. No publication changes, TCP_NODELAY tuning, or snapshot-format changes.
Design and behavior changes
/p2p-digest/{digest}using the existing canonical layer identity, descriptor validation, and bounded Range handling shared with the UUID route.Compatibility and operations
Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Negative controls: temporarily disabling digest lookup makes the digest-hit regression fail; removing read-time fallback makes the peer-loss regression fail; eagerly initializing the origin runtime makes the lazy-initialization regression fail. All mutations were reverted before the final successful checks.
Skipped checks and reasons: no aggregate capability/VM suites or two-node full-chain E2E rerun for this focused read-side change. Tests use local HTTP fixtures and mock P2P descriptors independently of publication. Historical full-chain results do not validate this exact commit. No Go/schema changes or performance benchmark.
Risks and reviewer notes
Digest probing adds a peer lookup before origin fallback. Review the lazy fallback's tar/ZFile reopening and the peer client's pinned-runtime lifecycle. The facade itself does not hold OSS credentials or perform OSS fallback. End-to-end snapshot recovery depends on both #304's publication fix and this read-side change and will be validated with the subsequent full-chain test PR.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.