Skip to content

test: add ACP integration test#6150

Merged
codefromthecrypt merged 1 commit intomainfrom
acp-integration-test
Dec 18, 2025
Merged

test: add ACP integration test#6150
codefromthecrypt merged 1 commit intomainfrom
acp-integration-test

Conversation

@codefromthecrypt
Copy link
Collaborator

@codefromthecrypt codefromthecrypt commented Dec 17, 2025

Summary

Adds an integration test for the ACP (Agent Client Protocol) server mode. The test verifies the full request/response cycle:

  • Protocol initialization handshake
  • Session creation
  • Prompt submission
  • Streaming response chunk reception

This provides regression coverage for ACP functionality and serves as executable documentation for how ACP clients should interact with goose.

Type of Change

  • Tests

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

cargo test -p goose --test acp_integration_test

The test spawns goose-cli acp, connects via stdio, and validates the streamed response matches expected content from a mocked OpenAI endpoint (wiremock).

Related Issues

once merged, I can write the impl and test for #6111

mockall = "0.13.1"
wiremock = "0.6.0"
tokio = { version = "1.43", features = ["full"] }
tokio-util = { version = "0.7.15", features = ["compat"] }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed because the ACP SDK uses futures traits

@codefromthecrypt codefromthecrypt force-pushed the acp-integration-test branch 2 times, most recently from f53bdb9 to 6f30eb1 Compare December 17, 2025 09:49
Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice

@codefromthecrypt codefromthecrypt marked this pull request as ready for review December 17, 2025 23:34
Copilot AI review requested due to automatic review settings December 17, 2025 23:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an integration test for the Agent Client Protocol (ACP) server mode in goose. The test validates the complete ACP workflow by spawning goose-cli acp as a subprocess, connecting via stdio, and verifying the protocol handshake, session creation, prompt handling, and streaming response reception.

Key changes:

  • Adds OpenAI streaming response test fixture for mocking
  • Implements comprehensive ACP integration test with wiremock-based OpenAI endpoint mocking
  • Adds agent-client-protocol as a dev dependency for test implementation

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
crates/goose/tests/test_data/openai_chat_completion_streaming.txt Adds SSE-formatted OpenAI streaming response fixture for mocking
crates/goose/tests/acp_integration_test.rs Implements full ACP integration test covering initialization, session creation, prompting, and response streaming
crates/goose/Cargo.toml Adds agent-client-protocol and tokio-util compat feature to dev-dependencies
Cargo.lock Updates lockfile with new agent-client-protocol dependency

@michaelneale
Copy link
Collaborator

nice - amazing how simple this looks.

Copilot AI review requested due to automatic review settings December 18, 2025 00:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.

Adds an integration test that verifies goose can handle a basic ACP
session: initialize, create session, send prompt, and receive streamed
response chunks. Uses wiremock to mock the OpenAI API.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt
Copy link
Collaborator Author

re-squashing as accepting the copilot commit tripped the DCO. Otherwise it is the same as reviewed

@codefromthecrypt codefromthecrypt merged commit dfd207b into main Dec 18, 2025
18 checks passed
@codefromthecrypt codefromthecrypt deleted the acp-integration-test branch December 18, 2025 01:26
zanesq added a commit that referenced this pull request Dec 18, 2025
* 'main' of github.com:block/goose: (28 commits)
  Clean PR preview sites from gh-pages branch history (#6161)
  fix: make goose reviewer less sycophantic (#6171)
  revert /reply to previous behavior (replacing session history) when full conversation provided (#6058)
  chore: manually update version (#6166)
  Integrate pricing with canonical model (#6130)
  Regenerate canonical models when release branch is created. (#6127)
  fix: use correct parameter name in read_module handler (#6148)
  docs: blog for code mode MCP (#6126)
  test: add ACP integration test (#6150)
  docs: auto download updates (#6163)
  fix: respect default_enabled value of platform extensions (#6159)
  docs: skills (#6062)
  fix: add conditional configuration for GOOSE_BIN_DIR in PATH (#5940)
  Update dependencies to help in Fedora packaging (#5835)
  fix: make goose reviewer less bad (#6154)
  docs: create/edit recipe button (#6145)
  fix(google): Fix 400 Bad Request error with Gemini 3 thought signatures (#6035)
  fix: we don't need to warn about tool count when in code mode (#6149)
  deps: upgrade agent-client-protocol to 0.9.0 (#6109)
  fix(providers): fix for gemini-cli on windows to work around cmd's multiline prompt limitations #5911 (#5966)
  ...

# Conflicts:
#	ui/desktop/src/api/sdk.gen.ts
#	ui/desktop/src/hooks/useAgent.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments