Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies = [
"nest-asyncio>=1.6.0", # for jupyter notebooks
"openai>=1.108.1",
"openai-agents>=0.0.7",
"prime-tunnel>=0.1.6",
"prime-tunnel>=0.1.7",
"prime-sandboxes>=0.2.21",
"pydantic>=2.11.9",
"requests",
Expand Down
8 changes: 6 additions & 2 deletions verifiers/envs/experimental/cli_agent_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@
try:
registered = await self._tunnel.check_registered()
if not registered:
frpc_output = "\n".join(self._tunnel.recent_output)
self.logger.warning(
"Tunnel registration expired server-side, recreating."
"Tunnel registration expired server-side, recreating. "
f"frpc output:\n{frpc_output}"
)
self._tunnel.sync_stop()
self._tunnel = None
Expand All @@ -198,13 +200,15 @@
if self._tunnel is None:
interception_server = self._require_interception_server()
port = interception_server.port
tunnel_log_cb = lambda line: self.logger.debug(f"tunnel: {line}")

Check failure on line 203 in verifiers/envs/experimental/cli_agent_env.py

View workflow job for this annotation

GitHub Actions / Ruff

ruff (E731)

verifiers/envs/experimental/cli_agent_env.py:203:17: E731 Do not assign a `lambda` expression, use a `def` help: Rewrite `tunnel_log_cb` as a `def`
if self.logger.isEnabledFor(logging.DEBUG):
self._tunnel = Tunnel(
local_port=port,
log_level="debug",
log_callback=tunnel_log_cb,
)
else:
self._tunnel = Tunnel(local_port=port)
self._tunnel = Tunnel(local_port=port, log_callback=tunnel_log_cb)
url = await self._tunnel.start()
self._tunnel_last_checked = time.time()
self.logger.debug(f"Prime Tunnel started: {url}")
Expand Down
Loading