Skip to content

DESIGN.md's Binary Format diagram documents v11; the format is at v22 and the operand widths contradict #365 #379

Description

@typeless

Found while promoting the record-field rules into DESIGN.md (#368). Documentation only; nothing
in the code is wrong.

The state

DESIGN.md's "### Binary Format (v11)" section documents index format version 11. The
current INDEX_VERSION is 22.

The diagram is not merely old, it is contradicted by a change the same document now cites:

So a reader who trusts the diagram gets both the wrong widths and the wrong version, in exactly the
place they went looking for authoritative layout.

Why it was left alone

The #368 promotion pass placed new rules in a new section beside it, and refreshing the diagram
plus the v12–v22 history is its own task with its own verification: each version bump needs its
actual layout change identified from the commit that made it, not reconstructed. Doing that inside
a documentation-placement change would have mixed a large unverified rewrite into a small verified
one.

What that pass did do is stop the new text from vouching for the stale diagram: the new "What a
record claims" section opens with "The binary layout says how the bytes are arranged (the diagram
above predates v22)" rather than a deictic endorsement.

What the fix involves

  1. Regenerate the layout diagram from the current structs in include/pup/index/format.hpp.
  2. Retitle the section to the current version, or better, to no version at all — a section titled
    with a version number is a promise to update it on every bump, and this is the second time that
    promise has gone unkept. Naming the header field that carries the version, and pointing at
    format.hpp as the authority, is a shape that cannot rot the same way.
  3. Decide what version history the document should carry, if any. A per-version changelog in
    DESIGN.md duplicates git history; the bump criterion (already documented on INDEX_VERSION)
    is the part that has lasting value.

Point 2 is the substantive question — the rest is mechanical once it is answered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions