Cosmos: Implement Binary Encoding RFC Fuzz - #4977
Draft
Debdatta Kunda (kundadebdatta) wants to merge 3 commits into
Draft
Cosmos: Implement Binary Encoding RFC Fuzz#4977Debdatta Kunda (kundadebdatta) wants to merge 3 commits into
Debdatta Kunda (kundadebdatta) wants to merge 3 commits into
Conversation
Byte/wire-format validation for the Cosmos binary JSON codec, independent of any live account: - azure_data_cosmos_driver/fuzz: isolated cargo-fuzz crate (nightly/libFuzzer) with decode, from_slice, transcode_to_text, decode_reencode_roundtrip targets - binary_json/conformance.rs: offline golden-vector conformance unit tests - testdata/binary_json_vectors.json: golden byte vectors - fuzz-matrix.json + ci.yml MatrixConfigs: weekly Build-stage -runs=0 replay - Run-BinaryJsonFuzz.ps1 + Invoke-CosmosTestSetup.ps1 fuzz hook - BINARY_ENCODING_RFC.md: wire-format spec (pending backend-team review) Split out of the original combined PR (#4898); the live e2e round-trip fuzzer is delivered separately.
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Debdatta Kunda (kundadebdatta)
force-pushed
the
users/kundadebdatta/4864_binary_codec_cargo_fuzz
branch
from
August 5, 2026 01:07
056e7ed to
0151dce
Compare
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This was referenced Aug 5, 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.
Summary
Adds byte-level (wire-format) fuzzing for the binary-JSON codec, plus a draft encoding RFC spec and golden-vector conformance tests. Where #4976 validates that well-formed values survive a live round-trip, this PR hardens the decoder against arbitrary/malformed bytes it must never crash on — a complementary, offline safety check.
How it works
sequenceDiagram participant L as libFuzzer participant D as Codec (decode / from_slice / transcode) L->>L: mutate bytes (seeded from golden vectors) L->>D: feed arbitrary buffer D-->>L: Ok(Value) or Err(_) — never panic/hang Note over L,D: decode → encode → decode idempotence also checkeddecode,from_slice,transcode_to_text,decode_reencode_roundtrip(isolated cargo-fuzz crate, nightly + libFuzzer).-runs=0,ContinueOnError=true); per-PR coverage comes from the offline conformance unit tests.BINARY_ENCODING_RFC.md) documents the wire format and is pending backend-team review.Validation
Running