Observed
A full npm test run leaves about 70 directories in $TMPDIR: about 65 nmsh-semantic-* and about 6 nmsh-zdotdir-*. Repeated runs accumulate thousands of them, each small but a real inode cost. Measured on the v0.6 stack.
Cause
nmsh-semantic-*: SemanticService creates a temporary ZDOTDIR and removes it in kill(), which TerminalApp.stop() calls. Many tests construct a TerminalApp and never stop it. Production exits are clean; only an abrupt SIGKILL of a window leaves one behind.
nmsh-zdotdir-*: shells killed with SIGKILL skip ShellSession cleanup.
Suggested fix (test hygiene, not a release blocker)
Stop every TerminalApp a test creates (a shared helper would help). Or run the test suite with a per-run TMPDIR that is removed afterwards. Keep it short, because Unix socket paths inside it are length-limited.
Already fixed
The nmsh-svc-* leaks from session-service tests (shells writing their spool after the test removed the directory) were fixed in #205 and #207.
Observed
A full
npm testrun leaves about 70 directories in$TMPDIR: about 65nmsh-semantic-*and about 6nmsh-zdotdir-*. Repeated runs accumulate thousands of them, each small but a real inode cost. Measured on the v0.6 stack.Cause
nmsh-semantic-*:SemanticServicecreates a temporary ZDOTDIR and removes it inkill(), whichTerminalApp.stop()calls. Many tests construct aTerminalAppand never stop it. Production exits are clean; only an abrupt SIGKILL of a window leaves one behind.nmsh-zdotdir-*: shells killed with SIGKILL skipShellSessioncleanup.Suggested fix (test hygiene, not a release blocker)
Stop every
TerminalAppa test creates (a shared helper would help). Or run the test suite with a per-runTMPDIRthat is removed afterwards. Keep it short, because Unix socket paths inside it are length-limited.Already fixed
The
nmsh-svc-*leaks from session-service tests (shells writing their spool after the test removed the directory) were fixed in #205 and #207.