Declare the input port, naming the paths the Jinja templates ask for - #13
Merged
Merged
Conversation
The task declared no input ports at all, so what the editor offered was DataIntegration's default rather than anything the task stated. It declares one now, exactly when it reads one - when the query or the variables carry Jinja syntax - and none otherwise, since a task without Jinja sends its text once and ignores whatever is connected. The port names the paths rather than leaving the schema unknown. DataIntegration reads only the paths a consuming task requests, so an unknown or flexible input asks for nothing and is handed nothing. The paths come from the templates themselves, via jinja2.meta.find_undeclared_variables, which is how cmem-plugin-llm derives its input schema from template variables. A run that takes the per entity branch and receives nothing now says so in the report. It used to report a successful run having sent no query at all, which is also what made this diagnosable: the warning is what showed the task was handed zero input collections. This does not fix feeding the task from a dataset - see the report on the branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Coverage Report
|
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.
Closes the last finding from the review of #12: the task declared no
input_portsat all,so what the workflow editor offered on the input side was DataIntegration's default rather
than anything the task stated.
What it declares now
One port when the query or the variables carry Jinja syntax — which is exactly when the
task reads its input — and no port at all otherwise, since a task without Jinja sends
its text once and ignores whatever is connected. A handle there only invites a connection
that does nothing.
The port names the paths, taken from the templates themselves with
jinja2.meta.find_undeclared_variables, the waycmem-plugin-llmderives an input schemafrom its template variables. This is the part that matters: DataIntegration reads only the
paths a consuming task requests, so an unknown or flexible input asks for nothing and is
handed nothing.
A run that takes the per entity branch and receives nothing now warns in the execution
report, instead of reporting a successful run having sent no query at all. That was noted
as out of scope on the last ticket; it is also what made the investigation below possible,
since the warning is what reported how many input collections arrived.
What this does not fix
A dataset wired into this task still delivers zero entities, and the declaration is not
the reason. Verified against a deployment, five ways, all reporting Received 0 input
collection(s): no declaration,
UnknownSchemaPort,FixedSchemaPortwith the derivedpaths,
FlexibleSchemaPort, a freshly created workflow, and a distinctly versioned buildafter a forced uninstall and reinstall.
What is established:
idSo the remaining suspect is the dataset to Python task schema negotiation, or something
about workflows created through the API rather than drawn in the editor. That wants either
a look from someone who knows the DataIntegration side, or a check of whether the editor
behaves differently — not another guess here.
Tests
Three new tests: the derived input schema names the template variables, a task without
Jinja declares no input, and a task with Jinja requests the paths it renders.
task checkgreen — 38 offline, ruff, mypy, deptry, trivy.
🤖 Generated with Claude Code