Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
86121d0
Adding the binary encoding spec.
Jun 22, 2026
ceaf826
cosmos(driver): add binary JSON codec scaffolding (P0a)
Jun 25, 2026
ae6df0a
cosmos(driver): add binary JSON system-string dictionary (P0b)
Jun 25, 2026
1dda9b5
cosmos(driver): add binary JSON golden scalar test corpus (P0c)
Jun 25, 2026
b26bf98
cosmos(driver): add binary JSON scalar decoder (P1a)
Jun 25, 2026
49d3091
cosmos(driver): add binary JSON container decoder (P1b)
Jun 25, 2026
09f549c
cosmos(driver): add binary JSON user + reference strings (P1c)
Jun 26, 2026
5cea73e
cosmos(driver): add binary JSON extended number forms (P1d-1)
Jun 26, 2026
8790969
cosmos(driver): add binary JSON GUID strings (P1d-2)
Jun 26, 2026
6888c36
cosmos(driver): add binary JSON base64 strings (P1d-3)
Jun 26, 2026
6472615
cosmos(driver): add binary JSON compressed strings (P1d-4)
Jun 26, 2026
ed12afe
cosmos(driver): add binary JSON GUID value and binary blobs (P1d-5a)
Jun 26, 2026
8eb14d2
cosmos(driver): add binary JSON uniform number arrays (P1d-5b)
Jun 26, 2026
7497d0f
cosmos(driver): auto-detect and decode binary JSON responses (P1e)
Jun 26, 2026
ac3b171
cosmos(driver): add minimal-valid binary JSON encoder (P2a)
Jun 26, 2026
fbc816e
cosmos: encode item writes as binary JSON behind a temporary flag (P2b)
Jun 26, 2026
c93ff81
cosmos: formalize binary-encoding enablement as resolved-once config …
Jun 26, 2026
9976b43
cosmos: emit binary serialization-format negotiation header on item o…
Jun 26, 2026
476a5ab
cosmos(driver): add binary JSON decoder robustness tests (P4)
Jun 26, 2026
d112555
Add binary JSON support to in-memory emulator with E2E tests
Jun 26, 2026
ec3c4c5
Add live binary-encoding integration test
Jun 27, 2026
cffbf8a
Fix spelling and link-format issues in binary encoding spec
Jun 27, 2026
a6a35d6
cosmos(driver): extract shared binary-JSON encode helpers (v2 prep)
Jul 10, 2026
25a46bf
cosmos(driver): add serde::ser::Error to BinaryError (v2 prep)
Jul 10, 2026
ece0186
cosmos(driver): add native serde Serializer for binary JSON (v2)
Jul 10, 2026
575fcf7
cosmos: encode item writes via native binary serde serializer (v2)
Jul 10, 2026
9690f01
cosmos(driver): add generative parity property test for binary serial…
Jul 10, 2026
ef4cda6
cosmos(bench): add text vs binary-v1 vs binary-v2 encode benchmark
Jul 10, 2026
eb00d36
cosmos(docs): mark binary-encoding spec implemented; document v2 seri…
Jul 10, 2026
aa41cf0
cosmos(docs): rewrite binary-encoding spec around the native serde se…
Jul 10, 2026
199dd46
cosmos(driver): add native serde Deserializer for binary JSON
Jul 10, 2026
fd71a33
cosmos: decode binary responses via native serde deserializer + add d…
Jul 10, 2026
efbc9bc
cosmos(docs): document the native serde deserializer in the binary-en…
Jul 10, 2026
21f1e4e
cosmos(docs): fix Mermaid sequence diagram rendering in binary-encodi…
Jul 10, 2026
3c8029e
cosmos(docs): make binary-encoding sequence diagram render reliably
Jul 10, 2026
3980fb5
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
Jul 10, 2026
66e3e81
perf(cosmos/testdata): add sample JSON files for serialization benchm…
kundadebdatta Jul 11, 2026
bd8026a
test(perf): sample testdata and round-trip via binary encoding
kundadebdatta Jul 12, 2026
4337025
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
Jul 13, 2026
073975a
cosmos(driver): make native binary deserializer reject undersized con…
Jul 13, 2026
ee93685
cosmos(driver): cap reference-string expansion to bound O(S^2) decode…
Jul 13, 2026
912ccc5
cosmos: downgrade item-write serialization logs to debug + document b…
Jul 13, 2026
d208d09
cosmos: map binary encode failures to a request-body status, not resp…
Jul 13, 2026
748dd50
cosmos(driver): refresh binary_json docs + fix fuzz comment to match …
Jul 13, 2026
4e5a9ec
cosmos: pin binary round-trip tests to the current-thread tokio flavor
Jul 13, 2026
3605d6e
cosmos(perf): rustfmt binary_sampled_testdata (fix cargo fmt --check)
Jul 13, 2026
5961306
cosmos: Box::pin query_items futures to satisfy clippy::large_futures
Jul 14, 2026
1212463
cosmos(driver): run backend-failover-exhausting topology tests on tok…
Jul 14, 2026
8d647bf
eng: add repo ignore-links.txt for Verify-Links pipeline
Jul 14, 2026
9c4c68c
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
kundadebdatta Jul 14, 2026
74e80a7
cosmos(driver): run binary-json deep-nesting tests on a large-stack t…
Jul 15, 2026
4f5a743
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
kundadebdatta Jul 15, 2026
41cdb1e
cosmos(driver): address PR #4671 binary-encoding review feedback
Jul 16, 2026
d786dbf
cosmos(driver): fix binary-json review regressions from PR #4671 squash
Jul 16, 2026
13c6dbd
cosmos(driver): sync binary-encoding spec with post-review code
Jul 16, 2026
7c1807e
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
Jul 16, 2026
a3acdd7
cosmos(driver): dedup Cow header conversion (PR #4671 review)
Jul 17, 2026
d404126
cosmos: model binary encoding as BinaryEncodingOptions client option …
Jul 17, 2026
8db2e71
cosmos(test): configure binary encoding via client option, not std::e…
Jul 17, 2026
da35b5e
cosmos(driver): shrink decoder recursion frame, drop large-stack test…
Jul 17, 2026
37e0d9c
cosmos: add request_text_response to BinaryEncodingOptions (PR #4671 …
Jul 17, 2026
3cd4800
cosmos(driver): test response-format negotiation incl. request_text_r…
Jul 17, 2026
6b6bf41
cosmos(driver): add binary->text transcode primitive + operation dire…
Jul 17, 2026
211922e
cosmos(driver): apply binary->text transcoding on the response path (…
Jul 17, 2026
92e343e
cosmos: wire request_text_response to driver-side transcoding (PR #4671)
Jul 17, 2026
b12a6d2
cosmos(driver): document driver-side transcoding in binary-encoding s…
Jul 17, 2026
2ce27ed
cosmos(driver): surface request_text_response across the binary-encod…
Jul 17, 2026
e89c883
cosmos(driver): align spec change-map with the shipped transcoding co…
Jul 17, 2026
af05deb
cosmos(driver): reflow binary-encoding spec paragraphs to full width …
Jul 17, 2026
c3ed830
Address review: document container_client sanity tests; fix rustfmt i…
kundadebdatta Jul 19, 2026
014a438
Address review: reject non-finite doubles symmetrically and classify …
kundadebdatta Jul 19, 2026
7f4bea5
cosmos(driver): add text->binary transcode primitive (PR #4671)
Jul 20, 2026
11d8b38
cosmos(driver): add BinaryEncodingOptions to OperationOptions (PR #4671)
Jul 20, 2026
90e1d26
cosmos(driver): apply binary encoding from OperationOptions in execut…
Jul 20, 2026
58f0aee
cosmos: re-export driver BinaryEncodingOptions, route encoding via Op…
Jul 20, 2026
0360e2c
cosmos(native): expose binary encoding to FFI callers via CosmosOpera…
Jul 20, 2026
12603e2
cosmos(driver): document driver-owned binary encoding + FFI reuse (PR…
Jul 20, 2026
d2c6aaf
cosmos: address latest Copilot review round (PR #4671)
Jul 20, 2026
c4a6a47
cosmos(driver): resolve binary_encoding via layered view, guard to po…
Jul 20, 2026
6d4f86d
cosmos(driver): support i128/u128 in binary serializer, document byte…
Jul 20, 2026
cae2476
cosmos(driver): bound decode output for uniform arrays of empty numbe…
Jul 20, 2026
58ba24a
cosmos(driver): tighten verbose comments from the binary-encoding rev…
Jul 20, 2026
700baa2
cosmos: exclude perf testdata from cspell and add new binary-encoding…
Jul 21, 2026
5362759
cosmos: add dkunda to cspell dictionary (PR #4671)
Jul 21, 2026
c3e89da
cosmos(driver): sync BINARY_ENCODING_SPEC with driver-owned encoding …
Jul 21, 2026
bad55c1
Address review: trim .NET/FFI/preview doc references and rename Field…
kundadebdatta Jul 21, 2026
060f0e5
Address review: shorten binary_encoding field doc
kundadebdatta Jul 21, 2026
8de8927
Address review: drop with_binary_encoding_enabled shortcut; convert g…
kundadebdatta Jul 21, 2026
ab2d1cb
cosmos(driver): add Binary Encoding HLD design doc (PR #4671)
kundadebdatta Jul 21, 2026
33a7312
cosmos(driver): fix relative link to BINARY_ENCODING_SPEC in HLD (PR …
kundadebdatta Jul 21, 2026
101aedb
cosmos(driver): use full GitHub URL for spec link in HLD (PR #4671)
kundadebdatta Jul 21, 2026
d4a6cca
cosmos(driver): fix cspell failure in BINARY_ENCODING_HLD Mermaid dia…
Jul 22, 2026
e7528d4
cosmos(driver): clear binary_encoding on PATCH sub-ops so patch stays…
Jul 22, 2026
9ae1b66
cosmos(driver): drop Delete from supports_binary_encoding to match sp…
Jul 22, 2026
bb517f5
cosmos(driver): trim redundant patch-handler binary-encoding comments…
Jul 22, 2026
edc67dd
cosmos(perf): generalize binary_sampled_testdata resource names (PR #…
Jul 22, 2026
63f2bb2
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
kundadebdatta Jul 22, 2026
130694d
cosmos(driver): address PR #4671 binary-encoding review feedback (tva…
Jul 23, 2026
e78ea5b
cosmos: honor operation-level binary_encoding over the client default…
Jul 23, 2026
9bf54fc
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
kundadebdatta Jul 23, 2026
e8d385f
perf(cosmos): untrack the 507MB testdata JSON corpus, keep it local
Jul 23, 2026
abce917
eng: remove repo ignore-links.txt (moving link exclusions to a separa…
Jul 23, 2026
47dba7e
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
Jul 23, 2026
13e260a
cosmos: address Copilot review findings on PR #4671
Jul 24, 2026
c132419
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
Jul 24, 2026
12e1dc4
Merge branch 'main' into users/kundadebdatta/4646_implement_binary_en…
Jul 24, 2026
f89e87c
cosmos(driver): add RFC-style binary-encoding wire-format spec and a …
Jul 22, 2026
3b142c3
test(cosmos-perf): add fuzzer dev-deps (arbitrary, arbitrary-json, js…
Jul 24, 2026
7ed1062
test(cosmos-perf): extract Cosmos-calibrated normalize_numbers (fuzze…
Jul 24, 2026
1f47bcf
test(cosmos-perf): canonicalize via json-canon (RFC 8785) + SHA-256 (…
Jul 24, 2026
4373d0d
test(cosmos-perf): generate documents via arbitrary-json (fuzzer Phas…
Jul 24, 2026
4ae53d2
docs(cosmos): record fuzzer crate-refactor status + json-canon safe-i…
Jul 24, 2026
54cff04
docs(cosmos): record Phase 5 live validation (18/18 calibration MATCH…
Jul 24, 2026
dd98c47
docs(cosmos): add visualized 'how it works' section to the round-trip…
Jul 24, 2026
7240b41
test(cosmos-perf): exercise all four binary point ops in the fuzzer (…
Jul 25, 2026
af4b621
docs(cosmos): record 12,000-round-trip 4-op soak (create/read/replace…
Jul 25, 2026
32bc4e8
test(cosmos-perf): hybrid depth-controlled generator for deep/complex…
Jul 25, 2026
e1d776e
test(cosmos): add cargo-fuzz codec crate and enrich round-trip generator
Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ version = "1.0.0"
version = "1.0.0"

[workspace.dependencies]
arbitrary = { version = "1.4", features = ["derive"] }
arbitrary-json = "0.1"
async-lock = "3.4"
async-stream = { version = "0.3.6" }
async-trait = "0.1"
Expand Down Expand Up @@ -115,6 +117,7 @@ hdrhistogram = "7.5"
hostname = "0.4"
hmac = { version = "0.12" }
include-file = { version = "1.0.0", default-features = false }
json-canon = "0.1"
openssl = { version = "0.10.79" }
opentelemetry = { version = "0.32", features = ["trace"] }
opentelemetry-appender-tracing = { version = "0.32" }
Expand Down
27 changes: 26 additions & 1 deletion sdk/cosmos/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"ALPN",
"apacsoutheast",
"Appleby's",
"AQID",
"argtypes",
"asyncio",
"australiacentral",
Expand All @@ -19,6 +20,7 @@
"azurecosmos",
"azurecosmosdriver",
"backoff",
"backoffs",
"backpressure",
"BADFUNC",
"bindgen",
Expand All @@ -30,6 +32,7 @@
"cabi",
"canadacentral",
"canadaeast",
"CBOR",
"cbindgen",
"CDLL",
"cdriver",
Expand All @@ -49,6 +52,7 @@
"chinaeast",
"chinanorth",
"chokepoint",
"canonicalizer",
"cloneable",
"codepoint",
"codepoints",
Expand All @@ -61,6 +65,7 @@
"consumingly",
"Conv",
"cooldown",
"cosmosbinary",
"cosmosclient",
"cosmosdriver",
"correlator",
Expand All @@ -78,6 +83,7 @@
"dcount",
"dedicatedgateway",
"deprioritized",
"dkunda",
"deprioritizes",
"derefs",
"dhat",
Expand Down Expand Up @@ -125,6 +131,7 @@
"Geospatial",
"fshort",
"funct",
"fuzzable",
"gatewayversion",
"germanycentral",
"germanynorth",
Expand All @@ -148,10 +155,12 @@
"inclusivity",
"inlines",
"inmemory",
"ints",
"INVALIDARG",
"isquery",
"japaneast",
"japanwest",
"jsontext",
"keepalive",
"keyspace",
"koreacentral",
Expand All @@ -163,6 +172,7 @@
"libazurecosmosdriver",
"libclang",
"LIBCLANG",
"libfuzzer",
"libqueryplaninterop",
"QUERYPLANINTEROP",
"linearizability",
Expand Down Expand Up @@ -198,6 +208,7 @@
"nocoll",
"noretry",
"normalises",
"notneg",
"northcentralus",
"northeurope",
"norwayeast",
Expand Down Expand Up @@ -233,6 +244,7 @@
"precomputation",
"preimage",
"Prereqs",
"PRNG",
"ptrs",
"pushback",
"pushdown",
Expand All @@ -242,10 +254,15 @@
"RAII",
"readfeed",
"recompiles",
"redecoded",
"reencode",
"reencoded",
"refetch",
"refetched",
"refetches",
"refcounted",
"reparses",
"reparsed",
"Replicaset",
"reqs",
"restype",
Expand All @@ -262,9 +279,11 @@
"RUPM",
"rwcache",
"sbyte",
"seqs",
"serviceunavailable",
"serviceversion",
"sess",
"Signedness",
"southafricanorth",
"southafricawest",
"southcentralus",
Expand All @@ -275,6 +294,7 @@
"sprocs",
"staticlib",
"stdlib",
"streamable",
"subrange",
"submitret",
"subsec",
Expand All @@ -293,10 +313,13 @@
"testdb",
"thinclient",
"threadsafe",
"tmin",
"TOCTOU",
"Tokio",
"TOPCOUNT",
"TPIO",
"transcoders",
"trippable",
"uaecentral",
"uaenorth",
"udfs",
Expand All @@ -307,6 +330,7 @@
"unavail",
"uncollapsed",
"uncontended",
"undecoded",
"undrained",
"unfaulted",
"ungoverned",
Expand Down Expand Up @@ -356,7 +380,8 @@
"**/query_plan_native/QueryPlanInterop.h",
"**/query_plan_native/bindgen_wrapper.h",
"**/query_plan_native/generated/native_bindings.rs",
"vnext-emulator-matrix.json"
"vnext-emulator-matrix.json",
"**/azure_data_cosmos_perf/testdata/**"
],
"overrides": [
{
Expand Down
6 changes: 1 addition & 5 deletions sdk/cosmos/azure_data_cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Added opt-in Cosmos binary JSON encoding for item operations (`create`/`read`/`replace`/`upsert`). Enable it via `CosmosClientBuilder::with_binary_encoding_options` (or the `AZURE_COSMOS_BINARY_ENCODING_ENABLED` environment-variable fallback). Off by default; when disabled, requests and responses are byte-for-byte unchanged. ([#4671](https://github.com/Azure/azure-sdk-for-rust/pull/4671))

## 0.37.1 (2026-07-23)

Expand Down
5 changes: 5 additions & 0 deletions sdk/cosmos/azure_data_cosmos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ name = "split"
path = "tests/split.rs"
required-features = ["key_auth", "fault_injection"]

[[test]]
name = "binary_encoding"
path = "tests/binary_encoding.rs"
required-features = ["key_auth", "fault_injection"]

[[test]]
name = "gateway_v2"
path = "tests/gateway_v2.rs"
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure_data_cosmos/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
fn main() {
// Allow `#[cfg_attr(not(test_category = "..."), ignore)]` in `tests/*.rs`.
println!(
"cargo:rustc-check-cfg=cfg(test_category, values(\"emulator\", \"emulator_vnext\", \"multi_write\", \"split\", \"gateway_v2\", \"gateway_v2_multi_region\"))"
"cargo:rustc-check-cfg=cfg(test_category, values(\"emulator\", \"emulator_vnext\", \"multi_write\", \"split\", \"binary_encoding\", \"gateway_v2\", \"gateway_v2_multi_region\"))"
);
}
Loading