[GH-ISSUE #4531] [TUI] The DeepSeek engine's start_env test asserts on PATH, but the code writes LD_LIBRARY_PATH off Windows #2044

Closed
opened 2026-11-04 01:56:12 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @TheHubUser4860938 on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4531

Problem: tests/terminal/test_dsv41_engine.py::HipPackageLibraryPath::test_rocm_bin_comes_after_the_package_folder builds an environment and then reads it back by the name PATH:

env = dsv41_engine.start_env(folder / EXE, {"PATH": "C:\\Windows"})
first = env["PATH"].split(os.pathsep)[:2]
self.assertEqual(first, [str(folder), str(folder / "rocm" / "bin")])

But start_env writes the variable the platform actually uses - strata_control/dsv41_engine.py:41: LIB_VAR = "PATH" if os.name == "nt" else "LD_LIBRARY_PATH", and line 61 puts the folders on LIB_VAR. On Linux and macOS the code leaves PATH exactly as it was handed in, so the assertion can only ever pass on a Windows host. Measured here it fails with the input string split on the POSIX separator, which is also what the fixture's "C:\\Windows" means to str.split(":"):

AssertionError: Lists differ: ['C', '\\Windows'] != ['/tmp/strata-dsv41-hip-…/rocm/bin', …]

Environment:
Environment:
Strata Version: 0.2.7.1 (source checkout at tag v0.2.7.1, commit 46c152a1; the test file discussed is upstream's own, unmodified by this fork)
OS: Linux x86-64 - Runtime: Python 3.14.8, Node 26.12.1 for the host suite

Reproduce: on any Linux or macOS host, python -m pytest tests/terminal/test_dsv41_engine.py -k rocm_bin. Measured on this box at three levels: red in the live checkout, red in a clean worktree of the same commit, and red in a worktree checked out at the pure tag - so it is the host's OS, not the checkout's state and not this fork.

Expected: the test checks the variable start_env actually sets, so it passes on the platform the archive is for and on the host that builds it.

Suggested one-line shape: read the same constant the code writes - env = dsv41_engine.start_env(folder / EXE, {dsv41_engine.LIB_VAR: os.pathsep.join(["C:\\Windows", "/usr/bin"])}) and first = env[dsv41_engine.LIB_VAR].split(os.pathsep)[:2]. (Related ground was covered by closed #3305, which is about the probes getting lib_dirs at all; this is the test's variable name.)

Reproduction status: measured on this box (Linux). The Windows branch reads as correct by inspection and was not executed here. This fork patched its own copy the same way so its suite is honest on a POSIX host.

Originally created by @TheHubUser4860938 on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4531 Problem: `tests/terminal/test_dsv41_engine.py::HipPackageLibraryPath::test_rocm_bin_comes_after_the_package_folder` builds an environment and then reads it back by the name `PATH`: ```python env = dsv41_engine.start_env(folder / EXE, {"PATH": "C:\\Windows"}) first = env["PATH"].split(os.pathsep)[:2] self.assertEqual(first, [str(folder), str(folder / "rocm" / "bin")]) ``` But `start_env` writes the variable the platform actually uses - `strata_control/dsv41_engine.py:41`: `LIB_VAR = "PATH" if os.name == "nt" else "LD_LIBRARY_PATH"`, and line 61 puts the folders on `LIB_VAR`. On Linux and macOS the code leaves `PATH` exactly as it was handed in, so the assertion can only ever pass on a Windows host. Measured here it fails with the input string split on the POSIX separator, which is also what the fixture's `"C:\\Windows"` means to `str.split(":")`: ``` AssertionError: Lists differ: ['C', '\\Windows'] != ['/tmp/strata-dsv41-hip-…/rocm/bin', …] ``` Environment: Environment: **Strata Version:** 0.2.7.1 (source checkout at tag v0.2.7.1, commit 46c152a1; the test file discussed is upstream's own, unmodified by this fork) **OS:** Linux x86-64 - **Runtime:** Python 3.14.8, Node 26.12.1 for the host suite Reproduce: on any Linux or macOS host, `python -m pytest tests/terminal/test_dsv41_engine.py -k rocm_bin`. Measured on this box at three levels: red in the live checkout, red in a clean worktree of the same commit, and red in a worktree checked out at the pure tag - so it is the host's OS, not the checkout's state and not this fork. Expected: the test checks the variable `start_env` actually sets, so it passes on the platform the archive is for and on the host that builds it. Suggested one-line shape: read the same constant the code writes - `env = dsv41_engine.start_env(folder / EXE, {dsv41_engine.LIB_VAR: os.pathsep.join(["C:\\Windows", "/usr/bin"])})` and `first = env[dsv41_engine.LIB_VAR].split(os.pathsep)[:2]`. (Related ground was covered by closed #3305, which is about the probes getting `lib_dirs` at all; this is the test's variable name.) Reproduction status: measured on this box (Linux). The Windows branch reads as correct by inspection and was not executed here. This fork patched its own copy the same way so its suite is honest on a POSIX host.
Author
Owner

@Nyarlathoteppppp commented on GitHub (Oct 29, 2026):

I have a fix with a regression test that fails before and passes after; opening a PR shortly.

<!-- gh-comment-id:6486296595 --> @Nyarlathoteppppp commented on GitHub (Oct 29, 2026): I have a fix with a regression test that fails before and passes after; opening a PR shortly.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6660624786 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2044
No description provided.