Skip to content

Commit f487fce

Browse files
authored
feat(acp): Add E2E tests for agent subprocess lifecycle and fix cleanup (#83)
## Summary 🤖 Generated with [Nori](https://www.npmjs.com/package/nori-ai) - 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 - [x] All 6 new E2E tests pass (`cargo test -p tui-pty-e2e --test agent_switching`) - [x] Unit tests pass (`cargo test -p codex-acp`) - [x] Clippy passes - [x] Code formatted with `cargo fmt` Share Nori with your team: https://www.npmjs.com/package/nori-ai
1 parent 04c9240 commit f487fce

13 files changed

Lines changed: 978 additions & 16 deletions

File tree

.claude/settings.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@
44
"additionalDirectories": [
55
"/home/clifford/Documents/source/nori/cli/.claude/profiles",
66
"/home/clifford/Documents/source/nori/cli/.claude/skills"
7+
],
8+
"allow": [
9+
"Bash(cat:*)",
10+
"Bash(cd:*)",
11+
"Bash(git status:*)",
12+
"Bash(mkdir:*)",
13+
"Bash(tree:*)",
14+
"Bash(cargo build:*)",
15+
"Bash(cargo b:*)",
16+
"Bash(cargo check:*)",
17+
"Bash(cargo c:*)",
18+
"Bash(cargo clean:*)",
19+
"Bash(cargo clippy:*)",
20+
"Bash(cargo doc:*)",
21+
"Bash(cargo d:*)",
22+
"Bash(cargo fmt:*)",
23+
"Bash(cargo run:*)",
24+
"Bash(cargo r:*)",
25+
"Bash(cargo test:*)",
26+
"Bash(cargo t:*)",
27+
"Bash(cargo search:*)"
728
]
829
}
9-
}
30+
}

codex-rs/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)