Skip to content

Preserve own prototype-like keys during canonicalization - #5

Merged
ViperJuice merged 2 commits into
mainfrom
fix/canonicalize-own-properties
Nov 13, 2026
Merged

ViperJuice merged 2 commits into
mainfrom
fix/canonicalize-own-properties

Conversation

@ViperJuice

@ViperJuice ViperJuice commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Canonicalizing a JSON object with an own __proto__ key previously invoked the inherited prototype setter and could omit the key from serialized output. Define own enumerable, writable and configurable data properties instead, preserving the ordinary object prototype, deterministic key sorting, array order, undefined omission and nonmutation.

Adds four dependency-free Node 24 regression tests and documents the canonical-string/hash migration for affected inputs. CI retains Node 20 typecheck, Vitest and build checks, caps Vitest workers at two with file parallelism disabled, checks the installed option support, and adds a separate serial Node 24 regression job. Jobs use GitHub-hosted Ubuntu with 15/5-minute timeouts. Dependencies and lockfile are unchanged.

Validation: four regression tests pass locally; the same tests against the original source give three expected failures and one pass. Full Vitest, typecheck and build await this PR's hosted CI. No release or runtime support-floor change.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T23:23:29.428296Z 5233f03 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ViperJuice
ViperJuice merged commit 47b462e into main Nov 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant