Skip to content

fix: transform NotRequired typed dictionary fields - #3872

Open
Shubham-Padkonde wants to merge 1 commit into
openai:mainfrom
Shubham-Padkonde:fix/not-required-transform-metadata
Open

Shubham-Padkonde wants to merge 1 commit into
openai:mainfrom
Shubham-Padkonde:fix/not-required-transform-metadata

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Transforming a TypedDict field wrapped in NotRequired currently skips its alias and format metadata and does not recurse into its nested typed dictionaries. An optional annotated date therefore remains a date under the original key instead of becoming an ISO 8601 string under its alias.

Unwrap NotRequired alongside Required in annotation stripping and metadata discovery. Add synchronous and asynchronous coverage for aliased dates, nested dictionaries, lists of dictionaries, and omitted fields.

Validation: the two regression cases fail before the fix; all 67 transform and typing tests pass afterward. Ruff lint/format checks and Pyright checks of the changed Python files pass. The local custom-code budget check passes at 6,900 of 10,000 lines; trusted upstream CI remains authoritative.

This serialization change needs SDK CODEOWNER review under AGENTS.md. Prepared with Codex assistance.

@Shubham-Padkonde
Shubham-Padkonde requested a review from a team as a code owner September 16, 2026 09:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 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-09-16T09:43:53.888915Z 2173a36 PR opened
🔒 Security Review Completed 2026-09-16T09:43:41.042589Z 2173a36 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.

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