test(issue-17): herdr 0.9.3 keeps a removed directory as the restored pane's cwd

test_b_only_the_resumed_sessions_restored_shell_is_closed asserted that a
pane whose directory was removed comes back in $HOME. That is herdr 0.9.1;
herdr 0.9.3 keeps the old path. The cwd check now takes either, with a note
on which version does what; closing never looked at the cwd.
herdr_restore.py's docstring said the same "$HOME when that directory is
gone" and now names both versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCGpJXhSZasJLU38ksDghe
This commit is contained in:
GodopuandClaude Opus 5.5 committed 2026-10-08 07:52:40 +09:00
1 parent 56d0bfda54
commit 25c99704f2
2 files changed
+8 -4

No files matched your search

+4 -2
View File
@@ -1,8 +1,10 @@
"""Issue #45 (B): close the restored empty shells of the session being resumed.
With restore-on-restart off (lib_py/herdr_config.py) a restarted MAM server
still brings every saved pane back - as an empty shell in its old cwd, or in
$HOME when that directory is gone. A pane keeps the `agent_session` its agent
still brings every saved pane back - as an empty shell in its old cwd. When
that directory is gone, herdr 0.9.1 opens the shell in $HOME and herdr 0.9.3
keeps the old path; nothing below looks at the cwd. A pane keeps the
`agent_session` its agent
reported before the server died. resume_session.sh calls this once, right
before it spawns, with the id it is about to resume; a pane is closed only when
all of these hold: