Repository navigation
Conversation
|
@rupak-eng is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @rupak-eng, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
|
|
Hi @rupak-eng, just a friendly reminder: this PR is still in draft because the Contributor License Agreement (CLA) hasn't been signed yet. We'd love to review your contribution! Please sign the CLA via the link in the |
|
Hi @rupak-eng, this PR is still waiting for the Contributor License Agreement (CLA) to be signed. Please note that if the CLA isn't signed within the next 4 days, this PR will be automatically closed as stale. Signing only takes a minute via the link in the |
|
@rupak-eng unless you sign the CLA we can't take this any further, if not signed in the next days, I will close it. |
|
Hi @rupak-eng, we're closing this PR because the Contributor License Agreement (CLA) wasn't signed within two weeks. Thanks a lot for your interest in contributing to Haystack! If you'd still like to see this change merged, please sign the CLA and reopen this PR — it will then automatically be marked ready for review. |
Related Issues
Proposed Changes
haystack/utils/base_serialization.py: dicts with non-string keys are nowserialized as an explicit list of key/value entries (each key keeps its own
schema) instead of through the
properties/datamappings, whose keysjson.dumpstringifies. The deserializer restores each key from its ownschema. Dicts with only string keys keep the historical
propertiesenvelope byte-identical, and snapshots written before this change still
load exactly as before.
TestNonStringKeysintest/utils/test_base_serialization.py(int/float/bool/None keys, mixedkeys, nested dicts, and a stringified collision, all through a real JSON
round-trip) and
test_resume_from_snapshot_file_preserves_int_dict_keysin
test/core/pipeline/test_breakpoint.py(the issue's end-to-end repro:run with breakpoint, save snapshot file, load, resume).
How did you test it?
carried string keys
{'1': 'a', '2': 'b'}); after the fix the same scriptreturns
{1: 'a', 2: 'b'}with int keys.test/utils/test_base_serialization.pyandtest/core/pipeline/test_breakpoint.pysuites pass (plusruff checkand
ruff format --checkon the touched files).Notes for the reviewer
_serialize_value_with_schema/_deserialize_value_with_schemahelpers are also used for Agent/State data, so the fix applies there too;
the change is additive (a new
entrieskeyword only for dicts thatpreviously could not round-trip) and does not alter string-keyed output.
_serialize_with_field_fallbackdegradedpath still drops a field it cannot serialize, as before.
Checklist
fix:.ruff checkandruff format --checkon the touched files and fixed any issue.AI assistance: this change was implemented with the help of an AI coding assistant; the bug was reproduced before the fix, and the tests and checks above were run as described.