Merged
Conversation
Contributor
There was a problem hiding this comment.
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::iffalse-branch behavior fromSignal::Return(null)toSignal::Success(null)so execution can continue to the next node. - Fix the test harness so cases that expect a
Failuresignal can pass when the produced error matches the expected JSON. - Add new flow-based tests for
std::control::ifandstd::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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #154