Skip to content

Conversation

@JPPhoto
Copy link
Collaborator

@JPPhoto JPPhoto commented Jan 6, 2026

Summary

Feature: best-effort in-order execution for nodes expanded by IterateInvocation, subject to ready state.

Why: iteration-expanded work could run in an arbitrary order when multiple iteration branches become ready at the same time, which reduces determinism and makes behavior harder to reason about.

How: compute a cached per-exec-node "iteration path" (outer to inner indices for nested iterators, respecting collector boundaries) and use it to ordered-insert ready nodes into the existing per-class ready queues. FIFO is preserved for equal iteration paths, and no blocking is introduced.

Related Issues / Discussions

QA Instructions

Create a collection, note the ordering, then iterate and pass values to a series of other nodes. Check that the outputs use the source collection's items in order.

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added python PRs that change python files services PRs that change app services labels Jan 6, 2026
@JPPhoto JPPhoto added backend PRs that change backend files enhancement New feature or request and removed python PRs that change python files services PRs that change app services labels Jan 6, 2026
Added a test for nested iterator execution ordering. (Failing at commit time!)
@github-actions github-actions bot added python PRs that change python files services PRs that change app services python-tests PRs that change python tests labels Jan 6, 2026
When a graph has nested iterators, some "ready to run" node combinations do not actually belong together. Previously, the scheduler would still try to build nodes for those mismatched combinations, which could cause the same work to run more than once. This change skips any combination that is missing a valid iterator parent, so nested iterator expansions run once per intended item.
@JPPhoto JPPhoto marked this pull request as ready for review January 6, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend PRs that change backend files enhancement New feature or request python PRs that change python files python-tests PRs that change python tests services PRs that change app services

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant