Skip to content

docs: editions name serialized formats, not in-memory encodings - #9275

Open
joseph-isaacs wants to merge 2 commits into
developfrom
claude/editions-serialization-plugin-uhm1sw
Open

docs: editions name serialized formats, not in-memory encodings#9275
joseph-isaacs wants to merge 2 commits into
developfrom
claude/editions-serialization-plugin-uhm1sw

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

The editions spec never says what an edition member actually is, and the distinction starts to matter the moment an in-memory encoding outgrows the bytes it froze. The concrete forcing case is DecimalByteParts gaining multi-part (wide decimal) support (#9119): the shipped serialized format promises lower_part_count == 0 to every reader since core2025.05.0, so writing lower parts under the same ID would violate the edition guarantee even though the in-memory encoding is the same one.

This PR pins the model down in the spec:

  • An edition member is a serialized format — the ID written into the file plus its metadata schema and buffer/child semantics. The read-forever guarantee attaches to those bytes.
  • In-memory encodings are unversioned implementation details; the serialization plugin registry maps between the two in both directions (reads may deserialize a frozen ID into a newer in-memory encoding — the ALP-with-patches precedent; writes choose which of an encoding's serialized formats to emit).
  • Freezing an edition freezes the meaning of each member ID. An incompatible extension is a new serialized format with a new ID staged in a draft edition — never a mutation of the frozen one, and reserved-but-constrained metadata fields cannot carry it after the fact.

The editions spec never said what an edition member actually is, and the
distinction matters as soon as an in-memory encoding outgrows the bytes it
froze: the read-forever guarantee attaches to the serialized format — the
ID in the file plus its metadata schema and child semantics — while the
in-memory encoding is an unversioned implementation detail free to evolve
underneath it.

Spell out the model and the evolution rule it implies: freezing an edition
freezes the meaning of each member ID, so an incompatible extension is a
new serialized format with a new ID staged in a draft edition, never a
mutation of the frozen one. The serialization plugin registry maps between
the two worlds in both directions — reads may deserialize an old ID into a
newer in-memory encoding (the ALP-with-patches precedent), and writes
choose which of an encoding's serialized formats to emit.

Worked example: growing decimal byte parts from one signed part to a
signed MSP plus unsigned 64-bit lower parts. The reserved-but-zero
lower_part_count field cannot carry the extension because frozen readers
require it to be zero; instead single-part arrays keep the frozen ID
byte-for-byte and multi-part arrays serialize under a new ID that old
readers reject with the unknown-encoding error editions promise.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5gep1Ah7rjHkDuyfrgKCD
Successive incompatible revisions of a serialized format take sequential
version suffixes on the same base name — vortex.foo, vortex.foo_v2 — so
each format has at most one successor and an encoding's serialized history
is a list, never a tree of forked variants. Rename the example's wide id
to vortex.decimal_byte_parts_v2 accordingly.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5gep1Ah7rjHkDuyfrgKCD
@codspeed-hq

codspeed-hq Bot commented Aug 7, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 12.86%

❌ 1 regressed benchmark
✅ 1933 untouched benchmarks
⏩ 51 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation decompress[u64, (10000, 4)] 317.4 µs 364.2 µs -12.86%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/editions-serialization-plugin-uhm1sw (0723848) with develop (d443eab)

Open in CodSpeed

Footnotes

  1. 51 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant