Repository navigation
Centralize native value conversion - #1011
Merged
Merged
Conversation
snazy
force-pushed
the
centr-nat-val-conv
branch
from
October 16, 2026 16:50
ad881ae to
af540d3
Compare
snazy
marked this pull request as ready for review
October 16, 2026 16:50
snazy
marked this pull request as draft
October 16, 2026 17:20
Make TypeAdapter the bidirectional conversion boundary while retaining the deprecated Val conversion fallback. Preserve scalar ranges, configured container adapters, and protobuf built-in and object type values; validate uint32 map entries before narrowing.
snazy
force-pushed
the
centr-nat-val-conv
branch
from
October 16, 2026 18:09
af540d3 to
e34eea7
Compare
snazy
marked this pull request as ready for review
October 16, 2026 18:13
snazy
force-pushed
the
centr-nat-val-conv
branch
from
October 16, 2026 19:20
e34eea7 to
adb1862
Compare
XN137
reviewed
Oct 20, 2026
Route native map keys and values through the configured adapter while preserving raw value access. Normalize uint32 and fixed32 map entries without sign extension, retaining output range validation. Add regression coverage for nested conversions, null and type values, generated and dynamic unsigned maps, and out-of-range keys and values.
XN137
reviewed
Oct 22, 2026
XN137
left a comment
Contributor
There was a problem hiding this comment.
thanks for the update, 2 more legit-looking findings
Use the calling adapter when converting built-in list elements, including string arrays and split results. Preserve legacy string-array element adaptation and custom list conversions. Preserve boxed conversion targets for custom protobuf map entries while retaining built-in primitive fast paths. Cover Java and protobuf list outputs, split overloads, null string-array elements, and boxed-only map keys and values.
Member
Author
Yup, addressed |
XN137
reviewed
Oct 22, 2026
Pass the calling adapter through built-in map conversion, including protobuf-backed maps and nested Java and protobuf output. Preserve custom map legacy conversion and raw value access. Retain CEL elements when concatenating array-backed and Java-backed lists so outbound hooks cannot alter evaluation or narrow element types. Preserve unsigned raw representations in concatenation snapshots. Cover delegated inbound adapters, nested map exports, protobuf maps, and typed-array concatenation.
XN137
approved these changes
Oct 22, 2026
XN137
left a comment
Contributor
There was a problem hiding this comment.
no more codex findings
maybe adjust the PR description to also include something like:
- Normalizing incoming uint32/fixed32 map entries without sign extension, so valid unsigned values still round-trip with the new range checks.
- Preserving CEL values during list concatenation, so outbound adapter hooks cannot change evaluation results or narrow element types.
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.
Make
TypeAdapterthe bidirectional boundary for Java/CEL conversion, with primitive conversion helpers and shared default implementations. Retain deprecatedVal.convertToNative()as the compatibility fallback for custom values.Route list and map exports through the calling adapter, including nested containers and protobuf-backed maps. Preserve CEL values during list concatenation so outbound conversion hooks cannot alter evaluation results.
Preserve primitive range checks and boxed conversion targets for custom protobuf map entries. Correct unsigned protobuf map reads and reject out-of-range
uint32andfixed32keys and values before narrowing (see #985).Add regression coverage for custom adapters, legacy conversions, nested containers, concatenation, and generated/dynamic protobuf round trips, plus conversion benchmarks.