Repository navigation
Conversation
Hoists the dynamic-namespace path-walking logic out of links_from_dict into a reusable staticmethod so aiida-workgraph's Map-zone clone path (_patch_cloned_tasks) can resolve dotted targets like ``pseudos.O`` into a dynamic namespace by materialising children on demand. Fixes the AttributeError "'O' is not in this namespace" raised when a Map zone clones a task whose dynamic-namespace input is populated by links (not raw values) — the round-trip via ``to_dict`` was preserving the namespace itself but losing its link-installed children. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reconstructing a graph whose typed dynamic namespace entries were populated by per-key leaf links failed in from_dict with "Missing socket '...' in <task>.inputs and parent namespace is not dynamic": - the entry namespace exists only at build time, and walking the dotted target path materializes it from the parent's item spec - the leaf socket created alongside the entry was then reported as missing because the typed entry itself is not dynamic Resolution now returns an already-existing leaf instead of insisting on creating it. Since run() and the daemon reconstruct via from_dict, such graphs previously died at run start.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
+ Coverage 89.68% 89.82% +0.14%
==========================================
Files 81 81
Lines 8984 9020 +36
==========================================
+ Hits 8057 8102 +45
+ Misses 927 918 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The helper extraction moved pre-existing untested error paths into _resolve_or_create_input_socket, where they are now unit-testable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LGsT8YPFW5jT93FPWojAYf
elinscott
added a commit
to elinscott/node-graph
that referenced
this pull request
Aug 14, 2026
# Conflicts: # src/node_graph/graph.py
elinscott
added a commit
to elinscott/node-graph
that referenced
this pull request
Aug 17, 2026
Resolution notes, all of it integration between two open pull requests: - graph.py: scinode#151 and scinode#166 reword the same docstring paragraph of `_resolve_or_create_input_socket`; scinode#151's wording is kept, and scinode#166's already-materialised-leaf early return is taken.
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.
Problem
A graph whose typed dynamic output namespace entries are populated key-by-key from leaf sockets cannot be reconstructed from its dict form — which
build(),run()and the daemon all rely on:The per-key links create the entry namespaces (
a,b) in the live graph, but reconstruction refuses to re-create their children because the typed entry itself is not marked dynamic.Changes
links_from_dictinto aGraph._resolve_or_create_input_sockethelper (mechanical, first commit)Testing
test_graph.py: a typed dynamic output namespace populated by per-key leaf links survivesto_dict→from_dict