Skip to content

Wire: char and bounds per format, conformance spec 0.3 (core#98) - #144

Merged
Kinflou merged 2 commits into
mainfrom
docs/bounds-wire
Nov 3, 2026
Merged

Kinflou merged 2 commits into
mainfrom
docs/bounds-wire

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 3, 2026

Copy link
Copy Markdown
Member

Step 7 of the bounds rollout (ComlineProject/core#98; resume note ComlineProject/core#197), docs part: each format's spec records its char encoding and its bounds behaviour.

  • reference/wire/packed.md:
    • The layout table gains char: raw UTF-8, 1 to 4 bytes, no prefix.
    • It also gains char[max N] / char[N], which always send a byte length, and T[max N].
    • A new "char and bounds" section covers the strict single-char check and what decoding refuses: a count above N, a byte length above 4 × N, then the exact character count, and the depth limit.
  • reference/wire/official-encodings.md: a new "char and bounds" section with a table per format (packed@1, msgpack@1, json@1): one char, T[max N] and char[max N], plus the depth rule.
    • It says why no profile fact covers bounds.
    • It notes that a changed maximum moves the comline@2 shape hash.
  • reference/conformance.md: spec 0.3.
    • New type descriptions (char, bounded_string, bounded_array, recursive/self) and the {"char": ...} value.
    • An encode case may carry a type, and an encode rejection must fail to encode.

Merge order: after ComlineProject/runtime#78 (the runtime and vectors) and ComlineProject/core#200 (bounds in the shape hash). The link to the runtime README's #the-spec-version-03 anchor resolves once runtime#78 is merged.

@Kinflou
Kinflou merged commit 453a14b into main Nov 3, 2026
3 checks passed
@Kinflou
Kinflou deleted the docs/bounds-wire branch November 3, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant