现象
_to_worker_request 在 ws 和 http 两个 Node 后端实现中重复定义,逻辑几乎一致(参数提取 + call_id/node_id 校验 + 构造 WorkerRequest)。
重复位置:
src/cobnet/executor/runner/backend/node/ws/client.py:114
src/cobnet/executor/runner/backend/node/http/client.py:125
建议
- 提取到基类/共享工厂方法,减少 transport 层重复实现
- 统一错误文案与参数校验(call_id/node_id 非空)
- 继续保留 transport 特有发送细节在各子类中
价值
- 避免未来新增 transport 时重复实现该映射语义
- 统一约定有利于回归一致性
与已存在 issue 的关系
当前 open issue 中 #8-15 分别聚焦 backplane 底层 helper,未覆盖该 transport 端 helper。
现象
_to_worker_request在ws和http两个 Node 后端实现中重复定义,逻辑几乎一致(参数提取 +call_id/node_id校验 + 构造WorkerRequest)。重复位置:
src/cobnet/executor/runner/backend/node/ws/client.py:114src/cobnet/executor/runner/backend/node/http/client.py:125建议
价值
与已存在 issue 的关系
当前 open issue 中 #8-15 分别聚焦 backplane 底层 helper,未覆盖该 transport 端 helper。