concore validate --format json reports the wrong node_id when a node has no label.
The warning is built as Node {node_id} has no label, but _build_entries() pulls the id back out with message[5:-9]. The suffix has no label is 13 chars, not 9, so part of it stays in the id.
Repro:
- Make a workflow with one node that has no
<y:NodeLabel>, e.g. <node id="n1"></node>
- Run
concore validate test.graphml --format json
Output:
"warnings": [
{
"message": "Node n1 has no label",
"error_type": "missing_node_label",
"node_id": "n1 has"
}
],
...
"nodes_affected": ["n1 has"]
Expected: node_id and nodes_affected should be "n1".
Actual: they are "n1 has", so anything that uses the JSON output to find the node (editor, scripts) gets an id that doesn't exist.
The bad slice is at concore_cli/commands/validate.py line 94. Changing it to message[5:-len(" has no label")] fixes it, and a test for this case would be good too since no existing test checks node_id here.
Tested on dev at 32951ab, Python 3.12.10
concore validate --format jsonreports the wrongnode_idwhen a node has no label.The warning is built as
Node {node_id} has no label, but_build_entries()pulls the id back out withmessage[5:-9]. The suffixhas no labelis 13 chars, not 9, so part of it stays in the id.Repro:
<y:NodeLabel>, e.g.<node id="n1"></node>concore validate test.graphml --format jsonOutput:
Expected:
node_idandnodes_affectedshould be"n1".Actual: they are
"n1 has", so anything that uses the JSON output to find the node (editor, scripts) gets an id that doesn't exist.The bad slice is at
concore_cli/commands/validate.pyline 94. Changing it tomessage[5:-len(" has no label")]fixes it, and a test for this case would be good too since no existing test checksnode_idhere.Tested on dev at 32951ab, Python 3.12.10