Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions verifiers/v1/cli/eval/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ async def run_eval_server(config: EvalConfig) -> list[Episode]:

from verifiers.v1.utils.logging import setup_logging
from verifiers.v1.configs.cli.env import pool_serve_kwargs
from verifiers.v1.serve import EnvClient, env_config_data, serve_env
from verifiers.v1.serve import (
EnvClient,
env_config_data,
serve_env,
wait_for_address,
)

legacy = config.is_legacy
server_kwargs = (
Expand Down Expand Up @@ -155,9 +160,8 @@ async def run_eval_server(config: EvalConfig) -> list[Episode]:
proc.start()
child_conn.close() # the child holds its end; we keep parent_conn so our exit closes it
try:
address = await asyncio.to_thread(address_queue.get, timeout=600)
address = await wait_for_address(proc, address_queue, log_file=log_file)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single-worker readiness hang returns

Medium Severity

Removing wait_for_server_startup leaves the max_workers=1 path without a readiness check. That path still publishes the address from run_server before run()/serving(), and wait_for_address returns as soon as the queue yields, so a death right after publish succeeds the wait and the client hangs on untimed requests.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f0c87f2. Configure here.

client = EnvClient(address=address)
await client.wait_for_server_startup(timeout=600)
# A v1 run dispatches — and resumes — tasks by content: the client owns them,
# and `resume.task_key` is their identity. Only the legacy bridge is addressed
# by dataset row (its dataset lives server-side, reported via `info`), and
Expand Down
10 changes: 9 additions & 1 deletion verifiers/v1/serve/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
from verifiers.v1.serve.client import EnvClient
from verifiers.v1.serve.pool import EnvServerPool, env_config_data, serve_env
from verifiers.v1.serve.pool import (
ENV_SERVER_SPAWN_TIMEOUT,
EnvServerPool,
env_config_data,
serve_env,
wait_for_address,
)
from verifiers.v1.serve.server import EnvServer
from verifiers.v1.serve.types import (
HealthRequest,
Expand All @@ -17,6 +23,8 @@
"EnvServerPool",
"serve_env",
"env_config_data",
"wait_for_address",
"ENV_SERVER_SPAWN_TIMEOUT",
"EnvClient",
"HealthRequest",
"HealthResponse",
Expand Down
Loading
Loading