Skip to content

The agent that grows with you

fix(tests): pin the allowed_root-relative folder header through the production entry point

teknium1090c4b9866d0
diff --git a/tests/agent/test_context_references.py b/tests/agent/test_context_references.py
index 4b07cf19dac..44aa5e742c6 100644
--- a/tests/agent/test_context_references.py
+++ b/tests/agent/test_context_references.py
@@ -124,13 +124,13 @@ def test_folder_listing_outside_cwd_inside_widened_allowed_root(tmp_path: Path):
assert result.expanded
assert not result.warnings
- assert "shared/" in result.message
+ # Header is the allowed_root-relative display, never the absolute path.
+ assert "\nshared/\n" in result.message
+ assert str(tmp_path) not in result.message
assert "a.txt" in result.message
assert "b.txt" in result.message
-
-
def test_folder_listing_inside_cwd_unchanged(sample_repo: Path):
"""Control: in-cwd listings keep their cwd-relative display shape."""
from agent.context_references import preprocess_context_references