[GH-ISSUE #4083] [Other] test_no_acquisition: the DeepSeek engine's reachability HEAD is not in NETWORK_ALLOWED #1777

Closed
opened 2026-11-04 01:53:58 +07:00 by bsakaguchi · 1 comment
Owner

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

Problem

tests/terminal/test_no_acquisition.py::ImportGraphTests::test_no_installer_subprocess_or_network_call_on_the_serving_side fails at v0.2.4.2. The static scan reports one unwhitelisted network call on the start/serve side:

E   AssertionError: Lists differ: ['strata_control/dsv41_engine.py:179 urlopen'] != []

Environment

Upstream tag v0.2.4.2 (dfa3f402), checked out clean in its own worktree — not a fork tree.
Linux (CachyOS 7.3.0-4-cachyos), Python 3.14, .venv created by setup.py. No GPU work involved: this is a pure test run.

Reproduce

python -m pytest tests/terminal/test_no_acquisition.py -k no_installer_subprocess_or_network_call -q

Expected: no urlopen in a scanned serving-side file outside NETWORK_ALLOWED, which carries six entries with reasons — serve/server.py, serve/mcp.py, strata_control/tune_api.py, strata_control/tune_session.py, strata_control/loopback.py, strata_control/components.py. SERVING_DIRS is ("serve", "strata_cli", "strata_control"), so strata_control/dsv41_engine.py is scanned.

Actual: the test fails on the DeepSeek engine manager's reachability probe:

urllib.request.urlopen(urllib.request.Request(f"{parts.scheme}://{parts.netloc}/", method="HEAD",
                                              headers={"User-Agent": "strata-launch"}), timeout=timeout).close()

Evidence

  • The call is a HEAD request, not an acquisition: nothing is downloaded, and it is the 10-second "GitHub cannot be reached" check the 0.2.4.2 notes describe. The rule's intent (a start or a serve must not fetch packages) therefore looks satisfied; the whitelist appears not to have been updated when the new module landed.
  • git show v0.2.4.2:tests/terminal/test_no_acquisition.py | grep -c dsv41 → 0: that test file never mentions the new module.

Reproduction status: reproduced locally, twice — in this fork's merged tree and in a clean worktree of the tag itself.

Limits / what I did not test

  • I did not check whether CI runs tests/terminal. If it does, something in this box's environment (Python 3.14, Linux, a .venv inside the checkout) may differ from the CI image.
  • One line in NETWORK_ALLOWED with its reason looks like the intended shape of the fix, but I am reporting rather than prescribing. Say the word and I will send the one-line PR.
Originally created by @TheHubUser4860938 on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4083 ## Problem `tests/terminal/test_no_acquisition.py::ImportGraphTests::test_no_installer_subprocess_or_network_call_on_the_serving_side` fails at **v0.2.4.2**. The static scan reports one unwhitelisted network call on the start/serve side: ``` E AssertionError: Lists differ: ['strata_control/dsv41_engine.py:179 urlopen'] != [] ``` ## Environment Upstream tag `v0.2.4.2` (`dfa3f402`), checked out clean in its own worktree — not a fork tree. Linux (CachyOS `7.3.0-4-cachyos`), Python 3.14, `.venv` created by `setup.py`. No GPU work involved: this is a pure test run. ## Reproduce ```sh python -m pytest tests/terminal/test_no_acquisition.py -k no_installer_subprocess_or_network_call -q ``` **Expected:** no `urlopen` in a scanned serving-side file outside `NETWORK_ALLOWED`, which carries six entries with reasons — `serve/server.py`, `serve/mcp.py`, `strata_control/tune_api.py`, `strata_control/tune_session.py`, `strata_control/loopback.py`, `strata_control/components.py`. `SERVING_DIRS` is `("serve", "strata_cli", "strata_control")`, so `strata_control/dsv41_engine.py` is scanned. **Actual:** the test fails on the DeepSeek engine manager's reachability probe: ```python urllib.request.urlopen(urllib.request.Request(f"{parts.scheme}://{parts.netloc}/", method="HEAD", headers={"User-Agent": "strata-launch"}), timeout=timeout).close() ``` ## Evidence * The call is a `HEAD` request, not an acquisition: nothing is downloaded, and it is the 10-second "GitHub cannot be reached" check the 0.2.4.2 notes describe. The rule's intent (a start or a serve must not fetch packages) therefore looks satisfied; the whitelist appears not to have been updated when the new module landed. * `git show v0.2.4.2:tests/terminal/test_no_acquisition.py | grep -c dsv41` → `0`: that test file never mentions the new module. **Reproduction status:** reproduced locally, twice — in this fork's merged tree and in a clean worktree of the tag itself. ## Limits / what I did not test * I did not check whether CI runs `tests/terminal`. If it does, something in this box's environment (Python 3.14, Linux, a `.venv` inside the checkout) may differ from the CI image. * One line in `NETWORK_ALLOWED` with its reason looks like the intended shape of the fix, but I am reporting rather than prescribing. Say the word and I will send the one-line PR.
Author
Owner

@TheHubUser4860938 commented on GitHub (Oct 25, 2026):

Closed as completed — upstream fixed this before the report landed.

a3e4cb64 ("test: serving never reaches the DeepSeek engine check (only launch and setup import it)", 2026-10-24 15:26 +0200 = 13:26 UTC) both added the NETWORK_ALLOWED entry and tightened the import side so serving never reaches the module at all. It shipped in v0.2.5, tagged 2026-10-25 09:41 UTC; this issue was filed at 10:46 UTC the same morning. My report was written against v0.2.4.2 (the tag this fork was riding when I checked it), so the search of open and closed issues and PRs correctly found nothing — the fix had simply landed an hour before I filed, and I had not looked at the new tag.

Verified here after merging v0.2.5 into this fork:

$ python -m pytest "tests/terminal/test_no_acquisition.py::ImportGraphTests::test_no_installer_subprocess_or_network_call_on_the_serving_side" -q
1 passed in 0.38s

One note from the same file, so it is not mistaken for a second bug: test_start_and_serve_modules_do_not_load_installer_code still fails on this box and has nothing to do with DeepSeek. jinja2 3.1.6 imports jinja2.bccache on import jinja2, so when .venv sits inside the checkout, that test's "every loaded module must live in serve/, strata_cli/ or strata_control/" assert trips on a site-packages path (.venv/lib/python3.14/site-packages/jinja2/bccache.py). It reproduces on this fork's own pre-merge tip too, so it is an environment shape rather than a regression.

<!-- gh-comment-id:6396869173 --> @TheHubUser4860938 commented on GitHub (Oct 25, 2026): Closed as completed — upstream fixed this before the report landed. `a3e4cb64` ("test: serving never reaches the DeepSeek engine check (only launch and setup import it)", 2026-10-24 15:26 +0200 = 13:26 UTC) both added the `NETWORK_ALLOWED` entry and tightened the import side so serving never reaches the module at all. It shipped in **v0.2.5**, tagged 2026-10-25 09:41 UTC; this issue was filed at 10:46 UTC the same morning. My report was written against v0.2.4.2 (the tag this fork was riding when I checked it), so the search of open and closed issues and PRs correctly found nothing — the fix had simply landed an hour before I filed, and I had not looked at the new tag. Verified here after merging v0.2.5 into this fork: ``` $ python -m pytest "tests/terminal/test_no_acquisition.py::ImportGraphTests::test_no_installer_subprocess_or_network_call_on_the_serving_side" -q 1 passed in 0.38s ``` One note from the same file, so it is not mistaken for a second bug: `test_start_and_serve_modules_do_not_load_installer_code` still fails on this box and has nothing to do with DeepSeek. jinja2 3.1.6 imports `jinja2.bccache` on `import jinja2`, so when `.venv` sits inside the checkout, that test's "every loaded module must live in `serve/`, `strata_cli/` or `strata_control/`" assert trips on a site-packages path (`.venv/lib/python3.14/site-packages/jinja2/bccache.py`). It reproduces on this fork's own pre-merge tip too, so it is an environment shape rather than a regression.
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#1777
No description provided.