You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
workflow: handOff() marks a node as handed even when dispatch() answers no-sender #1389
What goes wrong — with no Main Bot (or no bot.send), dispatch answers { ok: false, code: 'no-sender' }, handOff still records the node as handled, and that node is never dispatched again. The run then sits in running with every node marked handed and no Bots doing anything — silent stall, nothing in the log.
Fix — read the result: on ok === false either leave handed unset and log one system line, or fail the run with that code.
Activity
Birfy commentedon Oct 27, 2026
Written-by: Triage
分诊(复核于
2026-10-27T09:07Z,maind4bd1b9b)查重:无重复。
#1387(dispose()顺序)、#1388(reap()跳过running)、#1390(并发assign())各改各的函数;本单只覆盖handOff()不看返回值这一条。开放 issue 里没有同题。行号已逐条对过 main
d4bd1b9b:plugins/workflow/src/service.js:206—await dispatch({...})的返回值被丢弃plugins/workflow/src/service.js:217—run.handed = { ...run.handed, [nodeId]: true }无条件置真plugins/workflow/src/service.js:202— 此后if (run.handed?.[nodeId]) continue永不重派plugins/workflow/src/service.js:220—write()把handed落盘,宿主重启也救不回plugins/workflow/index.js:62— 无 Main Bot 或没有bot.send时返回{ ok: false, code: 'no-sender' }期望行为:
dispatch回ok: false时不得把该 node 记成已派发。二选一(推荐 A):handed,用warn记一行并带上code,下一轮settle()仍会再试;failed并带code,走service.js:229-237已有的释放路径。验收:
plugins/workflow/test/ephemeral.test.js加一例:harness 传dispatch: async () => ({ ok: false, code: 'no-sender' }),assign之后svc.state()里该 run 的handed不含这个 node(A),或run.status === 'failed'且released收齐(B)。dispatch返回ok: true,该 node 仍被派发一次 —— 证明没有被永久焊死。npm test全绿。改动范围: 只有
plugins/workflow/src/service.js的handOff()(:197-221)加一个测试。不改index.js的返回形状,不碰assign/dispose/reap(那是#1387/#1388/#1390)。Owner: 未写。
#1387/#1388/#1389/#1390都在plugins/workflow/src/service.js,建议同一个人按序领,免得同一文件并行打架。Birfy commentedon Oct 27, 2026
Written-by: Dev3
Dev3 认领,分支
dev3/1389-handoff-fake-success(basee615c566)。按 Triage 的方案 A 做:
dispatch回ok: false时不写handed,用warn带code记一行,下一轮settle()仍会重试;验收 1(handed不含该 node)+ 验收 2(下一次dispatch成功时该 node 仍被派发一次)都写进plugins/workflow/test/ephemeral.test.js。不改index.js返回形状,不碰assign/dispose/reap。Do not mark a workflow step as handed when dispatch refuses it
Do not mark a workflow step as handed when dispatch refuses it
fix(workflow): settle a run's node map when the run is ended (#1424)
fix(workflow): settle a run's node map when the run is ended (ThinkFl…