From 89bfbbef8f049b272298f80f912ee9c91dfd4473 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 10:28:44 +0000 Subject: [PATCH] docs: clarify behavior of extract_remote_path with multiple 'processed' dirs Added detailed docstring explaining that the function only removes the first occurrence of 'processed' from the path, not all occurrences. This documents the current implementation behavior. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- tests/test_filename_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_filename_utils.py b/tests/test_filename_utils.py index 9cbf3976..c22f99cf 100644 --- a/tests/test_filename_utils.py +++ b/tests/test_filename_utils.py @@ -487,7 +487,12 @@ class TestExtractRemotePathEdgeCases: assert result == "remote/file.pdf" def test_multiple_processed_directories(self): - """Test path with multiple 'processed' directories.""" + """Test path with multiple 'processed' directories. + + The function uses list.remove() which only removes the FIRST occurrence + of 'processed' in the path. This is the current implementation behavior. + If all occurrences should be removed, the function would need to be updated. + """ from app.utils.filename_utils import extract_remote_path result = extract_remote_path("/base/processed/subdir/processed/file.pdf", "/base", "/remote")