The test timed out because the skill itself was slow, not because the test waited too briefly. A session's browser stayed behind just as long for a real user.
The holder now gives Chrome 2 s to close on its own, then exits. When it exits, Playwright kills Chrome's process tree and removes its temporary profile. A graceful shutdown keeps nothing worth having: the profile is thrown away either way.
Chrome frozen on purpose (SIGSTOP) to stand in for a shutdown that drags on. The new test does the same.
Both times Chrome ended up killed and its profile removed; the difference is how long it stayed behind. Without the freeze, on an idle machine, the browser goes in about 1 s, as before.
bun test --parallel with 6 extra busy processes (yes > /dev/null) on this Mac.
| Run | Result | Duration |
|---|---|---|
| 1 | browser skill: all pass · 1811 pass, 0 fail | 86 s |
| 2 | browser skill: all pass · 1810 pass, 1 fail (another test) | 95 s |
| 3 | browser skill: all pass · 1810 pass, 2 fail (other tests) | 142 s |
| 4 | browser skill: all pass · 1810 pass, 2 fail (other tests) | 111 s |
The other failures, in five other test files, are other tests timing out on the loaded machine; they have nothing to do with closing the browser. The new test fails on the old code (the browser still isn't gone after 6 s) and passes on the new one.