> ## Content Index
> Fetch the complete content index at: https://datajutsu.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# A Protobuf Feature Default Is the One Line That Changes Your Bytes (and the Tool Never Sees It)
- URL: https://datajutsu.com/protobuf-editions-feature-defaults/
- Published: 2026-10-24T17:38:06.000Z
- Updated: 2026-10-24T17:38:06.000Z
- Author: Data Jutsu

Editions has a block the editions post never got to, and it is the part of the whole feature that actually moves bytes. It is called feature\_defaults, it sits after the edition line, and it is where you override the defaults the edition would have set. The previous post showed the edition line is a number in the descriptor the wire never reads, and this is the other half of the same story, which is that the defaults are not so inert. I fed the same message, a repeated int32 and a string, to the parser that runs every tab of the converter and to the real compiler, and measured where the two disagree, because the disagreement is the one place an editions file can change what your bytes are.

The feature that decides this is repeated\_field\_encoding, which is what the old packed field option was turned into when protobuf moved to editions. PACKED writes a repeated int32 as one length-delimited blob, \[1, 2, 3\] becomes five bytes, a length header plus the three values. EXPANDED writes the field tag in front of every value, the same list becomes six bytes, each number carrying its own tag. I measured both encodings in the tool's own library and against the real compiler and the bytes matched to the last digit in every case, so this is not a theory. The default table in the protobuf source is explicit about which syntax gets which: proto3 gets PACKED, proto2 gets EXPANDED, and every real edition also defaults to PACKED, which is why a plain proto3 file writes the compact form out of the box.

Here is the part that does not make it into the file you ship. The feature that decides packed versus expanded is a behavior, and behaviors do not sit in the descriptor. I pulled the two descriptor sets for the identical message, the proto3 one and the editions one, and read them back by hand. The field is stored the same way in both, a repeated int32 at number one, and there is no feature value recorded anywhere next to it. The editions file's descriptor is eleven bytes bigger, but the whole gap is the edition number and the longer syntax label, not an encoding. That means a code generator handed only the descriptor cannot tell from the descriptor alone whether your repeated field packed or expanded. The feature resolves at compile time and the bytes carry the answer, but the schema file you ship does not.

And the JavaScript toolchain never learns the word feature at all. It stores no features on the file, no features on the field, nothing in the serialized descriptor you can read back. It dies on the edition line before it ever reaches the defaults block, and the migration that gets your file through is the same mechanical pass the editions post described, comment the line, drop the keywords, put a syntax back. The thing you lose in that pass is exactly the default that matters most, because the tool's encoder packs a proto3 repeated scalar whether or not you wrote a feature to say otherwise, and it has no knob to ask what the edition would have done. The old packed option, which the tool does honor in proto2 and proto3, is the one setting that survives the migration visibly, and in editions the option is locked to true and the feature is the only way to change the bytes, so the knob the tool respects is precisely the one that is no longer allowed.

So the editions migration is not a line you delete, it is a default you have to re-decide. The block you comment out is carrying the only instruction that changes what your repeated fields write, and the tool you hand the file to afterward cannot read that instruction or echo it back. If a repeated field in an editions file is packed and the same list in your proto3 file is expanded, the bytes differ by a tag per element, and nothing in the descriptor will flag it for you. The edition and its defaults sit in the [editions post](https://datajutsu.com/protobuf-editions-parser/) for the descriptor side of this, the packed and expanded encodings the compiler actually wrote are measured in the [packed option post](https://datajutsu.com/protobuf-packed-option/), and the file goes into [proto.datajutsu.com](https://proto.datajutsu.com/?ref=datajutsu.com) on every tab once the one-line edit is in, which is where you will see the five-byte packed list and not the six-byte one.