Repository navigation
test(e2e): keep the descendant-kill stand-in's marker path out of argv - #39201
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Claude launches now get --plugin-dir prepended (subagent navigation, #33322), so the stand-in read '--plugin-dir' as its marker path and the spec never saw the detached child. Route the spec on descendant-kill and Claude launch-flag sources.
nwparker
force-pushed
the
nwparker/nightly-e2e-agent-descendant-process-kill
branch
from
November 6, 2026 22:51
1062acc to
d89cdde
Compare
nwparker
enabled auto-merge (squash)
November 6, 2026 22:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
A nightly end-to-end test that checks "closing an agent's terminal also kills the background processes it started" had been failing every night. The product still works; the test's fake agent was misreading its own arguments.
What Changed
claudescript and passes it a file path as its first argument; the script writes the pid of a detached child into that file. Since Orca started adding its own Claude flags (--plugin-dir <dir>, from Claude subagent navigation in feat(claude): navigate and track subagent views from sidebar #33322), the first argument the script received was--plugin-dir. It wrote the pid to a file named--plugin-dirin its working directory, so the test waited 20 s for a file that never appeared and failed with "stand-in agent never spawned its detached child".feature.agent-descendant-killroute now selects it for changes to the descendant-kill code (pty-descendant-*,terminal-descendant-shutdown,terminal-session-teardown,local-pty-termination) and tosrc/main/claude/agent-view/, which owns the injected Claude flags. Unit tests cover the route.Why
Adding
--plugin-dirto Claude launches is intended product behavior, so the test needed fixing, not the product. Taking the marker path out of argv makes the fake agent behave like a real one, which also gets flags it didn't ask for. The other options were to parse$@for the last argument or to turn off subagent navigation in the test. Both are more fragile, and turning off navigation would test a launch path that users don't get by default.Linked Issue
N/A (nightly E2E failure; maintainer fix)
Visual Proof
N/A: test-only change, no UI or behavior change.
Testing
Reproduced the failure locally on macOS. While the test ran,
psshowed the stand-in running asnode spawn-detached.cjs --plugin-dir.With the fix,
tests/e2e/agent-descendant-process-kill.spec.tspassed 3 times in a row locally (headless, background launch), and nosleep 31337was left running afterwards.pnpm test config/scripts/workflow/source-routing config/scripts/ci/...passes,pnpm tcpasses, and oxlint and the changed-code quality gate are clean.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Test and CI-routing only. The new route adds this one spec (about 20 s) to PRs that touch the listed files. Revert is a plain revert.
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
The spec is still skipped on Windows (POSIX-only), as before.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)