Backtestspydanticrun-20260930-183947#13687
populate_by_name (and implicit validate_by_name when validate_by_alias=False) is ignored by @validate_call
Better
Our patch was judged better than the merged fix.
In this judgment, Patch B = our agent, Patch A = the merged fix.
Both patches fix the root cause the issue identifies: the raw `validate_by_name` config value was being embedded into the arguments and arguments-v3 schemas.
Patch A reads the value from `core_config()`, which already applies the `populate_by_name` mapping and the implicit `validate_by_alias=False` → `validate_by_name=True` rule. This keeps one source of truth, which is good craft.
Patch B adds an `effective_validate_by_name` property that repeats the precedence logic from `core_config()`. The two copies could drift apart later, but the logic currently matches, including explicit `validate_by_name` overriding `populate_by_name`. B also applies the property to model and dataclass signature generation. That is an adjacent fix of the same bug class, low risk and covered by its own tests, so it is neutral.
On correctness, both handle the two scenarios in the issue: `populate_by_name=True`, and `validate_by_alias=False` making the parameter impossible to provide.
The tests differ clearly:
- **Patch A** only tests `populate_by_name=True`, via `validate_call` and an arguments-v3 schema. It never exercises the "worse variant" (`validate_by_alias=False`) that the issue calls out. It also makes unrelated style edits (`dict(...)` → `{...}`) to existing tests.
- **Patch B** parametrizes over both configs and both schema types (arguments and arguments-v3). It checks that the alias is rejected when `validate_by_alias=False`, and tests the precedence between explicit `validate_by_name` and `populate_by_name` in both directions. It also covers the signature change.
B's tests would fail before the fix and pass after for every scenario in the issue, while A's miss one. That outweighs A's slightly cleaner single-source implementation, so B is the better patch.
The judge saw only the two patches, labelled A and B in random order, with issue links and version numbers removed. The reasoning above is shown verbatim.
Solve
9m 39s
Wall-clock time in the container
Full test suite
No new failures
12,401 passed · 500 skipped · 12,901 total
Contamination audit
Clean
No sign the agent saw the real fix
Patch size
102vs 39 merged
Changed lines, ours vs merged