mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #196] Add heartbeat discovery and provider-neutral fleet planning #243
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#243
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/196
Author: @nikhilsimha
Created: 8/19/2026
Status: 🔄 Open
Base:
main← Head:nikhil/heartbeat-fleet-planning📝 Commits (1)
f2e0ccefeat(services): add heartbeat fleet planning📊 Changes
22 files changed (+2060 additions, -115 deletions)
View changed files
📝
docs/src/configuration/env-vars.md(+3 -0)📝
docs/src/configuration/reference.md(+4 -0)📝
docs/src/internals/architecture.md(+6 -3)📝
docs/src/internals/services.md(+6 -3)📝
services/README.md(+20 -1)📝
services/api/proto/scheduler.pb.go(+473 -42)📝
services/api/proto/scheduler.proto(+44 -0)📝
services/api/proto/scheduler_grpc.pb.go(+129 -15)➕
services/gateway/internal/fleet_admin.go(+147 -0)➕
services/gateway/internal/fleet_admin_test.go(+86 -0)📝
services/gateway/internal/server.go(+45 -17)📝
services/gateway/internal/server_test.go(+24 -0)📝
services/scheduler/cmd/main.go(+33 -7)➕
services/scheduler/internal/fleet_plan.go(+311 -0)➕
services/scheduler/internal/fleet_plan_test.go(+192 -0)➕
services/scheduler/internal/heartbeat_discovery_test.go(+126 -0)📝
services/scheduler/internal/node_registry.go(+94 -8)📝
services/scheduler/internal/service.go(+109 -6)📝
services/shared/config/config.go(+128 -12)📝
services/shared/config/config_test.go(+42 -0)...and 2 more files
📄 Description
Why this change
AgentENV knows which sandboxes exist, which nodes are full, and whether a node is safe to remove. A cloud autoscaler only sees VM-level signals, so it can remove a node that still owns a running or paused sandbox. A static node list also means every node addition or replacement requires a Scheduler config update and restart.
This change lets AgentENV make the sandbox-aware capacity and drain decisions while a small external executor creates and deletes VMs. We get automatic scale-out, safe scale-in, and node replacement without putting cloud credentials or cloud-specific code inside AgentENV.
High-level approach
AgentENV never receives cloud credentials, and the infrastructure executor never guesses whether a sandbox node is safe to remove.
Summary
Safety
Validation
make -C services testcargo fmt --all -- --checkcargo clippy -p agentenv --lib -- -D warningscargo test -p agentenv observability::reporter --lib🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.