diff --git a/cmux-tui/bindings/ERGONOMICS.md b/cmux-tui/bindings/ERGONOMICS.md index 3ad8b6d326f5..1c5bd09e7fed 100644 --- a/cmux-tui/bindings/ERGONOMICS.md +++ b/cmux-tui/bindings/ERGONOMICS.md @@ -2,7 +2,7 @@ The seven public SDKs expose handwritten resource handles over the reviewed 125-operation `cmux.protocol/2` catalog. The raw protocol inventory is a -separate compatibility surface with 101 commands and 46 events. Deterministic +separate compatibility surface with 104 commands and 47 events. Deterministic generation is limited to those private protocol-12 models under each package's explicit `raw` namespace. Consumers do not run a generator or install a generator runtime. @@ -74,7 +74,9 @@ and secret redaction. The exact-binary live matrix adds one isolated create, run, exit, restart, and cleanup flow per language. TypeScript repeats it over authenticated WebSocket, for eight live transport runs. The separate raw protocol-12 suite runs 266 -compatibility checks over its 101 commands and 46 events. +compatibility checks across seven language adapters: 34 fake cases, one metadata +audit, and three live cases per language. Those checks cover the 104 generated +commands and 47 event shapes. Each package suite also opens a stream with a short request deadline, leaves it idle past that deadline, then delivers and cancels normally. This separates diff --git a/cmux-tui/bindings/conformance/raw/test_runner.py b/cmux-tui/bindings/conformance/raw/test_runner.py index a0c2552ecf91..758da13d1aa5 100644 --- a/cmux-tui/bindings/conformance/raw/test_runner.py +++ b/cmux-tui/bindings/conformance/raw/test_runner.py @@ -1,10 +1,12 @@ from __future__ import annotations import json +import re import socket import unittest from runner import ( + BINDINGS, FIXTURES, LANGUAGES, RAW_CATALOGS, @@ -97,6 +99,50 @@ def test_live_lifecycle_covers_every_required_transition(self) -> None: ) self.assertTrue(all(expected.values())) + def test_ergonomics_documents_current_inventory_and_matrix_count(self) -> None: + docs = (BINDINGS / "ERGONOMICS.md").read_text() + schema = json.loads((BINDINGS.parent / "spec" / "sdk-schema.json").read_text()) + command_count = len(schema["commands"]) + event_count = len(schema["events"]) + fake_count = len(self.fixtures["fake_cases"]) + real_count = len(self.fixtures["real_cases"]) + check_count = len(LANGUAGES) * (fake_count + 1 + real_count) + + inventory = re.search( + r"raw protocol inventory is a\s+separate compatibility surface with " + r"(?P\d+) commands and (?P\d+) events\.", + docs, + ) + self.assertIsNotNone(inventory) + assert inventory is not None + self.assertEqual(int(inventory.group("commands")), command_count) + self.assertEqual(int(inventory.group("events")), event_count) + + go_readme = (BINDINGS / "go" / "raw" / "README.md").read_text() + go_inventory = re.search( + r"The Go SDK covers all (?P\d+) protocol-12 commands and " + r"(?P\d+) event shapes", + go_readme, + ) + self.assertIsNotNone(go_inventory) + assert go_inventory is not None + self.assertEqual(int(go_inventory.group("commands")), command_count) + self.assertEqual(int(go_inventory.group("events")), event_count) + + matrix = re.search( + r"The separate raw protocol-12 suite runs\s+(?P\d+)\s+" + r"compatibility checks across seven language adapters:\s+" + r"(?P\d+) fake cases, one metadata\s+audit, and\s+" + r"(?Pthree) live cases per language\.", + docs, + ) + self.assertIsNotNone(matrix) + assert matrix is not None + self.assertEqual(int(matrix.group("checks")), check_count) + self.assertEqual(int(matrix.group("fake")), fake_count) + self.assertEqual(matrix.group("real"), "three") + self.assertEqual(real_count, 3) + class MatchingTests(unittest.TestCase): def test_partial_match_allows_extra_fields_but_not_missing_fields(self) -> None: diff --git a/cmux-tui/bindings/go/raw/README.md b/cmux-tui/bindings/go/raw/README.md index f186691f84e9..bc18a4df7882 100644 --- a/cmux-tui/bindings/go/raw/README.md +++ b/cmux-tui/bindings/go/raw/README.md @@ -1,6 +1,6 @@ # cmux Go SDK -The Go SDK covers all 101 protocol-12 commands and 46 event shapes using only +The Go SDK covers all 104 protocol-12 commands and 47 event shapes using only the Go standard library. ```go