[Other] in_trash misses Windows Recycle Bin paths on Linux (Path does not split backslashes)
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 76/100
Research direction
Start with in_trash() in strata_control/discovery.py and the failing test tests/terminal/test_issues_022.py::Issue3410TrashIsNotAnInstall::test_trash_folders_are_recognised. Check how Path(path).parts handles backslashes on Linux, then run that test on Linux. Done means the Windows Recycle Bin path is recognized and the test passes.
Written by the indexing model from the issue text.
Description
Problem: the in_trash() helper added for #3410 (strata_control/discovery.py) never matches a Windows Recycle Bin path when it runs on Linux: Path(path).parts treats a backslash as an ordinary character on POSIX, so the whole path arrives as ONE part and $RECYCLE.BIN is never seen. Upstream's own #3410 test fails on Linux for exactly this reason.
Expected: the function's docstring names $RECYCLE.BIN\.. and test_issues_022.py asserts a Windows Recycle Bin path on every OS the suite runs on; both should hold on Linux.
Actual (reproduced locally, clean v0.2.1.3, Linux, Python 3.14):
git checkout v0.2.1.3
python -m pytest "tests/terminal/test_issues_022.py::Issue3410TrashIsNotAnInstall::test_trash_folders_are_recognised" -q
> AssertionError: False is not true : C:\$Recycle.Bin\S-1-5-21\$R123\Strata
or directly: python -c "from strata_control.discovery import in_trash; print(in_trash(r'C:\$Recycle.Bin\S-1-5-21\x\Strata'))" prints False on Linux, True on Windows.
Scope of the user-visible effect, stated honestly: on Linux, paths read live from a mounted NTFS drive arrive POSIX-style (/mnt/d/$RECYCLE.BIN/...) and DO match today; the gap is Windows-shaped path strings on Linux - the case the docstring and the test name (and a Linux install reading a settings file written by its Windows twin would produce).
CI note: the repository's workflows run only tests/terminal/test_runtime.py (terminal-minimal-server) plus the monitor jobs, so test_issues_022.py is not exercised on Linux in CI - which is why this shipped.
Suggested fix (one line; a no-op on Windows, where Path already split the backslashes):
parts = [x.lower() for p in Path(path).parts for x in p.split("\\")]
With exactly this line, tests/terminal/test_issues_022.py passes in full on Linux (26 passed). Our fork merge carried the fix already; posting so upstream can take it.
Reproduction status: reproduced locally (test failure on the clean tag).
Environment: v0.2.1.3 (cbfd5b92), Linux, Python 3.14; no GPU involved - Terminal/discovery code only.
- Dominant language
- C++
- Stars
- 11.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Niko1221/Strata
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Niko1221/Strata#3524 · 2 comments ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Niko1221/Strata#3512 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 3 days
-
[Benchmark] Community benchmark on AMD Radeon RX 6800 XTX + 48gb of RAM for 256k tokens of contextOpen
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Niko1221/Strata#3468 · 1 comment ·
Maintainers usually reply within 3 days
Similar issues
-
v9.6.0: CMake incorrectly enforces presence of libevdevPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Rowan (2017) electron heating gives NaN for beta > beta_max; clip() then sets electrons to kel_minOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
parthenon-hpc-lab/kharma#213 · 1 comment ·
Maintainers usually reply within 3 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
metasequoiaime/msime#9113 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tone-3000/tone3000-plugin#257 · 1 comment ·
Maintainers usually reply within 1 day
-
Locked plugin flip-flops position on every refresh after being disabledPossibly taken @Illustar0 claimed this today. Openissue report
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ModOrganizer2/modorganizer#2449 ·