Skip to content

OptimizedNodeBridge should enforce protocolVersion via meta handshake #108

@bbopen

Description

@bbopen

Problem

OptimizedNodeBridge does not validate the Python bridge’s protocol version. If the Python subprocess is mismatched (older/newer protocol), OptimizedNodeBridge will still send requests and attempt to decode responses, potentially producing silent misbehavior or hard crashes. NodeBridge guards this via meta validation; OptimizedNodeBridge does not.

Evidence

  • src/runtime/optimized-node.ts: no meta call or protocolVersion validation during init or worker spawn.
  • src/runtime/node.ts: refreshBridgeInfo() validates protocol and protocolVersion.

Acceptance criteria

  • On worker spawn (or at init), call meta and validate protocol + protocolVersion.
  • On mismatch, terminate the worker and surface a BridgeProtocolError.
  • Add a test fixture with mismatched protocol version to ensure OptimizedNodeBridge rejects it.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions