• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

deepset-ai / haystack / 22770452027
93%

Build:
DEFAULT BRANCH: main
Ran 06 Mar 2026 03:44PM UTC
Jobs 1
Files 257
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Mar 2026 03:40PM UTC coverage: 92.764% (-0.004%) from 92.768%
22770452027

push

github

web-flow
fix: replace in-place dataclass mutations with dataclasses.replace() (#10702)

* fix: replace in-place dataclass mutations with dataclasses.replace()

Resolves the in-place mutation warnings introduced by the
_warn_on_inplace_mutation guard in PR #10650.

Running `hatch run test:unit | grep "Mutating attribute"` surfaced
mutations across five components. Each is replaced with
`dataclasses.replace(instance, field=new_value)` so that dataclass
instances are never mutated after creation.

Changed files:
- components/builders/chat_prompt_builder.py: replace _content mutation
  on rendered ChatMessage copy with dataclasses.replace()
- core/pipeline/pipeline.py: replace two-field mutation on PipelineSnapshot
  (agent_snapshot + break_point) with a single dataclasses.replace() call
- components/converters/image/file_to_image.py: replace ByteStream.mime_type
  mutation with dataclasses.replace()
- components/extractors/llm_metadata_extractor.py: replace Document.content
  mutation with dataclasses.replace() (already imported `replace`)
- components/fetchers/link_content.py: replace ByteStream.mime_type
  mutations in both sync and async run() methods
- components/joiners/document_joiner.py: replace Document.score mutations in
  _score_norm, _reciprocal_rank_fusion, and _distribution_based_rank_fusion
  with non-mutating list comprehensions using dataclasses.replace()

Also updates test_document_joiner.py::test_list_with_one_empty_list to
compare by document ID rather than object identity, since the test
previously relied on the mutation side-effect to make the assertion pass.

Fixes #10659

* fix: wrap long line in chat_prompt_builder and add release notes

- Break line 272 in chat_prompt_builder.py to satisfy E501 (max 120 chars)
- Add reno release note for the dataclass mutation fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: replace all remaining in-place dataclass mutations with dataclasses.replace()

Address reviewer feedback:
- Re... (continued)

15601 of 16818 relevant lines covered (92.76%)

0.93 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
98.59
-0.04% components/rankers/hugging_face_tei.py
6
94.07
0.0% core/pipeline/pipeline.py
7
96.28
-0.01% document_stores/in_memory/document_store.py
9
90.83
0.0% components/rankers/transformers_similarity.py
9
95.63
-0.02% components/readers/extractive.py
13
86.17
0.07% components/fetchers/link_content.py
Jobs
ID Job ID Ran Files Coverage
1 22770452027.1 06 Mar 2026 03:44PM UTC 257
92.76
GitHub Action Run
Source Files on build 22770452027
  • Tree
  • List 257
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22770452027
  • fa0281b4 on github
  • Prev Build on main (#22768237205)
  • Next Build on main (#22771562448)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc