Preserve prototype-named keys in Effect Schema maps - #3524
Closed
schani wants to merge 3 commits into
Closed
Conversation
Generated-output differences47 files differ — 47 modified, 0 new, 0 deleted |
schani
force-pushed
the
probe/effect-prototype-record
branch
from
September 8, 2026 03:04
523f339 to
e589247
Compare
Member
Author
|
Superseded by #3519, which now contains this Effect fix and the shared regression fixture in the same PR. |
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.
Effect Schema records rebuild decoded maps through ordinary object assignment, so an own
__proto__key changes the prototype instead of becoming data. Decode maps as validated entry tuples and rebuild them withObject.fromEntries, preserving prototype-named keys, nested value transformations, schema context, and inferred record types.This complete fix changes 24 production lines; the user explicitly approved that exception. Depends on #3522. The shared
class-map-union.5.jsonruntime regression lands in downstream #3519, where all TypeScript schema backends run it.Validation: full TypeScript Effect Schema fixtures 145/145; focused
class-map-union.schema6 files; invalid Boolean map rejection and own__proto__descriptor probe; build and lint.