Skip to content

fix(coordinator): stop succeeded dataflow orphans on status report - #3119

Open
SunSunSun689 wants to merge 1 commit into
dora-rs:mainfrom
SunSunSun689:fix/reconcile-succeeded-status-report
Open

fix(coordinator): stop succeeded dataflow orphans on status report#3119
SunSunSun689 wants to merge 1 commit into
dora-rs:mainfrom
SunSunSun689:fix/reconcile-succeeded-status-report

Conversation

@SunSunSun689

Copy link
Copy Markdown

Summary

Fixes a coordinator reconciliation gap where a daemon could report a dataflow as still running even though the coordinator store already marked it as Succeeded.

Previously, the DaemonStatusReport handler handled:

  • Pending / Recovering / non-terminal Failed: reconcile back to Running
  • Running: re-establish live coordinator state
  • terminal Failed: preserve the terminal verdict and stop orphaned daemon- side nodes
  • Succeeded: fell through to _ => {} after the coordinator had already recorded the dataflow as successfully finished.

This change treats Succeeded as a terminal state for status-report reconciliation and reuses the existing orphan cleanup path.

@trunk-io

trunk-io Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

Copy link
Copy Markdown
Collaborator

Reviewed the diff — no issues found, looks correct and safe to merge.

The new status if status_report_should_stop_orphan(&status) guard arm in the DaemonStatusReport reconciliation is only reachable for Failed { terminal: true } and Succeeded, because the earlier arms already consume Failed { terminal: false } | Pending | Recovering and Running — so arm ordering is sound and Stopping still falls through to the unchanged _ => {}. Succeeded is a genuinely terminal state (set only once all node results are collected error-free), so stopping a daemon that still reports such a dataflow as running is the right call and consistent with the existing terminal-failure orphan cleanup. The added unit test directly asserts the helper returns true for Succeeded, exercising the fixed path.


🤖 Automated review by Claude (Claude Code). This review was generated fully automatically with no human in the loop and has not been vetted by a maintainer — treat it as advisory.


Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants