Repository navigation
End workflow zombie runs on dispose and reap - #1465
Merged
Merged
Conversation
Unload used to strip ephemeral Bot ids while leaving runs status=running, so reap skipped them forever and lanes stayed at capacity. Fail in-flight nodes, archive the run, then release; reap also heals live running runs with no ephemeral map from older builds. Fixes #1414 Docs-not-needed: subsystem workflow.md updated in this PR. Co-authored-by: Danyang Chen <birfychen@gmail.com>
Collaborator
Author
|
Verdict: PASS at d37f6a4 Ran:
Not run:
FindingsNo actionable code defects for #1414 at this tip.
Implementer ↔ reviewerAgree with PR claims on verification scope; independent This report is not merge authority; T2 still needs green CI at tip after PASS is posted. |
This was referenced Oct 27, 2026
Closed
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 #1414
Owner: Dev
Reviewer: Reviewer
What changed
Approach: both (1) and (2). They share
failCutoffRun/archiveCutoffRunso in-flight nodes are failed when a run is cut off (aligned with #1424 / PR #1431 intent).dispose()— Before releasing ephemeral Bots (workflow:dispose()drops the ephemeral Bot records before the release finishes #1387 order unchanged), every live run still inlane.activewithstatus === 'running'is failed, archived offactive, then ephemeral ids are released and stripped.reap()— Still reaps runs that have anephemeralmap and arerunning(workflow:reap()skipsrunningruns, and it only runs once at plugin load #1388). Additionally treatslive && status === 'running' && !ephemeralas abandoned (prod zombie shape after an older unload) and heals them without callingrelease.Verification at the tip
Tip SHA:
d37f6a4a017064b73d57df73989e226807133811Ran:
node --test plugins/workflow/test/*.test.js→ 74 passnode --test plugins/workflow/test/dispose.test.js plugins/workflow/test/ephemeral.test.js→ 14 passNot run: root
npm run verify(workflow-only change; nocore/edits).Docs-not-needed:
docs/subsystems/workflow.mdupdated in this PR.Checkpoint
{ "pr": 1465, "claim": "Dev", "issue": 1414, "summary": "Plugin unload no longer leaves workflow runs persisted as running after ephemeral Bot ids are cleared. dispose() fails in-flight nodes and archives live runs before release. reap() also ends live running runs that already lost their ephemeral map, freeing lane capacity after restart.", "files": [ "plugins/workflow/src/service.js", "plugins/workflow/test/dispose.test.js", "plugins/workflow/test/ephemeral.test.js", "docs/subsystems/workflow.md", "changelog.d/1414-workflow-dispose-zombie.fixed.md" ], "checks": { "ran": "node --test plugins/workflow/test/*.test.js", "result": "green", "at": "d37f6a4a017064b73d57df73989e226807133811" }, "next": "none — ready for review" }Written-by: Dev