make use of sub flow definition source - #267
Conversation
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/taurus/-/pipelines/2723734124 Status: Passed Job summariesdocs:previewDocumentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/15658300462/artifacts/out/index.html |
There was a problem hiding this comment.
Pull request overview
This PR extends Taurus’ runtime compilation/execution pipeline to honor definition_source for function-backed sub-flows, routing non-local sub-flow functions to the configured remote runtime (mirroring existing node routing behavior). It also updates fixtures/docs and bumps shared protocol crate versions to support the new SubFlow function shape.
Changes:
- Route function-backed sub-flow execution to
RemoteRuntimewhendefinition_sourceis non-local, and add remote execution request materialization for function thunks. - Update engine/compiler data models to carry an execution target for function thunks, and adjust tests/fixtures accordingly (including a new remote sub-flow fixture).
- Bump
code0-flowandtucanaworkspace dependency versions and update docs describing routing behavior.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| flows/13_remote_function_subflow.json | Adds a new validation flow fixture for remote-dispatched function-backed sub-flows. |
| flows/12_for_each_function_subflow.json | Updates sub-flow function reference shape to the new function { ... } form. |
| flows/11_function_subflow.json | Updates sub-flow function reference shape to the new function { ... } form. |
| docs/dev.md | Updates remote routing documentation to include function-backed sub-flows. |
| crates/taurus-tests/src/main.rs | Adds an optional “remote” fixture and a stub RemoteRuntime to validate remote sub-flow dispatch without NATS. |
| crates/taurus-tests/README.md | Documents how to use the new remote fixture in test cases. |
| crates/taurus-tests/Cargo.toml | Adds async-trait to support the test stub RemoteRuntime implementation. |
| crates/taurus-core/src/runtime/engine/model.rs | Extends compiled function thunk model to include NodeExecutionTarget. |
| crates/taurus-core/src/runtime/engine/executor.rs | Executes function-backed sub-flow thunks locally or remotely based on execution target; builds remote requests for function thunks. |
| crates/taurus-core/src/runtime/engine/compiler.rs | Compiles sub-flow function references with definition_source into local/remote execution targets. |
| crates/taurus-core/src/runtime/engine.rs | Adjusts module visibility to support sharing NodeExecutionTarget outside the engine module. |
| crates/taurus-core/src/handler/argument.rs | Carries execution target through FunctionThunk to enable remote function thunk execution. |
| Cargo.toml | Bumps workspace dependency versions for code0-flow and tucana. |
| Cargo.lock | Updates lockfile for the dependency bumps and new async-trait usage in tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| mod compiler; | ||
| mod emitter; | ||
| mod executor; | ||
| mod model; | ||
| pub(crate) mod model; | ||
|
|
| use tucana::shared::value::Kind; | ||
| use tucana::shared::{ListValue, NumberValue, Struct, Value}; | ||
|
|
||
| use crate::runtime::engine::model::NodeExecutionTarget; |
| In the compiler, a node or function-backed sub-flow is treated as local when | ||
| `definition_source` is: |
Resolves: #252