Repository navigation
fix(workflow): end a run whose running node the graph edit drops - #1593
Merged
Merged
Conversation
This was referenced Oct 28, 2026
Collaborator
Author
|
Verdict: PASS at 657d6c1 Ran at this tip: Review
Not run: the full Note: the local suite runs against |
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 #1549
Owner: Dev
Reviewer: Reviewer
(
Owner:isDev, thewritersname, not the original'sDev-1, whichenqueue-guardrefuses as a name the policy does not know.)Replay of #1551: the original head is on a fork we cannot push to (maintainer_can_modify=false), so this PR carries the same change replayed onto current main; the original is closed as superseded.
Replayed onto
mainfa932f86900353bc0d916d0836f3a4060d38ed0afrom the original head685ebde140bb72080a7f7f6c96fdc610083614a9(basec1b9fd23, 18 commits behind). Two of the four files were also touched bymain:plugins/workflow/src/service.jsanddocs/subsystems/workflow.md.How the replay merged
plugins/workflow/src/service.js—mainchanged this file in 18 commits, but thesaveGraph/defineblock the original edits is byte-equal between the original basec1b9fd23andmain, so the original's block applies unchanged and every other line ismain's. One semantic adjustment:main(fix(workflow): a sibling Failed run is only in Runs — header/timeline never say it failed #1493) now givesendRuna third argument and recordsrun.failure; called with two arguments it would record{ code: 'host-ended' }, but a graph edit is not the host ending the run, so the replay passes{ code: 'stopped' }— what Stop and Reset record — and the failed sibling on the stage says Stopped.plugins/workflow/test/save-graph-running-node.test.js— carried over, with one assertion adapted:main(fix(workflow): a sibling Failed run is only in Runs — header/timeline never say it failed #1493, fix(workflow): retry leaves duplicate run rows (Failed + Running/Done) for the same issue/PR #1507) keeps a failed run on the stage beside the run that took its slot, soworkflow/statenow lists the ended attempt as the failed sibling. The case now asserts that the only running row is the task that took the lane and that the stranded attempt shows asfailed; the other assertions (node failed, historyfailed, both Bots released,activeCount1, queue drained, the ended run keeps its node map) are unchanged.docs/subsystems/workflow.md—mainrewrote the same invariant-3 paragraph (fix(workflow): a sibling Failed run is only in Runs — header/timeline never say it failed #1493/fix(workflow,settings): UI polish passes 4-6 - composer, locale, header, Progress, Notifications, failed runs #1494/fix(workflow): retry leaves duplicate run rows (Failed + Running/Done) for the same issue/PR #1507/fix(workflow): a ten-minute step deadline kills any node that does real work #1580); the original's one sentence is inserted intomain's version, still right after the#1424sentence.changelog.d/1549.fixed.md— new, byte-identical to the original.Nothing
mainlanded is reverted.What changed (4 files, +151/−18)
plugins/workflow/src/service.js—saveGraphno longer clears only the timer of a dropped running node: every live run (lane.activepluslane.last) whose running node the edit drops goes throughendRunthe way Stop/Reset do — the node is failed, the run archivedfailed, its ephemeral Bots released anddrainAll()lets the queued task take the slot. The ended run keeps its own node map (the failed node included), a surviving run settles against the new graph, and the chat gets the same■ 已停止 · …line Stop writes.defineawaits the promisesaveGraphnow returns when the edit ended a run, and still applies a new name afterwards.plugins/workflow/test/save-graph-running-node.test.js— 1 new case with injectedspawn/release,maxConcurrent: 1, two tasks: deleting the running node ends the run, releases both Bots, archives itfailed, and the queued task starts; with nothing queued the failed node stays in the ended run's map.docs/subsystems/workflow.md— invariant 3 records the rule (fix(workflow): deleting a running node strands its run and holds the lane #1549).changelog.d/1549.fixed.md— the fragment.What I ran at 657d6c1
TZ=UTCin amaintree with the four files overwritten:Not run: the red-first measurement (the review node does it), the full
npm run verify(nocore/change and no generated file:plugins/workflow/client.jsandpatches/ds-bot/are untouched), the smoke bench and Desktop.Checkpoint
{ "pr": 1593, "claim": "Dev", "issue": 1549, "summary": "Deleting a running node from the workflow canvas used to clear only its timer, so the run stayed running with nothing able to advance it and held its lane slot forever under maxConcurrent. A graph edit that drops a running node now ends that run the way Stop does: the node is failed, the run is archived failed, its node Bots are released and the queue drains. The ended run keeps its node map, so the failed node cannot be painted as running. Every live run is checked, not only the one on display; this replay keeps main's failed-sibling stage row and records the stop reason.", "files": [ "plugins/workflow/src/service.js", "plugins/workflow/test/save-graph-running-node.test.js", "docs/subsystems/workflow.md", "changelog.d/1549.fixed.md" ], "checks": { "ran": "TZ=UTC node --import ./test/resolve.mjs --test \"test/*.test.js\" (plugins/workflow, 178 pass); node .github/scripts/changelog.mjs check (81 fragments well formed)", "result": "green", "at": "657d6c126bf139f5d796b2e0841aa43c3181a0f4" }, "next": "none — ready for review; the review node measures the red first and the new tip is what it judges." }