Skip to content

feat(acp): Add E2E tests for agent subprocess lifecycle and fix cleanup#83

Merged
CSRessel merged 4 commits into
devfrom
feature/e2e-agent-switching
Dec 8, 2025
Merged

feat(acp): Add E2E tests for agent subprocess lifecycle and fix cleanup#83
CSRessel merged 4 commits into
devfrom
feature/e2e-agent-switching

Conversation

@CSRessel
Copy link
Copy Markdown
Collaborator

@CSRessel CSRessel commented Dec 8, 2025

Summary

🤖 Generated with Nori

  • Add 6 E2E tests in agent_switching.rs to verify ACP agent subprocess handling:
    • Subprocess spawning with unique PIDs
    • Session switch via /new creates new subprocess
    • Old subprocess cleanup after switch (no zombies)
    • Cleanup timing (outside prompt turns)
    • Different agents use different subprocesses
    • Model picker switch creates new subprocess
  • Add mock-model-alt to ACP registry for testing agent switching
  • Fix subprocess cleanup: kill child process when AcpConnection is dropped
  • Fix Arc reference deadlock that prevented cleanup from happening

Test Plan

  • All 6 new E2E tests pass (cargo test -p tui-pty-e2e --test agent_switching)
  • Unit tests pass (cargo test -p codex-acp)
  • Clippy passes
  • Code formatted with cargo fmt

Share Nori with your team: https://www.npmjs.com/package/nori-ai

…up\n\n🤖 Generated with [Nori](https://nori.ai)\n\nCo-Authored-By: Nori <contact@tilework.tech>

- Add 6 E2E tests verifying ACP agent subprocess handling

- Add mock-model-alt to registry for testing agent switching

- Fix subprocess cleanup: kill child process when AcpConnection dropped

- Fix Arc reference deadlock that prevented cleanup
@CSRessel CSRessel merged commit f487fce into dev Dec 8, 2025
1 of 3 checks passed
@CSRessel CSRessel deleted the feature/e2e-agent-switching branch December 8, 2025 23:22
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.

1 participant