Commit Graph
2 Commits
Author SHA1 Message Date
Lisandro Navarra c041bf55e0 fix(checkpoint-postgres,checkpoint-sqlite): normalize Mapping values to dict before JSON serialization
The widened Mapping[str, Any] type on Store.put()/aput() let non-dict
Mappings (e.g. UserDict, MappingProxyType) pass type-checking, but
checkpoint-sqlite and checkpoint-postgres only had a type-checker-only
cast(dict, op.value) rather than an actual runtime conversion, so these
values would raise TypeError from orjson/json during serialization.
InMemoryStore already normalized via dict(op.value); apply the same
normalization here.

Caught by open-swe's automated review on this PR.
2026-08-13 22:07:06 -05:00
Lisandro Navarra d2882aba3c fix(checkpoint): widen Store put/aput value type to Mapping[str, Any]
TypedDict values don't structurally satisfy dict[str, Any] since dict
implies full mutability. Mapping[str, Any] accepts both plain dicts and
TypedDicts while still requiring string keys, matching what put()
actually needs from callers.
2026-08-13 14:23:23 -05:00