fixup(hallways): address gemini-code-assist review on PR #1780

Two catches on tests/test_hallways_palace_scoped.py
TestMultiPalaceIsolation.test_save_then_load_under_different_palace_returns_empty:

1. Stale comment referencing the removed _HALLWAY_FILE back-compat shim
   (deleted in the prior fixup commit). Removed.
2. _legacy_hallway_file was not monkey-patched, so the test isolation gap
   let _load_hallways check the host's real ~/.mempalace/hallways.json
   when evaluating the legacy-warning branch. Now patched to a tmp_path
   sibling, matching the helper pattern used in test_palace_graph_tunnels.
This commit is contained in:
Grace Gettert 2026-06-11 19:18:54 +00:00
parent 4fd12318df
commit f5ee33b216
No known key found for this signature in database
1 changed files with 7 additions and 2 deletions

View File

@ -132,8 +132,13 @@ class TestMultiPalaceIsolation:
palace_a.mkdir(parents=True)
palace_b.mkdir(parents=True)
# Force the module constant to match the (default) legacy path so the
# back-compat shim doesn't override the resolver.
# Pin the legacy-file lookup to a temp path so the legacy-warning
# branch never checks the host's real ~/.mempalace/hallways.json.
monkeypatch.setattr(
hallways_mod,
"_legacy_hallway_file",
lambda: str(tmp_path / "legacy-hallways.json"),
)
monkeypatch.setenv("MEMPALACE_PALACE_PATH", str(palace_a))
hallways_mod._save_hallways(