diff --git a/server.py b/server.py index e98d8aa..fdab249 100644 --- a/server.py +++ b/server.py @@ -932,6 +932,12 @@ LEAN_TOOL_NAMES = frozenset( "pid_symbol_insert", "pid_line_draw", "pid_graph", + # Styles (track E) — a lean client *uses* a style far more often than + # it authors one; drawing_apply_standard authors the whole set in one + # call when it must. + "dimstyle_set_current", + "textstyle_set_current", + "drawing_apply_standard", } ) diff --git a/tests/data/discovery_golden.py b/tests/data/discovery_golden.py index 3ed8b4c..fb20aaa 100644 --- a/tests/data/discovery_golden.py +++ b/tests/data/discovery_golden.py @@ -1,6 +1,6 @@ """Golden query set for tool discovery: English in, one right tool out. -Sixty-six cases (51 tuning + 15 holdout) split into a **tuning** set and a +Seventy-one cases (56 tuning + 15 holdout) split into a **tuning** set and a **holdout** set. The split is the point of the file. Ranking work is measured against :data:`TUNING_CASES` only; :data:`HOLDOUT_CASES` were written at the same time, @@ -143,6 +143,18 @@ TUNING_CASES: tuple[GoldenCase, ...] = ( "counting", risk="read", ), + # Styles (track E). DIMSTYLE / STYLE / MLEADERSTYLE are umbrella commands + # shared by their list/create/modify/set-current tools, so the one command + # case uses the command unique to a single tool and the rest are phrased. + GoldenCase("DDIM", "dimstyle_create", "command"), + GoldenCase("make ISO-25 the current dimension style", "dimstyle_set_current", "paraphrase"), + GoldenCase( + "set the drawing up to the ISO drafting standard in one go", + "drawing_apply_standard", + "paraphrase", + ), + GoldenCase("create a text style that uses the isocp font", "textstyle_create", "paraphrase"), + GoldenCase("which dimension styles are defined", "dimstyle_list", "counting", risk="read"), ) diff --git a/tests/test_styles.py b/tests/test_styles.py index c4995cc..1c91e5b 100644 --- a/tests/test_styles.py +++ b/tests/test_styles.py @@ -1716,3 +1716,20 @@ async def test_com_apply_standard_creates_both_styles_and_sets_units(com_backend assert ("ActiveTextStyle", "ISOCP") in document.calls assert document.ActiveDimStyle.Name == "ISO-25" assert document.variables["DIMDSEP"] == "," and document.variables["INSUNITS"] == 4 + + +# ── profile decision ──────────────────────────────────────────────────────── + + +async def test_lean_carries_the_two_set_current_tools_and_apply_standard_only(): + import server + + lean = server.LEAN_TOOL_NAMES + assert {"dimstyle_set_current", "textstyle_set_current", "drawing_apply_standard"} <= lean + assert not (STYLE_TOOLS - {"dimstyle_set_current", "textstyle_set_current"}) & lean, ( + "authoring and listing styles is full-profile work" + ) + claimed = set().union(*server.PACK_TOOL_NAMES.values()) + assert not claimed & (STYLE_TOOLS | {"drawing_apply_standard"}), ( + "styles are core: no pack may claim them" + )