Skip to content

fix(mkconcore): allow node labels with no source file - #685

Open
yadavchiragg wants to merge 4 commits into
ControlCore-Project:devfrom
yadavchiragg:fix/allow-empty-source-nodes
Open

yadavchiragg wants to merge 4 commits into
ControlCore-Project:devfrom
yadavchiragg:fix/allow-empty-source-nodes

Conversation

@yadavchiragg

Copy link
Copy Markdown

Fixes #684

Problem: mkconcore.py raises ValueError: Node source file '' cannot be empty for any node whose label has an empty source part, such as IN: or OUT:. 22 of the .graphml files in the repository have such port-only nodes (0mq/, measurements/, ratc/yuyu*learn*.graphml, testsou/), and none of them can be built. The rest of mkconcore.py still handles a node without a source file (it checks len(sourcecode) != 0 / if not sourcecode in several places), so the label validation is stricter than the generator.

Change: only validate the source part with safe_relpath when it is non-empty. Non-empty sources are validated exactly as before, so unsafe source paths are still rejected.

Testing: new tests/test_port_only_nodes.py finds every workflow in the repo that contains a port-only node and builds it for posix, windows and docker. On current dev all 66 build cases fail; with this change all pass. ruff format --check and ruff check are clean.

Maintainer confirmed port-only nodes (IN:/OUT:) are meant to be supported. validate no longer reports 'has no filename' for them; mkconcore already builds them. The test now asserts port-only nodes validate.
@pradeeban

Copy link
Copy Markdown
Member

@yadavchiragg

yadavchiragg commented Nov 23, 2026 •

Copy link
Copy Markdown
Author

Thanks @pradeeban. None of these failures come from this PR. It changes no C++ files, and the Python tests pass locally with results identical to dev.

I'll rebase #685 once those are merged so CI can re-run.

@pradeeban

Copy link
Copy Markdown
Member

@yadavchiragg but there are some merge conflicts now. Pls check.

@pradeeban
pradeeban marked this pull request as draft November 27, 2026 02:58
@yadavchiragg

Copy link
Copy Markdown
Author

@pradeeban I merged the latest dev and resolved the conflict in validate.py (dev added ".jl" to the same extension list, so I kept both changes). The remaining red checks are not from this PR: test (3.9) and the cancelled 3.10-3.12 jobs are the Ubuntu 26.04 / Python 3.9 problem that #678 fixes, and the cpp-* jobs are the params path in the C++ test that #714 fixes. Once those two are merged I'll re-run CI here.

@pradeeban

Copy link
Copy Markdown
Member

@yadavchiragg looks like some more merge conflicts.

@yadavchiragg
yadavchiragg marked this pull request as ready for review November 27, 2026 14:51
@yadavchiragg

Copy link
Copy Markdown
Author

@pradeeban I merged the latest dev again and resolved the new conflict in validate.py (dev added the --type pulled-container check, so the port-only guard now wraps it). dev also now fails a build when a node's source file is missing, which several bundled workflows hit, so test_port_only_nodes.py now creates an empty file for each node before building. All 16 checks were green on the previous push.

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.

mkconcore.py rejects node labels with no source file ("IN:", "OUT:"), so 22 example workflows no longer build

2 participants