Repository navigation
fix: isolate JSON parameter containers during validation - #1022
Closed
Gareth.Y (linjiaye929) wants to merge 1 commit into
Closed
Gareth.Y (linjiaye929) wants to merge 1 commit into
Gareth.Y (linjiaye929) wants to merge 1 commit into
Conversation
Gareth.Y (linjiaye929)
marked this pull request as ready for review
October 31, 2026 06:51
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. |
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.
Summary
Keep saved evaluation parameters and JSON-schema defaults independent of each validation result. Currently, mutating a returned default list or nested saved configuration changes later calls to
validate_parameters. Applying nested defaults also mutates caller-owned input, even when validation ultimately raises.Copy dict/list containers before applying defaults and when injecting each default. Preserve opaque leaf values rather than applying arbitrary
__deepcopy__methods; local Pydantic/model/prompt parameter validation remains unchanged. This does not change sharing of parameter values between rows within one evaluation run.Regression coverage
Pure local tests through
validate_parametersandRemoteEvalParameterscover:__deepcopy__must not run.Initial validation
Python 3.14.7, existing SDK test environment:
test_parameters.py: 4 failed, 10 passed, 10 skipped.miseis unavailable, invoked the underlyingpre-commit run --all-filescommand directly with pinned existing tools rather than claiming literalmake fixupexecution.git diff --checkpassed.The initial validation used no live service/provider calls, new dependencies, or full-core run. Full-core, provider/version/type-check matrices are not claimed as passed.
Follow-up validation (2026-10-31)
In an isolated Python 3.14.7 environment with the repository-locked Pydantic 2.14.1 and pydantic-core 2.50.1, the complete
test_parameters.pypassed all 24 tests with no skips. Pylint errors-only passed for both changed files; supplemental shared-container alias and opaque-lock checks passed. This resolves the earlier optional-Pydantic skips/import errors. The tests used the existing external-network guard; no outbound attempts were observed. The full-core suite was not retried, and provider/version matrices, including real Pydantic v1, remain untested.AI assistance
Prepared with AI assistance. Independent AI code and evidence reviews found no blocking issues in the scoped change and follow-up validation. Human review and hosted CI are still pending.
Compatibility scope: ordinary dict/list containers are isolated; opaque leaf objects remain shared, and dict/list subclasses are normalized to ordinary containers. This does not introduce general support for cyclic parameter inputs.