Skip to content

Loop condition errors can leave partial results marked Completed #9499

Open

Description

@aglinxinyuan

What happened?

Loop End evaluates its condition after sending port_completed for its output ports. Region completion is port-based, so an undefined name in the condition can leave the UI showing Completed with partial results, even though the console reports a NameError.

Before: port completion → condition raises → partial results shown as Completed.
After: validate the condition before completion notifications; an error keeps the region incomplete.

How to reproduce?

  1. Run a loop with a valid body and update expression.
  2. Set Loop End's condition to reference an undefined variable.
  3. Observe the console error and the workflow's Completed status after the first iteration.

Version/Branch

1.4.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

b9d6f11 (PR #9498; unchanged Loop End code from main).

What browsers are you seeing the problem on?

Chrome

Relevant log output

NameError: name 'score' is not defined, followed by a Completed workflow state with only the first iteration's result.

Activity

  1. aglinxinyuan commented on Nov 16, 2026

    @aglinxinyuan
    ContributorAuthor

    /take

  2. added theissue type on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions