Let a legacy-era tools/call answer with a CreateTaskResult - #3161
Open
maxisbey wants to merge 1 commit into
Open
Let a legacy-era tools/call answer with a CreateTaskResult#3161maxisbey wants to merge 1 commit into
maxisbey wants to merge 1 commit into
Claude / Claude Code Review
completed
Jul 29, 2026 in 31m 49s
Code review found 1 important issue
Found 1 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/mcp-types/mcp_types/_wire_base.py:53-72 |
KeepRequiredNullable restores fields removed by exclude_unset, not exclude_none |
Annotations
Check warning on line 72 in src/mcp-types/mcp_types/_wire_base.py
claude / Claude Code Review
KeepRequiredNullable restores fields removed by exclude_unset, not exclude_none
`KeepRequiredNullable` restores fields that `exclude_unset` (not `exclude_none`) removed: a required-nullable field never set at all (via `model_construct`) is fabricated back as `null` when a caller combines `exclude_unset=True` with `exclude_none=True` — e.g. `JSONRPCError` gains `"id": null` (a semantically loaded JSON-RPC value) and `Task` gains `"ttl": null` in partial dumps, violating the base's own documented contract that a field never set stays absent. Fix by skipping restoration when `
Loading