Repository navigation
Compile workflow calls against the exact version they call, with activation pins - #46
Merged
Merged
Conversation
added 15 commits
October 13, 2026 14:57
…d limit the call depth
…k to the caller, and stays within the call depth
…ow calls in explain and graph
…kflow that calls others
…DK mark a workflow callable
… callee calling back an unpublished caller is recursion, and that callee connections stay out of the caller
…a call's business key
… and list every activation pin refusal
…nostics, recursion and secret inputs
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.
Summary
The compiler now checks and compiles Call a workflow (
callWorkflow) steps against the exact publishedworkflow version they call, and activation pins the called workflows' activations. Calls do not run yet: the
platform refuses to publish, import or activate a workflow that calls another (
WV-IR-UNSUPPORTED) until a laterrelease runs child workflows.
spec.callable:{}allows any workflow in the project,allowedCallersonly the named ones.
withis checked against itsinputSchema, abusinessKeymust be text of 1 to 200characters, and the step's output is the called workflow's output (
wait), a{status, runId, output?, error?}envelope (
onFailure: continue), ornull(mode: detach).WV-COMP-UNKNOWN_WORKFLOW,WV-COMP-CALL_NOT_CALLABLE,WV-COMP-CALL_RECURSION,WV-COMP-CALL_DEPTH(new operator limitmax_call_depth, default 8) andWV-COMP-CALL_MODE(at…/onFailure). Without a catalog, calls areWV-COMP-CATALOG_PENDING.callWorkflowIR node withcall_inputandcall_outputguards; such a workflow compiles toweave/ir-v1alpha4with theflow.callWorkflowfeature. Calls work the same inside loop bodies. Workflowswithout calls compile to the same bytes.
check_call_targetapplies the same resolution, callable, recursion and depth checks for other callers.workflow_activation_ids(one live activation of each called version in the sameenvironment) and stores
workflow_call_pinsandcall_depth; wrong or missing pins answer422 WV-READINESS-CALL. Retiring an activation keeps its pins.weave workflow explainandgraphshow calls, Studio has plain copy for the new diagnostics, shared scope fixtures cover call outputs, andthe SDK's
WorkflowBuilder.with_callable()writesspec.callable.Verification
make checkwith every stage passing (unit and contract tests 6831 passed, ruff, format,mypy, source coverage,
check_docs,mkdocs build --strict, worker packages, installed artifacts); goldencorpus, golden loops and language fixture checks; Studio type check, Prettier, vitest (1965 tests) and
production build.
anything is stored; activation pins one live activation of each called workflow and refuses bad pins (with the
call feature enabled inside the test); a retired activation keeps its call pins and depth; the definitions,
unsupported-run, connections, loop publication, loop runtime and loop human-task suites pass after merging
main. The full integration suite on four workers showed only failures from services the local fixture does notstart and two capacity-timing tests that also fail on
main.fixture tests (including the call IR, call target and call compiler tests). Runtime, CLI, SDK and activation-pin
unit tests run on Linux in CI. No CI job runs PostgreSQL tests. No Studio screen changes, so no browser suite was
rerun.
Decisions
Workflowdependency'sdocumentisthe called version's normalized definition, so the dependency digest equals the published definition digest that
activation compares. Compiling, importing and activating the caller read only its input and output schemas; the
callee's steps are never re-checked or run as part of the caller.
its own dependencies or callees, so growth is linear in the number of distinct versions a workflow calls
directly. The 32 MiB artifact budget still applies: a workflow calling dozens of very large workflows can hit
it at compile time.
prompts, action references, connection slot names and literal values. Calls stay inside one project, and
catalog reads are project-wide, so this is the same audience that can read the called version itself. Secret
values are never in a definition (literals bound to secret inputs are refused at compile and import). Treat an
exported caller artifact as containing its callees' definitions.
callableis checked by the caller's name; recursion by exact version, so calling an older version of the sameworkflow is allowed.
422 WV-READINESS-CALLwith a message naming the rule; a pin from anotherenvironment and a pin that does not exist get the same answer. A pin must resolve to the very activation it names.
onFailurewithmode: detachis reported asWV-COMP-CALL_MODEat the field; Studio's copy names theWhen it runs and If the called run fails settings. Other schema errors in the same document are still
reported.
WV-SCHEMA-SECRET_VALUEat the documentroot, exactly like a literal bound to an action's, decision table's or connector's secret input: the shared
payload admission that refuses it does not track paths. Pointing every binding's refusal at its
withfield is aseparate change for all step kinds.
Follow-ups for the call runtime
version are still live (retirement can race activation), and that the actor's scope still matches.
inputSchemaandoutputSchemafrom theWorkflowdependency document (and the
continueenvelope), not only against the guards the artifact carries; apply thesame classification and file admission as any run start and task output.
flow.callWorkflow, and add the call migration anddispatch.
call_tree_side_effectinto activation and run-start side-effect acknowledgement, and applycall_pinstotest activations of drafts (
DraftTestBindings.workflow_activation_ids).WV-SCHEMA-SECRET_VALUE, classification) at the binding's path for every stepkind, calls included.
compiler/calls.pyworkflow_stepsandlanguage_support, and memoizeCallGraph.depth.