From df897413be096d505c301fe4eaef7a381942e729 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 4 Jun 2026 16:04:03 +0200 Subject: [PATCH 1/2] drop: removed infinity function --- crates/taurus-core/src/runtime/functions/number.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/crates/taurus-core/src/runtime/functions/number.rs b/crates/taurus-core/src/runtime/functions/number.rs index 05782a8..917d1ee 100644 --- a/crates/taurus-core/src/runtime/functions/number.rs +++ b/crates/taurus-core/src/runtime/functions/number.rs @@ -42,7 +42,6 @@ pub(crate) const FUNCTIONS: &[FunctionRegistration] = &[ FunctionRegistration::eager("std::number::exponential", exponential, 2), FunctionRegistration::eager("std::number::pi", pi, 0), FunctionRegistration::eager("std::number::euler", euler, 0), - FunctionRegistration::eager("std::number::infinity", infinity, 0), FunctionRegistration::eager("std::number::round_up", round_up, 2), FunctionRegistration::eager("std::number::round_down", round_down, 2), FunctionRegistration::eager("std::number::round", round, 2), @@ -396,15 +395,6 @@ fn euler( Signal::Success(value_from_f64(f64::consts::E)) } -fn infinity( - args: &[Argument], - _ctx: &mut ValueStore, - _run: &mut crate::handler::registry::ThunkRunner<'_>, -) -> Signal { - no_args!(args); - Signal::Success(value_from_f64(f64::INFINITY)) -} - fn round_up( args: &[Argument], _ctx: &mut ValueStore, @@ -1056,10 +1046,6 @@ mod tests { assert!( (expect_num(euler(&[], &mut ctx, &mut run)) - std::f64::consts::E).abs() < f64::EPSILON ); - - let mut run = dummy_run; - let inf = expect_num(infinity(&[], &mut ctx, &mut run)); - assert!(inf.is_infinite() && inf.is_sign_positive()); } #[test] From 019942d0a3a651bfb9fd340678b54ab302123676 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 4 Jun 2026 16:13:08 +0200 Subject: [PATCH 2/2] feat: correct flow functions after http response create removal --- flows/02_return_flow_input.json | 2 +- flows/05_if_control.json | 40 ++--------------- flows/06_if_else_control.json | 36 +-------------- flows/07_simple_return.json | 20 +-------- flows/09_filter_return.json | 18 +------- flows/10_multiple_respond.json | 80 ++++++++++++++++++++++++--------- 6 files changed, 68 insertions(+), 128 deletions(-) diff --git a/flows/02_return_flow_input.json b/flows/02_return_flow_input.json index 227f692..a4836a6 100644 --- a/flows/02_return_flow_input.json +++ b/flows/02_return_flow_input.json @@ -47,7 +47,7 @@ { "definition_source": "taurus", "databaseId": "3", - "runtimeFunctionId": "http::response::create", + "runtimeFunctionId": "rest::control::respond", "parameters": [ { "databaseId": "5", diff --git a/flows/05_if_control.json b/flows/05_if_control.json index bc9847f..8b601fb 100644 --- a/flows/05_if_control.json +++ b/flows/05_if_control.json @@ -72,24 +72,9 @@ ], "startingNodeId": "11", "nodeFunctions": [ - { - "databaseId": "13", - "runtimeFunctionId": "rest::control::respond", - "parameters": [ - { - "databaseId": "57", - "runtimeParameterId": "http_response", - "value": { - "referenceValue": { - "nodeId": "14" - } - } - } - ] - }, { "databaseId": "14", - "runtimeFunctionId": "http::response::create", + "runtimeFunctionId": "rest::control::respond", "parameters": [ { "databaseId": "54", @@ -120,8 +105,7 @@ } } } - ], - "nextNodeId": "13" + ] }, { "databaseId": "11", @@ -158,24 +142,9 @@ ], "nextNodeId": "14" }, - { - "databaseId": "15", - "runtimeFunctionId": "rest::control::respond", - "parameters": [ - { - "databaseId": "58", - "runtimeParameterId": "http_response", - "value": { - "referenceValue": { - "nodeId": "12" - } - } - } - ] - }, { "databaseId": "12", - "runtimeFunctionId": "http::response::create", + "runtimeFunctionId": "rest::control::respond", "parameters": [ { "databaseId": "51", @@ -214,8 +183,7 @@ } } } - ], - "nextNodeId": "15" + ] } ], "projectSlug": "codezero-project", diff --git a/flows/06_if_else_control.json b/flows/06_if_else_control.json index 4c05804..282c3e5 100644 --- a/flows/06_if_else_control.json +++ b/flows/06_if_else_control.json @@ -74,7 +74,7 @@ "nodeFunctions": [ { "databaseId": "19", - "runtimeFunctionId": "http::response::create", + "runtimeFunctionId": "rest::control::respond", "parameters": [ { "databaseId": "51", @@ -105,22 +105,6 @@ } } } - ], - "nextNodeId": "20" - }, - { - "databaseId": "20", - "runtimeFunctionId": "rest::control::respond", - "parameters": [ - { - "databaseId": "76", - "runtimeParameterId": "http_response", - "value": { - "referenceValue": { - "nodeId": "19" - } - } - } ] }, { @@ -170,7 +154,7 @@ }, { "databaseId": "17", - "runtimeFunctionId": "http::response::create", + "runtimeFunctionId": "rest::control::respond", "parameters": [ { "databaseId": "72", @@ -201,22 +185,6 @@ } } } - ], - "nextNodeId": "18" - }, - { - "databaseId": "18", - "runtimeFunctionId": "rest::control::respond", - "parameters": [ - { - "databaseId": "64", - "runtimeParameterId": "http_response", - "value": { - "referenceValue": { - "nodeId": "17" - } - } - } ] } ], diff --git a/flows/07_simple_return.json b/flows/07_simple_return.json index eae7552..204c226 100644 --- a/flows/07_simple_return.json +++ b/flows/07_simple_return.json @@ -188,24 +188,9 @@ } ] }, - { - "databaseId": "13", - "runtimeFunctionId": "rest::control::respond", - "parameters": [ - { - "databaseId": "25", - "runtimeParameterId": "http_response", - "value": { - "referenceValue": { - "nodeId": "8" - } - } - } - ] - }, { "databaseId": "8", - "runtimeFunctionId": "http::response::create", + "runtimeFunctionId": "rest::control::respond", "parameters": [ { "databaseId": "16", @@ -236,8 +221,7 @@ } } } - ], - "nextNodeId": "13" + ] } ], "projectSlug": "codezero-project", diff --git a/flows/09_filter_return.json b/flows/09_filter_return.json index accef8f..340325f 100644 --- a/flows/09_filter_return.json +++ b/flows/09_filter_return.json @@ -317,7 +317,7 @@ }, { "databaseId": "11", - "runtimeFunctionId": "http::response::create", + "runtimeFunctionId": "rest::control::respond", "parameters": [ { "databaseId": "27", @@ -354,22 +354,6 @@ } } } - ], - "nextNodeId": "4" - }, - { - "databaseId": "4", - "runtimeFunctionId": "rest::control::respond", - "parameters": [ - { - "databaseId": "8", - "runtimeParameterId": "http_response", - "value": { - "referenceValue": { - "nodeId": "11" - } - } - } ] } ], diff --git a/flows/10_multiple_respond.json b/flows/10_multiple_respond.json index 592b624..00bd32b 100644 --- a/flows/10_multiple_respond.json +++ b/flows/10_multiple_respond.json @@ -304,7 +304,7 @@ }, { "databaseId": "11", - "runtimeFunctionId": "http::response::create", + "runtimeFunctionId": "rest::control::respond", "parameters": [ { "databaseId": "27", @@ -342,35 +342,45 @@ } } ], - "nextNodeId": "4" + "nextNodeId": "20" }, { - "databaseId": "4", - "nextNodeId": "20", + "nextNodeId": "21", + "databaseId": "20", "runtimeFunctionId": "rest::control::respond", "parameters": [ { - "databaseId": "8", - "runtimeParameterId": "http_response", + "databaseId": "27", + "runtimeParameterId": "http_status_code", "value": { - "referenceValue": { - "nodeId": "11" + "literalValue": { + "numberValue": { + "integer": "200" + } } } - } - ] - }, - { - "nextNodeId": "21", - "databaseId": "20", - "runtimeFunctionId": "rest::control::respond", - "parameters": [ + }, { - "databaseId": "8", - "runtimeParameterId": "http_response", + "databaseId": "30", + "runtimeParameterId": "headers", + "value": { + "literalValue": { + "structValue": { + "fields": { + "x": { + "stringValue": "y" + } + } + } + } + } + }, + { + "databaseId": "31", + "runtimeParameterId": "payload", "value": { "referenceValue": { - "nodeId": "11" + "nodeId": "10" } } } @@ -382,11 +392,37 @@ "runtimeFunctionId": "rest::control::respond", "parameters": [ { - "databaseId": "8", - "runtimeParameterId": "http_response", + "databaseId": "27", + "runtimeParameterId": "http_status_code", + "value": { + "literalValue": { + "numberValue": { + "integer": "200" + } + } + } + }, + { + "databaseId": "30", + "runtimeParameterId": "headers", + "value": { + "literalValue": { + "structValue": { + "fields": { + "x": { + "stringValue": "y" + } + } + } + } + } + }, + { + "databaseId": "31", + "runtimeParameterId": "payload", "value": { "referenceValue": { - "nodeId": "11" + "nodeId": "10" } } }