deepset-ai / deepset-ai/haystack

Follow-Up: Schema-Based Serialization Improvements

Open
#9,539 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
Python
Stars
26.6k
Forks
3.2k
Avg merge
1d 3h
Merged PRs (30d)
194

Description

Is your feature request related to a problem? Please describe.
There are a few open follow-up tasks related to the schema-based serialization utilities:

  • The functions _serialize_value_with_schema and _deserialize_value_with_schema are currently private. The plan is to make them public once they are verified to work reliably in scenarios like:
    -- Breakpoint input serialization
    -- Agent State serialization

  • The current implementation does not support lists with mixed types (e.g., [1, "a", {"x": 2}]). We should either:
    Decide explicitly that mixed-type lists are out of scope, and document that limitation
    Or, extend the implementation to handle them correctly

Describe the solution you'd like

  • Promote _serialize_with_schema and _deserialize_with_schema to public utility functions after validation in real use cases
  • Resolve the handling of mixed-type lists: either by implementing support or documenting the constraint

Reference discussion: https://github.com/deepset-ai/haystack/pull/9526#discussion_r2153806997

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the reference discussion on pull request 9526 and tracing _serialize_value_with_schema and _deserialize_value_with_schema in their current uses. Validate them against breakpoint input serialization and Agent State serialization, then decide whether mixed-type lists are supported or explicitly documented as out of scope; done means the public API and limitation are settled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.