Repository navigation
Name the node and the reason when a workflow start's run Bots are not created (#3282) - #3284
Conversation
… created
A start whose node Bots the host does not create in time answered only
"the host did not create the run Bots within 60s", so a lane that needs more
time than the deadline looked like a silent hang. The refusal now names the
node the host never answered, how many node Bots it did create and how long
each took, and the seconds the lane needs when that is past the deadline; a
node Bot the host refuses carries the node and the host's own reason.
The endpoint seam refuses by throwing, so api/bot answers the refusal as
{ ok: false, error } instead of putting { ok: false } inside the success
envelope; assign() keeps its own answer for in-process callers and the canvas
reads the thrown refusal through settledCall.
Fixes #3282
Written-by: Dev
|
Written-by: Dev Note on the checkpoint: the The remaining reason in |
A start waits for its node Bots, and the host refuses it at its own 60 s deadline, so the canvas must not cut the call at the shared 10 s: both assign call sites pass ASSIGN_TIMEOUT_MS (70 s) and still show a refused answer as the sentence the dialog already drew. Fixes #3282 Written-by: Dev
#3283 changed core/src/host/capabilities.js, its test and the ds-bot patches; none of the six paths this branch touches. The merge keeps both commits whole and adds no edit: plugins/workflow/src/service.js plugins/workflow/client.js plugins/workflow/index.js plugins/workflow/test/spawn-failure-message.test.js docs/subsystems/workflow.md changelog.d/3282.fixed.md
|
Verdict: PASS at cd1977e Ran at this tip: The one local failure is Per acceptance point:
Scope: compare |
Fixes #3282
Written-by: Dev
Owner: Dev
Reviewer: Reviewer
Tier: T2 (
plugins/**is T2 in.github/agent/risk-rules.json;docs/**andchangelog.d/**are T0/T1) — no gate file, so noPolicy-sign:lineBase: 59ee395
What changed
Before: a start whose node Bots the host did not finish creating answered
{"ok":false,"error":"the host did not create the run Bots within 60s"}— no node, no reason — and the Bots API delivered that inside a success envelope,{"ok":true,"value":{"ok":false,…}}, so a caller that read the envelope first saw a failed dispatch as a started run.plugins/workflow/src/service.js,startLive/boundedSpawn), so the deadline sentence reads e.g.the host did not create the run Bots within 60s: 5 of 6 node Bots were created ("Triage" (triage) in 11.0s, …); node "取证" (attest) still had no Bot; a lane of 6 nodes needs about 66s on this host at 11.0s per Bot, past the 60s deadline. A node Bot the host refuses keeps the node and the host's own words, classifiedmodel-missing/name-taken/no-slot/no-answer/refused:node "Claim" (claim) could not create its Bot (model-missing): Unknown model opencsitool/Nope-1017. The 60 s deadline itself is unchanged.workflow/assignis registered through the newservice.assignEndpoint(), which throws a refused answer instead of returning it, soapi/botanswers{"ok":false,"error":{"code":"bot/refused","message":"…","details":{"workflowId","taskId","nodeId","nodeName","reason"}}}(core/src/host/channel.jsok()/fail()).assign()itself is untouched:{ ok: false, error }in-process, never thrown.confirmAssigninplugins/workflow/client.jsnow reads both assign paths throughstageCall/settledCall, which turns a refusedok:falseanswer into the same{ ok: false, error }it already drew. In-process callers need no change — the drain,ingest,runNamed, the tools and the plugin's tests keep readingassign(). Nothing else in the repo callsworkflow/assign(code search;docs/subsystems/workflow.mdnow says so).Why
wf-1cdf6ec5does not start (located, not changed)Read from the live store (
$DSH_HOME/bot/flybot-workflow/workflows.json, read-only; the lane itself is untouched):triage, claim, gate, enqueue, escalate, attest); the two controls are 5 and 3 nodes. All six nodes name the same model the working lanes name (opencsitool/DeepSeek-V4.1-Flash-1017), so no model id is missing. Node names are short and the host'srunnerNameappends a 4-hex suffix and retries on "already exists", so no Bot name is blocking. Itstriagenode is the only one of the three that carries a seatedbotId, which only feeds prompt/role/model fallbacks.runsstayed 0 and freeing a tree slot changed nothing.state.jsonis 8.1 MB and still carries 329 leaked ephemeral run-Bot records, so every create rewrites the whole team store and per-Bot creation has grown with the roster. Cleaning those records would give the lane back its margin; the durable fix on the owner's side is a shorter line (five nodes or fewer, or Triage/Escalate split out) — that is a live-definition change, left to the owner as the issue asks.Main merged in (this pass)
cd1977ecde3ddd748eb34d65019f6d2b3098b1de— a real merge commit with both parents kept (0f2d6b378be87dcaad57ec07327f3db82c50238band59ee395726317d02c1de57134752ecba8d0d947d): no squash, no force-push, the two commits below it unchanged.#3283touchedcore/src/host/capabilities.js,core/test/capabilities.test.js,docs/subsystems/core-host.md,patches/ds-bot/0001-core-fixes.patch,patches/ds-bot/0014-flybot-branding.patchandchangelog.d/3281.fixed.md— none of this branch's six paths, so the merge tree is main's tree with this branch's six blobs. Every pushed blob was compared to the file the tests ran (git blobsha,SAMEon all six), so the results below are results for the pushed bytes.node scripts/ds-bot-patches.mjs checkafter the merge:ok 10 patches apply cleanly in orderandok core/ equals ds-bot/ + patches/ds-bot/— #3283's patch edits and theservice.jschange do not interfere.Verification at the tip
cd1977ecde3ddd748eb34d65019f6d2b3098b1deThis box: node 22.23.3, no git. Full tarball of main 59ee395 extracted, the branch's six files written over it, then
npm ci --include=dev+npm run harnessincore/(655 packages) sods-botand the harness resolve.Ran at this tip:
node --test plugins/workflow/test/spawn-failure-message.test.js→# tests 3 / # pass 0 / # fail 3—the node that failed is named: Unknown model opencsitool/Nope-1017(the bare host text, no node),the node that never answered is named: the host did not create the run Bots within 60s(the bare deadline),okSvc.assignEndpoint is not a function(no seam to refuse through). Restored, same command →# tests 3 / # pass 3 / # fail 0.node --test plugins/workflow/test/late-spawn-release.test.js→# tests 2 / # pass 2 / # fail 0.npm --prefix plugins/workflow test(the package's own script:node --import ./test/resolve.mjs --test "test/*.test.js") →# tests 541 / # suites 4 / # pass 541 / # fail 0— includeshost.test.js, which needs the resolver to reachds-bot.node --test "plugins/workflow/test/*.test.js"(no resolver) →# tests 540 / # pass 539 / # fail 1; the one failure ishost.test.jsfailing to load (Cannot find module 'ds-bot'), i.e. the same file the script above runs green.node --test plugins/workflow/on node 22.23.3 runs the directory as one unit and answers# tests 1 / # pass 1(ok 1 - plugins/workflow): it finds no test file, so the two commands above are the real suite.node core/scripts/build-client.mjs --check→ exit 0 (nocore/src/client/**change, socore/client.jsneeds no rebuild).node scripts/ds-bot-patches.mjs check→ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/(skips the pin hash: no git).node .github/scripts/changelog.mjs check→changelog: 5 fragment(s) in changelog.d/ are well formed.node --test ".github/scripts/*.test.mjs" "policy/*.test.mjs"→# tests 717 / # pass 709 / # fail 6; all six areauto-queue-t1: spawnSync gh EACCESinauto-queue-t1.test.mjs(this box has nogh), unrelated to this change.NODE_ENV=development npm --prefix core test→# tests 3417 / # pass 3413 / # fail 2, both incore/test/check-arch-docs.test.jsbecause it shells out togit(cannot diff against HEAD); nocore/**file is changed here.Not run, and why:
TZ=UTC npm run verify— it stops on its first step,core/scripts/check-arch-docs.mjs:arch-docs: FAIL — cannot diff against origin/main, this box has no git. Equivalent check with the script's ownloadSubsystemMap(): the only owned area touched isplugins/workflow/(owned bydocs/subsystems/workflow.md) and that page is edited in the same change.node scripts/ds-bot-patches.mjs canonical— needs git to compare the committed patch series.{ ok: false, error }it already drew;client.test.js(180 tests) is part of the 541 green above.Checkpoint
{ "pr": 3284, "claim": "Dev", "issue": 3282, "summary": "A workflow start the host could not finish now names the node it waited on, how many node Bots were made, how long each took, and the seconds the lane needs past the 60s deadline; a refused node Bot carries the node and the host's reason. workflow/assign throws that refusal through assignEndpoint, so api/bot answers { ok: false, error }; assign() keeps its in-process answer and the canvas reads it through settledCall. wf-1cdf6ec5 is the only six-node lane: about 11s per Bot here runs past the 60s deadline before a run row exists; the live definition is untouched.", "files": ["plugins/workflow/src/service.js", "plugins/workflow/index.js", "plugins/workflow/client.js", "plugins/workflow/test/spawn-failure-message.test.js", "docs/subsystems/workflow.md", "changelog.d/3282.fixed.md"], "checks": { "ran": "red first at main 3/3 fail, green 3/3 after restore; workflow 541/541 via npm test; late-spawn 2/2; build-client --check 0; ds-bot-patches check ok; changelog ok; core 3413/3417 (2 need git)", "result": "green", "at": "cd1977ecde3ddd748eb34d65019f6d2b3098b1de" }, "next": "none — ready for review" }