You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(mcp): pin MO+datetime regression on typed-cache write path (#632) (#678)
#632 reported `list_manufacturing_orders` failing with `Object of type
datetime is not JSON serializable` on every page. Root cause was a
ManufacturingOrder row carrying a SerialNumber with a populated
`transaction_date` — that datetime lives inside the `serial_numbers`
PydanticJSON column on CachedManufacturingOrder, and SQLAlchemy's stock
`json.dumps` rejected it.
The underlying fix already landed in 1174c34
("fix(client): PydanticJSON serializes nested datetimes in plain
dicts/lists") for the parent #659 cluster, which routes JSON-column
values through `pydantic_core.to_jsonable_python` and so handles
nested datetimes uniformly. The CachedSupplier case already had
regression coverage; this commit adds the parallel MO case so the fix
can't silently regress only for MO-shape rows.
The new test mirrors the production path exactly:
1. PydanticManufacturingOrder with a SerialNumber.transaction_date
2. `_convert`-style model_dump → CachedManufacturingOrder.model_validate
3. `_bulk_upsert`-style row.model_dump(include=column_names)
4. `sqlite_insert(...).values(values)` + read-back
Closes#632.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments