Panels dialog saves a ready I/O port draft on close and keeps an unfinished one; one qualified message-name rule on both sides

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 16:49:26 +02:00
co-authored by Claude Opus 5.5
parent 749393034d
commit 2bea71db7f
6 changed files with 150 additions and 34 deletions
+18 -1
View File
@@ -2,7 +2,13 @@ import json
import pytest
from fluksio.flow.messages import DType, MessageSpec, flow_of, qualify
from fluksio.flow.messages import (
DType,
MessageSpec,
flow_of,
qualify,
validate_qualified,
)
def test_port_defaults_to_last_name_segment():
@@ -201,3 +207,14 @@ def test_a_value_that_refers_to_itself_does_not_hang_the_check():
loop: dict = {}
loop["self"] = loop
spec.check(loop)
@pytest.mark.parametrize("name", ["home.doorbell", "house.kitchen.temperature"])
def test_a_qualified_name_names_its_flow(name):
assert validate_qualified(name) == name
@pytest.mark.parametrize("name", ["doorbell", "Home.x", "home.", "home.a-b", "home..x"])
def test_anything_else_is_refused_with_the_rule(name):
with pytest.raises(ValueError, match="flow.name"):
validate_qualified(name)