Repository navigation
Keep null on a nullable object that another branch narrows - #5172
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Merging this PR will degrade performance by 24.38%2 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
e30e405 to
f5c869e
Compare
Breaking Change AnalysisResult: No breaking changes detected Reasoning: The PR is an internal bug fix to nullability handling during duplicate model deletion. DataModel._prepare_dedup_key now writes pre-render nullability for every field whose hint renders its own type. It does this through a new private hook, _hint_renders_own_type, which msgspec overrides via a refactored private helper, _hint_meta. That restores the legacy L3 import-nullability behavior, so a field keeps the None of the nullable model it named when dedup points it at an equivalent model without one. For example, Model2.item correctly renders as Item or None and accepts null as the schema allows. No existing expected output files were changed. Only new test fixtures were added, and the option and default variants produce identical output. No CLI options, public Python API, templates, defaults, Python version support or error handling changed. The only removed lines are doc wording and private-method internals moved into a helper. This corrects wrong output in a narrow edge case to match the schema and earlier behavior, so it is not a breaking change. This analysis was produced by the release draft workflow |
Fixes: #5154
Summary by CodeRabbit
Nonevalid where the schema allows it and maintains consistent validation across supported model types and generation options.