1
0
forked from wrenn/wrenn

Fix expandEnv regex, init script crash, healthcheck deadline, and test issues

- Fix envRegex: remove spurious (\$)? group that swallowed $$$, handle ${}
- wrenn-init.sh: add || true to networking commands under set -e, remove dead code
- waitForHealthcheck: use context deadline for unlimited retries instead of implicit 100 cap
- Make parseSandboxEnv a package-level function (unused receiver)
- Fix WrappedCommand test: map iteration order dependency, pre-expand env values
- Fix error wrapping: %v → %w per project conventions
- test-jupyter-kernel.py: move import to top-level, fix misleading comment
This commit is contained in:
2026-04-08 02:14:38 +06:00
parent 11e08e5b96
commit 0ea0e7cc70
5 changed files with 51 additions and 53 deletions

View File

@ -2,6 +2,7 @@
import argparse
import json
import sys
import urllib.request
import uuid
try:
@ -12,8 +13,6 @@ except ImportError:
def create_kernel(base_url: str, token: str) -> str:
import urllib.request
url = f"{base_url}/api/kernels"
headers = {}
if token:
@ -57,7 +56,7 @@ def execute_code(ws: websocket.WebSocket, code: str) -> dict:
while True:
resp = json.loads(ws.recv())
# CRITICAL FIX: Ignore messages left over from previous executions
# Filter out messages from other executions by matching msg_id
parent_id = resp.get("parent_header", {}).get("msg_id")
if parent_id != msg_id:
continue