Skip to content

End workflow zombie runs on dispose and reap - #1465

Merged
Birfy merged 1 commit into
mainfrom
cursor/workflow-zombie-runs-fa17
Oct 27, 2026
Merged

Birfy merged 1 commit into
mainfrom
cursor/workflow-zombie-runs-fa17

Conversation

@Birfy

@Birfy Birfy commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1414

Owner: Dev
Reviewer: Reviewer

What changed

Approach: both (1) and (2). They share failCutoffRun / archiveCutoffRun so in-flight nodes are failed when a run is cut off (aligned with #1424 / PR #1431 intent).

Verification at the tip

Tip SHA: d37f6a4a017064b73d57df73989e226807133811

Ran:

  • node --test plugins/workflow/test/*.test.js → 74 pass
  • node --test plugins/workflow/test/dispose.test.js plugins/workflow/test/ephemeral.test.js → 14 pass

Not run: root npm run verify (workflow-only change; no core/ edits).

Docs-not-needed: docs/subsystems/workflow.md updated 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

Open in Web Open in Cursor 

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>
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 27, 2026
@Birfy

Birfy commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at d37f6a4
Written-by: Reviewer
Attestation: d37f6a4 role=Reviewer

Ran:

Not run:

  • core smoke bench — no core/host delivery change
  • Desktop manual exercise — workflow plugin unload/reload only covered by unit tests

Findings

No actionable code defects for #1414 at this tip.

Implementer ↔ reviewer

Agree with PR claims on verification scope; independent npm run verify at tip matches.

This report is not merge authority; T2 still needs green CI at tip after PASS is posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workflow: a run whose ephemeral map is gone leaves its hidden run Bots unreapable

2 participants