Skip to content

test(acp): accept prompt persistence kwargs in MCP E2E mocks#18047

Merged
ethernet8023 merged 1 commit into
NousResearch:mainfrom
stephenschoettler:fix/acp-persist-user-message-test-mocks
Apr 30, 2026
Merged

test(acp): accept prompt persistence kwargs in MCP E2E mocks#18047
ethernet8023 merged 1 commit into
NousResearch:mainfrom
stephenschoettler:fix/acp-persist-user-message-test-mocks

Conversation

@stephenschoettler

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the current main test failure in tests/acp/test_mcp_e2e.py after the ACP prompt path started forwarding persist_user_message into AIAgent.run_conversation(...).

The production agent supports that keyword, but these local E2E test doubles had narrow mock signatures. This PR makes the mocks accept future optional keyword arguments so the tests continue to exercise ACP tool-call event behavior instead of failing at the adapter boundary.

Related Issue

Fixes current main CI regression from Tests run 25180124129.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Updated two ACP MCP E2E run_conversation test doubles in tests/acp/test_mcp_e2e.py to accept **kwargs.
  • Preserved the behavior under test: ACP tool start/result event emission and call-id pairing.

How to Test

  1. Reproduce on current main: gh run view 25180124129 --repo NousResearch/hermes-agent --log-failed
  2. Run the focused failing tests.
  3. Run the full affected file with xdist.

Validation Status

Passed locally:

HOME="$TMP/home" HERMES_HOME="$TMP/hermes" CI=true TZ=UTC LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONHASHSEED=0 \
  OPENROUTER_API_KEY='' OPENAI_API_KEY='' NOUS_API_KEY='' \
  /home/w0lf/hermes-agent/venv/bin/python -m pytest \
  tests/acp/test_mcp_e2e.py::TestMcpRegistrationE2E::test_prompt_with_tool_calls_emits_acp_events \
  tests/acp/test_mcp_e2e.py::TestMcpRegistrationE2E::test_prompt_tool_results_paired_by_call_id \
  -q -o addopts='' --tb=short
# 2 passed in 0.72s

HOME="$TMP/home" HERMES_HOME="$TMP/hermes" CI=true TZ=UTC LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONHASHSEED=0 \
  OPENROUTER_API_KEY='' OPENAI_API_KEY='' NOUS_API_KEY='' \
  /home/w0lf/hermes-agent/venv/bin/python -m pytest tests/acp/test_mcp_e2e.py \
  -q -o addopts='' --tb=short -n 4
# 8 passed, 1 warning in 2.05s

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Arch Linux, Python 3.14 local venv

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) - N/A
  • I've updated cli-config.yaml.example if I added/changed config keys - N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows - N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide - test-only mock signature change, no runtime platform impact
  • I've updated tool descriptions/schemas if I changed tool behavior - N/A

For New Skills

N/A

Screenshots / Logs

Current main failure:

TypeError: TestMcpRegistrationE2E.test_prompt_with_tool_calls_emits_acp_events.<locals>.mock_run_conversation() got an unexpected keyword argument 'persist_user_message'
TypeError: TestMcpRegistrationE2E.test_prompt_tool_results_paired_by_call_id.<locals>.mock_run() got an unexpected keyword argument 'persist_user_message'

@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have comp/acp Agent Communication Protocol adapter tool/mcp MCP client and OAuth labels Apr 30, 2026
@ethernet8023 ethernet8023 merged commit b737af8 into NousResearch:main Apr 30, 2026
6 checks passed
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…persist-user-message-test-mocks

test(acp): accept prompt persistence kwargs in MCP E2E mocks
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
…persist-user-message-test-mocks

test(acp): accept prompt persistence kwargs in MCP E2E mocks
dannyJ848 pushed a commit to dannyJ848/hermes-agent that referenced this pull request May 17, 2026
…persist-user-message-test-mocks

test(acp): accept prompt persistence kwargs in MCP E2E mocks
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…persist-user-message-test-mocks

test(acp): accept prompt persistence kwargs in MCP E2E mocks
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…persist-user-message-test-mocks

test(acp): accept prompt persistence kwargs in MCP E2E mocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/acp Agent Communication Protocol adapter P3 Low — cosmetic, nice to have tool/mcp MCP client and OAuth type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants