test: wait for the pane's shell to exit before removing the isolation test's directory #1169
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 298 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.341
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #1169"
general
weight: 0.35
mvschwarz
claude-interactive-isolation.test.ts("classic Claude pane-shell isolation") sometimes fails in its cleanup on macOS runners withENOTEMPTY: directory not empty, rmdir '…/claude-isolation-…'. The assertions had already passed, and a rerun passed.Why the directory isn't empty:
tmux kill-server.HISTFILEis in that directory. When the server hangs up, Bash writes its history as it exits. On macOS that's/bin/bash3.2, which opens the file with create-and-truncate.rmSynchas already unlinkedhistoryby then, Bash creates it again, and the finalrmdirfails.force: trueignores it.The change, in the test only:
$$, the first field ofrcInitial). It doesn't use#{pane_pid}, which can be a wrapper shell that tmux starts the command through and that exits first.kill-server, it waits up to 5 seconds for that shell to exit (process.kill(pid, 0)until it throws). It then removes the directory withmaxRetries: 5in every case. Cleanup runs after the test body rather than infinally, and errors are reported in order: the test's own failure, then "pane shell did not exit within 5 s" if the shell is still alive, then a removal error.finallyas before.🤖 Generated with Claude Code
https://claude.ai/code/session_01WfCu2MmcrSGRNX9Rjv1h6u
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Tests
Improved reliability of interactive isolation test cleanup by waiting for the pane’s shell process to exit before removing temporary files. Temporary-directory removal is retried if needed, and cleanup errors are reported after any test failure or shell-exit timeout. This helps ensure cleanup problems are surfaced clearly without obscuring the original test failure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->