test(sandbox): mam_sandbox also drops HERDR_SESSION (reviews 63919c5d / 191f0ec3, non-blocking)

The caller-server helpers read it, so tests branched on whether they ran in
an agent pane. L2 covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
This commit is contained in:
GodopuandClaude Opus 5.5 committed 2026-10-13 10:01:55 +09:00
1 parent 325b056057
commit db7f4cab9c
2 files changed
+5 -1

No files matched your search

+3
View File
@@ -293,7 +293,10 @@ def mam_sandbox(tmp_path, monkeypatch, request):
# A herdr pane exports its server's socket (and pane/tab ids). The real # A herdr pane exports its server's socket (and pane/tab ids). The real
# herdr follows HERDR_SOCKET_PATH over the sandbox HOME, so a call that # herdr follows HERDR_SOCKET_PATH over the sandbox HOME, so a call that
# missed the mock reached the caller's real server and opened panes there. # missed the mock reached the caller's real server and opened panes there.
# HERDR_SESSION resolves under the sandbox HOME, but the caller-server
# helpers read it, so tests branched on whether they ran in a pane.
monkeypatch.delenv("HERDR_SOCKET_PATH", raising=False) monkeypatch.delenv("HERDR_SOCKET_PATH", raising=False)
monkeypatch.delenv("HERDR_SESSION", raising=False)
monkeypatch.delenv("HERDR_PANE_ID", raising=False) monkeypatch.delenv("HERDR_PANE_ID", raising=False)
monkeypatch.delenv("HERDR_TAB_ID", raising=False) monkeypatch.delenv("HERDR_TAB_ID", raising=False)
# Issue #45: the shim bootstrap writes a herdr server config next to the # Issue #45: the shim bootstrap writes a herdr server config next to the
+2 -1
View File
@@ -72,7 +72,8 @@ def test_l1_a_directory_named_shim_is_still_skipped(mam_sandbox, mock_herdr):
PANE_VARS = {"HERDR_SOCKET_PATH": "/nonexistent/sessions/real/herdr.sock", PANE_VARS = {"HERDR_SOCKET_PATH": "/nonexistent/sessions/real/herdr.sock",
"HERDR_PANE_ID": "w9:p1", "HERDR_TAB_ID": "w9:t1", "HERDR_PANE_ID": "w9:p1", "HERDR_TAB_ID": "w9:t1",
"HERDR_WORKSPACE_ID": "w9", "HERDR_SESSION_NAME": "real"} "HERDR_WORKSPACE_ID": "w9", "HERDR_SESSION_NAME": "real",
"HERDR_SESSION": "real"}
@pytest.fixture @pytest.fixture