fix: preserve prototype-named map keys - #3519
Open
schani wants to merge 9 commits into
Open
Conversation
Generated-output differences1023 files differ — 1023 modified, 0 new, 0 deleted |
schani
force-pushed
the
agent/javascript-prototype-key
branch
from
September 7, 2026 17:52
173ef9b to
841417d
Compare
Generated-output differences1320 files differ — 1320 modified, 0 new, 0 deleted |
Generated-output differences1214 files differ — 1173 modified, 41 new, 0 deleted |
schani
force-pushed
the
agent/javascript-prototype-key
branch
from
September 8, 2026 01:34
6d7da60 to
5ae1275
Compare
Generated-output differences1073 files differ — 1073 modified, 0 new, 0 deleted |
Generated-output differences1073 files differ — 1073 modified, 0 new, 0 deleted |
schani
force-pushed
the
probe/effect-prototype-record
branch
from
September 8, 2026 03:04
523f339 to
e589247
Compare
schani
force-pushed
the
agent/javascript-prototype-key
branch
from
September 8, 2026 03:04
fb6e8dc to
4d7f7db
Compare
schani
changed the base branch from
probe/effect-prototype-record
to
fix/zod-prototype-record
September 8, 2026 03:05
Generated-output differences1231 files differ — 1222 modified, 9 new, 0 deleted |
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.
JavaScript, Elm, and Effect Schema rebuilt decoded maps through ordinary object assignment, so an own
__proto__key changed or disappeared from the result instead of remaining data.JavaScript assigns through a null-prototype object before restoring
Object.prototype. Elm encodes dictionary entries into JSON text and parses the complete object; its helper name is reserved only when maps use the helper. Effect Schema validates entry tuples and rebuilds them withObject.fromEntries, preserving nested transforms, schema context, and inferred record types.Depends on the Zod map fix #3522 because the shared regression runs across all TypeScript schema backends. The 24-line Effect fix has the explicitly approved size exception.
Production diff: Effect Schema 24 lines; JavaScript 4 lines; Elm 14 lines.
Tests:
class-map-union.5.jsonround-trip with an own__proto__keymakeDictEncoderkeyword caseObject.prototype