Skip to content

agent_servers: Move the legacy ACP adapter into v1 - #65606

Closed
benbrandt wants to merge 3 commits into
benbrandt/acp-v2-connection-auth-foundationfrom
benbrandt/acp-v1-module
Closed

benbrandt wants to merge 3 commits into
benbrandt/acp-v2-connection-auth-foundationfrom
benbrandt/acp-v1-module

Conversation

@benbrandt

@benbrandt benbrandt commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Stacked on #65601's reviewed head (2a522533d423ad). This is the mechanical module-boundary follow-up, not another lifecycle or session-backend change. Retarget after the prerequisite lands; #65601 and #65582 are unchanged.

  • Move AcpConnection, its defaults, the v1 builder/capabilities/wire handlers, legacy session/config/MCP operations and session-list implementation into acp/v1.rs alongside acp/v2.rs.
  • Keep foreground routing/context, shared session/config data, v2 client ingress, canonical permission/elicitation application, shared terminal-auth construction and error/lifecycle helpers in the root/shared modules.
  • Keep only the v1 config-setting wire method on the shared config data in v1.rs; the shared constructor/state stays in the root. The existing mixed session record is not redesigned in this extraction.
  • Preserve public paths through root reexports (AcpConnection, AcpSessionList, connect, the Gemini terminal-auth constant and conditional test_support). Consumer call sites are unchanged. The shared-runtime test imports the moved private v1 driver directly.
  • Keep compatibility/ingress tests alongside the legacy harness they exercise; v2 connection/auth tests stay in v2.rs. Test names gain the v1 module prefix but their bodies and scheduler behavior are unchanged.

The root is now 755 lines rather than 10,318. Shared and legacy declaration bodies were compared against a mechanical partition of the original source after rustfmt; they match. Changes beyond relocation are imports/reexports and the two internal visibility adjustments needed by shared ingress and the runtime regression.

Production still negotiates v1. No public type renames, wire/storage changes, session-state redesign, new backend operations or selection changes.

Review

This is a large source relocation, not thousands of new implementation lines. For copy-aware review:

git diff -B -M origin/benbrandt/acp-shared-client-runtime...HEAD -- crates/agent_servers/src/acp.rs crates/agent_servers/src/acp/v1.rs crates/agent_servers/src/acp/runtime.rs

Git recognizes v1.rs as a 93%-similar copy of the old adapter. Review the retained root boundary and the small import/visibility changes rather than re-reviewing unchanged test bodies.

Validation

  • cargo test -p agent_servers -p acp_thread -p acp_tools -p agent_ui -p agent --lib --locked -- --test-threads=1: 1,679 passed, 11 ignored; agent_servers retains all 102 tests.
  • SEED=200 ITERATIONS=100 cargo test -p agent_servers --lib sdk_ --locked: 25-test SDK group, with GPUI seeds 200–299.
  • SEED=200 ITERATIONS=100 cargo test -p agent_servers --lib shared_runtime --locked: five-test runtime group, with GPUI seeds 200–299.
  • GITHUB_ACTIONS=true ./script/clippy -p acp_thread -p agent_servers -p acp_tools -p agent_ui -p agent -p zed --locked.
  • cargo rustc -p agent_servers --lib --locked -- -D warnings for the plain production configuration.
  • cargo check -p agent_servers -p acp_thread -p agent_ui --all-targets --features test-support --locked, including consumer/test-support reexports.
  • cargo check -p zed --bins --locked.
  • RUSTDOCFLAGS='-D warnings' cargo doc -p agent_servers --no-deps --locked.
  • Rustfmt, diff checks and declaration-body equivalence after formatting.

Live-agent/UI, E2E execution and local Linux/Windows/remote workflows were not run. README's manual review marker and the local migration plan remain excluded.

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Oct 14, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Oct 14, 2026
Base automatically changed from benbrandt/acp-shared-client-runtime to benbrandt/acp-v2-connection-auth-foundation October 14, 2026 18:58
@benbrandt
benbrandt deleted the branch benbrandt/acp-v2-connection-auth-foundation October 14, 2026 18:58
@benbrandt benbrandt closed this Oct 14, 2026
@benbrandt

Copy link
Copy Markdown
Member Author

Replaced by #65607 against main. Both prerequisites have landed; the extraction branch was rebased without source changes (identical stable patch ID). GitHub refuses reopening this PR because its old base branch was deleted, and refuses retargeting while it is closed. Review history is retained here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant