From ac71b10328860a42de68179877459b54d0b079e9 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Thu, 26 Nov 2026 11:24:11 +0100 Subject: [PATCH 1/2] fix(catalogue): an option's example only beside a default that is a word --- .../catalogue/agents/jiuwenswarm/agent.json | 1 - .../catalogue/benchmarks/osworld1/standard.json | 1 - .../catalogue/benchmarks/tau3-bench/standard.json | 2 -- app/nullius/standard/contract/definitions.py | 5 ++++- app/tests/test_standard_options.py | 14 ++++++++------ app/ui_tests/test_agents.py | 2 +- app/ui_tests/test_catalogue_routes.py | 3 ++- docs/agents/supported/jiuwenswarm.md | 2 +- docs/benchmarks/supported/osworld1.md | 2 +- docs/benchmarks/supported/tau3-bench.md | 4 ++-- docs/standard.md | 2 +- 11 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app/nullius/catalogue/agents/jiuwenswarm/agent.json b/app/nullius/catalogue/agents/jiuwenswarm/agent.json index c9b7e4606..8919d8139 100644 --- a/app/nullius/catalogue/agents/jiuwenswarm/agent.json +++ b/app/nullius/catalogue/agents/jiuwenswarm/agent.json @@ -95,7 +95,6 @@ "label": "Page fetch limit", "summary": "Pages fetched per invocation.", "pattern": "(?:[1-9]|[1-9][0-9]|100)", - "example": "6", "default": "3" } }, diff --git a/app/nullius/catalogue/benchmarks/osworld1/standard.json b/app/nullius/catalogue/benchmarks/osworld1/standard.json index 37b201899..85d611fd0 100644 --- a/app/nullius/catalogue/benchmarks/osworld1/standard.json +++ b/app/nullius/catalogue/benchmarks/osworld1/standard.json @@ -255,7 +255,6 @@ "label": "Pause after each action (seconds)", "summary": "Seconds to wait after each action before taking the next screenshot.", "pattern": "[0-9]{1,2}(\\.[0-9]{1,2})?", - "example": "5.0", "default": "3.0", "setups": [ "agent" diff --git a/app/nullius/catalogue/benchmarks/tau3-bench/standard.json b/app/nullius/catalogue/benchmarks/tau3-bench/standard.json index 191acfdf3..a5def2150 100644 --- a/app/nullius/catalogue/benchmarks/tau3-bench/standard.json +++ b/app/nullius/catalogue/benchmarks/tau3-bench/standard.json @@ -335,7 +335,6 @@ ], "default": "200", "pattern": "[1-9][0-9]?|1[0-9]{2}|200", - "example": "100", "limit": true }, "max_errors": { @@ -347,7 +346,6 @@ ], "default": "10", "pattern": "[1-9][0-9]{0,3}", - "example": "5", "limit": true }, "upstream_agent": { diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index 0b6e846aa..ab4879345 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -128,6 +128,7 @@ _ID = re.compile(r"^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$") _TAG = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._+/-]{0,127}$") _COMMIT = re.compile(r"^[0-9a-f]{40}$") +_NUMBER = re.compile(r"^-?[0-9]+(?:\.[0-9]+)?$") # a default that shows the form of its own input _SHA256 = re.compile(r"^[0-9a-f]{64}$") _HTTPS = re.compile(r"^https://[A-Za-z0-9.-]+(?:/[A-Za-z0-9_.%@+-]+)+$") _RELATIVE = re.compile(r"^[A-Za-z0-9_-][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_-][A-Za-z0-9_.-]*)*$") @@ -540,7 +541,9 @@ def _options(d: dict) -> List[str]: except re.error: bad.append(f"{w}.pattern: a regular expression") continue - if "example" in o and (option_problem(o, o["example"]) or o["example"] == o.get("default")): + if "example" in o and _NUMBER.match(str(o.get("default"))): + bad.append(f"{w}.example: only when its default is a word, not a number") + elif "example" in o and (option_problem(o, o["example"]) or o["example"] == o.get("default")): bad.append(f"{w}.example: a value its pattern allows besides its default, shown in its place") if option_problem(o, o.get("default")): bad.append(f"{w}.default: the vendor's own default, a value it allows") diff --git a/app/tests/test_standard_options.py b/app/tests/test_standard_options.py index 3ad12f39d..b0dab8e15 100644 --- a/app/tests/test_standard_options.py +++ b/app/tests/test_standard_options.py @@ -43,22 +43,24 @@ def test_values_or_a_pattern_and_plain_words_only(self): self.assertIn("options.effort: values or pattern, one of them", both) quote = definitions.problems(agent(options={"effort": dict(EFFORT, values=["low", 'x"; rm', "medium"])}), "agent") self.assertIn("options.effort.values: distinct plain words", quote) - pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40", "example": "16"} + pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40"} self.assertEqual(definitions.problems(agent(options={"effort": pattern}), "agent"), []) self.assertTrue(definitions.problems(agent(options={"effort": dict(pattern, default="x")}), "agent")) - def test_a_pattern_carries_an_example_it_allows(self): - pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40"} + def test_an_example_only_beside_a_default_that_is_a_word(self): + pattern = {"summary": "s", "pattern": "^(default|[0-9]{1,3})$", "default": "default", "example": "16"} self.assertEqual(definitions.problems(agent(options={"effort": pattern}), "agent"), []) - for example in (16, "x", "1234", "40"): + self.assertIn("options.effort.example: only when its default is a word, not a number", + definitions.problems(agent(options={"effort": dict(pattern, default="40")}), "agent")) + for example in (16, "x", "1234", "default"): o = dict(pattern, example=example) self.assertIn("options.effort.example: a value its pattern allows besides its default, shown in its place", definitions.problems(agent(options={"effort": o}), "agent")) - def test_every_bundled_pattern_carries_an_example(self): + def test_every_bundled_pattern_without_a_number_default_carries_an_example(self): for kind in ("benchmark", "agent", "capability"): for d in definitions.load(kind, root=definitions.CATALOGUE, every=True)[0]: for n, o in (d.get("options") or {}).items(): - self.assertTrue("pattern" not in o or "example" in o, f"{d['_ref']} {n}") + self.assertTrue("pattern" not in o or "example" in o or definitions._NUMBER.match(str(o.get("default"))), f"{d['_ref']} {n}") def test_a_name_and_a_summary(self): bad = definitions.problems(agent(options={"Effort": dict(EFFORT), "effort": dict(EFFORT, summary="")}), "agent") diff --git a/app/ui_tests/test_agents.py b/app/ui_tests/test_agents.py index 08b4aff64..3282a86ce 100644 --- a/app/ui_tests/test_agents.py +++ b/app/ui_tests/test_agents.py @@ -316,7 +316,7 @@ def test_an_option_with_a_pattern_shows_its_example_not_the_pattern(self): root = self.tmp / "catalogue" shutil.copytree(ROOT, root) path = root / "agents" / "fake" / "agent.json" - path.write_text(json.dumps(dict(json.loads(path.read_text()), options={"turns": {"summary": "Turns.", "pattern": "[1-9][0-9]{0,2}", "example": "40", "default": "10"}}))) + path.write_text(json.dumps(dict(json.loads(path.read_text()), options={"turns": {"summary": "Turns.", "pattern": "default|[1-9][0-9]{0,2}", "example": "40", "default": "default"}}))) self.stack.enter_context(patch.object(definitions, "load", lambda kind, root_=None, every=False: _LOAD(kind, str(root), every=every))) self.stack.enter_context(patch.object(definitions, "get", lambda kind, key, root_=None: _GET(kind, key, str(root)))) html = self.get("/agents/fake").get_data(as_text=True) diff --git a/app/ui_tests/test_catalogue_routes.py b/app/ui_tests/test_catalogue_routes.py index 4f4a61cb5..eb23ca0be 100644 --- a/app/ui_tests/test_catalogue_routes.py +++ b/app/ui_tests/test_catalogue_routes.py @@ -255,8 +255,9 @@ def test_an_option_with_a_pattern_shows_its_example_not_the_pattern(self): for key in ("osworld2", "gsm8k", "humaneval", "gaia", "osworld1", "tau3-bench"): html, opts = self.page_html(key), json.loads((Path(catalog.__file__).parent / "benchmarks" / key / "standard.json").read_text())["options"] for o in opts.values(): - if "pattern" in o: + if "example" in o: self.assertIn("e.g. %s" % o["example"], html) + if "pattern" in o: self.assertNotIn(o["pattern"], unescape(html)) self.assertNotIn("Provider default", self.page("osworld1")) diff --git a/docs/agents/supported/jiuwenswarm.md b/docs/agents/supported/jiuwenswarm.md index bc0191250..4b155b87f 100644 --- a/docs/agents/supported/jiuwenswarm.md +++ b/docs/agents/supported/jiuwenswarm.md @@ -31,7 +31,7 @@ openJiuwen's WorkSwarm agent. | Option | Values, default in bold | What it sets | Versions | |---|---|---|---| | `reasoning_effort` | **`default`**, `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | How much reasoning the model uses before answering, with `default` leaving the choice to the provider. | every version | -| `web_max_fetches` | e.g. `6`, default `3` | Pages fetched per invocation. | `jiuwenswarm@0.2.9` | +| `web_max_fetches` | default `3` | Pages fetched per invocation. | `jiuwenswarm@0.2.9` | ## Benchmarks it fits diff --git a/docs/benchmarks/supported/osworld1.md b/docs/benchmarks/supported/osworld1.md index 2f522674d..f6bcbbacf 100644 --- a/docs/benchmarks/supported/osworld1.md +++ b/docs/benchmarks/supported/osworld1.md @@ -42,7 +42,7 @@ Open-ended tasks on a real Ubuntu desktop and its applications, each in a VM of |---|---|---|---| | `agent` | **`m3` (M3 Agent)**, `prompt` (PromptAgent), `claude` (Claude computer use), `gpt54` (GPT-5.4), `openai_cua` (OpenAI CUA), `qwen` (Qwen), `os_symphony` (OS-Symphony), `evocua` (EvoCUA), `autoglm` (AutoGLM), `autoglm_v` (AutoGLM-V), `mano` (Mano), `muse_spark` (Muse Spark) | Which of OSWorld's own agents runs: each its script as published, with its own prompts, action format and step limit. | `original`, `model` | | `max_steps` | e.g. `50`, default `default` | The most actions per task. default: each OSWorld agent script's own documented invocation; 100 through the computer port. | `original`, `model`, `yours` | -| `pause` | e.g. `5.0`, default `3.0` | Seconds to wait after each action before taking the next screenshot. | `agent` | +| `pause` | default `3.0` | Seconds to wait after each action before taking the next screenshot. | `agent` | | `thinking` | **`adaptive`**, `off` | M3_THINKING_MODE: adaptive, as run_multienv_m3.py's own documented invocation exports it (the model decides whether to think; temperature 1, no top_p), or off, the agent's code default when the variable is unset. | `original`, `model` | | `vm_provider` | **`docker`** | --provider_name: where the task's VM runs. docker only: the upstream's other providers need cloud accounts or a hypervisor of their own. | `original`, `model`, `yours` | diff --git a/docs/benchmarks/supported/tau3-bench.md b/docs/benchmarks/supported/tau3-bench.md index 2c852e82f..ab0135a16 100644 --- a/docs/benchmarks/supported/tau3-bench.md +++ b/docs/benchmarks/supported/tau3-bench.md @@ -39,8 +39,8 @@ Customer service with domain tools and a simulated user: airline, retail, teleco | Option | Values, default in bold | What it sets | Setups | |---|---|---|---| | `agent_reasoning_effort` | **`default`**, `none`, `minimal`, `low`, `medium`, `high`, `xhigh` | How much reasoning the benchmark's own agent model uses, with `default` keeping the upstream settings. | `original` | -| `max_errors` | e.g. `5`, default `10` | The upstream's --max-errors: the most tool calls that fail before a conversation ends. 10, its default, is the leaderboard's. | `original`, `yours` | -| `max_steps` | e.g. `100`, default `200` | The upstream's --max-steps: the most messages and tool calls of a conversation, the user's and the agent's together, at most 200: its default, the leaderboard's, which limits.turns leaves the one met. | `original`, `yours` | +| `max_errors` | default `10` | The upstream's --max-errors: the most tool calls that fail before a conversation ends. 10, its default, is the leaderboard's. | `original`, `yours` | +| `max_steps` | default `200` | The upstream's --max-steps: the most messages and tool calls of a conversation, the user's and the agent's together, at most 200: its default, the leaderboard's, which limits.turns leaves the one met. | `original`, `yours` | | `retrieval` | **`bm25`**, `bm25_grep`, `grep_only`, `no_knowledge`, `full_kb`, `golden_retrieval`, `openai_embeddings`, `openai_embeddings_grep`, `alltools`, `terminal_use`, `terminal_use_write`, `bm25_reranker`, `bm25_reranker_grep`, `openai_embeddings_reranker`, `openai_embeddings_reranker_grep`, `qwen_embeddings`, `qwen_embeddings_grep`, `qwen_embeddings_reranker`, `qwen_embeddings_reranker_grep`, `alltools-qwen` | How the agent searches the bank's documents in banking_knowledge tasks. | `original`, `yours` | | `task_split` | **`base`**, `train`, `test`, `small`, `full` | Which group of tasks to run within the selected domain. | `original`, `yours` | | `upstream_agent` | **`llm_agent`**, `llm_agent_gt`, `llm_agent_solo` | Whether the benchmark's own agent runs normally, receives the reference actions, or works alone with the user's tools. | `original` | diff --git a/docs/standard.md b/docs/standard.md index a5fb05ea9..4a0610ec6 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -492,7 +492,7 @@ The upstream's dependencies go in `driver.install` (a capability's `install` is | Key of an option | Meaning | | --- | --- | -| `summary`, `values` or `pattern`, `example`, `default` | What it changes, its allowed choices or input pattern, and its value when unset. `example`, optional and checked when given, is a value the pattern allows besides the default | +| `summary`, `values` or `pattern`, `example`, `default` | What it changes, its allowed choices or input pattern, and its value when unset. `example`, only beside a default that is a word, is a value the pattern allows besides it | | `datasets` | The datasets it applies to | | `about` | A line about each value | | `names` | A name for some values, shown in their place; a recipe and the CLI keep the value | From 4c3306d5c4d09f7e23ea934ce5b2710e5ae6b1a7 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Mon, 30 Nov 2026 10:20:11 +0100 Subject: [PATCH 2/2] fix(catalogue): an example beside a number default fails a test of the bundled entries, not the check: a profile's own copy of an entry keeps loading --- app/nullius/standard/contract/definitions.py | 5 +---- app/tests/test_standard_options.py | 18 ++++++++++-------- app/ui_tests/test_agents.py | 2 +- docs/standard.md | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index ab4879345..0b6e846aa 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -128,7 +128,6 @@ _ID = re.compile(r"^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$") _TAG = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._+/-]{0,127}$") _COMMIT = re.compile(r"^[0-9a-f]{40}$") -_NUMBER = re.compile(r"^-?[0-9]+(?:\.[0-9]+)?$") # a default that shows the form of its own input _SHA256 = re.compile(r"^[0-9a-f]{64}$") _HTTPS = re.compile(r"^https://[A-Za-z0-9.-]+(?:/[A-Za-z0-9_.%@+-]+)+$") _RELATIVE = re.compile(r"^[A-Za-z0-9_-][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_-][A-Za-z0-9_.-]*)*$") @@ -541,9 +540,7 @@ def _options(d: dict) -> List[str]: except re.error: bad.append(f"{w}.pattern: a regular expression") continue - if "example" in o and _NUMBER.match(str(o.get("default"))): - bad.append(f"{w}.example: only when its default is a word, not a number") - elif "example" in o and (option_problem(o, o["example"]) or o["example"] == o.get("default")): + if "example" in o and (option_problem(o, o["example"]) or o["example"] == o.get("default")): bad.append(f"{w}.example: a value its pattern allows besides its default, shown in its place") if option_problem(o, o.get("default")): bad.append(f"{w}.default: the vendor's own default, a value it allows") diff --git a/app/tests/test_standard_options.py b/app/tests/test_standard_options.py index b0dab8e15..18a3b4c1b 100644 --- a/app/tests/test_standard_options.py +++ b/app/tests/test_standard_options.py @@ -6,6 +6,7 @@ import json import os +import re import shutil import tempfile import unittest @@ -43,24 +44,25 @@ def test_values_or_a_pattern_and_plain_words_only(self): self.assertIn("options.effort: values or pattern, one of them", both) quote = definitions.problems(agent(options={"effort": dict(EFFORT, values=["low", 'x"; rm', "medium"])}), "agent") self.assertIn("options.effort.values: distinct plain words", quote) - pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40"} + pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40", "example": "16"} self.assertEqual(definitions.problems(agent(options={"effort": pattern}), "agent"), []) self.assertTrue(definitions.problems(agent(options={"effort": dict(pattern, default="x")}), "agent")) - def test_an_example_only_beside_a_default_that_is_a_word(self): - pattern = {"summary": "s", "pattern": "^(default|[0-9]{1,3})$", "default": "default", "example": "16"} + def test_a_pattern_carries_an_example_it_allows(self): + pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40"} self.assertEqual(definitions.problems(agent(options={"effort": pattern}), "agent"), []) - self.assertIn("options.effort.example: only when its default is a word, not a number", - definitions.problems(agent(options={"effort": dict(pattern, default="40")}), "agent")) - for example in (16, "x", "1234", "default"): + for example in (16, "x", "1234", "40"): o = dict(pattern, example=example) self.assertIn("options.effort.example: a value its pattern allows besides its default, shown in its place", definitions.problems(agent(options={"effort": o}), "agent")) - def test_every_bundled_pattern_without_a_number_default_carries_an_example(self): + def test_a_bundled_pattern_has_an_example_only_beside_a_word_default(self): + """"200 e.g. 100" reads as two defaults: an example only where the default is a word (default, none).""" + number = re.compile(r"^-?[0-9]+(?:\.[0-9]+)?$") for kind in ("benchmark", "agent", "capability"): for d in definitions.load(kind, root=definitions.CATALOGUE, every=True)[0]: for n, o in (d.get("options") or {}).items(): - self.assertTrue("pattern" not in o or "example" in o or definitions._NUMBER.match(str(o.get("default"))), f"{d['_ref']} {n}") + if "pattern" in o: + self.assertEqual("example" in o, not number.match(str(o.get("default"))), f"{d['_ref']} {n}") def test_a_name_and_a_summary(self): bad = definitions.problems(agent(options={"Effort": dict(EFFORT), "effort": dict(EFFORT, summary="")}), "agent") diff --git a/app/ui_tests/test_agents.py b/app/ui_tests/test_agents.py index 3282a86ce..08b4aff64 100644 --- a/app/ui_tests/test_agents.py +++ b/app/ui_tests/test_agents.py @@ -316,7 +316,7 @@ def test_an_option_with_a_pattern_shows_its_example_not_the_pattern(self): root = self.tmp / "catalogue" shutil.copytree(ROOT, root) path = root / "agents" / "fake" / "agent.json" - path.write_text(json.dumps(dict(json.loads(path.read_text()), options={"turns": {"summary": "Turns.", "pattern": "default|[1-9][0-9]{0,2}", "example": "40", "default": "default"}}))) + path.write_text(json.dumps(dict(json.loads(path.read_text()), options={"turns": {"summary": "Turns.", "pattern": "[1-9][0-9]{0,2}", "example": "40", "default": "10"}}))) self.stack.enter_context(patch.object(definitions, "load", lambda kind, root_=None, every=False: _LOAD(kind, str(root), every=every))) self.stack.enter_context(patch.object(definitions, "get", lambda kind, key, root_=None: _GET(kind, key, str(root)))) html = self.get("/agents/fake").get_data(as_text=True) diff --git a/docs/standard.md b/docs/standard.md index 4a0610ec6..00a29451c 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -492,7 +492,7 @@ The upstream's dependencies go in `driver.install` (a capability's `install` is | Key of an option | Meaning | | --- | --- | -| `summary`, `values` or `pattern`, `example`, `default` | What it changes, its allowed choices or input pattern, and its value when unset. `example`, only beside a default that is a word, is a value the pattern allows besides it | +| `summary`, `values` or `pattern`, `example`, `default` | What it changes, its allowed choices or input pattern, and its value when unset. `example`, optional and checked when given, is a value the pattern allows besides the default; give it only beside a default that is a word | | `datasets` | The datasets it applies to | | `about` | A line about each value | | `names` | A name for some values, shown in their place; a recipe and the CLI keep the value |