From d5f2b100b0666250c7913914aee77c99d1b01a18 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 23 Oct 2026 23:40:52 -0400 Subject: [PATCH] Declare the stored-format fixture's second spelling as an Id128 kind The fixture record subclassed Id128Text directly. Since 56cfe9f12 Id128Text is NominalSpelling[Id128], whose __init_subclass__ finds the value type in a NominalSpelling[...] base, so the bare subclass raised StopIteration when the stored_formats probe imported it and all six cases failed before measuring. The same-spelling case is now a kind (an Id128 subclass inheriting Id128Text), which is how the codec declares one. Co-Authored-By: Claude Opus 5.5 --- tests/test_carry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_carry.py b/tests/test_carry.py index 8293765e58..abdf979569 100644 --- a/tests/test_carry.py +++ b/tests/test_carry.py @@ -75,8 +75,8 @@ def commit(self, steps: dict[str, str | None]) -> str: def record_source(version: int, fields: str) -> str: return ("from dataclasses import dataclass\nfrom typing import Annotated, ClassVar\n" - "from agent_comms.field_codec import Id128Text\n\n" - "class RootId(Id128Text):\n \"\"\"Another representation of the same spelling.\"\"\"\n\n" + "from agent_comms.field_codec import Id128, Id128Text\n\n" + "class RootKind(Id128):\n \"\"\"Another kind written in the same spelling.\"\"\"\n\n" f"@dataclass(frozen=True)\nclass Record:\n version: ClassVar[int] = {version}\n{fields}") @@ -90,7 +90,7 @@ def record_source(version: int, fields: str) -> str: (PLAIN, 2, PLAIN + " label: str\n", {}, 1), (PLAIN, 2, PLAIN + " label: str\n", {"carry_record": step_source()}, 0), (PLAIN, 1, PLAIN + " kind: ClassVar[str] = 'x'\n", {}, 0), - (SPELLED, 1, " root: Annotated[str, RootId]\n", {}, 0), + (SPELLED, 1, " root: RootKind\n", {}, 0), (PLAIN, 1, SPELLED, {}, 1), ]) def test_a_stored_record_format_change_bumps_its_version_and_ships_a_carry(