fix(core): harden declarative workflow runtime - #84
Open
LukasParke wants to merge 6 commits into
Open
Conversation
Signed-off-by: Luke Parke <5702154+LukasParke@users.noreply.github.com>
Signed-off-by: Luke Parke <5702154+LukasParke@users.noreply.github.com>
Signed-off-by: Luke Parke <5702154+LukasParke@users.noreply.github.com>
Signed-off-by: Luke Parke <5702154+LukasParke@users.noreply.github.com>
…d uniqueness, route matchMode, hydration cache - invokeTool nodes dispatch through the shared tool-execution path (executeToolCall) instead of bare tool.execute — JSON-workflow tools now get the same argument validation, steering, and tool-UI as model-driven calls, and the transcript records the matching function_call_output item - executeToolCall is extracted from adapters/openrouter into a new core-tooling layer (packages/core/src/tooling/) so builders can reach it without a builders→adapters Sentrux violation; its broadcaster and tool-context/tool-UI helpers move to util/ and tooling/ accordingly (event-broadcaster and broadcaster-utils now live in util/) - document-scope node-id uniqueness (DUPLICATE_NODE_ID via NoeticConfigError), scoped per document so an id shared between the outer doc and an inline subflow document — safe at runtime because the hydrator suffixes subflow ids — is not a false positive; dynamicWorkflow routes uniqueness failures through the planner revision loop instead of throwing - per-index hydration cache for dynamic inParallel (an each-template re-hydrated every path on every invocation) - ConditionalRoute.matchMode 'substring' (default) | 'exact', lowercased once at hydration; documents the 'cat'-matches-'concatenate' footgun - DynamicWorkflowOpts accepts the full hydration registries (layers, subHarnesses, uiLibraries, workflows) and hydration config errors feed the revision loop with a register-your-refs hint - runCode execute capped at 256 KiB-equivalent length; subprocess request metadata no longer duplicates code+input - JSON schema artifacts regenerated via gen:schema; one test fixture corrected — it passed only because invokeTool nodes previously skipped validation Ported from OpenRouter's fork (commit 4cb90e3 there), adapted to current names (invokeTool/conditional/inParallel/runCode/callModel, builders/) and current Sentrux layering. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Luke Parke <5702154+LukasParke@users.noreply.github.com>
Apply review fixes for shared invokeTool result decoration/validation, reusable duplicate-id discovery, plan authoring validation, and preserved core workflow exports. Signed-off-by: Luke Parke <5702154+LukasParke@users.noreply.github.com>
|
@LukasParke is attempting to deploy a commit to the Matt Apperson's projects Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
Author
|
Agent: Code CI/structural/DCO are green where configured; remaining external red checks are |
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.
What
invokeToolnodes through shared validation, steering, UI, decoration, and item-schema pathsWhy
Declarative workflows bypassed tool gates, could silently mis-hydrate duplicate ids, rebuilt dynamic branches repeatedly, and failed generation without giving the planner actionable hydration feedback. The historical port also introduced a forbidden layer-direction edge, so this version first moves shared tool machinery to a foundational
toolinglayer.This semantically ports item 14 from
fork/port/openrouter-fixescommit4cb90e35onto current post-#68 names/architecture.Test plan
sentrux check .andsentrux gate .Schema
Adds conditional
matchModeand the run-code body size constraint. Both published schema copies were regenerated in the implementation commit.