Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ccb4b0e
feat: satisfied new tucana interface
raphael-goetz Apr 28, 2026
3bd0436
dependencies: updated tucana and code0-flow
raphael-goetz Apr 28, 2026
aa23084
feat: satisfied new tucana grpc interface
raphael-goetz Apr 28, 2026
58c7fe8
feat: satisfied new tucana interface
raphael-goetz Apr 28, 2026
ed7d87f
dependencies: updated tucana and code0-flow
raphael-goetz Apr 28, 2026
e34f3b8
feat: satisfied new tucana grpc interface
raphael-goetz Apr 28, 2026
39f87ac
Merge branch '#186-new-module-structure' of https://github.com/code0-…
raphael-goetz May 4, 2026
9736310
feat: adjusted provider interface to match node execution result
raphael-goetz May 4, 2026
346d33a
feat: updated test exec to latest tucana interface
raphael-goetz May 4, 2026
45cc1d1
feat: refactored internal store to use node execution results instead…
raphael-goetz May 4, 2026
e4e015c
feat: taurus will react to nats subject test_execution
raphael-goetz May 4, 2026
3dd00d5
feat: added nats to workflow
raphael-goetz May 30, 2026
78ea0ce
dependencies: added serde as dev dependency
raphael-goetz May 30, 2026
58b945d
feat: added execution test
raphael-goetz May 30, 2026
99c3af9
feat: adjustments from code review
raphael-goetz May 30, 2026
5b4bf04
Merge pull request #203 from code0-tech/#185-handle-test-exec
raphael-goetz May 30, 2026
64a9826
Merge branch 'main' into #186-new-module-structure
raphael-goetz May 30, 2026
827bc45
feat: implemented sub flow support
raphael-goetz May 30, 2026
6b23062
feat: changes from code review
raphael-goetz May 30, 2026
c7bb276
Merge pull request #204 from code0-tech/#184-support-sub-flows
raphael-goetz May 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
jobs:
taurus:
runs-on: ubuntu-latest
services:
nats:
image: nats:2
ports:
- 4222:4222

steps:
- uses: actions/checkout@v6
Expand All @@ -15,8 +20,11 @@ jobs:
run: PATH=${{ runner.temp }}/proto/bin:$PATH cargo build
env:
RUST_BACKTRACE: 'full'
- name: Run Tests
run: cargo test
- name: Run Test Suite
- name: Run workspace tests
run: cargo test --workspace --all-targets
- name: Run NATS test execution request tests
run: cargo test -p taurus test_execution_request -- --ignored --nocapture
env:
NATS_URL: nats://127.0.0.1:4222
- name: Run tests package flow suite
run: cargo run --package tests

34 changes: 8 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2024"
[workspace.dependencies]
async-trait = "0.1.89"
code0-flow = { version = "0.0.33" }
tucana = { version = "0.0.68" }
tucana = { version = "0.0.70" }
Comment thread
raphael-goetz marked this conversation as resolved.
tokio = { version = "1.44.1", features = ["rt-multi-thread", "signal"] }
log = "0.4.27"
futures-lite = "2.6.0"
Expand Down
48 changes: 46 additions & 2 deletions crates/taurus-core/src/handler/argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,56 @@ use tucana::shared::value::Kind;
use tucana::shared::{ListValue, NumberValue, Struct, Value};

use crate::value::{number_to_f64, number_to_i64_lossy};
use std::fmt;
use tucana::shared::SubFlowSetting;

#[derive(Clone)]
pub struct FunctionThunk {
pub identifier: String,
pub parameter_index: i64,
pub settings: Vec<SubFlowSetting>,
}

impl fmt::Debug for FunctionThunk {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("FunctionThunk")
.field("identifier", &self.identifier)
.field("parameter_index", &self.parameter_index)
.field("settings_len", &self.settings.len())
.finish()
}
}

#[derive(Clone)]
pub enum Thunk {
Node(i64),
Function(FunctionThunk),
}

impl fmt::Debug for Thunk {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Thunk::Node(node_id) => write!(f, "{}", node_id),
Thunk::Function(function) => function.fmt(f),
}
}
}

impl Thunk {
pub fn trace_target(&self) -> String {
match self {
Thunk::Node(node_id) => format!("node={}", node_id),
Thunk::Function(function) => format!("function={}", function.identifier),
}
}
}

#[derive(Clone, Debug)]
pub enum Argument {
/// Eager value that can be consumed immediately by a handler.
Eval(Value),
/// Deferred node execution handle, evaluated by calling `run(node_id)`.
Thunk(i64),
/// Deferred execution handle, evaluated by calling `run(thunk)`.
Thunk(Thunk),
}

#[derive(Clone, Copy, Debug)]
Expand Down
12 changes: 7 additions & 5 deletions crates/taurus-core/src/handler/registry.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
//! Runtime handler registry and callable function signatures.

use crate::handler::argument::{Argument, ParameterNode};
use crate::handler::argument::{Argument, ParameterNode, Thunk};
use crate::runtime::execution::value_store::ValueStore;
use crate::runtime::functions::ALL_FUNCTION_SETS;
use crate::types::signal::Signal;
use std::collections::HashMap;

/// Handler function type.
/// - For eager params, the executor will already convert them to Argument::Eval(Value).
/// - For lazy params, the executor will pass Argument::Thunk(node_id).
/// - If a handler wants to execute a lazy arg, it calls run(node_id).
pub type HandlerFn = fn(
/// - For lazy params, the executor will pass Argument::Thunk(thunk).
/// - If a handler wants to execute a lazy arg, it calls run(thunk).
pub type ThunkRunner<'runner> = dyn FnMut(&Thunk, &mut ValueStore) -> Signal + 'runner;

pub type HandlerFn = for<'runner> fn(
args: &[Argument],
ctx: &mut ValueStore,
run: &mut dyn FnMut(i64, &mut ValueStore) -> Signal,
run: &mut ThunkRunner<'runner>,
) -> Signal;

#[derive(Clone, Copy)]
Expand Down
1 change: 1 addition & 0 deletions crates/taurus-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

mod handler;
pub mod runtime;
pub mod time;
pub mod types;
pub mod value;
Loading