Repository navigation
Conformance decodes any generated type's shape, by a run-time Type - #32
Merged
Merged
Conversation
The reference could decode only three hand-written reader types, so any other shape was NotImplemented. TypeSeed decodes by a Type known at run time, making exactly the calls a serde derive makes, through each format's decode_seed; a stage 1 fuzzer can now ask about any schema. - Type covers every shape generated Rust has: all scalars to 128 bits, unit, option, T[], T[N] (N > 32 included), struct and enum. Value gains u128, i128 and unit. - tests/seed_vs_derive.rs holds TypeSeed to real derives (the old readers, plus the generation goldens' shapes) on valid bytes, every single-byte mutation, truncation, a trailing byte, and hand-written JSON and MessagePack maps; three deliberate seed bugs each fail it. - Names go through an interner instead of leaking per call. - answer() asks one question, for the comline-reference binary. - 14 new cases per format, for the new shapes; no existing case changed.
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #31. Stage 1 of runtime#29.
TypeSeeddecodes bytes by aTypeknown only at run time, making exactly the calls a serde derive makes, through each format'sdecode_seed(Json and MsgPack decode through a seed, as Packed does #31). Before this, the reference could decode only three hand-written reader types, and every other shape wasNotImplemented.Typenow covers every shape generated Rust has: all scalars up to 128 bits, unit, option,T[], andT[N](including N > 32, which needsserde_big_array), plus struct and enum.Valuegainsu128,i128andunit. Unions are left out, since the Rust generator refuses them.tests/seed_vs_derive.rsholdsTypeSeedto real derives: the old readers plus the generation goldens' shapes (Scalars,Bag,Sample, error structs, unit). Each format is tried on valid bytes, every single-byte mutation, every truncation, a trailing byte, and hand-written JSON and MessagePack maps. Three deliberately planted seed bugs each fail it.Box::leakon every encode, so a long-runningcomline-referenceprocess doesn't grow.answer()asks the reference one question, for the binary in the next step.One finding, left as it is here:
msgpack@1accepts trailing bytes after a value, becausermp_serdenever checks the end of input.packed@1andjson@1refuse them. That's a strictness gap in the reference itself.