Skip to content

Treat deserializer compatibility as serializer output#72

Draft
ostrowr wants to merge 2 commits into
mainfrom
codex/deserializer-emitted-values
Draft

Treat deserializer compatibility as serializer output#72
ostrowr wants to merge 2 commits into
mainfrom
codex/deserializer-emitted-values

Conversation

@ostrowr
Copy link
Copy Markdown
Owner

@ostrowr ostrowr commented Apr 14, 2026

Summary

  • interpret Role::Deserializer against values the old serializer could emit, instead of every value the old schema would accept through undeclared additional properties
  • thread that emitted-value assumption through object subset checks
  • add a focused regression test for adding an optional property under default-open object semantics

Why

The current checker treats open object schemas as if old serializers might emit arbitrary undeclared keys. That makes an added optional property look deserializer-incompatible even when the serializer contract is "only declared fields are emitted," which is the behavior described in the README.

Validation

  • cargo test check_compat_treats_optional_added_property_as_deserializer_compatible --quiet
  • cargo test --test backcompat complex_optional_prop_added --quiet
  • cargo fmt --all --check

Follow-up

cargo test --quiet still fails in tests/backcompat.rs for additionalprops_reduced and pattern_properties_fall_back_to_additional_properties. Those fixtures and the fuzz confirmation harness still encode the old deserializer semantics for open object schemas, so they need a follow-up decision/update before this should leave draft.

ostrowr and others added 2 commits April 5, 2026 18:13
Model Role::Deserializer against values the old serializer could actually emit, rather than every value the old schema would accept via undeclared additional properties. Add a focused regression test covering an optional property added under the default-open object semantics.

Co-authored-by: Codex <noreply@openai.com>
@ostrowr ostrowr changed the title [codex] Treat deserializer compatibility as serializer output Treat deserializer compatibility as serializer output Apr 14, 2026
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