Skip to content

Add typed unchanged states for partial-update models - #5

Merged
kdubb merged 1 commit into
mainfrom
codex/issue-239-patch-models
Oct 2, 2026
Merged

kdubb merged 1 commit into
mainfrom
codex/issue-239-patch-models

Conversation

@kdubb

@kdubb kdubb commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Adds SundayPatchModel, UNSET, UnsetType, and is_unset for typed partial updates. Omitted arguments and fields reset to UNSET remain unchanged and are omitted from serialization. Supplied values retain native Pydantic validation, and fields that permit deletion can use None to encode JSON null.

The adapter handles unchanged fields after native alias selection, preserves request-mode instance revalidation, and keeps the application-only sentinel out of JSON Schema without reserving the literal string "UNSET". Includes usage documentation and regressions for wire states, cancellation, aliases, inheritance, constraints, copy/pickle behavior, and mutation before request validation.

Validation: Ruff formatting/lint, mypy, all 221 tests (91.94% coverage), wheel/sdist build, and Twine metadata checks passed.

Related to outfoxx/sunday-generator#239.

Introduce SundayPatchModel, UNSET, UnsetType, and is_unset so omitted and cancelled updates remain distinct from supplied values and deletion. Preserve native Pydantic aliases, constraints, request revalidation, and wire schemas. Add runtime regression coverage and usage documentation.
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds typed partial-update model support to the library.

The PR appears safe to merge; no actionable issue was established.

Summary

The PR adds typed unchanged states for partial-update models, exports the new model and sentinel APIs, and documents and tests validation, cancellation, aliases, serialization, and schema behavior.

Reviews (1) · Last reviewed commit: "Add typed unchanged states for partial-u..."

@kdubb
kdubb merged commit 3556fa0 into main Oct 2, 2026
6 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