Repository navigation
Conversation
AI-assisted implementation and independent AI review. Temporary own-fork review branch, part 1 of 4; not submitted as an upstream contribution. This commit alone is incomplete. Preserve None only when requested for input normalization. The complete four-file change was tested: 143 focused tests passed; independent InMemoryRunner matrix verified 11 expected behaviors. Broader related run: 1218 passed, 1 skipped, 5 xfailed, 9 setup errors from missing mocker; an A2A-dependent module was excluded. Formatting checks, full pre-commit, tox/Python-version matrix, complete suite, and clean-wheel E2E remain unverified.
AI-assisted implementation and independent AI review. Temporary own-fork review branch, part 2 of 4; not submitted as an upstream contribution. Regression test files follow. The complete four-file change passed 143 focused tests and an independent 11-behavior InMemoryRunner matrix. Full formatter/pre-commit checks, complete repository suite, tox/Python-version matrix, and clean-wheel E2E remain unverified.
AI-assisted implementation and independent AI review. Temporary own-fork review branch, part 3 of 4; not submitted as an upstream contribution. Workflow regression test file follows. The complete four-file change passed 143 focused tests and an independent 11-behavior InMemoryRunner matrix. Full formatter/pre-commit checks, complete repository suite, tox/Python-version matrix, and clean-wheel E2E remain unverified.
Input normalization currently omits validated BaseModel fields whose value is None. Re-validating that normalized input can reject a required nullable field or replace an explicit None with a non-None default. Preserve None only for input normalization and retain the existing output-schema omission behavior. Add regression coverage for message and dictionary inputs, nullable defaults, nested models, and missing required nullable fields. AI-assisted implementation and independent AI review. Temporary review branch; formatting checks are incomplete. Not submitted as an upstream contribution. This completes the four reviewed files. Verification on Python 3.12.14: - Pristine-baseline new Workflow cases: 4 failed, 3 passed. - Patched focused tests: 143 passed. - Independent public InMemoryRunner matrix: 11 expected behaviors verified. - git diff --check, compileall, and repository compliance checks passed. - Broader related run: 1218 passed, 1 skipped, 5 xfailed, 9 setup errors from a missing mocker fixture; an A2A-dependent module was excluded. Limits: full pre-commit/formatter checks, tox/Python-version matrix, complete repository suite, and clean-wheel E2E remain unverified. This input-only change does not alter typed output None omission or other repeated-coercion behavior.
Apply the configured pyink formatting to the two regression test files. Their ASTs and the production implementation are unchanged. AI assistance: OpenAI Codex assisted formatting and validation.
Preserve all upstream sync-generator tests and nullable-input regressions. Related workflow/schema/runner suite: 1285 passed, 1 skipped, 5 xfailed. Four-file pre-commit framework passed without changing bytes. AI assistance was used for conflict resolution and validation.
…workflow-nullable-input-20261006
…workflow-nullable-input-20261006
…workflow-nullable-input-20261006
…workflow-nullable-input-20261006
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the bug
Workflow input normalization drops valid nullable fields by serializing Pydantic models with
exclude_none=True. A required nullable value becomes missing before the function validates its input again, and explicit null on a field with a non-null default can silently become that default, including in nested models.Preserve
Noneduring input normalization with a keyword-onlyexclude_noneoption onvalidate_node_data. Its existingTruedefault retains output validation and other callers' behavior. Regressions cover required/defaulted/nested nulls, omitted fields, message and predecessor inputs, and model/list/dictionary serialization.Reproduction
Define a model with
value: str | Noneand a workflow function acceptingnode_inputof that model type. RunWorkflow(edges=[(START, consume)])throughInMemoryRunnerwith a user message containing{"value": null}, or pass{'value': None}from a preceding node. Before the fix, this raisesField required; a non-null field default instead replaces explicit null. After the fix, explicit null reaches the function asNone, an omitted field uses its default, and an omitted required nullable field remains invalid.The seven public-workflow regressions give four failures and three control passes with the pristine base methods; all seven pass with this change. The original built-wheel replay through
InMemoryRunneralso passes all seven scenarios. No model API is involved.Current revision and verification
Current head
b80d408ba012cdcc7a786ca6e249d832c7a0a3bcnormally merges upstream main7099ce45fa7b55d708c96e1696aa03f15067756d. Relative to main, the diff is the original four-file nullable-input fix plus a five-line GKE test-fixture correction (146 insertions, 3 deletions across five files).The mocked Kubernetes API now returns a real
V1Jobwith string owner fields. This restores five GKE test scenarios that also fail on pristine main with Kubernetes 37.0.0. The production GKE implementation and dependency declarations are unchanged; no dependency downgrade or test filter is used.Full supported-version tox matrix
The original
pytest tests/unittestscommand completed ondad5ca17894ad4a0c34962326db118d24e7f0181in the repository's isolatedtoxenvironments:All use Kubernetes 37.0.0, Pydantic 2.13.5, and the optional Agent Platform / Vertex SDK pair 2.4.0 on macOS arm64. The full command is unfiltered; the two xpasses are non-strict upstream cases and all four tox exit codes are zero.
Final published-head verification
Subsequent normal upstream merges include LiteLLM parsing and the latest A2A, CLI, evaluation-rubric, Runner and cache-analyzer changes through
7099ce45. The authored PR patch, dependency declarations, lock file, tox and hook configurations remain byte-identical to the full-matrix commit.Required hosted CI (including other platform/API-version matrices), repository-wide hosted pre-commit and maintainer review remain pending. AI assistance was used for implementation and independent review/validation.