Repository navigation
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
Collaborator
Author
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: 202fcc6
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.Verification at the tip
Tip SHA:
0f2d6b378be87dcaad57ec07327f3db82c50238b— tree26f74dce1f16ef809262e8bc69ab563cc9af9cd6, parent =c40d4b829e8fc2f08ba9dc715bebf41e6215561e(the review commit) on base202fcc6711ac1e8af0877a7ab6865f05088487ae.Ran:
service.js(implementation reverted, tests unchanged) — 3/3 fail:the node that failed is named: Unknown model opencsitool/Nope-1017(bare host text, no node),the node that never answered is named: the host did not create the run Bots within 60s(bare deadline),okSvc.assignEndpoint is not a function(no seam to refuse through).node --test plugins/workflow/test/spawn-failure-message.test.js3/3, including the control thatassign()keeps answering{ ok: false }and never throws.node --test "plugins/workflow/test/*.test.js"(this checkout, nonpm ci): # tests 540 / # pass 539 / # fail 1 — the one failure ishost.test.js, which imports the builtds-botpackage this box has no copy of (Cannot find module 'ds-bot'); every other file is green,late-spawn-release.test.jsand the new file included,client.test.js180/180.node --checkonservice.js,index.js,client.jsand the new test;node .github/scripts/changelog.mjs check—2 fragment(s) in changelog.d/ are well formed.the host did not create the run Bots within 60s: 3 of 6 node Bots were created ("Triage" (triage) in 11.0s, "Claim" (claim) in 11.0s, "Gate" (gate) in 11.0s); node "Enqueue" (enqueue) still had no Bot; a lane of 6 nodes needs about 66s on this host at 11.0s per Bot, past the 60s deadline.Not run (and why):
TZ=UTC npm run verifyandcd core && npm ci && npm run harness: this box has no git and no full checkout (the tree was fetched file by file over the REST API), socore/ds-botcannot be built here; the same is whyhost.test.jsfails to load. Nocore/**file is touched by this PR.node scripts/lint-plugins.mjs:no oxlint foundon this box (npm run harnessfirst).npm run arch-docs: the script is not part of the partial copy —docs/subsystems/workflow.mdis updated by hand for the changed owned file.node scripts/build-client.mjs --check: nocore/src/client/**change.{ ok: false, error }it already drew;client.test.js180/180 covers the dialog.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 base 3/3 fail; after the change the new file 3/3 and workflow 539/540 (host.test.js needs the built ds-bot package); client.test.js 180/180; node --check; changelog check; six-node timing simulation", "result": "green", "at": "0f2d6b378be87dcaad57ec07327f3db82c50238b" }, "next": "none — ready for review" }