Skip to content

fix std control if#155

Merged
raphael-goetz merged 7 commits intomainfrom
#154-fix-std-control-if
Apr 14, 2026
Merged

fix std control if#155
raphael-goetz merged 7 commits intomainfrom
#154-fix-std-control-if

Conversation

@raphael-goetz
Copy link
Copy Markdown
Member

Resolves: #154

Copilot AI review requested due to automatic review settings April 14, 2026 15:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an execution bug where std::control::if prematurely terminated flows by emitting a Return signal when the condition was false, and extends the JSON flow test suite to cover if/if_else behavior and expected HTTP response shapes.

Changes:

  • Change std::control::if false-branch behavior from Signal::Return(null) to Signal::Success(null) so execution can continue to the next node.
  • Fix the test harness so cases that expect a Failure signal can pass when the produced error matches the expected JSON.
  • Add new flow-based tests for std::control::if and std::control::if_else, and align several existing flow expectations with current runtime outputs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
flows/06_if_else_control.json Adds a flow-based test for std::control::if_else including else-branch behavior and invalid-arg error expectation.
flows/05_if_control.json Adds a flow-based test for std::control::if to ensure false branch does not terminate execution.
flows/04_example_action.json Updates expected result to match behavior when remote runtime is not configured.
flows/02_return_flow_input.json Updates expected HTTP response field name to http_status_code.
flows/01_return_object.json Updates expected HTTP response field name to http_status_code.
crates/tests/src/main.rs Fixes test runner logic to treat matching failures as passing cases.
crates/core/src/runtime/functions/control.rs Fixes std::control::if else-path to emit Success(null) instead of Return(null).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread flows/05_if_control.json Outdated
Comment thread flows/05_if_control.json Outdated
Comment thread flows/06_if_else_control.json Outdated
Comment thread flows/06_if_else_control.json Outdated
Comment thread flows/04_example_action.json
Comment thread crates/core/src/runtime/functions/control.rs
raphael-goetz and others added 3 commits April 14, 2026 18:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
@raphael-goetz raphael-goetz merged commit ee001ad into main Apr 14, 2026
1 check passed
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.

std::control::if sends Return Signal when calling else branch

2 participants