Add unwrapped dict task inputs#48
Merged
Volv-G merged 5 commits intoJul 23, 2026
Merged
Conversation
Assisted-By: devx/b49d7847-4e8a-45eb-8304-dacd6e78458e
Assisted-By: devx/b49d7847-4e8a-45eb-8304-dacd6e78458e
Assisted-By: devx/b49d7847-4e8a-45eb-8304-dacd6e78458e
Assisted-By: devx/b49d7847-4e8a-45eb-8304-dacd6e78458e
Assisted-By: devx/b49d7847-4e8a-45eb-8304-dacd6e78458e
Volv-G
deleted the
piforge/tangle-compile-oss-migration/dict-unwrapped-task-inputs-aefbc0b
branch
July 23, 2026 20:07
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
Adds a first-class
@task(unwrap=...)API for Python-authored tasks that need to receive a caller-provided dict as explicit component inputs instead of oneJsonObjectinput.The compiler now flattens the traced call-site dict into synthetic inputs such as
run_data__shopandrun_data__catalog, so normal argument/edge emission can wire each dict value independently.Mechanism
@task(...)withunwrap="param"andunwrap=["param", ...].param__key) and records the exact key order per task call site.local_from_python.unwrapped_inputsschema in the generated components sidecar:dict[..., V];task-name--<hash>) so the same function can be called with different dict key sets without component schema collisions.CallableRef.named()/bind()/with_annotations()so schema generation works for named task call sites.Tests
Adds coverage for:
@task(unwrap=...)API normalization/validation.dict[str, V]into flattened input types.local_from_python.unwrapped_inputs.unwrapped_inputsfor compile↔hydrate round-trip determinism.Version
Bumps
tangle-clifrom0.1.6to0.1.7so this can be tagged/released after merge.Design reference
Implements the design tracked in the PiForge project wiki page
design-dict-unwrapping-task-inputs.Local validation
uv lock --checkuv run ruff check packages/tangle-cli/src/tangle_cli/component_from_func.py packages/tangle-cli/src/tangle_cli/component_generator.py packages/tangle-cli/src/tangle_cli/pipeline_compiler.py packages/tangle-cli/src/tangle_cli/pipeline_hydrator.py packages/tangle-cli/src/tangle_cli/python_pipeline/ref.py packages/tangle-cli/src/tangle_cli/python_pipeline/task.py packages/tangle-cli/src/tangle_cli/python_pipeline/graph.py tests/test_component_from_func.py tests/test_pipeline_compiler.py tests/test_pipelines_cli.py tests/test_packaging.pyuv run pytest→805 passed, 4 warnings