mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #317] [MERGED] fix(cli): install a rustls crypto provider so aenv build works over HTTPS #344
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#344
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/317
Author: @nblintao
Created: 9/23/2026
Status: ✅ Merged
Merged: 9/24/2026
Merged by: @yingdi-shan
Base:
main← Head:fix/aenv-rustls-provider📝 Commits (1)
e4e87c7fix(cli): install a rustls crypto provider so aenv build works over HTTPS📊 Changes
4 files changed (+30 additions, -0 deletions)
View changed files
📝
Cargo.lock(+1 -0)📝
crates/aenv/Cargo.toml(+1 -0)📝
crates/aenv/src/client/buildkit.rs(+18 -0)📝
crates/aenv/src/main.rs(+10 -0)📄 Description
What
aenvinstalls rustls's aws-lc-rs provider as the process-level default at startup.Why
With an
https://API URL,aenv buildpanics as soon as it opens the BuildKit tunnel:The CLI's dependencies compile in both of rustls's providers: reqwest's
rustlsfeature enables aws-lc-rs, and ureq'stlsfeature enables ring. reqwest and ureq each configure their provider explicitly, so ordinary HTTPS requests work. tokio-tungstenite's TLS connector uses the process-level default instead, and rustls cannot choose one when both providers are present, so the firstwss://connection panics.buildkit_tunnelmaps anhttpsAPI URL towss, so everyaenv buildagainst an HTTPS endpoint hits this; anhttpURL maps towsand is unaffected.Reproduced with the v0.2.2 release binary (
aenv-darwin-aarch64) against an HTTPS endpoint, and on Linux by the new unit test (see Validation).Related issue
None filed; the panic and its cause are above.
Scope and non-goals
Only the choice of provider. aws-lc-rs is the provider reqwest already uses. The duplicate provider is left in place; removing ring would mean changing ureq's TLS setup, which is a larger change than this fix needs.
Design and behavior changes
install_crypto_provider()is the first thingmainruns.install_defaultfails only when a provider is already installed, which serves equally well, so its result is ignored.Compatibility and operations
rustlsbecomes a direct dependency ofaenv, at the 0.23.37 already inCargo.lock; no new crates.Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
This PR's CI passes: fmt, clippy, unit-tests, agentenv-tests, envd-tests, ublk-tests, and both e2e-tests jobs (single-node and docker-compose). The new test opens a
wss://connection to a local listener that accepts and hangs up, so the client gets as far as setting up TLS:With the provider line removed, the same test fails with the panic above:
Skipped checks and reasons: an end-to-end
aenv buildagainst an HTTPS endpoint with a binary built from this branch was not run; the unit test covers the connection setup that panicked.Risks and reviewer notes
Low. The change is
crates/aenv/src/main.rs; the test is incrates/aenv/src/client/buildkit.rs.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.