fix(pid): signal lines carry no fabricated number; a bubble exits towards the first waypoint

An ISA-5.1 signal line has no pipe line number, yet every pneumatic /
electric line got the bare sequence as its number and a label, and ate a
process sequence number. Signal classes now leave line_number None (a
verbatim one is still honoured), seq None, no label. A radial port aimed
at the far end even with waypoints, so the first segment cut through the
bubble; aim_points (lines.py) aims at the first/last waypoint for both
draw_line and the dry run.

Merge note: benchmarks/adapters/autocad_mcp_pro.py (final group's file)
had its two _task_pid_roundtrip assertion lines moved to the new truth —
the signal row is unnumbered, the connector row is 3.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
Umut CAN
2026-09-21 22:24:03 +03:00
co-authored by Claude Opus 5
parent 2e101b95e2
commit 3c0babfef1
8 changed files with 216 additions and 41 deletions
+15 -7
View File
@@ -381,19 +381,27 @@ class AutoCADMCPProAdapter(BenchmarkAdapter):
graph = result["graph"]
index = instrument_index(graph)
lines = line_list(graph)
# The spec numbers its two process lines; the signal line and the
# connector line are left to the default ``number_format``, which with
# no size/service/spec/insulation collapses to the bare sequence
# number. Both must come back through XDATA, not a label search.
# The spec numbers its two process lines; the connector line is left
# to the default ``number_format``, which with no size/service/spec/
# insulation collapses to the bare sequence number, and it must come
# back through XDATA, not a label search. The electric signal line is
# unnumbered by rule (ISA-5.1 signal lines carry no pipe line number)
# and must not have consumed a sequence number: the connector is "3".
authored = "100-P-1001-CS1"
numbers = {(r["from_tag"], r["to_tag"]): r["line_number"] for r in lines}
authored_ok = (
numbers.get(("P-101", "FCV-101")) == authored
and numbers.get(("FCV-101", "V-201")) == authored
)
sequenced = [r for r in lines if r["line_number"] != authored]
sequenced_ok = len(sequenced) == 2 and all(
r["line_number"].isdigit() and r["number_source"] == "xdata" for r in sequenced
others = [r for r in lines if r["line_number"] != authored]
signal = [r for r in others if r["line_class"] == "electric"]
sequenced = [r for r in others if r["line_class"] != "electric"]
sequenced_ok = (
len(signal) == 1
and signal[0]["line_number"] is None
and len(sequenced) == 1
and sequenced[0]["line_number"] == "3"
and sequenced[0]["number_source"] == "xdata"
)
passed = (
len(graph["nodes"]) == 5