mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #283] feat(p2p): make Iroh backend optional #315
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#315
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/283
Author: @CharlesXu-HQ
Created: 9/13/2026
Status: 🔄 Open
Base:
main← Head:feat/p2p-iroh-optional📝 Commits (1)
f254c65feat(p2p): make iroh backend optional📊 Changes
9 files changed (+65 additions, -10 deletions)
View changed files
📝
.github/workflows/release.yml(+1 -1)📝
Cargo.toml(+3 -2)📝
Makefile(+3 -3)📝
config/default.toml(+2 -1)📝
deploy/docker/Dockerfile.agentenv(+2 -2)📝
docs/src/configuration/reference.md(+1 -1)📝
src/p2p/config.rs(+13 -0)📝
src/p2p/error.rs(+1 -0)📝
src/p2p/mod.rs(+39 -0)📄 Description
What
Make the Iroh P2P backend optional behind a
p2p-irohCargo feature. Default development and unit-test builds no longer compileirohoriroh-blobs, while the release Makefile targets, Docker image, and release workflow continue to include Iroh support.When P2P is enabled with
transport = "iroh"in a binary built without the feature, startup now returns a clear error naming the required feature.Why
Iroh brings a large transitive dependency graph into ordinary builds even when P2P is disabled. This implements the P2 dependency-isolation item in #8 without changing the capabilities of distributed release artifacts.
Related issue
Part of #8 (P2)
Scope and non-goals
This PR includes Cargo feature wiring, compile-time gates around the Iroh implementation, a missing-feature error, release build flags, focused tests, and configuration documentation. It does not change the P2P configuration schema, transport behavior when Iroh is compiled in, or the default
p2p.enabled = falsesetting.Design and behavior changes
irohandiroh-blobsare optional dependencies selected byp2p-iroh.DisabledP2pTransportin a no-feature build.p2p-irohfails before backend initialization and reports the feature required to enable it.p2p-iroh.Compatibility and operations
--features p2p-iroh.Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons:
make test-unitand integration tests require broader host capabilities and are unrelated to the compile-time gate; focused no-feature and feature-enabled P2P tests passed.services/and generated code are unchanged.Risks and reviewer notes
Custom source builds that previously enabled P2P without build flags must enable
p2p-iroh. The repository's formal release paths have been updated to preserve their existing runtime capability.Cargo also reports an existing future-incompatibility notice in the third-party
proc-macro-error2crate; it is not emitted as a project Clippy warning.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.