-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
area:runtime-nodeArea: Node runtime bridgeArea: Node runtime bridgebugSomething isn't workingSomething isn't workingpriority:p2Priority P2 (medium)Priority P2 (medium)
Milestone
Description
Summary
OptimizedNodeBridge does not validate the bridge script path or detect spawn errors. A missing/invalid scriptPath or pythonPath yields obscure errors later instead of a clear startup failure.
Failure mode
scriptPathis missing orpythonPathis invalid.spawnemitserrorasynchronously; the worker is still added to the pool.- Subsequent calls fail with unclear errors.
Evidence
src/runtime/optimized-node.tsspawnProcess()callsspawn(...)without checkingexistsSync(scriptPath)or waiting forspawn/errorsignals.
Proposed fix
- Validate
scriptPathexists before spawning (likeNodeBridge). - Await a spawn/ready signal and fail fast on
errorbefore adding the worker to the pool. - Reject
executeRequestwith a clearBridgeProtocolErrorwhen startup fails.
Acceptance criteria
- Invalid
pythonPathor missingscriptPathfails immediately with a clear error. - No workers are added to the pool on spawn failure.
- Add a test that uses a missing script path and asserts a predictable error.
Metadata
Metadata
Assignees
Labels
area:runtime-nodeArea: Node runtime bridgeArea: Node runtime bridgebugSomething isn't workingSomething isn't workingpriority:p2Priority P2 (medium)Priority P2 (medium)