[PR #4125] [Other] serve tests: VisionArgs passes again (fake process without pid) #4910

Open
opened 2026-11-07 16:31:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4125
Author: @mnott
Created: 10/25/2026
Status: 🔄 Open

Base: main ← Head: pr/test-visionargs-pid


📝 Commits (1)

  • 763c81f test(serve): VisionArgs stubs lifeline's watcher, its fake process has no pid

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 serve/test_server.py (+1 -1)

📄 Description

Problem and result

serve/test_server.py::VisionArgs::test_min_tokens_is_passed_only_when_set fails on v0.2.6 with AttributeError: 'Proc' object has no attribute 'pid' at serve/lifeline.py:147. With this change the test passes and serve/test_server.py runs without failures.

Overview of our related macOS / Metal contributions: #4128. Found while running serve/test_server.py on v0.2.6 for the other PRs.

Approach

Since 48e6d64c every server child is started through lifeline.popen, whose _watch reads child.pid to start a watcher process. The test stubs subprocess.Popen with a bare fake, so _watch hit the missing attribute. Giving the fake a pid would start a real watcher; the test instead patches lifeline._watch, since it only checks the encoder arguments.

Validation

Revision 763c81f861cf24ebafdba8d32a92201b3db9955b on v0.2.6.

Passed:

  • Before: pytest serve/test_server.py::VisionArgs 1 failed; whole serve/test_server.py 1 failed, 351 passed.
  • After: VisionArgs 1 passed; whole serve/test_server.py 352 passed, 0 failed.

Failed:

  • none observed

Not run:

  • Linux and Windows runs of the test file (macOS only here).

Limits

Test change only; serve/lifeline.py is unchanged.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4125 **Author:** [@mnott](https://github.com/mnott) **Created:** 10/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pr/test-visionargs-pid` --- ### 📝 Commits (1) - [`763c81f`](https://github.com/Niko1221/Strata/commit/763c81f861cf24ebafdba8d32a92201b3db9955b) test(serve): VisionArgs stubs lifeline's watcher, its fake process has no pid ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `serve/test_server.py` (+1 -1) </details> ### 📄 Description ## Problem and result `serve/test_server.py::VisionArgs::test_min_tokens_is_passed_only_when_set` fails on v0.2.6 with `AttributeError: 'Proc' object has no attribute 'pid'` at `serve/lifeline.py:147`. With this change the test passes and `serve/test_server.py` runs without failures. ## Related discussion Overview of our related macOS / Metal contributions: #4128. Found while running serve/test_server.py on v0.2.6 for the other PRs. ## Approach Since 48e6d64c every server child is started through `lifeline.popen`, whose `_watch` reads `child.pid` to start a watcher process. The test stubs `subprocess.Popen` with a bare fake, so `_watch` hit the missing attribute. Giving the fake a pid would start a real watcher; the test instead patches `lifeline._watch`, since it only checks the encoder arguments. ## Validation Revision `763c81f861cf24ebafdba8d32a92201b3db9955b` on `v0.2.6`. **Passed:** - Before: `pytest serve/test_server.py::VisionArgs` 1 failed; whole `serve/test_server.py` 1 failed, 351 passed. - After: `VisionArgs` 1 passed; whole `serve/test_server.py` 352 passed, 0 failed. **Failed:** - none observed **Not run:** - Linux and Windows runs of the test file (macOS only here). ## Limits Test change only; serve/lifeline.py is unchanged. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#4910
No description provided.