Repository navigation
Preserve nullable maps in generated players - #1018
Merged
Eli Pinkerton (wallstop) merged 4 commits intoOct 17, 2026
Merged
Conversation
Why: WebGL needs direct checks for generated serialization and safe memory replacements. How: Build an isolated Release IL2CPP consumer with High stripping and single-threaded code. Bind source and player inputs, require generated formatters, and run each case in a fresh Chromium context. Retain failed attempts and verify corrupt-byte and stale-source controls. What: Cover retained maps, nullable presence, enum widths, WyRandom vectors, and both R-trees. Add 13 runner controls to the contract suite. Validation: Both changed-file preflight modes, full spelling and documentation checks, strict MkDocs, member ordering, 13 Python controls, and 13 registry controls pass. The exploratory legacy browser profile passes 23 cases and two negative controls. Generated browser acceptance remains pending on this commit. Refs #343, #637
The fresh generated WebGL consumer exposed WPROTO003 errors for nullable map halves. Unwrap their wire shapes while retaining nullable local and collection types, emit presence for present defaults, and refuse absent nullable keys before dictionary insertion. Rebuild the shipped generator. Pin literal bytes, duplicate message merging, malformed entries, nullable keys, and interface/read-only maps. Both oracle writers match generated bytes. The pinned v2 reader loses nullable enum/struct values from its own bytes on .NET 9; freeze those losses explicitly rather than claiming full v2 reader equivalence. Generated readers retain the encoded values. Validation: complete Release generator suites pass 1382/1382 (v3) and 1351/1351 (v2), without skips. All eight formerly failing nullable-map diagnostic compilation controls pass. Unity source typechecks and member ordering pass. Unity 6000.4.6f1 compiles and passes all eight new PlayMode cases. Both changed-file preflights pass, including shipped DLL comparison; full spelling, documentation links, and Markdown lint pass. Refs #343, #637.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 920edcc. Configure here.
A caller-defined IReadOnlyDictionary can enumerate a null nullable key, although Dictionary rejects insertion of one. Generated writes previously returned true for that keyless entry, which generated reads then refused. Return false before writing the entry and document the refusal. The new regression fails before the guard (one failure, two valid-key controls passing), then all three cases pass with the rebuilt shipped DLL. Full Release suites pass 1385/1385 v3 and 1354/1354 v2 without skips. Both preflight modes, member order, full spelling, documentation links, Markdown lint and strict MkDocs pass. Unity 6000.4.6f1 recompiles cleanly. The preceding 920edcc generated WebGL player passes all 23 cases and both negative controls, with zero browser errors. Its final assembly manifests require generated dispatch and SINGLE_THREADED. A new final-head player will qualify this guard; the preceding player is retained separately. Refs #343, #637. Addresses PR #1018 review comment 4297918648.
This was referenced Oct 16, 2026
Eli Pinkerton (wallstop)
enabled auto-merge (squash)
October 16, 2026 22:18
Eli Pinkerton (wallstop)
deleted the
codex/browser-serializer-acceptance
branch
October 17, 2026 02:09
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.

DISCLOSURE: LLM-GENERATED TEXT
Why: Generated serializers reject nullable map values needed by retained consumer data.
What:
Refs #343, #637
Note
Medium Risk
Changes generated serialization wire semantics and presence for map entries; retained saves and mixed protobuf-net reader versions need the documented qualification before rollout.
Overview
Extends the WProto generator so
Dictionary/IDictionarymap members can use nullable keys and values, with presence driven byHasValue(present zeros and default structs stay on the wire; null values omit; nullable keys must be present or read/write fails).MapMemberandShape.Underlyingwere updated accordingly, and WPROTO003 now documents nullable map halves while repeated elements stay non-nullable.Adds qualification: differential and golden-byte tests against protobuf-net oracles, fast runtime tests, and a WebGL IL2CPP browser consumer (
run-browser-consumer.py+ Playwright) that runs retained-map goldens plus enum/RNG/spatial safety checks with manifest-bound identity and negative controls. Docs and CHANGELOG describe nullable map wire rules and older protobuf-net reader limits for nullable enum/struct map values.Reviewed by Cursor Bugbot for commit 5763bf6. Bugbot is set up for automated code reviews on this repo. Configure here.