docs(plan,spec): track H examples carry invented values only

A second pass compared every tag, number and literal in the plan with the
field files, locally. Two borrowed values remained: a motor rating and one
motor tag. Both are now invented (18,5 kW, M82), and the dependent sums and
section rules were checked against them. The rest of the tank series was
renumbered to keep its old sort order, since several assertions compare
sorted tags: T4101-T4103, T4500 and T4600.

Docstrings no longer tie example layer names to a particular drawing. The
fixture's claim now says exactly what is invented (every tag and number) and
what is ordinary drafting vocabulary (layer and block names). The spec's
grounding paragraph now says "process plant" and no longer names the sector.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
Umut CAN
2026-09-24 11:17:53 +03:00
co-authored by Claude Opus 5.5
parent 77db39804a
commit 7f82766d38
@@ -526,7 +526,7 @@ results out, the drawing never modified.
"""Label parsers for foreign drawings: diameters, equipment tags, panels, electrical data.
Pure functions over one string each - no ezdxf, no I/O - so every rule here is
tested on the exact spellings the field drawings of 2026-09-24 used, and the
tested on the spellings real drawings use, and the
readers above it (the network, the takeoffs, the scale check) share one
reading of a label instead of three.
@@ -830,7 +830,7 @@ def wiring_target(text: str | None) -> str | None:
- [ ] **Step 4: Run it to verify it passes**
Run: `uv run --frozen pytest tests/test_understand_labels.py -q`
Expected: `41 passed` (the look-alike test is parametrized over the eleven letters). A failing spelling is fixed in `labels.py`, never by deleting its test: each one is a spelling a field drawing used.
Expected: `41 passed` (the look-alike test is parametrized over the eleven letters). A failing spelling is fixed in `labels.py`, never by deleting its test: each one is a spelling real drawings use.
- [ ] **Step 5: Write the failing test for the vocabulary**
@@ -1086,9 +1086,9 @@ The tables are vocabulary a drafter writes, each row with its language — not a
"""Multilingual keyword tables for reading foreign drawings: EN / TR / RU / NL / DE.
A foreign drawing says what a layer carries in its name and in the texts on it,
in whatever language the office that drew it speaks: the field P&ID of
2026-09-24 named its piping layers in English and Dutch (``P_cipsupplyline``,
``KLEPPEN``) and labelled its lines in Russian. These tables are what lets the
in whatever language the office that drew it speaks: a P&ID may name
its piping layers in English and Dutch (``P_cipsupplyline``,
``KLEPPEN``) and label its lines in Russian. These tables are what lets the
reader tell a CIP supply line from a product line without a human.
They are **vocabulary, not a standard**: words a drafter writes, each with the
@@ -2665,7 +2665,7 @@ MSG
plus additive keys that no pinned key changes: per run `"id"`, `"layer"`, `"diameters": {size: schematic length on the P&ID}`, `"pid_length_mm"`; per cable row `"phases"`, `"voltage"`, `"vfd"`; top level `"pid_insunits": 4`, `"copy_offset": [100000.0, 0.0]`, `"allowance": 0.20`, `"label_offset_mm": 300.0`, `"tag_positions": {"layout": {tag: (x, y)}, "pid": {tag: (x, y)}}`, `"scale": {"overall", "room_1", "room_2": {"pairs", "median", "within_10pct"}, "room_1_factor": 1.3}`. Also module constants `RUNS`, `LAYOUT_TAGS`, `ROOM1_TAGS`, `PID_ROOM2`, `LAYER_SERVICES`, `ALLOWANCE`, `LABEL_OFFSET`, and the helpers `manhattan(a, b)`, `rmst_length(points)`, `scale_statistics(pid, layout, tags)`, `pid_tags()`.
Conventions later tasks rely on: `tags` is **sorted**; a layout tag's position is its TEXT insertion, which is also the centre of the equipment circle it labels (so "tag position" and "equipment position" are one point by construction); `layout_length_mm` is `None` for the status-C run (`PR4`, ending on `T105`, which only the P&ID has); `PR3` crosses a reducer, so it has two sizes — `"diameter"` is the one at its first tag (`Ø51`) and `"diameters"` gives both; the layout draws the plan twice, so each shared tag appears twice on it and is unique only within a copy (Review Focus 3).
The truth, computed by the generator and worked by hand in the test comments: nine runs — `PR1` product Ø51 A 5500 mm; `PR2` product SMS51 B (a T-junction, an inline valve, an arc bend, one segment drawn twice) 13200; `PR3` product Ø51→Ø38 A (a reducer) 9000; `PR4` product DN20 C (to T105) —; `CS1` CIP supply Ø38 A 20700; `CS2` CIP supply 20x27 B (an inline valve) 8000; `CR1` CIP return Ø38 A 25700; `CR2` CIP return Ø38 A **drawn on the supply layer** 10100; `UT1` ice water DN25 A 7100 (a utility, outside the default takeoff scope). Cables: M11 → CP-1 6900 mm, 9 m; T102 → CP-1 14100, 17; M12 → CP-2 15800, 19; T202 → CP-2 8000, 10 (no power stated). Every name is invented; no value comes from a client drawing.
The truth, computed by the generator and worked by hand in the test comments: nine runs — `PR1` product Ø51 A 5500 mm; `PR2` product SMS51 B (a T-junction, an inline valve, an arc bend, one segment drawn twice) 13200; `PR3` product Ø51→Ø38 A (a reducer) 9000; `PR4` product DN20 C (to T105) —; `CS1` CIP supply Ø38 A 20700; `CS2` CIP supply 20x27 B (an inline valve) 8000; `CR1` CIP return Ø38 A 25700; `CR2` CIP return Ø38 A **drawn on the supply layer** 10100; `UT1` ice water DN25 A 7100 (a utility, outside the default takeoff scope). Cables: M11 → CP-1 6900 mm, 9 m; T102 → CP-1 14100, 17; M12 → CP-2 15800, 19; T202 → CP-2 8000, 10 (no power stated). Every tag and every number is invented and no value comes from a client drawing; the layer and block names are ordinary drafting words in the languages the readers must handle.
- [ ] **Step 1: Write the failing test**