implemented sub flow support#204
Conversation
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/taurus/-/pipelines/2564384697 Status: Passed Job summariesdocs:previewDocumentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/14616674890/artifacts/out/index.html |
There was a problem hiding this comment.
Pull request overview
Implements sub-flow execution by function identifier (in addition to existing starting-node sub-flows), letting handlers receive a deferred call into another built-in function whose arguments are bound through SubFlowSettings (defaults, hidden, optional/required). Threads a new Thunk abstraction through the handler/executor/tracer stack, replacing the previous i64 node-id thunks.
Changes:
- Introduce
Thunk { Node, Function }andFunctionThunk(handler/argument.rs) and updateHandlerFn/ThunkRunnerplus every handler signature to take&Thunkinstead ofi64. - Compile
sub_flow.functionIdentifierto a newCompiledThunk::Functionand execute it inexecutor.rsviaexecute_function_thunk, resolving each setting (hidden → default, null → default, missing → default/null/T-CORE-000107). - Switch tracing from
node_id: i64to a stringtarget(node=../function=..), retire compiler errorT-CORE-000106, addT-CORE-000107, and add fixture/engine tests.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/taurus-core/src/handler/argument.rs | New Thunk/FunctionThunk types; Argument::Thunk now carries a Thunk. |
| crates/taurus-core/src/handler/registry.rs | New ThunkRunner type alias; HandlerFn switched to it. |
| crates/taurus-core/src/runtime/engine/model.rs | CompiledArg::Deferred(CompiledThunk) with Node/Function variants. |
| crates/taurus-core/src/runtime/engine/compiler.rs | Compile function-identifier sub-flows; remove T-CORE-000106. |
| crates/taurus-core/src/runtime/engine/executor.rs | Dispatch Thunk execution; build/resolve function sub-flow settings; new T-CORE-000107. |
| crates/taurus-core/src/runtime/engine.rs | New engine unit tests covering function sub-flow semantics. |
| crates/taurus-core/src/runtime/execution/trace.rs | ArgKind::Thunk uses target: String. |
| crates/taurus-core/src/runtime/execution/tracer.rs | mark_thunk_executed matches by string target. |
| crates/taurus-core/src/runtime/execution/render.rs | Render thunk arg with target string. |
| crates/taurus-core/src/runtime/functions/*.rs | Update all handler signatures and test dummies to ThunkRunner/&Thunk. |
| docs/errors.md | Replace T-CORE-000106 row with T-CORE-000107. |
| flows/11_function_subflow.json | New fixture exercising functionIdentifier + hidden/default settings. |
| Cargo.lock | Consolidate to a single tucana version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c7bb276
into
#186-new-module-structure
Resolves: #184