Skip to content

Fix exception when rebuilding graph for tasks with static sub-namespace of dynamic namespace - #184

Open
ahkole wants to merge 1 commit into
scinode:mainfrom
ahkole:fix-mixed-dynamic-static-namespaces-setup
Open

ahkole wants to merge 1 commit into
scinode:mainfrom
ahkole:fix-mixed-dynamic-static-namespaces-setup

Conversation

@ahkole

@ahkole ahkole commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

This closes #183.

From my debugging, I think the issue is caused by the assumption in links_from_dict that the leaf socket in the socket_path is in a dynamic namespace, which is not always the case (see minimal example in the issue, which I also added as an additional test). This leads to an exception when it tries to assert that the parent of the leaf socket is a dynamic namespace. To fix this, we now first check if the leaf socket is not already in the parent namespace before trying to add it as a dynamic child. If the leaf socket is already present, we simply use it as the target.

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.76%. Comparing base (8d85e61) to head (cb88da7).

Files with missing lines Patch % Lines
src/node_graph/graph.py 62.50% 3 Missing ⚠️
tests/test_graph.py 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
+ Coverage   89.68%   89.76%   +0.08%     
==========================================
  Files          81       81              
  Lines        8984     9001      +17     
==========================================
+ Hits         8057     8080      +23     
+ Misses        927      921       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Static sub-namespaces of dynamic spaces causes exception when rebuilding Graph from ngdata

1 participant