Skip to content

Comments

Fix ZMQ specialization collision for shared node source scripts in mkconcore#419

Merged
pradeeban merged 1 commit intoControlCore-Project:devfrom
Titas-Ghosh:fix-zmq-specialization-shared-sources
Feb 19, 2026
Merged

Fix ZMQ specialization collision for shared node source scripts in mkconcore#419
pradeeban merged 1 commit intoControlCore-Project:devfrom
Titas-Ghosh:fix-zmq-specialization-shared-sources

Conversation

@Titas-Ghosh
Copy link

Hi @pradeeban , Fixes #418

This PR fixes a functional bug where mkconcore could generate incomplete ZMQ specialization constants when multiple nodes reference the same source file (for example: A:common.py, B:common.py, C:common.py).

Root Cause

  • Specialization was executed per node.
  • Output specialization file was keyed by basename (common.py) and reused if it already existed.
  • Later node-specific edge params were not merged into the existing specialized file.

What Changed

mkconcore.py

  • Build specialization plans per source script instead of per node.
  • Merge/deduplicate ZMQ edge parameters for all nodes sharing that script.
  • Specialize once per source script, then update all related nodes to that result.

copy_with_port_portname.py

  • Added optional output_relpath support so caller can control specialization output path safely.
  • Updated CLI usage to accept optional output relative path.

test_cli.py

  • Added regression test: test_run_command_shared_source_specialization_merges_edge_params
  • Verifies shared common.py includes both PORT_* / PORT_NAME_* definitions from multiple ZMQ edges.

Notes

  • No CLI breaking changes.
  • No behavior changes for workflows that do not use shared source scripts.
  • PR contains only functional code changes related to this fix.

@pradeeban pradeeban merged commit 8582910 into ControlCore-Project:dev Feb 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.

2 participants