Repository navigation
loop: align agent transport with TUI/CLI socket-first discovery - #495
Merged
Merged
Conversation
future loop run hardcoded TCP 127.0.0.1:50051, while the TUI/CLI clients discover the agent socket-first via the per-user local IPC boundary. Route AgentClient::connect through the shared transport::connect_channel so the loop control plane connects to the default agent (socket-only) instead of requiring an explicit --grpc-addr agent. - agent_addr() now defaults to the auto sentinel (local IPC) instead of 127.0.0.1:50051; FUTURE_LOOP_AGENT_ADDR still overrides with an explicit TCP address (tests keep using it for mock servers) - connect() reuses future_rpc::transport::connect_channel: explicit TCP first with local fallback; auto selects local-only - isolate FUTURE_AGENT_SOCKET in test cli_root() and the connect_failure_is_wrapped test so 'unreachable agent' cases never fall back to an ambient dev-machine socket - docs/loop-control-plane.md: agent service line matches the zh doc (per-user local IPC by default)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
future loop runhardcoded its agent connection to TCP127.0.0.1:50051, while the TUI/CLI clients discover the agent socket-first via the per-user local IPC boundary (seefuture_rpc::transport). This meant the loop control plane could not reach an agent started the default way (socket-only, no--grpc-addr), and required a separately-flagged TCP agent.This PR routes the loop's agent client through the shared
transport::connect_channeldiscovery so it behaves like every other client.Changes
agent_addr()now defaults to theautosentinel (local IPC) instead of127.0.0.1:50051;FUTURE_LOOP_AGENT_ADDRstill overrides with an explicit TCP address (tests keep using it to point at mock servers).AgentClient::connect()reusesfuture_rpc::transport::connect_channel: explicit TCP first with local IPC fallback;autoselects local-only.cli_root()andconnect_failure_is_wrappedsetFUTURE_AGENT_SOCKETto a tempdir so "unreachable agent" tests never fall back to an ambient dev-machine socket.docs/loop-control-plane.mdagent-service line now matches the zh doc (per-user local IPC by default).Verification
cargo fmt -p future-loop --check✅cargo clippy -p future-loop --all-targets -- -D warnings✅cargo test -p future-loop✅ (all green)future loop modelsstill succeeds against the socket-only agent.