Skip to content

Reject a child's missing config before reusing a sibling's artifact (v0.1.39) - #88

Merged
Volv-G merged 2 commits into
masterfrom
reject-missing-child-config
Nov 19, 2026
Merged

Volv-G merged 2 commits into
masterfrom
reject-missing-child-config

Conversation

@Volv-G

@Volv-G Volv-G commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #86 and #87. When a child had a task_annotations function but no config file, _own_task_annotations_for_key returned {}. That made the child's compile key the same as the key of an annotation-free wrapper over the same function and name. With no config.yaml, using plain = pipeline("Child")(body) before configured = pipeline("Child", task_annotations=lambda cfg: {"team": cfg.team})(body) made configured reuse plain's compiled artifact. That skipped the _compile_pipeline_fn call that rejects the missing config, so the defaults were silently dropped. In the reverse order the compile raised.

The missing config is now rejected while building the key, with the error the child's own compile raises (via _load_cfg_and_raw), so the outcome no longer depends on the order of the siblings.

Test: plain-then-configured and configured-then-plain siblings with no config.yaml both raise "config file not found … has a task_annotations function". On the current master, the plain-first case does not raise.

Bumps the version to 0.1.39.

Raised in review of the shop/world vendoring of tangle-cli: https://delta.shopify.io/shop/world/pull/2480347#discussion_r2600832335899

A child's `task_annotations` function contributed nothing to its compile key
when the child had no config file, so its key matched an annotation-free
wrapper over the same function and name. Used after that sibling, the child
reused the sibling's artifact, skipping the compile that rejects the missing
config, and its defaults were dropped; in the other order it raised.

The missing config is now rejected while building the key, with the error
the child's own compile raises, whichever sibling comes first.
@Volv-G
Volv-G requested a review from Ark-kun as a code owner November 19, 2026 13:35
@Volv-G
Volv-G merged commit 9db2f30 into master Nov 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant