Skip to content

DAG fan‑in node can execute more than once when dependencies finish close together #673

@next-n

Description

@next-n

Summary
When a DAG node has multiple incoming dependencies, the fan‑in path checks “are all deps done?” and then executes the node. If two dependencies finish nearly at the same time, both can pass the check and both execute the fan‑in node, causing duplicate execution.

Location
service.rs — fan‑in branch (see TODO about the “done” check).

Steps to reproduce (conceptual)

Build a DAG where C depends on A and B.
Make A and B complete quickly.
Run the workflow; C can execute twice (log/side‑effect).
Expected
C runs exactly once after all dependencies complete.

Actual
C can be scheduled/run more than once under race conditions.

Note
I found this TODO in the code and would like to work on a fix + test if that’s okay.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions