Skip to content

Commit fe68760

Browse files
committed
no-mistakes(document): Document Python 1.0.x float-to-string change in wire-format skill
1 parent e94eb18 commit fe68760

6 files changed

Lines changed: 36 additions & 30 deletions

File tree

  • agent-context/skills/metaobjects-codegen/references
  • fixtures/agent-context-conformance
    • java-kotlin-react-tanstack/expected/.claude/skills/metaobjects-codegen/references
    • java-react/expected/.claude/skills/metaobjects-codegen/references
    • python/expected/.claude/skills/metaobjects-codegen/references
    • ts-react-tanstack/expected/.claude/skills/metaobjects-codegen/references
    • ts-requirements/expected/.claude/skills/metaobjects-codegen/references

‎agent-context/skills/metaobjects-codegen/references/wire-format.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ The generated input converters stay in every mode.
7777
## Upgrading, and drift
7878

7979
- From 1.0.x, upgrade to 1.1.2 or later. With no setting, C#, Java and Kotlin keep their 1.0.x
80-
output. In Python and TypeScript, a decimal keeps its scale (`"12.50"`).
81-
- In Python this is a change: a 1.0.x router wrote a decimal as a JSON number, a float that can
82-
lose digits (`12.5`). It now writes a string, Pydantic's `str(Decimal)`, which is the
83-
Python-normal form. There is no float option, by decision. Update a client that read the
84-
number to read the string (`"decimals": "string"` gives the canonical `"12.5"`).
80+
output. In TypeScript, a decimal keeps its scale (`"12.50"`). Python changed; see the next bullet.
81+
- In Python this is a change, not a no-op. A 1.0.x router wrote a decimal as a JSON number, a float
82+
that can lose digits (`12.5`). The 1.1.2 default writes a string, Pydantic's `str(Decimal)`, which
83+
is the Python-normal form (`"12.50"` for a decimal stored at scale 2). There is no float option, by
84+
decision. Update a Python client that read the number to read the string. `"decimals": "string"`
85+
gives the canonical `"12.5"` form that 1.1.0 and 1.1.1 wrote.
8586
- A project already on 1.1.0 or 1.1.1 whose clients now expect strings and omitted members
8687
declares `"wire": { "decimals": "string", "nullMembers": "omit" }` before it moves to 1.1.2.
8788
- Every port's codegen drift gate (`meta verify --codegen`, `dotnet meta verify --codegen`,

‎fixtures/agent-context-conformance/java-kotlin-react-tanstack/expected/.claude/skills/metaobjects-codegen/references/wire-format.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ The generated input converters stay in every mode.
7777
## Upgrading, and drift
7878

7979
- From 1.0.x, upgrade to 1.1.2 or later. With no setting, C#, Java and Kotlin keep their 1.0.x
80-
output. In Python and TypeScript, a decimal keeps its scale (`"12.50"`).
81-
- In Python this is a change: a 1.0.x router wrote a decimal as a JSON number, a float that can
82-
lose digits (`12.5`). It now writes a string, Pydantic's `str(Decimal)`, which is the
83-
Python-normal form. There is no float option, by decision. Update a client that read the
84-
number to read the string (`"decimals": "string"` gives the canonical `"12.5"`).
80+
output. In TypeScript, a decimal keeps its scale (`"12.50"`). Python changed; see the next bullet.
81+
- In Python this is a change, not a no-op. A 1.0.x router wrote a decimal as a JSON number, a float
82+
that can lose digits (`12.5`). The 1.1.2 default writes a string, Pydantic's `str(Decimal)`, which
83+
is the Python-normal form (`"12.50"` for a decimal stored at scale 2). There is no float option, by
84+
decision. Update a Python client that read the number to read the string. `"decimals": "string"`
85+
gives the canonical `"12.5"` form that 1.1.0 and 1.1.1 wrote.
8586
- A project already on 1.1.0 or 1.1.1 whose clients now expect strings and omitted members
8687
declares `"wire": { "decimals": "string", "nullMembers": "omit" }` before it moves to 1.1.2.
8788
- Every port's codegen drift gate (`meta verify --codegen`, `dotnet meta verify --codegen`,

‎fixtures/agent-context-conformance/java-react/expected/.claude/skills/metaobjects-codegen/references/wire-format.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ The generated input converters stay in every mode.
7777
## Upgrading, and drift
7878

7979
- From 1.0.x, upgrade to 1.1.2 or later. With no setting, C#, Java and Kotlin keep their 1.0.x
80-
output. In Python and TypeScript, a decimal keeps its scale (`"12.50"`).
81-
- In Python this is a change: a 1.0.x router wrote a decimal as a JSON number, a float that can
82-
lose digits (`12.5`). It now writes a string, Pydantic's `str(Decimal)`, which is the
83-
Python-normal form. There is no float option, by decision. Update a client that read the
84-
number to read the string (`"decimals": "string"` gives the canonical `"12.5"`).
80+
output. In TypeScript, a decimal keeps its scale (`"12.50"`). Python changed; see the next bullet.
81+
- In Python this is a change, not a no-op. A 1.0.x router wrote a decimal as a JSON number, a float
82+
that can lose digits (`12.5`). The 1.1.2 default writes a string, Pydantic's `str(Decimal)`, which
83+
is the Python-normal form (`"12.50"` for a decimal stored at scale 2). There is no float option, by
84+
decision. Update a Python client that read the number to read the string. `"decimals": "string"`
85+
gives the canonical `"12.5"` form that 1.1.0 and 1.1.1 wrote.
8586
- A project already on 1.1.0 or 1.1.1 whose clients now expect strings and omitted members
8687
declares `"wire": { "decimals": "string", "nullMembers": "omit" }` before it moves to 1.1.2.
8788
- Every port's codegen drift gate (`meta verify --codegen`, `dotnet meta verify --codegen`,

‎fixtures/agent-context-conformance/python/expected/.claude/skills/metaobjects-codegen/references/wire-format.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ The generated input converters stay in every mode.
7777
## Upgrading, and drift
7878

7979
- From 1.0.x, upgrade to 1.1.2 or later. With no setting, C#, Java and Kotlin keep their 1.0.x
80-
output. In Python and TypeScript, a decimal keeps its scale (`"12.50"`).
81-
- In Python this is a change: a 1.0.x router wrote a decimal as a JSON number, a float that can
82-
lose digits (`12.5`). It now writes a string, Pydantic's `str(Decimal)`, which is the
83-
Python-normal form. There is no float option, by decision. Update a client that read the
84-
number to read the string (`"decimals": "string"` gives the canonical `"12.5"`).
80+
output. In TypeScript, a decimal keeps its scale (`"12.50"`). Python changed; see the next bullet.
81+
- In Python this is a change, not a no-op. A 1.0.x router wrote a decimal as a JSON number, a float
82+
that can lose digits (`12.5`). The 1.1.2 default writes a string, Pydantic's `str(Decimal)`, which
83+
is the Python-normal form (`"12.50"` for a decimal stored at scale 2). There is no float option, by
84+
decision. Update a Python client that read the number to read the string. `"decimals": "string"`
85+
gives the canonical `"12.5"` form that 1.1.0 and 1.1.1 wrote.
8586
- A project already on 1.1.0 or 1.1.1 whose clients now expect strings and omitted members
8687
declares `"wire": { "decimals": "string", "nullMembers": "omit" }` before it moves to 1.1.2.
8788
- Every port's codegen drift gate (`meta verify --codegen`, `dotnet meta verify --codegen`,

‎fixtures/agent-context-conformance/ts-react-tanstack/expected/.claude/skills/metaobjects-codegen/references/wire-format.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ The generated input converters stay in every mode.
7777
## Upgrading, and drift
7878

7979
- From 1.0.x, upgrade to 1.1.2 or later. With no setting, C#, Java and Kotlin keep their 1.0.x
80-
output. In Python and TypeScript, a decimal keeps its scale (`"12.50"`).
81-
- In Python this is a change: a 1.0.x router wrote a decimal as a JSON number, a float that can
82-
lose digits (`12.5`). It now writes a string, Pydantic's `str(Decimal)`, which is the
83-
Python-normal form. There is no float option, by decision. Update a client that read the
84-
number to read the string (`"decimals": "string"` gives the canonical `"12.5"`).
80+
output. In TypeScript, a decimal keeps its scale (`"12.50"`). Python changed; see the next bullet.
81+
- In Python this is a change, not a no-op. A 1.0.x router wrote a decimal as a JSON number, a float
82+
that can lose digits (`12.5`). The 1.1.2 default writes a string, Pydantic's `str(Decimal)`, which
83+
is the Python-normal form (`"12.50"` for a decimal stored at scale 2). There is no float option, by
84+
decision. Update a Python client that read the number to read the string. `"decimals": "string"`
85+
gives the canonical `"12.5"` form that 1.1.0 and 1.1.1 wrote.
8586
- A project already on 1.1.0 or 1.1.1 whose clients now expect strings and omitted members
8687
declares `"wire": { "decimals": "string", "nullMembers": "omit" }` before it moves to 1.1.2.
8788
- Every port's codegen drift gate (`meta verify --codegen`, `dotnet meta verify --codegen`,

‎fixtures/agent-context-conformance/ts-requirements/expected/.claude/skills/metaobjects-codegen/references/wire-format.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ The generated input converters stay in every mode.
7777
## Upgrading, and drift
7878

7979
- From 1.0.x, upgrade to 1.1.2 or later. With no setting, C#, Java and Kotlin keep their 1.0.x
80-
output. In Python and TypeScript, a decimal keeps its scale (`"12.50"`).
81-
- In Python this is a change: a 1.0.x router wrote a decimal as a JSON number, a float that can
82-
lose digits (`12.5`). It now writes a string, Pydantic's `str(Decimal)`, which is the
83-
Python-normal form. There is no float option, by decision. Update a client that read the
84-
number to read the string (`"decimals": "string"` gives the canonical `"12.5"`).
80+
output. In TypeScript, a decimal keeps its scale (`"12.50"`). Python changed; see the next bullet.
81+
- In Python this is a change, not a no-op. A 1.0.x router wrote a decimal as a JSON number, a float
82+
that can lose digits (`12.5`). The 1.1.2 default writes a string, Pydantic's `str(Decimal)`, which
83+
is the Python-normal form (`"12.50"` for a decimal stored at scale 2). There is no float option, by
84+
decision. Update a Python client that read the number to read the string. `"decimals": "string"`
85+
gives the canonical `"12.5"` form that 1.1.0 and 1.1.1 wrote.
8586
- A project already on 1.1.0 or 1.1.1 whose clients now expect strings and omitted members
8687
declares `"wire": { "decimals": "string", "nullMembers": "omit" }` before it moves to 1.1.2.
8788
- Every port's codegen drift gate (`meta verify --codegen`, `dotnet meta verify --codegen`,

0 commit comments

Comments
 (0)