descriptor: reject overlapping extension ranges - #417
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
b3fd5c8 to
0c13e33
Compare
|
[claude code] The rule and the algorithm are right: protoc's check is pairwise half-open (
Sequencing: this will land after #416, at which point the |
# Conflicts: # buffa-descriptor/src/pool.rs # buffa-descriptor/tests/pool_e2e.rs
Review follow-ups: OverlappingExtensionRange carries both ranges, naming the later declaration first as protoc does; the sweep sorts by start and compares against the furthest reach so far (no windows/unreachable!); the rejection test uses the proto2 set-level helper (protoc forbids extension ranges in proto3) and adds the MAX-boundary and three-range cases; the fragment cites the PR. Merged main over anthropics#416's InvalidExtensionRange, so the start<end filter that guarded this check is gone; the DescriptorPool::new/decode error summaries keep main's wording pending a single rewrite after this series.
|
[claude code] No push since the review, so I've applied the items myself so this can ride 0.10.0: 07bdc4c merges |
What changed
Why
Hand-built descriptor sets could load overlapping extension ranges that protoc rejects.
Tests
cargo test -p buffa-descriptor --all-featurescargo clippy --workspace --all-targets -- -D warningscargo fmt --all --check