[PR #2994] [CLOSED] bench: the start-its-own-server path names its port again #4385

Closed
opened 2026-11-07 15:35:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2994
Author: @victorgabr
Created: 10/18/2026
Status: ❌ Closed

Base: main ← Head: fix/bench-port-nameerror


📝 Commits (1)

  • 4665481 bench: the start-its-own-server path names its port again (69fe4055 inlined the value into server_base and dropped the port assignment, so the port-in-use line, the start line and start_server itself died with a NameError; tools/test_bench_host.py pins the path without a GPU or a server)

📊 Changes

2 files changed (+45 additions, -1 deletions)

View changed files

📝 tools/strata_bench.py (+2 -1)
📝 tools/test_bench_host.py (+43 -0)

📄 Description

69fe4055 (#2330) inlined the port into server_base(...) and dropped the port = a.port or int(cfg.get("port", 8080)) assignment, but three uses of port below it stayed: the port-in-use line, the "Starting the server on port" line, and the start_server(cfg_path, port, ...) call itself. Running tools/strata_bench.py with no server already up now dies before launching one:

NameError: name 'port' is not defined. Did you mean: 'props'?

test_bench_host.py only exercised server_base in isolation, so the path stayed unpinned.

Changes: one line in main() — port is assigned again and passed to server_base. Nothing else moves. Adds: StartServerPort in tools/test_bench_host.py, which drives main() down the start-its-own-server branch with start_server/wait_ready stubbed — no GPU, no server, no network — and asserts the config's port and the --port override reach start_server.

How I checked: the new tests raise the NameError on the file before the fix and pass after (python -m unittest tools.test_bench_host: 7/7). End to end on a TITAN RTX: with the fix, the bench started its own server and wrote three full community reports today (runs with and without STRATA_ROUTE_TAIL_SKIP); without it every such run crashed at the line above.


🔄 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/2994 **Author:** [@victorgabr](https://github.com/victorgabr) **Created:** 10/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/bench-port-nameerror` --- ### 📝 Commits (1) - [`4665481`](https://github.com/Niko1221/Strata/commit/4665481cdb754f1b1a84963e1d362050b59bc3eb) bench: the start-its-own-server path names its port again (69fe4055 inlined the value into server_base and dropped the port assignment, so the port-in-use line, the start line and start_server itself died with a NameError; tools/test_bench_host.py pins the path without a GPU or a server) ### 📊 Changes **2 files changed** (+45 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/strata_bench.py` (+2 -1) 📝 `tools/test_bench_host.py` (+43 -0) </details> ### 📄 Description 69fe4055 (#2330) inlined the port into `server_base(...)` and dropped the `port = a.port or int(cfg.get("port", 8080))` assignment, but three uses of `port` below it stayed: the port-in-use line, the "Starting the server on port" line, and the `start_server(cfg_path, port, ...)` call itself. Running `tools/strata_bench.py` with no server already up now dies before launching one: ``` NameError: name 'port' is not defined. Did you mean: 'props'? ``` `test_bench_host.py` only exercised `server_base` in isolation, so the path stayed unpinned. **Changes:** one line in `main()` — `port` is assigned again and passed to `server_base`. Nothing else moves. **Adds:** `StartServerPort` in `tools/test_bench_host.py`, which drives `main()` down the start-its-own-server branch with `start_server`/`wait_ready` stubbed — no GPU, no server, no network — and asserts the config's port and the `--port` override reach `start_server`. **How I checked:** the new tests raise the NameError on the file before the fix and pass after (`python -m unittest tools.test_bench_host`: 7/7). End to end on a TITAN RTX: with the fix, the bench started its own server and wrote three full community reports today (runs with and without STRATA_ROUTE_TAIL_SKIP); without it every such run crashed at the line above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:35:21 +07:00
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#4385
No description provided.