Skip to content

fix(json): distinguish absent object members from null - #263

Open
joo00der (jihtsan) wants to merge 1 commit into
braintrustdata:mainfrom
jihtsan:codex/261-distinguish-missing-null-members
Open

joo00der (jihtsan) wants to merge 1 commit into
braintrustdata:mainfrom
jihtsan:codex/261-distinguish-missing-null-members

Conversation

@jihtsan

Copy link
Copy Markdown

Change

Fixes #261. Missing object members contribute score0 before recursive value comparison in Python and TypeScript. An omitted nullable member no longer receives a perfect identical-structure grade. Own-property checks preserve the JSON member contract for prototype-looking names. Keep union weighting, root null/undefined behavior, shared custom scorers, skipped sub-scores, arrays and string parsing unchanged. No async traversal redesign or bool/numeric scope expansion.

New regressions cover both directions, weighted records, nested objects/arrays, parsed JSON strings, null/null, empty records, false/zero and custom shared scorers. Original-code results: Python8fail10pass; TS8fail12pass. Final targets: Python18pass, TS20pass. Independent Standards/Spec reviews on415c8cbd22b1e77bb09210e5da7700b80e4f9847 have no remaining findings.

Validation

  • Targeted JSON tests: Python18 and TypeScript20 pass.
  • Broader filtered offline Python:73passed/31deselected. Full TypeScript attempt:86passed/8failed because external provider requests were blocked.
  • Full Python attempt:80passed/24failed (16 credential-dependent provider cases with a dummy fixture key returning401, and8 missing optionalLiteLLM cases). Later filtered run blocks all TCP/connect_ex and clears proxy env. The24 deselection prefixes also match7additionaltests; actual31deselections are retained, not called a full offline suite.
  • Full repository precommit hooks, TypeScriptCJS/ESM/DTS build, Pythonwheel/sdistbuild and twine metadata checks pass.

Validated locally with Python3.13.12/uv.lock dev+scipy and pnpm10.33.0 frozen lock/Node24.22.1. Hosted CI, real-provider/model success and other runtime/platform matrices are unverified. No real keys or paid quota were used; full-suite success is not claimed. Maintainers own approval/merge/release.

AI assistance: OpenAI Codex researched, implemented and independently reviewed this change.

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T07:56:56.038750Z 415c8cb PR opened
ℹ️ About Codex in GitHub

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

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

This branch has not been deployed

No deployments
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.

JSONDiff treats an absent object member as equal to an explicit null

1 participant