Public report of deepset-ai/haystack, published 16 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 16 November 2026, 14:26 UTC · Survey ID cd_28517cd044bf4df8889675f592e53f64
deepset-ai/haystack
Measured 16 November 2026, 14:25 UTC, at code version 3bcaec8
CAI scoreStrong
CriticalWeakAdequateStrongExemplary
Up 4.6 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 51,304 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.2 person-years · Weakest lens: Accessibility, 59.7
Findings by how serious they are
30 critical470 serious44 minor
14 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 14:25 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
58of 58 dimensions measured by tools.
535of 544 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
58dimensions across 7 lenses, read from 51,304 lines of product code in 1 project.
deepset-ai/haystack meets our standard for production, though it has controls that only work with a mouse. It scores 71.3 out of 100 and is rated Strong, and 28 of its 30 critical findings are security problems.
Accessibility, at 59.7, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 9.3 points. Fixing focus, motion and contrast comes next, worth about 5.9 points. Raising Accessibility to 70 would lift the score to about 76.0.
Nineteen pipeline steps install packages that can change without warning. Two controls can't be used without a mouse, and one automatic update takes new releases before a bad one can be spotted. Making the controls work with a keyboard, pinning what the pipeline installs and setting a waiting period for automatic updates would close these risks. Correcting the flagged pipeline settings would fix the six weaknesses in the build pipeline's configuration, and fixing the weaknesses the scanner points to would deal with the security weakness in the code.
The product code is 51,304 lines, about €180,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Accessibility rose from 59.7 to 70, the lowest score rated Strong, the score would rise from 71.3 to about 76.0.
Code composition: what the lines of code are
Product code 39%Tests 61%
New since the last survey: 190 findings
These 190 critical or serious findings weren't in the previous survey, on 4 November 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Edited copy of a member (72 corresponding lines) haystack/components/query/query_expander.py
Code Duplication · Edited copy of a member (68 corresponding lines) haystack/components/evaluators/llm_evaluator.py
Code Duplication · Edited copy of a member (61 corresponding lines) haystack/components/retrievers/auto_merging_retriever.py
Code Duplication · Edited copy of a member (81 corresponding lines) haystack/components/agents/tool_calling.py
Code Duplication · Edited copy of a member (38 corresponding lines) haystack/components/embedders/openai_document_embedder.py
Code Duplication · Edited copy of a member (81 corresponding lines) haystack/components/agents/agent.py
Code Duplication · Edited copies of one member (3 members, 49+ corresponding lines) haystack/document_stores/in_memory/document_store.py
Code Duplication · Edited copy of a member (67 corresponding lines) haystack/components/rankers/llm_ranker.py
Code Duplication · Edited copy of a member (58 corresponding lines) haystack/hooks/human_in_the_loop/strategies.py
Code Duplication · Edited copy of a member (61 corresponding lines) haystack/core/pipeline/pipeline.py
Code Duplication · Edited copy of a member (47 corresponding lines) haystack/components/generators/chat/azure_responses.py
Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (49 corresponding lines) haystack/components/converters/docx.py
Code Duplication · Edited copy of a member (43 corresponding lines) haystack/components/routers/llm_messages_router.py
Code Duplication · Edited copy of a member (48 corresponding lines) haystack/components/generators/chat/fallback.py
Code Duplication · Edited copy of a member (53 corresponding lines) haystack/components/evaluators/document_map.py
Code Duplication · Edited copy of a member (48 corresponding lines) haystack/components/extractors/image/llm_document_content_extractor.py
Code Duplication · Edited copy of a member (41 corresponding lines) haystack/components/converters/pptx.py
Code Duplication · Edited copy of a member (70 corresponding lines) haystack/utils/requests_utils.py
Code Duplication · Edited copies of one member (3 members, 64+ corresponding lines) haystack/components/generators/chat/openai.py
Code Duplication · Edited copy of a member (37 corresponding lines) haystack/components/converters/json.py
Code Duplication · Edited copy of a member (51 corresponding lines) haystack/core/pipeline/pipeline.py
Code Duplication · Edited copy of a member (32 corresponding lines) haystack/components/extractors/image/llm_document_content_extractor.py
Code Duplication · Edited copy of a member (30 corresponding lines) haystack/components/agents/tool_calling.py
Code Duplication · Edited copy of a member (35 corresponding lines) haystack/hooks/compaction/summarization.py
Code Duplication · Edited copy of a member (24 corresponding lines) haystack/components/classifiers/openai_decisions_document_classifier.py
Code Duplication · Edited copy of a member (17 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (33 corresponding lines) haystack/components/extractors/image/llm_document_content_extractor.py
Code Duplication · Edited copy of a member (27 corresponding lines) haystack/components/generators/chat/azure_responses.py
Code Duplication · Edited copy of a member (19 corresponding lines) haystack/components/extractors/llm_metadata_extractor.py
Code Duplication · Edited copy of a member (31 corresponding lines) haystack/components/embedders/openai_document_embedder.py
Code Duplication · Edited copy of a member (24 corresponding lines) haystack/hooks/compaction/hooks.py
Code Duplication · Edited copy of a member (37 corresponding lines) haystack/components/joiners/answer_joiner.py
Code Duplication · Edited copy of a member (29 corresponding lines) haystack/components/generators/openai_image_generator.py
Code Duplication · Edited copy of a member (37 corresponding lines) haystack/components/preprocessors/embedding_based_document_splitter.py
Code Duplication · Edited copy of a member (25 corresponding lines) haystack/hooks/human_in_the_loop/user_interfaces.py
Code Duplication · Edited copy of a member (26 corresponding lines) haystack/components/embedders/azure_document_embedder.py
Code Duplication · Edited copy of a member (17 corresponding lines) haystack/components/joiners/document_joiner.py
Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (52 corresponding lines) haystack/components/evaluators/context_relevance.py
Code Duplication · Edited copy of a member (27 corresponding lines) haystack/logging.py
Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) haystack/dataclasses/byte_stream.py
Code Duplication · Edited copy of a member (30 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (51 corresponding lines) haystack/document_stores/types/filter_policy.py
Code Duplication · Edited copy of a member (12 corresponding lines) haystack/hooks/human_in_the_loop/hooks.py
Code Duplication · Edited copy of a member (33 corresponding lines) haystack/components/preprocessors/embedding_based_document_splitter.py
Code Duplication · Edited copy of a member (21 corresponding lines) haystack/hooks/backup_answer/hooks.py
Code Duplication · Edited copy of a member (8 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (21 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (12 corresponding lines) haystack/components/routers/openai_decisions_image_router.py
Code Duplication · Edited copies of one member (4 members, 29+ corresponding lines) haystack/components/retrievers/in_memory/bm25_retriever.py
Code Duplication · Edited copy of a member (31 corresponding lines) haystack/components/generators/chat/mock.py
Code Duplication · Edited copy of a member (19 corresponding lines) haystack/components/retrievers/text_embedding_retriever.py
Code Duplication · Edited copy of a member (12 corresponding lines) haystack/components/generators/chat/azure.py
Code Duplication · Edited copy of a member (16 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (20 corresponding lines) haystack/utils/type_serialization.py
Code Duplication · Edited copy of a member (10 corresponding lines) haystack/components/generators/chat/openai.py
Code Duplication · Edited copy of a member (18 corresponding lines) haystack/core/super_component/super_component.py
Code Duplication · Edited copy of a member (19 corresponding lines) haystack/dataclasses/file_content.py
Code Duplication · Edited copy of a member (19 corresponding lines) haystack/testing/document_store_async.py
Code Duplication · Edited copy of a member (9 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (13 corresponding lines) haystack/core/pipeline/base.py
Code Duplication · Edited copy of a member (21 corresponding lines) haystack/components/caching/cache_checker.py
Code Duplication · Edited copy of a member (30 corresponding lines) haystack/components/retrievers/sentence_window_retriever.py
Code Duplication · Edited copy of a member (36 corresponding lines) haystack/hooks/human_in_the_loop/strategies.py
Code Duplication · Edited copy of a member (19 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (18 corresponding lines) haystack/components/converters/docx.py
Code Duplication · Edited copy of a member (22 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (6 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (9 corresponding lines) haystack/components/embedders/openai_document_embedder.py
Code Duplication · Edited copy of a member (10 corresponding lines) haystack/components/generators/chat/openai_responses.py
Code Duplication · Edited copy of a member (17 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (16 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (17 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copies of one member (5 members, 6+ corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (33 corresponding lines) haystack/components/retrievers/in_memory/embedding_retriever.py
Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) haystack/components/routers/openai_decisions_image_router.py
Code Duplication · Edited copy of a member (19 corresponding lines) haystack/document_stores/in_memory/document_store.py
Code Duplication · Edited copy of a member (15 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (15 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) haystack/components/converters/pypdf.py
Code Duplication · Edited copy of a member (4 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (14 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (15 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copy of a member (15 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) haystack/components/embedders/openai_text_embedder.py
Code Duplication · Edited copy of a member (15 corresponding lines) haystack/hooks/human_in_the_loop/strategies.py
Code Duplication · Edited copy of a member (17 corresponding lines) haystack/hooks/compaction/tool_result_offloading.py
Code Duplication · Edited copy of a member (21 corresponding lines) haystack/testing/document_store.py
Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) haystack/components/generators/chat/openai.py
Code Duplication · Edited copy of a member (14 corresponding lines) haystack/components/retrievers/in_memory/bm25_retriever.py
Code Duplication · Edited copy of a member (5 corresponding lines) haystack/hooks/compaction/summarization.py
Code Duplication · Edited copy of a member (15 corresponding lines) haystack/hooks/human_in_the_loop/strategies.py
Code Duplication · Edited copy of a member (11 corresponding lines) haystack/components/retrievers/multi_query_embedding_retriever.py
Code Duplication · Edited copies of one member (5 members, 6+ corresponding lines) haystack/components/extractors/llm_metadata_extractor.py
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 14 findings
These 14 critical or serious findings were in the previous survey, on 4 November 2026, and are gone from this one.
A11y enforcement · Accessibility enforcement below the top rung docs-website/package.json
Rebuild cost: about €180,000 · Estimate
Cost to rebuild
€60,000 to €300,000, for 995 to 3,158 hours of work, about 1.2 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×1.0 at a score of 71. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 51,304 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 9.3 points · Medium effort · Keyboard semantics
2
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Files that change often carry extra risk · Combined risk
13 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (40 files) · Code Coverage (50 files under half tested) · Bus Factor (0 files written almost entirely by one person) · The files: xlsx.py, utils.py and document_store.py
What to do: Add tests to these files and have a second person review every change to them, starting with xlsx.py, utils.py and document_store.py.
Where the investment is most exposed · Value at risk
This code would cost about €180,000 to build again, about 1.2 person-years of work. Its weakest lens is Accessibility, at 59.7 (Adequate). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 9.3 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 35,161 lines over the last 90 days, which is about 142,597 lines a year. At that pace, the extra work comes to an estimated 13.8 to 82.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
250 modules, with 175 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 210 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
components.agents.agent uses components.agents.state.state, so a change to components.agents.state.state can break components.agents.agent, while a change to components.agents.agent can't break components.agents.state.state.
Position
Below the diagonal: components.agents.agent uses a module listed above it, which is the healthy direction.
components.agents.agent uses components.generators.chat.types.protocol, so a change to components.generators.chat.types.protocol can break components.agents.agent, while a change to components.agents.agent can't break components.generators.chat.types.protocol.
Position
Below the diagonal: components.agents.agent uses a module listed above it, which is the healthy direction.
components.agents.agent uses tracing.tracer, so a change to tracing.tracer can break components.agents.agent, while a change to components.agents.agent can't break tracing.tracer.
Position
Below the diagonal: components.agents.agent uses a module listed above it, which is the healthy direction.
components.extractors.image.llm_document_content_extractor uses components.generators.chat.types.protocol, so a change to components.generators.chat.types.protocol can break components.extractors.image.llm_document_content_extractor, while a change to components.extractors.image.llm_document_content_extractor can't break components.generators.chat.types.protocol.
Position
Below the diagonal: components.extractors.image.llm_document_content_extractor uses a module listed above it, which is the healthy direction.
components.extractors.image.llm_document_content_extractor uses dataclasses.chat_message, so a change to dataclasses.chat_message can break components.extractors.image.llm_document_content_extractor, while a change to components.extractors.image.llm_document_content_extractor can't break dataclasses.chat_message.
Position
Below the diagonal: components.extractors.image.llm_document_content_extractor uses a module listed above it, which is the healthy direction.
components.extractors.image.llm_document_content_extractor uses dataclasses.document, so a change to dataclasses.document can break components.extractors.image.llm_document_content_extractor, while a change to components.extractors.image.llm_document_content_extractor can't break dataclasses.document.
Position
Below the diagonal: components.extractors.image.llm_document_content_extractor uses a module listed above it, which is the healthy direction.
components.extractors.llm_metadata_extractor uses components.generators.chat.types.protocol, so a change to components.generators.chat.types.protocol can break components.extractors.llm_metadata_extractor, while a change to components.extractors.llm_metadata_extractor can't break components.generators.chat.types.protocol.
Position
Below the diagonal: components.extractors.llm_metadata_extractor uses a module listed above it, which is the healthy direction.
components.extractors.llm_metadata_extractor uses dataclasses.chat_message, so a change to dataclasses.chat_message can break components.extractors.llm_metadata_extractor, while a change to components.extractors.llm_metadata_extractor can't break dataclasses.chat_message.
Position
Below the diagonal: components.extractors.llm_metadata_extractor uses a module listed above it, which is the healthy direction.
components.extractors.llm_metadata_extractor uses dataclasses.document, so a change to dataclasses.document can break components.extractors.llm_metadata_extractor, while a change to components.extractors.llm_metadata_extractor can't break dataclasses.document.
Position
Below the diagonal: components.extractors.llm_metadata_extractor uses a module listed above it, which is the healthy direction.
core.pipeline.base uses core.component.component, so a change to core.component.component can break core.pipeline.base, while a change to core.pipeline.base can't break core.component.component.
Position
Below the diagonal: core.pipeline.base uses a module listed above it, which is the healthy direction.
dataclasses.streaming_chunk uses core.component.component, so a change to core.component.component can break dataclasses.streaming_chunk, while a change to dataclasses.streaming_chunk can't break core.component.component.
Position
Below the diagonal: dataclasses.streaming_chunk uses a module listed above it, which is the healthy direction.
document_stores.in_memory.document_store uses document_stores.types.policy, so a change to document_stores.types.policy can break document_stores.in_memory.document_store, while a change to document_stores.in_memory.document_store can't break document_stores.types.policy.
Position
Below the diagonal: document_stores.in_memory.document_store uses a module listed above it, which is the healthy direction.
document_stores.types.protocol uses document_stores.types.policy, so a change to document_stores.types.policy can break document_stores.types.protocol, while a change to document_stores.types.protocol can't break document_stores.types.policy.
Position
Below the diagonal: document_stores.types.protocol uses a module listed above it, which is the healthy direction.
hooks uses components.agents.state.state, so a change to components.agents.state.state can break hooks, while a change to hooks can't break components.agents.state.state.
Position
Below the diagonal: hooks uses a module listed above it, which is the healthy direction.
hooks uses dataclasses.chat_message, so a change to dataclasses.chat_message can break hooks, while a change to hooks can't break dataclasses.chat_message.
Position
Below the diagonal: hooks uses a module listed above it, which is the healthy direction.
hooks.backup_answer.hooks uses components.agents.state.state, so a change to components.agents.state.state can break hooks.backup_answer.hooks, while a change to hooks.backup_answer.hooks can't break components.agents.state.state.
Position
Below the diagonal: hooks.backup_answer.hooks uses a module listed above it, which is the healthy direction.
hooks.backup_answer.hooks uses components.generators.chat.types.protocol, so a change to components.generators.chat.types.protocol can break hooks.backup_answer.hooks, while a change to hooks.backup_answer.hooks can't break components.generators.chat.types.protocol.
Position
Below the diagonal: hooks.backup_answer.hooks uses a module listed above it, which is the healthy direction.
hooks.backup_answer.hooks uses dataclasses.chat_message, so a change to dataclasses.chat_message can break hooks.backup_answer.hooks, while a change to hooks.backup_answer.hooks can't break dataclasses.chat_message.
Position
Below the diagonal: hooks.backup_answer.hooks uses a module listed above it, which is the healthy direction.
hooks.compaction.types.protocol uses token_counters.types.protocol, so a change to token_counters.types.protocol can break hooks.compaction.types.protocol, while a change to hooks.compaction.types.protocol can't break token_counters.types.protocol.
Position
Below the diagonal: hooks.compaction.types.protocol uses a module listed above it, which is the healthy direction.
hooks.human_in_the_loop.types.protocol uses hooks.human_in_the_loop.dataclasses, so a change to hooks.human_in_the_loop.dataclasses can break hooks.human_in_the_loop.types.protocol, while a change to hooks.human_in_the_loop.types.protocol can't break hooks.human_in_the_loop.dataclasses.
Position
Below the diagonal: hooks.human_in_the_loop.types.protocol uses a module listed above it, which is the healthy direction.
hooks.tool_result_offloading.types.protocol uses components.agents.state.state, so a change to components.agents.state.state can break hooks.tool_result_offloading.types.protocol, while a change to hooks.tool_result_offloading.types.protocol can't break components.agents.state.state.
Position
Below the diagonal: hooks.tool_result_offloading.types.protocol uses a module listed above it, which is the healthy direction.
tools.component_tool uses core.component.component, so a change to core.component.component can break tools.component_tool, while a change to tools.component_tool can't break core.component.component.
Position
Below the diagonal: tools.component_tool uses a module listed above it, which is the healthy direction.
tools.component_tool uses tools.tool, so a change to tools.tool can break tools.component_tool, while a change to tools.component_tool can't break tools.tool.
Position
Below the diagonal: tools.component_tool uses a module listed above it, which is the healthy direction.
components.agents uses components.agents.state.state, so a change to components.agents.state.state can break components.agents, while a change to components.agents can't break components.agents.state.state.
Position
Below the diagonal: components.agents uses a module listed above it, which is the healthy direction.
components.agents uses dataclasses.chat_message, so a change to dataclasses.chat_message can break components.agents, while a change to components.agents can't break dataclasses.chat_message.
Position
Below the diagonal: components.agents uses a module listed above it, which is the healthy direction.
components.agents uses dataclasses.streaming_chunk, so a change to dataclasses.streaming_chunk can break components.agents, while a change to components.agents can't break dataclasses.streaming_chunk.
Position
Below the diagonal: components.agents uses a module listed above it, which is the healthy direction.
components.generators.chat uses dataclasses.chat_message, so a change to dataclasses.chat_message can break components.generators.chat, while a change to components.generators.chat can't break dataclasses.chat_message.
Position
Below the diagonal: components.generators.chat uses a module listed above it, which is the healthy direction.
components.generators.chat uses dataclasses.streaming_chunk, so a change to dataclasses.streaming_chunk can break components.generators.chat, while a change to components.generators.chat can't break dataclasses.streaming_chunk.
Position
Below the diagonal: components.generators.chat uses a module listed above it, which is the healthy direction.
components.generators.chat.openai uses dataclasses.chat_message, so a change to dataclasses.chat_message can break components.generators.chat.openai, while a change to components.generators.chat.openai can't break dataclasses.chat_message.
Position
Below the diagonal: components.generators.chat.openai uses a module listed above it, which is the healthy direction.
components.generators.chat.openai uses utils.auth, so a change to utils.auth can break components.generators.chat.openai, while a change to components.generators.chat.openai can't break utils.auth.
Position
Below the diagonal: components.generators.chat.openai uses a module listed above it, which is the healthy direction.
components.generators.chat.openai uses dataclasses.streaming_chunk, so a change to dataclasses.streaming_chunk can break components.generators.chat.openai, while a change to components.generators.chat.openai can't break dataclasses.streaming_chunk.
Position
Below the diagonal: components.generators.chat.openai uses a module listed above it, which is the healthy direction.
core.pipeline.pipeline uses core.pipeline.base, so a change to core.pipeline.base can break core.pipeline.pipeline, while a change to core.pipeline.pipeline can't break core.pipeline.base.
Position
Below the diagonal: core.pipeline.pipeline uses a module listed above it, which is the healthy direction.
hooks.compaction.summarization uses components.generators.chat.types.protocol, so a change to components.generators.chat.types.protocol can break hooks.compaction.summarization, while a change to hooks.compaction.summarization can't break components.generators.chat.types.protocol.
Position
Below the diagonal: hooks.compaction.summarization uses a module listed above it, which is the healthy direction.
hooks.compaction.summarization uses token_counters.types.protocol, so a change to token_counters.types.protocol can break hooks.compaction.summarization, while a change to hooks.compaction.summarization can't break token_counters.types.protocol.
Position
Below the diagonal: hooks.compaction.summarization uses a module listed above it, which is the healthy direction.
hooks.compaction.summarization uses hooks.compaction.types.protocol, so a change to hooks.compaction.types.protocol can break hooks.compaction.summarization, while a change to hooks.compaction.summarization can't break hooks.compaction.types.protocol.
Position
Below the diagonal: hooks.compaction.summarization uses a module listed above it, which is the healthy direction.
hooks.compaction.tool_result_offloading uses dataclasses.chat_message, so a change to dataclasses.chat_message can break hooks.compaction.tool_result_offloading, while a change to hooks.compaction.tool_result_offloading can't break dataclasses.chat_message.
Position
Below the diagonal: hooks.compaction.tool_result_offloading uses a module listed above it, which is the healthy direction.
hooks.compaction.tool_result_offloading uses token_counters.types.protocol, so a change to token_counters.types.protocol can break hooks.compaction.tool_result_offloading, while a change to hooks.compaction.tool_result_offloading can't break token_counters.types.protocol.
Position
Below the diagonal: hooks.compaction.tool_result_offloading uses a module listed above it, which is the healthy direction.
hooks.compaction.tool_result_offloading uses hooks.compaction.types.protocol, so a change to hooks.compaction.types.protocol can break hooks.compaction.tool_result_offloading, while a change to hooks.compaction.tool_result_offloading can't break hooks.compaction.types.protocol.
Position
Below the diagonal: hooks.compaction.tool_result_offloading uses a module listed above it, which is the healthy direction.
hooks.compaction.tool_result_offloading uses hooks.tool_result_offloading.types.protocol, so a change to hooks.tool_result_offloading.types.protocol can break hooks.compaction.tool_result_offloading, while a change to hooks.compaction.tool_result_offloading can't break hooks.tool_result_offloading.types.protocol.
Position
Below the diagonal: hooks.compaction.tool_result_offloading uses a module listed above it, which is the healthy direction.
hooks.compaction.tool_result_pruning uses dataclasses.chat_message, so a change to dataclasses.chat_message can break hooks.compaction.tool_result_pruning, while a change to hooks.compaction.tool_result_pruning can't break dataclasses.chat_message.
Position
Below the diagonal: hooks.compaction.tool_result_pruning uses a module listed above it, which is the healthy direction.
hooks.compaction.tool_result_pruning uses token_counters.types.protocol, so a change to token_counters.types.protocol can break hooks.compaction.tool_result_pruning, while a change to hooks.compaction.tool_result_pruning can't break token_counters.types.protocol.
Position
Below the diagonal: hooks.compaction.tool_result_pruning uses a module listed above it, which is the healthy direction.
hooks.compaction.tool_result_pruning uses hooks.compaction.types.protocol, so a change to hooks.compaction.types.protocol can break hooks.compaction.tool_result_pruning, while a change to hooks.compaction.tool_result_pruning can't break hooks.compaction.types.protocol.
Position
Below the diagonal: hooks.compaction.tool_result_pruning uses a module listed above it, which is the healthy direction.
hooks.human_in_the_loop uses components.agents.state.state, so a change to components.agents.state.state can break hooks.human_in_the_loop, while a change to hooks.human_in_the_loop can't break components.agents.state.state.
Position
Below the diagonal: hooks.human_in_the_loop uses a module listed above it, which is the healthy direction.
hooks.human_in_the_loop uses dataclasses.chat_message, so a change to dataclasses.chat_message can break hooks.human_in_the_loop, while a change to hooks.human_in_the_loop can't break dataclasses.chat_message.
Position
Below the diagonal: hooks.human_in_the_loop uses a module listed above it, which is the healthy direction.
hooks.human_in_the_loop uses hooks.human_in_the_loop.dataclasses, so a change to hooks.human_in_the_loop.dataclasses can break hooks.human_in_the_loop, while a change to hooks.human_in_the_loop can't break hooks.human_in_the_loop.dataclasses.
Position
Below the diagonal: hooks.human_in_the_loop uses a module listed above it, which is the healthy direction.
hooks.human_in_the_loop uses hooks.human_in_the_loop.types.protocol, so a change to hooks.human_in_the_loop.types.protocol can break hooks.human_in_the_loop, while a change to hooks.human_in_the_loop can't break hooks.human_in_the_loop.types.protocol.
Position
Below the diagonal: hooks.human_in_the_loop uses a module listed above it, which is the healthy direction.
hooks.tool_result_offloading.hooks uses components.agents.state.state, so a change to components.agents.state.state can break hooks.tool_result_offloading.hooks, while a change to hooks.tool_result_offloading.hooks can't break components.agents.state.state.
Position
Below the diagonal: hooks.tool_result_offloading.hooks uses a module listed above it, which is the healthy direction.
hooks.tool_result_offloading.hooks uses dataclasses.chat_message, so a change to dataclasses.chat_message can break hooks.tool_result_offloading.hooks, while a change to hooks.tool_result_offloading.hooks can't break dataclasses.chat_message.
Position
Below the diagonal: hooks.tool_result_offloading.hooks uses a module listed above it, which is the healthy direction.
hooks.tool_result_offloading.hooks uses hooks.tool_result_offloading.types.protocol, so a change to hooks.tool_result_offloading.types.protocol can break hooks.tool_result_offloading.hooks, while a change to hooks.tool_result_offloading.hooks can't break hooks.tool_result_offloading.types.protocol.
Position
Below the diagonal: hooks.tool_result_offloading.hooks uses a module listed above it, which is the healthy direction.
testing.document_store_async uses document_stores.types.policy, so a change to document_stores.types.policy can break testing.document_store_async, while a change to testing.document_store_async can't break document_stores.types.policy.
Position
Below the diagonal: testing.document_store_async uses a module listed above it, which is the healthy direction.
testing.document_store_async uses document_stores.types.protocol, so a change to document_stores.types.protocol can break testing.document_store_async, while a change to testing.document_store_async can't break document_stores.types.protocol.
Position
Below the diagonal: testing.document_store_async uses a module listed above it, which is the healthy direction.
tools.skills.skill_toolset uses tools.tool, so a change to tools.tool can break tools.skills.skill_toolset, while a change to tools.skills.skill_toolset can't break tools.tool.
Position
Below the diagonal: tools.skills.skill_toolset uses a module listed above it, which is the healthy direction.
tools.skills.skill_toolset uses tools.toolset, so a change to tools.toolset can break tools.skills.skill_toolset, while a change to tools.skills.skill_toolset can't break tools.toolset.
Position
Below the diagonal: tools.skills.skill_toolset uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
29
High / Critical
A03:2025 — Software Supply Chain Failures
3
Medium
A02:2025 — Security Misconfiguration
2
High / Critical
Roadmap
Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 30
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 470
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 44
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 14
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 58 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 58 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 535 of 544 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 20 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its Python distribution dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (51304 LoC, 422 module-visible types across 77 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D30 Dependency Vulnerabilities — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The scanner produced no output at all, so no dependency was actually scanned. 1 of 2 declared ecosystem(s) (npm) WERE scanned and every vulnerability they reported is included in this result; osv was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that osv is free of known-vulnerable dependencies. osv: the scanner produced no output at all, so no dependency was actually scanned. This is reported as a measurement gap rather than a clean pass. osv-scanner documents exit 128 as "no package sources found" — but this scan only invoked it because the tree declares a source it supports (`pom.xml` and the resolved lockfiles among them), so the tool's report and this repository disagree. Check that those sources are reachable from the directory the scan ran in before concluding anything is missing. If this tree really does commit only range-pinned manifests, commit the lockfile your package manager produces — but only where your ecosystem HAS one and commits it: Maven has none at all (osv-scanner reads `pom.xml` directly) and Gradle writes one only under opt-in dependency locking, while a published Composer package and a published Dart library both deliberately exclude theirs. In those three, generate one in CI before the scan instead — a resolved dependency list or an SBOM fed to the scanner.
D43 Malicious Dependencies — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The scanner produced no output at all, so no dependency was actually scanned. 1 of 2 declared ecosystem(s) (npm) WERE scanned and every vulnerability they reported is included in this result; osv was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that osv is free of known-vulnerable dependencies. osv: the scanner produced no output at all, so no dependency was actually scanned. This is reported as a measurement gap rather than a clean pass. osv-scanner documents exit 128 as "no package sources found" — but this scan only invoked it because the tree declares a source it supports (`pom.xml` and the resolved lockfiles among them), so the tool's report and this repository disagree. Check that those sources are reachable from the directory the scan ran in before concluding anything is missing. If this tree really does commit only range-pinned manifests, commit the lockfile your package manager produces — but only where your ecosystem HAS one and commits it: Maven has none at all (osv-scanner reads `pom.xml` directly) and Gradle writes one only under opt-in dependency locking, while a published Composer package and a published Dart library both deliberately exclude theirs. In those three, generate one in CI before the scan instead — a resolved dependency list or an SBOM fed to the scanner.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Java was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby, Scala or Rust was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala, Kotlin and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala, Kotlin or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala, PHP and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala, PHP or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, Kotlin source, and Rust source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 35 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with Tool.__post_init__ (cyclomatic 42), openai_responses._convert_streaming_chunks_to_chat_message (cyclomatic 34), PipelineBase.connect (cyclomatic 31). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 6.9 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 91 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 60 down to 60 or less in Cognitive Complexity — start with Tool.__post_init__ (cognitive 89). — Refactoring it lifts Cognitive Complexity from 4.2 to about 5.0/10.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.2 / 10Stronggated by 11 serious findings✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 8 FileTooLong finding(s) in God Classes — start with document_store.py (2), base.py, openai_responses.py. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 3 TooManyMethods finding(s) in God Classes — start with document_store.py (2), base.py. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D4 · Code Duplication4.8 / 10Weak✓ Tool-verified
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
93 duplicated block group(s) detected. 13.0 % of the production lines (6,694 of 51,304) are in a reported copy. A further 102 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 104 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with agent.py, llm_document_content_extractor.py, answer_joiner.py. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 7 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with docx.py (2), agent.py, document_splitter.py. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 6 Edited copy of a member (19 corresponding lines) finding(s) in Code Duplication — start with document_store.py (2), llm_metadata_extractor.py, text_embedding_retriever.py. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with super_component.py. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 67.3% — 63 file(s) below 50%. Measured from the Python suite (repository root: `coverage run -m pytest`, the 3 run(s) test reliability made). Taken over 3 runs of the suite: a line counts as covered only when every run executed it. 5 line(s) in 1 file(s) were executed in some runs and not in others, so they are not counted.
Tests reach code only in some runs: haystack/telemetry/_telemetry.pyhaystack/telemetry/_telemetry.py:70
What to do
Resolve the 63 Low coverage finding(s) in Code Coverage — start with __init__.py (12), hooks.py (4), openai_decisions_document_classifier.py. — One of this dimension's main actionable groups (63 warning-level).
Resolve the 1 Tests reach code only in some runs finding(s) in Code Coverage — start with _telemetry.py. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 44 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 20 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (24 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 2 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's Python distribution dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: haystack/components/generators/chat/openai_responses.py (19×34=646); haystack/core/pipeline/base.py (9×31=279); haystack/components/preprocessors/markdown_header_splitter.py (10×19=190) Repeated repair below the complexity floor: haystack/document_stores/in_memory/document_store.py (10 of 10 changes were fixes); haystack/components/preprocessors/recursive_splitter.py (6 of 8 changes were fixes); haystack/components/joiners/document_joiner.py (5 of 7 changes were fixes)
Resolve the 23 Repeated repair finding(s) in Churn × Complexity Hotspots — start with document_store.py, recursive_splitter.py, document_joiner.py. — One of this dimension's main actionable groups (23 warning-level).
Resolve the 17 Hotspot finding(s) in Churn × Complexity Hotspots — start with openai_responses.py, base.py, markdown_header_splitter.py. — One of this dimension's main actionable groups (17 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
10 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is haystack/core/serialization_security.py. Counted over 200 of the 300 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
2 deducted task-comment markers across 51304 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 2 TodoComment finding(s) in Explicit Debt — start with test_pipeline_base.py, test_openai_responses_conversion.py. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 6 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D27 · Navigability7.2 / 10Strong✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
77 % of calls cross a namespace and 13 % go through an interface, but 44 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
Scattered collaborators
What to do
Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
29 finding(s): 0 critical, 27 high, 2 medium, 0 low. semgrep hit a parse error in 2 file(s) — `releasenotes/notes/automerge-falsy-hierarchy-meta-9bca6c7d0bd15c3a.yaml`, `releasenotes/notes/fix-top-p-sampler-int-scores-and-zero-override-dd3b0e65d9c0603f.yaml` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 17 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 19 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (19 issue-level).
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
No known-vulnerable dependencies in the 1 ecosystem(s) that were scanned (npm). Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (npm), and the findings above are real and complete for them. osv was not scanned (osv: the scanner produced no output at all, so no dependency was actually scanned), so this is not the whole dependency surface and the result is reported at reduced confidence.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
5 of 200 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is haystack/testing/factory.py. Counted over 200 of the 300 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned file · ×5haystack/testing/factory.py:1
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 5 Change coupling finding(s) in Change Coupling — start with bm25_retriever.py, multi_query_embedding_retriever.py, context_relevance.py. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
No known-vulnerable dependencies in the 1 ecosystem(s) that were scanned (npm). Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (npm), and the findings above are real and complete for them. osv was not scanned (osv: the scanner produced no output at all, so no dependency was actually scanned), so this is not the whole dependency surface and the result is reported at reduced confidence.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 20 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
This <div> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it. — docs-website/src/components/ClickableImage/index.tsx:30
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — docs-website/src/components/ClickableImage/index.tsx:45
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.spinner` moves (`animation: spin 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — docs-website/src/theme/styles.module.css:295
`.footer-social-icon` moves (`transition: opacity 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — docs-website/src/css/custom.css:270
`.dropdownMenu` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — docs-website/src/components/CopyDropdown/styles.module.css:57
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether behaviour is captured as executable Gherkin specifications (a plus for shared understanding) — only assessed when a BDD framework is present.
Method: Filesystem scan: BDD framework presence (SpecFlow, Gherkin files) when a project references a BDD tool. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `vercel.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — docs-website/vercel.json:1
What to do
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document1.6 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`serialize_hf_model_kwargs` is public and takes `kwargs: dict[str, Any]` from its caller, and it calls itself at line 31 (`serialize_hf_model_kwargs`) with a piece of `kwargs` — and nowhere in `serialize_hf_model_kwargs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `serialize_hf_model_kwargs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — haystack/utils/hf.py:31
`deserialize_hf_model_kwargs` is public and takes `kwargs: dict[str, Any]` from its caller, and it calls itself at line 51 (`deserialize_hf_model_kwargs`) with a piece of `kwargs` — and nowhere in `deserialize_hf_model_kwargs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `deserialize_hf_model_kwargs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — haystack/utils/hf.py:51
`serialize_type` is public and takes `target: Any` from its caller, and it calls itself at line 102 (`serialize_type`) with a piece of `target` — and nowhere in `serialize_type` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `serialize_type` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — haystack/utils/type_serialization.py:102
`coerce_tag_value` is public, takes a document from its caller (line 15) and hands it to `_serializable_value`, which calls itself at line 58 (`_serializable_value`) with a piece of `value` (and at line 61, line 64, line 67) — and nowhere in `_serializable_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_serializable_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — haystack/tracing/utils.py:58
`component_to_dict` is public, takes a document from its caller (line 43) and hands it to `check_dict`, which calls itself at line 124 (`check_dict`) with a piece of `d` — and nowhere in `check_dict` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `check_dict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — haystack/core/serialization.py:124
`default_from_dict` is public and takes `data: dict[str, Any]` from its caller, and it calls itself at line 334 (`default_from_dict`) with a piece of `data` — and nowhere in `default_from_dict` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `default_from_dict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — haystack/core/serialization.py:334
`run` is public, takes a document from its caller (line 403) and hands it to `_output_matches_type`, which calls itself at line 600 (`self._output_matches_type`) with a piece of `value` (and at line 612) — and nowhere in `_output_matches_type` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_output_matches_type` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — haystack/components/routers/conditional_router.py:600
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — haystack/utils/misc.py:148
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. — haystack/components/converters/csv.py:162
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 28 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 57 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route and starts no server another machine can reach (no Flask/FastAPI/Starlette route, Django urlpatterns or class-based view, Tornado handler). Access control is therefore N/A here — a library or command-line tool is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~81811 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D12 Dependency Hygiene — Not scored — 20 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — Naming consistency does not read html yet; not measured.
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Python surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (39 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Python source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage data present for 299 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
AC4 · Keyboard semantics· Clickable role="button" that no keyboard user can reach · ×1
Clickable role="button" that no keyboard user can reach docs-website/src/components/ClickableImage/index.tsx:30— This <div> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×1
Click handler on a non-interactive <div> docs-website/src/components/ClickableImage/index.tsx:45— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Repeated repair: haystack/document_stores/in_memory/document_store.py haystack/document_stores/in_memory/document_store.py:811— haystack/document_stores/in_memory/document_store.py changed 10 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is InMemoryDocumentStore.bm25_retrieval at line 811), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: prevent mutation in InMemoryDocumentStore.update_by_filter (#13755)”; “fix: restore exact in-memory document store snapshots (#13696)”; “fix: keep in-memory BM25 statistics coherent during concurrent mutations (#13674)”; “fix: add delete_by_filter_async to InMemoryDocumentStore (#13356)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/document_stores/in_memory/document_store.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/preprocessors/recursive_splitter.py haystack/components/preprocessors/recursive_splitter.py:352— haystack/components/preprocessors/recursive_splitter.py changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is RecursiveDocumentSplitter._chunk_text at line 352), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: don't count whitespace-only pieces as words in RecursiveDocumentSplitter (#13354)”; “fix: validate split_unit in RecursiveDocumentSplitter (#13358)”; “fix: handle literal special-token strings in document splitters (#12853)”; “fix: keep init parameters when serializing RecursiveDocumentSplitter and TextCleaner (#12738)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/preprocessors/recursive_splitter.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/joiners/document_joiner.py haystack/components/joiners/document_joiner.py:274— haystack/components/joiners/document_joiner.py changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is DocumentJoiner._distribution_based_rank_fusion at line 274), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: treat a non-finite score as missing in DocumentJoiner DBSF mode (#13582)”; “fix!: pass variadic inputs in connection order in Pipeline.run() and run_async() (#13415)”; “fix: reject NaN/inf weights in DocumentJoiner (#13410)”; “fix: reject negative weights in DocumentJoiner (#12718)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/joiners/document_joiner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/preprocessors/document_splitter.py haystack/components/preprocessors/document_splitter.py:192— haystack/components/preprocessors/document_splitter.py changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is DocumentSplitter.run at line 192), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: stop sentence overlap once split_overlap words are reached (#13522)”; “fix: handle literal special-token strings in document splitters (#12853)”; “fix: skip overlap-only trailing chunks in character-based split modes (#12687)”; “fix: avoid overlap-only trailing chunks in DocumentSplitter token mode (#12661)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/preprocessors/document_splitter.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/fetchers/link_content.py haystack/components/fetchers/link_content.py:309— haystack/components/fetchers/link_content.py changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is LinkContentFetcher.run_async at line 309), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: match the LinkContentFetcher content type case-insensitively (#13433)”; “fix: stop `LinkContentFetcher` fallback from inserting a `text/plain` handler (#12908)”; “fix: do not mutate caller-provided client_kwargs in LinkContentFetcher (#12829)”; “fix: preserve client default headers in async LinkContentFetcher #12817 (#12818)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/fetchers/link_content.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/converters/docx.py haystack/components/converters/docx.py:374— haystack/components/converters/docx.py changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is DOCXToDocument._inline_content at line 374), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: read tracked insertions and inline content controls in DOCXToDocument (#13364)”; “fix: preserve URL fragments stored in w:anchor in DOCXToDocument links (#13207)”; “fix: read text boxes in DOCXToDocument (#12769)”; “fix: keep hyperlink addresses in DOCXToDocument table cells (#12988)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/converters/docx.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/retrievers/auto_merging_retriever.py haystack/components/retrievers/auto_merging_retriever.py:111— haystack/components/retrievers/auto_merging_retriever.py changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is AutoMergingRetriever._check_valid_documents at line 111), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: merge hierarchical leaves at different depths (#12944)”; “fix: deduplicate AutoMergingRetriever documents (#13511)”; “fix: run sync document store methods in a worker thread (#13381)”; “fix: accept zero hierarchy meta values in AutoMergingRetriever (#12635)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/retrievers/auto_merging_retriever.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/extractors/image/llm_document_content_extractor.py haystack/components/extractors/image/llm_document_content_extractor.py:263— haystack/components/extractors/image/llm_document_content_extractor.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is LLMDocumentContentExtractor._process_response at line 263), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: validate max_workers at init in MultiRetriever and other parallel components (#13430)”; “fix: correct LLMDocumentContentExtractor failure messages and docstring (#13175)”; “fix(extractors): don't treat a generator's own "error" field as failure in LLMDocumentContentExtractor (#12735)”; “fix: convert images off the event loop in LLMDocumentContentExtractor.run_async (#12359)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/extractors/image/llm_document_content_extractor.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/extractors/llm_metadata_extractor.py haystack/components/extractors/llm_metadata_extractor.py:271— haystack/components/extractors/llm_metadata_extractor.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is LLMMetadataExtractor._prepare_prompts at line 271), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: validate max_workers at init in MultiRetriever and other parallel components (#13430)”; “fix: don't treat a generator's own "error" field as failure in LLMMetadataExtractor (#12852)”; “fix: LLMMetadataExtractor treats an extracted 'error' key as a failure (#12685)”; “fix: clear stale metadata extraction errors after successful retries (#12533)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/extractors/llm_metadata_extractor.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/evaluators/sas_evaluator.py haystack/components/evaluators/sas_evaluator.py:145— haystack/components/evaluators/sas_evaluator.py changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is SASEvaluator.run at line 145), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: reject multi-label cross encoders in SASEvaluator (#13251)”; “fix: validate batch_size in SASEvaluator (#13503)”; “fix: pass token instead of use_auth_token in SASEvaluator.warm_up (#13217)”; “fix: normalize SASEvaluator cross encoder scores based on the model (#13244)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/evaluators/sas_evaluator.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/hooks/structured_output/hooks.py haystack/hooks/structured_output/hooks.py:177— haystack/hooks/structured_output/hooks.py changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is StructuredOutputHook._parse at line 177), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: support CRLF code fences in StructuredOutputHook (#13617)”; “fix: mark user messages added by hooks as system reminders (#13580)”; “fix: don't let system reminders reset StructuredOutputHook retries (#13501)”; “fix: replace structured output list state after validation (#13400)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/hooks/structured_output/hooks.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/retrievers/multi_retriever.py haystack/components/retrievers/multi_retriever.py:230— haystack/components/retrievers/multi_retriever.py changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is MultiRetriever.run at line 230), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: validate join_mode in MultiRetriever (#13122)”; “fix: validate max_workers at init in MultiRetriever and other parallel components (#13430)”; “fix: validate top_k in MultiRetriever (#12719)”; “fix: honour max_workers in the multi-retrievers' run_async (#12662)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/retrievers/multi_retriever.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/utils/filters.py haystack/utils/filters.py:128— haystack/utils/filters.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is filters._prepare_ordering_comparison at line 128), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: complete partial dates to start of period in range filters (#13342)”; “fix: reject datetime numeric ordering filters (#13202)”; “fix: treat dotted filter fields with unknown root as missing instead of raising AttributeError (#12744)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/utils/filters.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/preprocessors/sentence_tokenizer.py haystack/components/preprocessors/sentence_tokenizer.py:231— haystack/components/preprocessors/sentence_tokenizer.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is SentenceSplitter._needs_join at line 231), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: split sentences ending with danda (।, ॥) in DocumentSplitter (#13646)”; “fix: always close PDF in `_convert_pdf_to_images`; narrow bare except in `SentenceSplitter` (#12942)”; “fix: read abbreviation lists as UTF-8 regardless of locale (#13052)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/preprocessors/sentence_tokenizer.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/retrievers/sentence_window_retriever.py haystack/components/retrievers/sentence_window_retriever.py:121— haystack/components/retrievers/sentence_window_retriever.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is SentenceWindowRetriever.merge_documents_text at line 121), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: avoid repeated text after contained sentence chunks (#13340)”; “fix: run sync document store methods in a worker thread (#13381)”; “fix: sort SentenceWindowRetriever context before merging text (#12976)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/retrievers/sentence_window_retriever.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/converters/image/document_to_image.py haystack/components/converters/image/document_to_image.py:102— haystack/components/converters/image/document_to_image.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is DocumentToImageContent.run at line 102), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: DocumentToImageContent skips undecodable images instead of failing the whole batch (#13452)”; “fix: return None for unconvertible PDF pages in DocumentToImageContent (#12912)”; “fix: return None instead of raising for invalid documents in DocumentToImageContent (#12872)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/converters/image/document_to_image.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/tools/parameters_schema_utils.py haystack/tools/parameters_schema_utils.py:239— haystack/tools/parameters_schema_utils.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is parameters_schema_utils._resolve_type at line 239), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: resolve string field annotations of dataclasses in ComponentTool schemas (#13516)”; “fix: skip annotated callable parameters in tool schemas (#13138)”; “fix: unwrap Annotated in _unwrap_optional for State parameter detection (#13169)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/tools/parameters_schema_utils.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/converters/pptx.py haystack/components/converters/pptx.py:131— haystack/components/converters/pptx.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is PPTXToDocument._process_paragraph at line 131), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pptx): keep soft line breaks with markdown and plain link formats (#13222)”; “fix: preserve PowerPoint field text when extracting links (#13377)”; “fix: read grouped shapes and tables in PPTXToDocument (#12768)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/converters/pptx.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/preprocessors/text_cleaner.py haystack/components/preprocessors/text_cleaner.py:80— haystack/components/preprocessors/text_cleaner.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is TextCleaner.run at line 80), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: apply each TextCleaner remove_regexps pattern independently (#13293)”; “fix: raise TypeError for non-string TextCleaner inputs (#12792)”; “fix: keep init parameters when serializing RecursiveDocumentSplitter and TextCleaner (#12738)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/preprocessors/text_cleaner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/document_stores/types/filter_policy.py haystack/document_stores/types/filter_policy.py:322— haystack/document_stores/types/filter_policy.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is filter_policy.apply_filter_policy at line 322), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: warn when MERGE combines two AND filters on the same field (#13637)”; “fix: keep both filters when FilterPolicy.MERGE combines OR/NOT filters (#12816)”; “fix: avoid mutating filters during FilterPolicy.MERGE (#12501)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/document_stores/types/filter_policy.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/retrievers/multi_query_embedding_retriever.py haystack/components/retrievers/multi_query_embedding_retriever.py:102— haystack/components/retrievers/multi_query_embedding_retriever.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is MultiQueryEmbeddingRetriever.warm_up_async at line 102), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: validate max_workers at init in MultiRetriever and other parallel components (#13430)”; “fix: sort unscored retriever results last (#13090)”; “fix: honour max_workers in the multi-retrievers' run_async (#12662)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/retrievers/multi_query_embedding_retriever.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/components/retrievers/multi_query_text_retriever.py haystack/components/retrievers/multi_query_text_retriever.py:109— haystack/components/retrievers/multi_query_text_retriever.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is MultiQueryTextRetriever.run at line 109), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: validate max_workers at init in MultiRetriever and other parallel components (#13430)”; “fix: sort unscored retriever results last (#13090)”; “fix: honour max_workers in the multi-retrievers' run_async (#12662)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/retrievers/multi_query_text_retriever.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: haystack/logging.py haystack/logging.py:415— haystack/logging.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is logging.configure_logging at line 415), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: bound log values nested in lists and dicts (#13031)”; “fix: log traceback in `logger.exception()` of Haystack loggers (#13189)”; “fix: bound log field sizes to stop exceptions leaking payloads (#12849)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/logging.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/generators/chat/openai_responses.py haystack/components/generators/chat/openai_responses.py:931— haystack/components/generators/chat/openai_responses.py changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in openai_responses._convert_streaming_chunks_to_chat_message at line 931. 9 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/generators/chat/openai_responses.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/core/pipeline/base.py haystack/core/pipeline/base.py:600— haystack/core/pipeline/base.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in PipelineBase.connect at line 600. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/core/pipeline/base.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/preprocessors/markdown_header_splitter.py haystack/components/preprocessors/markdown_header_splitter.py:141— haystack/components/preprocessors/markdown_header_splitter.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in MarkdownHeaderSplitter._split_text_by_markdown_headers at line 141. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/preprocessors/markdown_header_splitter.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/dataclasses/chat_message.py haystack/dataclasses/chat_message.py:756— haystack/dataclasses/chat_message.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ChatMessage.from_openai_dict_format at line 756. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/dataclasses/chat_message.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/rankers/meta_field.py haystack/components/rankers/meta_field.py:163— haystack/components/rankers/meta_field.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in MetaFieldRanker.run at line 163. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/rankers/meta_field.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/core/type_utils.py haystack/core/type_utils.py:136— haystack/core/type_utils.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in type_utils._strict_types_are_compatible at line 136. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/core/type_utils.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/converters/xlsx.py haystack/components/converters/xlsx.py:220— haystack/components/converters/xlsx.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in XLSXToDocument._extract_tables at line 220. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/converters/xlsx.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/tools/tool.py haystack/tools/tool.py:112— haystack/tools/tool.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in Tool.__post_init__ at line 112. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/tools/tool.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/preprocessors/python_code_splitter.py haystack/components/preprocessors/python_code_splitter.py:337— haystack/components/preprocessors/python_code_splitter.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in PythonCodeSplitter._extract_units at line 337. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/preprocessors/python_code_splitter.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/core/pipeline/pipeline.py haystack/core/pipeline/pipeline.py:808— haystack/core/pipeline/pipeline.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in Pipeline.run_async_generator at line 808. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/core/pipeline/pipeline.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/validators/json_schema.py haystack/components/validators/json_schema.py:115— haystack/components/validators/json_schema.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in JsonSchemaValidator.run at line 115. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/validators/json_schema.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/tools/from_function.py haystack/tools/from_function.py:18— haystack/tools/from_function.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in from_function.create_tool_from_function at line 18. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/tools/from_function.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/preprocessors/document_cleaner.py haystack/components/preprocessors/document_cleaner.py:112— haystack/components/preprocessors/document_cleaner.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in DocumentCleaner.run at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/preprocessors/document_cleaner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/converters/json.py haystack/components/converters/json.py:188— haystack/components/converters/json.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in JSONConverter._get_content_and_meta at line 188. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/converters/json.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/generators/utils.py haystack/components/generators/utils.py:117— haystack/components/generators/utils.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in utils._convert_streaming_chunks_to_chat_message at line 117. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/generators/utils.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/builders/chat_prompt_builder.py haystack/components/builders/chat_prompt_builder.py:205— haystack/components/builders/chat_prompt_builder.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ChatPromptBuilder.run at line 205. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/builders/chat_prompt_builder.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: haystack/components/rankers/lost_in_the_middle.py haystack/components/rankers/lost_in_the_middle.py:63— haystack/components/rankers/lost_in_the_middle.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in LostInTheMiddleRanker.run at line 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:04:07 +00:00' --until='2026-11-16 14:04:07 +00:00' --full-history --no-merges -- haystack/components/rankers/lost_in_the_middle.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FileTooLong: pipeline/base.py haystack/core/pipeline/base.py— FileTooLong — 970 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 470 over it, 1.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: testing/document_store.py haystack/testing/document_store.py— FileTooLong — 830 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 330 over it, 1.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: chat/openai_responses.py haystack/components/generators/chat/openai_responses.py— FileTooLong — 679 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 179 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: in_memory/document_store.py haystack/document_stores/in_memory/document_store.py— FileTooLong — 631 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 131 over it, 1.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: agents/agent.py haystack/components/agents/agent.py— FileTooLong — 618 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 118 over it, 1.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: pipeline/pipeline.py haystack/core/pipeline/pipeline.py— FileTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 73 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: testing/document_store_async.py haystack/testing/document_store_async.py— FileTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 53 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: dataclasses/chat_message.py haystack/dataclasses/chat_message.py— FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 11 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (12 lines × 2) haystack/components/agents/agent.py:1096— haystack/components/agents/agent.py:1096-1107 | haystack/components/agents/agent.py:1166-1177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) haystack/components/extractors/image/llm_document_content_extractor.py:310— haystack/components/extractors/image/llm_document_content_extractor.py:310-321 | haystack/components/extractors/image/llm_document_content_extractor.py:346-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) haystack/components/joiners/answer_joiner.py:154— haystack/components/joiners/answer_joiner.py:154-165 | haystack/components/joiners/document_joiner.py:193-205 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) haystack/testing/document_store.py:667— haystack/testing/document_store.py:667-678 | haystack/testing/document_store.py:689-700 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) haystack/testing/document_store_async.py:98— haystack/testing/document_store_async.py:98-109 | haystack/testing/document_store_async.py:121-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) haystack/components/converters/pdfminer.py:144— haystack/components/converters/pdfminer.py:144-155 | haystack/components/converters/pypdf.py:161-172 — before extracting anything, compare `haystack/components/converters/pdfminer.py` and `haystack/components/converters/pypdf.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) haystack/components/retrievers/in_memory/bm25_retriever.py:107— haystack/components/retrievers/in_memory/bm25_retriever.py:107-118 | haystack/components/retrievers/in_memory/embedding_retriever.py:123-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) haystack/components/agents/agent.py:1126— haystack/components/agents/agent.py:1126-1134 | haystack/components/agents/agent.py:1196-1204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) haystack/components/converters/docx.py:247— haystack/components/converters/docx.py:247-255 | haystack/components/converters/html.py:148-156 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) haystack/components/preprocessors/document_splitter.py:213— haystack/components/preprocessors/document_splitter.py:213-221 | haystack/components/preprocessors/embedding_based_document_splitter.py:191-199 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/preprocessors/document_splitter.py:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) haystack/core/pipeline/base.py:1842— haystack/core/pipeline/base.py:1842-1850 | haystack/core/pipeline/base.py:1860-1870 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/core/pipeline/base.py:1842` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) haystack/components/joiners/answer_joiner.py:32— haystack/components/joiners/answer_joiner.py:32-40 | haystack/components/joiners/document_joiner.py:46-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) haystack/components/converters/docx.py:110— haystack/components/converters/docx.py:110-118 | haystack/components/converters/utils.py:27-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) haystack/testing/document_store.py:655— haystack/testing/document_store.py:655-663 | haystack/testing/document_store_async.py:54-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `document_store` to `DocumentStore` in one and `AsyncDocumentStore` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×7
Recursive walk over a caller-supplied document has no depth cap haystack/utils/hf.py:31— `serialize_hf_model_kwargs` is public and takes `kwargs: dict[str, Any]` from its caller, and it calls itself at line 31 (`serialize_hf_model_kwargs`) with a piece of `kwargs` — and nowhere in `serialize_hf_model_kwargs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `serialize_hf_model_kwargs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap haystack/utils/hf.py:51— `deserialize_hf_model_kwargs` is public and takes `kwargs: dict[str, Any]` from its caller, and it calls itself at line 51 (`deserialize_hf_model_kwargs`) with a piece of `kwargs` — and nowhere in `deserialize_hf_model_kwargs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `deserialize_hf_model_kwargs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap haystack/utils/type_serialization.py:102— `serialize_type` is public and takes `target: Any` from its caller, and it calls itself at line 102 (`serialize_type`) with a piece of `target` — and nowhere in `serialize_type` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `serialize_type` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap haystack/tracing/utils.py:58— `coerce_tag_value` is public, takes a document from its caller (line 15) and hands it to `_serializable_value`, which calls itself at line 58 (`_serializable_value`) with a piece of `value` (and at line 61, line 64, line 67) — and nowhere in `_serializable_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_serializable_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap haystack/core/serialization.py:124— `component_to_dict` is public, takes a document from its caller (line 43) and hands it to `check_dict`, which calls itself at line 124 (`check_dict`) with a piece of `d` — and nowhere in `check_dict` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `check_dict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap haystack/core/serialization.py:334— `default_from_dict` is public and takes `data: dict[str, Any]` from its caller, and it calls itself at line 334 (`default_from_dict`) with a piece of `data` — and nowhere in `default_from_dict` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `default_from_dict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap haystack/components/routers/conditional_router.py:600— `run` is public, takes a document from its caller (line 403) and hands it to `_output_matches_type`, which calls itself at line 600 (`self._output_matches_type`) with a piece of `value` (and at line 612) — and nowhere in `_output_matches_type` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_output_matches_type` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×6
Edited copy of a member (19 corresponding lines) haystack/components/extractors/llm_metadata_extractor.py:309— haystack/components/extractors/llm_metadata_extractor.py:309-327 | haystack/components/extractors/llm_metadata_extractor.py:332-350 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) haystack/components/retrievers/text_embedding_retriever.py:112— haystack/components/retrievers/text_embedding_retriever.py:112-130 | haystack/components/retrievers/text_embedding_retriever.py:136-158 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) haystack/dataclasses/file_content.py:47— haystack/dataclasses/file_content.py:47-65 | haystack/dataclasses/image_content.py:86-107 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) haystack/testing/document_store_async.py:345— haystack/testing/document_store_async.py:345-363 | haystack/testing/document_store_async.py:386-420 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) haystack/testing/document_store.py:942— haystack/testing/document_store.py:942-960 | haystack/testing/document_store_async.py:187-205 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) haystack/document_stores/in_memory/document_store.py:626— haystack/document_stores/in_memory/document_store.py:626-645 | haystack/document_stores/in_memory/document_store.py:649-667 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×6
Edited copy of a member (15 corresponding lines) haystack/testing/document_store.py:1364— haystack/testing/document_store.py:1364-1378 | haystack/testing/document_store_async.py:882-896 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) haystack/testing/document_store.py:1017— haystack/testing/document_store.py:1017-1031 | haystack/testing/document_store_async.py:266-280 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) haystack/testing/document_store.py:1313— haystack/testing/document_store.py:1313-1327 | haystack/testing/document_store_async.py:829-843 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) haystack/testing/document_store.py:1141— haystack/testing/document_store.py:1141-1155 | haystack/testing/document_store_async.py:643-657 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) haystack/hooks/human_in_the_loop/strategies.py:212— haystack/hooks/human_in_the_loop/strategies.py:212-231 | haystack/hooks/tool_result_offloading/hooks.py:203-217 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) haystack/hooks/human_in_the_loop/strategies.py:661— haystack/hooks/human_in_the_loop/strategies.py:661-675 | haystack/hooks/tool_result_offloading/hooks.py:45-59 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) haystack/components/converters/image/file_to_image.py:115— haystack/components/converters/image/file_to_image.py:115-127 | haystack/components/converters/image/pdf_to_image.py:120-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) haystack/components/routers/llm_messages_router.py:160— haystack/components/routers/llm_messages_router.py:160-172 | haystack/components/routers/llm_messages_router.py:209-221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) haystack/hooks/compaction/hooks.py:132— haystack/hooks/compaction/hooks.py:132-144 | haystack/hooks/compaction/hooks.py:158-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) haystack/components/evaluators/context_relevance.py:244— haystack/components/evaluators/context_relevance.py:244-256 | haystack/components/evaluators/faithfulness.py:253-265 — before extracting anything, compare `haystack/components/evaluators/context_relevance.py` and `haystack/components/evaluators/faithfulness.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) haystack/components/generators/chat/openai.py:254— haystack/components/generators/chat/openai.py:254-266 | haystack/components/generators/chat/openai_responses.py:264-276 — before extracting anything, compare `haystack/components/generators/chat/openai.py` and `haystack/components/generators/chat/openai_responses.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) haystack/components/generators/chat/openai.py:269— haystack/components/generators/chat/openai.py:269-281 | haystack/components/generators/chat/openai_responses.py:279-291 — before extracting anything, compare `haystack/components/generators/chat/openai.py` and `haystack/components/generators/chat/openai_responses.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Change coupling: bm25_retriever.py ↔ embedding_retriever.py haystack/components/retrievers/in_memory/bm25_retriever.py:1— `haystack/components/retrievers/in_memory/bm25_retriever.py` and `haystack/components/retrievers/in_memory/embedding_retriever.py` change together 88% of the time (14 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `b3d1fbdc` fix: validate top_k in MultiRetriever (#12719); `20d9bc4e` fix: apply FilterPolicy.MERGE correctly in in-memory retrievers (#12066); `f43b28de` docs: document type errors in docstrings (#10656) — run `git show` on any of them.
Change coupling: multi_query_embedding_retriever.py ↔ multi_query_text_retriever.py haystack/components/retrievers/multi_query_embedding_retriever.py:1— `haystack/components/retrievers/multi_query_embedding_retriever.py` and `haystack/components/retrievers/multi_query_text_retriever.py` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `bab6a0ae` fix: validate max_workers at init in MultiRetriever and other paralle…; `cd01d569` fix: honour max_workers in the multi-retrievers' run_async (#12662); `a68ed4ac` fix: cancel sibling tasks when concurrent retrieval fails (#11967) — run `git show` on any of them.
Change coupling: context_relevance.py ↔ faithfulness.py haystack/components/evaluators/context_relevance.py:1— `haystack/components/evaluators/context_relevance.py` and `haystack/components/evaluators/faithfulness.py` change together 67% of the time (14 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `e65bd61e` fix: fill in the LLMEvaluator failure summary and clarify its fallbac…; `e8f88975` fix: add missing output sockes to LLM evaluators (#12049); `95d17ca7` feat: expose evaluator row status for LLM evaluators (#11333) — run `git show` on any of them.
Change coupling: output_adapter.py ↔ conditional_router.py haystack/components/converters/output_adapter.py:1— `haystack/components/converters/output_adapter.py` and `haystack/components/routers/conditional_router.py` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `98d75dd7` fix: preserve string outputs in OutputAdapter (#12322); `cf4cadbe` fix!: require unsafe loading for serialized Jinja filters (#12415); `efcf6b89` fix: prevent RCE by hardening deserialization and Jinja sandbox (#12312) — run `git show` on any of them.
Change coupling: azure_document_embedder.py ↔ azure_text_embedder.py haystack/components/embedders/azure_document_embedder.py:1— `haystack/components/embedders/azure_document_embedder.py` and `haystack/components/embedders/azure_text_embedder.py` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `63e94e2e` chore: unpin openai (#12348); `49863778` feat: Allow OpenAI client config in `OpenAIChatGenerator` and `AzureO…; `dd6ff10d` feat: allow OpenAI client config in AzureOpenAI embedders (#9136) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×5
Edited copy of a member (17 corresponding lines) haystack/testing/document_store.py:1270— haystack/testing/document_store.py:1270-1286 | haystack/testing/document_store_async.py:783-799 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) haystack/components/joiners/document_joiner.py:222— haystack/components/joiners/document_joiner.py:222-238 | haystack/utils/misc.py:178-207 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) haystack/testing/document_store.py:1214— haystack/testing/document_store.py:1214-1230 | haystack/testing/document_store_async.py:720-738 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) haystack/testing/document_store.py:1086— haystack/testing/document_store.py:1086-1102 | haystack/testing/document_store_async.py:585-601 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) haystack/hooks/compaction/tool_result_offloading.py:107— haystack/hooks/compaction/tool_result_offloading.py:107-123 | haystack/hooks/compaction/tool_result_pruning.py:85-105 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (11 lines × 2) haystack/components/agents/agent.py:1084— haystack/components/agents/agent.py:1084-1094 | haystack/components/agents/agent.py:1152-1162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) haystack/components/extractors/llm_metadata_extractor.py:317— haystack/components/extractors/llm_metadata_extractor.py:317-327 | haystack/components/extractors/llm_metadata_extractor.py:340-350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) haystack/core/super_component/utils.py:67— haystack/core/super_component/utils.py:67-77 | haystack/core/super_component/utils.py:79-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `haystack/core/super_component/utils.py:79` calls `_is_union_type` and `haystack/core/super_component/utils.py:92` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) haystack/components/embedders/azure_document_embedder.py:174— haystack/components/embedders/azure_document_embedder.py:174-184 | haystack/components/embedders/azure_text_embedder.py:150-160 — before extracting anything, compare `haystack/components/embedders/azure_document_embedder.py` and `haystack/components/embedders/azure_text_embedder.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) haystack/components/embedders/azure_document_embedder.py:187— haystack/components/embedders/azure_document_embedder.py:187-197 | haystack/components/embedders/azure_text_embedder.py:163-173 — before extracting anything, compare `haystack/components/embedders/azure_document_embedder.py` and `haystack/components/embedders/azure_text_embedder.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) haystack/hooks/backup_answer/hooks.py:141— haystack/hooks/backup_answer/hooks.py:141-161 | haystack/hooks/backup_answer/hooks.py:164-186 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) haystack/testing/document_store.py:721— haystack/testing/document_store.py:721-741 | haystack/testing/document_store.py:761-797 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) haystack/components/caching/cache_checker.py:77— haystack/components/caching/cache_checker.py:77-97 | haystack/components/caching/cache_checker.py:101-121 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) haystack/testing/document_store.py:1054— haystack/testing/document_store.py:1054-1074 | haystack/testing/document_store_async.py:305-326 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) haystack/components/builders/chat_prompt_builder.py:298— haystack/components/builders/chat_prompt_builder.py:298-316 | haystack/components/builders/prompt_builder.py:252-270 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: `PromptBuilder` names `haystack.components.builders` in one and `haystack.components.builders.prompt_builder` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (19 lines × 2) haystack/components/extractors/image/llm_document_content_extractor.py:290— haystack/components/extractors/image/llm_document_content_extractor.py:290-308 | haystack/components/extractors/image/llm_document_content_extractor.py:326-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) haystack/core/pipeline/pipeline.py:719— haystack/core/pipeline/pipeline.py:719-737 | haystack/core/pipeline/pipeline.py:783-801 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `haystack/core/pipeline/pipeline.py:781` calls `_runner` and `haystack/core/pipeline/pipeline.py:717` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 2) haystack/hooks/compaction/summarization.py:245— haystack/hooks/compaction/summarization.py:245-263 | haystack/hooks/compaction/summarization.py:284-302 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) haystack/components/generators/chat/openai.py:488— haystack/components/generators/chat/openai.py:488-501 | haystack/components/generators/chat/openai_responses.py:520-533 — before extracting anything, compare `haystack/components/generators/chat/openai.py` and `haystack/components/generators/chat/openai_responses.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) haystack/testing/document_store.py:1347— haystack/testing/document_store.py:1347-1360 | haystack/testing/document_store_async.py:864-877 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/testing/document_store.py:1347` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) haystack/components/query/query_expander.py:218— haystack/components/query/query_expander.py:218-231 | haystack/components/query/query_expander.py:297-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) haystack/components/embedders/azure_document_embedder.py:250— haystack/components/embedders/azure_document_embedder.py:250-263 | haystack/components/embedders/azure_text_embedder.py:221-234 — before extracting anything, compare `haystack/components/embedders/azure_document_embedder.py` and `haystack/components/embedders/azure_text_embedder.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×3
Animation without a prefers-reduced-motion guard docs-website/src/theme/styles.module.css:295— `.spinner` moves (`animation: spin 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard docs-website/src/css/custom.css:270— `.footer-social-icon` moves (`transition: opacity 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard docs-website/src/components/CopyDropdown/styles.module.css:57— `.dropdownMenu` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
TooManyMethods: PipelineBase haystack/core/pipeline/base.py:86— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: InMemoryDocumentStore haystack/document_stores/in_memory/document_store.py:102— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FilterDocumentsTest haystack/testing/document_store.py:252— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×3
Edited copy of a member (37 corresponding lines) haystack/components/converters/json.py:273— haystack/components/converters/json.py:273-309 | haystack/components/converters/xlsx.py:115-163 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) haystack/components/joiners/answer_joiner.py:121— haystack/components/joiners/answer_joiner.py:121-165 | haystack/components/joiners/document_joiner.py:169-205 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) haystack/components/preprocessors/embedding_based_document_splitter.py:174— haystack/components/preprocessors/embedding_based_document_splitter.py:174-210 | haystack/components/preprocessors/embedding_based_document_splitter.py:214-251 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×3
Edited copy of a member (30 corresponding lines) haystack/components/agents/tool_calling.py:210— haystack/components/agents/tool_calling.py:210-239 | haystack/components/agents/tool_calling.py:251-280 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) haystack/testing/document_store.py:1331— haystack/testing/document_store.py:1331-1360 | haystack/testing/document_store_async.py:848-877 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) haystack/components/retrievers/sentence_window_retriever.py:179— haystack/components/retrievers/sentence_window_retriever.py:179-208 | haystack/components/retrievers/sentence_window_retriever.py:212-244 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×3
Edited copy of a member (33 corresponding lines) haystack/components/extractors/image/llm_document_content_extractor.py:389— haystack/components/extractors/image/llm_document_content_extractor.py:389-421 | haystack/components/extractors/llm_metadata_extractor.py:379-434 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) haystack/components/preprocessors/embedding_based_document_splitter.py:464— haystack/components/preprocessors/embedding_based_document_splitter.py:464-498 | haystack/components/preprocessors/embedding_based_document_splitter.py:501-533 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) haystack/components/retrievers/in_memory/embedding_retriever.py:60— haystack/components/retrievers/in_memory/embedding_retriever.py:60-96 | haystack/components/retrievers/in_memory/bm25_retriever.py:49-81 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) haystack/hooks/human_in_the_loop/hooks.py:93— haystack/hooks/human_in_the_loop/hooks.py:93-111 | haystack/hooks/human_in_the_loop/hooks.py:114-125 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) haystack/components/routers/openai_decisions_image_router.py:189— haystack/components/routers/openai_decisions_image_router.py:189-200 | haystack/components/routers/openai_decisions_text_router.py:162-183 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) haystack/components/generators/chat/azure.py:247— haystack/components/generators/chat/azure.py:247-268 | haystack/components/generators/chat/openai_responses.py:250-261 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) haystack/components/builders/chat_prompt_builder.py:188— haystack/components/builders/chat_prompt_builder.py:188-202 | haystack/components/builders/prompt_builder.py:187-201 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `PromptBuilder` names `haystack.components.builders` in one and `haystack.components.builders.prompt_builder` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 2) haystack/components/embedders/azure_document_embedder.py:124— haystack/components/embedders/azure_document_embedder.py:124-138 | haystack/components/embedders/azure_text_embedder.py:105-119 — before extracting anything, compare `haystack/components/embedders/azure_document_embedder.py` and `haystack/components/embedders/azure_text_embedder.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) haystack/utils/type_serialization.py:137— haystack/utils/type_serialization.py:137-151 | haystack/utils/type_serialization.py:168-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) haystack/components/agents/tool_calling.py:225— haystack/components/agents/tool_calling.py:225-234 | haystack/components/agents/tool_calling.py:269-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) haystack/components/evaluators/llm_evaluator.py:247— haystack/components/evaluators/llm_evaluator.py:247-256 | haystack/components/evaluators/llm_evaluator.py:321-330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) haystack/utils/auth.py:26— haystack/utils/auth.py:26-35 | haystack/utils/device.py:39-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) haystack/components/classifiers/openai_decisions_document_classifier.py:254— haystack/components/classifiers/openai_decisions_document_classifier.py:254-259 | haystack/components/classifiers/openai_decisions_document_classifier.py:285-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) haystack/hooks/backup_answer/hooks.py:120— haystack/hooks/backup_answer/hooks.py:120-125 | haystack/hooks/compaction/summarization.py:474-479 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) haystack/hooks/backup_answer/hooks.py:133— haystack/hooks/backup_answer/hooks.py:133-138 | haystack/hooks/compaction/summarization.py:487-492 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 3) haystack/components/embedders/openai_document_embedder.py:146— haystack/components/embedders/openai_document_embedder.py:146-156 | haystack/components/embedders/openai_text_embedder.py:117-127 | haystack/components/generators/openai_image_generator.py:104-114 — before extracting anything, compare `haystack/components/embedders/openai_document_embedder.py` and `haystack/components/embedders/openai_text_embedder.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) haystack/components/embedders/openai_document_embedder.py:159— haystack/components/embedders/openai_document_embedder.py:159-169 | haystack/components/embedders/openai_text_embedder.py:130-140 | haystack/components/generators/openai_image_generator.py:117-127 — before extracting anything, compare `haystack/components/embedders/openai_document_embedder.py` and `haystack/components/embedders/openai_text_embedder.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) haystack/components/evaluators/context_relevance.py:260— haystack/components/evaluators/context_relevance.py:260-270 | haystack/components/evaluators/faithfulness.py:269-279 | haystack/components/routers/llm_messages_router.py:240-251 — before extracting anything, compare `haystack/components/evaluators/context_relevance.py` and `haystack/components/evaluators/faithfulness.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
TodoComment test/core/pipeline/test_pipeline_base.py:1859— # TODO: Remove this, this should be a component test. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment test/components/generators/chat/test_openai_responses_conversion.py:1446— # TODO Unneeded streaming chunk — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) haystack/components/evaluators/document_map.py:63— haystack/components/evaluators/document_map.py:63-82 | haystack/components/evaluators/document_mrr.py:61-80 | haystack/components/evaluators/document_ndcg.py:54-73 | haystack/components/evaluators/document_recall.py:96-115 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) haystack/testing/document_store.py:312— haystack/testing/document_store.py:312-325 | haystack/testing/document_store.py:357-370 | haystack/testing/document_store.py:402-415 | haystack/testing/document_store.py:447-460 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (61 corresponding lines) · ×2
Edited copy of a member (61 corresponding lines) haystack/components/retrievers/auto_merging_retriever.py:134— haystack/components/retrievers/auto_merging_retriever.py:134-194 | haystack/components/retrievers/auto_merging_retriever.py:198-261 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (61 corresponding lines) haystack/core/pipeline/pipeline.py:136— haystack/core/pipeline/pipeline.py:136-197 | haystack/core/pipeline/pipeline.py:552-612 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (81 corresponding lines) · ×2
Edited copy of a member (81 corresponding lines) haystack/components/agents/tool_calling.py:548— haystack/components/agents/tool_calling.py:548-628 | haystack/components/agents/tool_calling.py:641-730 — These two members are one piece of code written twice and then edited apart: 81 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (81 corresponding lines) haystack/components/agents/agent.py:892— haystack/components/agents/agent.py:892-972 | haystack/components/agents/agent.py:984-1068 — These two members are one piece of code written twice and then edited apart: 81 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (48 corresponding lines) · ×2
Edited copy of a member (48 corresponding lines) haystack/components/generators/chat/fallback.py:159— haystack/components/generators/chat/fallback.py:159-206 | haystack/components/generators/chat/fallback.py:216-263 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (48 corresponding lines) haystack/components/extractors/image/llm_document_content_extractor.py:425— haystack/components/extractors/image/llm_document_content_extractor.py:425-472 | haystack/components/extractors/llm_metadata_extractor.py:438-499 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (51 corresponding lines) · ×2
Edited copy of a member (51 corresponding lines) haystack/core/pipeline/pipeline.py:685— haystack/core/pipeline/pipeline.py:685-739 | haystack/core/pipeline/pipeline.py:755-805 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (51 corresponding lines) haystack/document_stores/types/filter_policy.py:166— haystack/document_stores/types/filter_policy.py:166-220 | haystack/document_stores/types/filter_policy.py:228-278 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) haystack/components/classifiers/openai_decisions_document_classifier.py:236— haystack/components/classifiers/openai_decisions_document_classifier.py:236-259 | haystack/components/classifiers/openai_decisions_document_classifier.py:264-290 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) haystack/hooks/compaction/hooks.py:132— haystack/hooks/compaction/hooks.py:132-155 | haystack/hooks/compaction/hooks.py:158-181 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) haystack/components/generators/chat/azure_responses.py:253— haystack/components/generators/chat/azure_responses.py:253-283 | haystack/components/generators/chat/openai_responses.py:366-392 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) haystack/logging.py:162— haystack/logging.py:162-190 | haystack/logging.py:194-220 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) haystack/components/embedders/openai_document_embedder.py:336— haystack/components/embedders/openai_document_embedder.py:336-366 | haystack/components/embedders/openai_document_embedder.py:370-402 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) haystack/components/generators/chat/mock.py:337— haystack/components/generators/chat/mock.py:337-367 | haystack/components/generators/chat/mock.py:379-411 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 19+ corresponding lines) · ×2
Edited copies of one member (4 members, 19+ corresponding lines) haystack/testing/document_store.py:667— haystack/testing/document_store.py:667-685 | haystack/testing/document_store.py:689-711 | haystack/testing/document_store_async.py:98-116 | haystack/testing/document_store_async.py:121-143 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 19+ corresponding lines) haystack/components/routers/openai_decisions_image_router.py:203— haystack/components/routers/openai_decisions_image_router.py:203-223 | haystack/components/routers/openai_decisions_image_router.py:226-248 | haystack/components/routers/openai_decisions_text_router.py:186-204 | haystack/components/routers/openai_decisions_text_router.py:207-227 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) haystack/testing/document_store.py:625— haystack/testing/document_store.py:625-640 | haystack/testing/document_store_async.py:67-82 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) haystack/testing/document_store.py:1035— haystack/testing/document_store.py:1035-1050 | haystack/testing/document_store_async.py:285-300 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) haystack/components/generators/chat/openai.py:623— haystack/components/generators/chat/openai.py:623-632 | haystack/components/generators/chat/openai.py:637-655 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) haystack/components/generators/chat/openai_responses.py:639— haystack/components/generators/chat/openai_responses.py:639-649 | haystack/components/generators/chat/openai_responses.py:654-663 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) haystack/core/super_component/super_component.py:124— haystack/core/super_component/super_component.py:124-141 | haystack/core/super_component/super_component.py:148-167 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) haystack/components/converters/docx.py:460— haystack/components/converters/docx.py:460-478 | haystack/components/converters/pptx.py:112-129 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×2
Edited copy of a member (9 corresponding lines) haystack/testing/document_store.py:987— haystack/testing/document_store.py:987-995 | haystack/testing/document_store_async.py:234-242 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) haystack/components/embedders/openai_document_embedder.py:232— haystack/components/embedders/mock_document_embedder.py:136-144 | haystack/components/embedders/openai_document_embedder.py:232-245 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 6+ corresponding lines) · ×2
Edited copies of one member (5 members, 6+ corresponding lines) haystack/testing/document_store.py:304— haystack/testing/document_store.py:304-309 | haystack/testing/document_store.py:349-354 | haystack/testing/document_store.py:394-399 | haystack/testing/document_store.py:439-444 | haystack/testing/document_store.py:484-489 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 6+ corresponding lines) haystack/components/extractors/llm_metadata_extractor.py:212— haystack/components/extractors/llm_metadata_extractor.py:212-219 | haystack/components/generators/chat/fallback.py:96-101 | haystack/components/retrievers/multi_query_embedding_retriever.py:103-110 | haystack/components/retrievers/multi_retriever.py:202-209 | haystack/components/retrievers/text_embedding_retriever.py:81-88 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×2
Edited copy of a member (14 corresponding lines) haystack/testing/document_store.py:528— haystack/testing/document_store.py:528-541 | haystack/testing/document_store_async.py:929-942 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) haystack/components/retrievers/in_memory/bm25_retriever.py:90— haystack/components/retrievers/in_memory/bm25_retriever.py:90-103 | haystack/components/retrievers/in_memory/embedding_retriever.py:105-119 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) haystack/hooks/compaction/summarization.py:507— haystack/hooks/compaction/summarization.py:507-511 | haystack/hooks/compaction/tool_result_offloading.py:201-210 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) haystack/testing/document_store.py:66— haystack/testing/document_store.py:66-70 | haystack/testing/document_store_async.py:170-174 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×2
Edited copy of a member (11 corresponding lines) haystack/components/retrievers/multi_query_embedding_retriever.py:228— haystack/components/retrievers/multi_query_embedding_retriever.py:228-239 | haystack/components/retrievers/text_embedding_retriever.py:161-171 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) haystack/components/joiners/branch.py:114— haystack/components/joiners/branch.py:114-124 | haystack/components/routers/metadata_router.py:169-181 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (64 lines × 2) haystack/components/routers/openai_decisions_image_router.py:69— haystack/components/routers/openai_decisions_image_router.py:69-132 | haystack/components/routers/openai_decisions_text_router.py:61-124 — before extracting anything, compare `haystack/components/routers/openai_decisions_image_router.py` and `haystack/components/routers/openai_decisions_text_router.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (64 lines × 2) haystack/hooks/human_in_the_loop/types/protocol.py:17— haystack/hooks/human_in_the_loop/types/protocol.py:17-117 | haystack/hooks/tool_result_offloading/types/protocol.py:32-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/hooks/human_in_the_loop/types/protocol.py:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (31 lines × 2) haystack/components/agents/tool_calling.py:548— haystack/components/agents/tool_calling.py:548-578 | haystack/components/agents/tool_calling.py:641-671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (31 lines × 2) haystack/components/retrievers/in_memory/embedding_retriever.py:145— haystack/components/retrievers/in_memory/embedding_retriever.py:145-175 | haystack/components/retrievers/in_memory/embedding_retriever.py:196-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25 lines × 2) haystack/components/rankers/llm_ranker.py:284— haystack/components/rankers/llm_ranker.py:284-308 | haystack/components/rankers/llm_ranker.py:360-384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25 lines × 2) haystack/components/retrievers/multi_query_embedding_retriever.py:132— haystack/components/retrievers/multi_query_embedding_retriever.py:132-156 | haystack/components/retrievers/multi_query_text_retriever.py:110-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (17–18 lines × 2) haystack/components/generators/chat/azure_responses.py:267— haystack/components/generators/chat/azure_responses.py:267-283 | haystack/components/generators/chat/openai_responses.py:375-392 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `haystack/components/generators/chat/azure_responses.py:261` calls `get`, `isinstance`, `deserialize_callable` and `haystack/components/generators/chat/openai_responses.py:371` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17–18 lines × 2) haystack/components/preprocessors/python_code_splitter.py:258— haystack/components/preprocessors/python_code_splitter.py:258-274 | haystack/components/preprocessors/python_code_splitter.py:280-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) haystack/components/converters/pdfminer.py:293— haystack/components/converters/pdfminer.py:293-308 | haystack/components/converters/pypdf.py:267-282 — before extracting anything, compare `haystack/components/converters/pdfminer.py` and `haystack/components/converters/pypdf.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) haystack/components/retrievers/auto_merging_retriever.py:163— haystack/components/retrievers/auto_merging_retriever.py:163-178 | haystack/components/retrievers/auto_merging_retriever.py:230-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) haystack/components/extractors/image/llm_document_content_extractor.py:305— haystack/components/extractors/image/llm_document_content_extractor.py:305-315 | haystack/components/extractors/llm_metadata_extractor.py:312-321 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/extractors/image/llm_document_content_extractor.py:305` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `haystack/components/extractors/image/llm_document_content_extractor.py:303` calls `from_user`, `TextContent` and `haystack/components/extractors/llm_metadata_extractor.py:310` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10–11 lines × 2) haystack/components/extractors/image/llm_document_content_extractor.py:341— haystack/components/extractors/image/llm_document_content_extractor.py:341-351 | haystack/components/extractors/llm_metadata_extractor.py:335-344 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/extractors/image/llm_document_content_extractor.py:341` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `haystack/components/extractors/image/llm_document_content_extractor.py:339` calls `from_user`, `TextContent` and `haystack/components/extractors/llm_metadata_extractor.py:333` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–10 lines × 2) haystack/components/generators/openai_image_generator.py:174— haystack/components/generators/openai_image_generator.py:174-181 | haystack/components/generators/openai_image_generator.py:215-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/generators/openai_image_generator.py:215` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8–10 lines × 2) haystack/core/pipeline/base.py:654— haystack/core/pipeline/base.py:654-661 | haystack/core/pipeline/base.py:664-673 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `haystack/core/pipeline/base.py:660` calls `join`, `items` and `haystack/core/pipeline/base.py:649` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) haystack/components/agents/agent.py:966— haystack/components/agents/agent.py:966-972 | haystack/components/agents/agent.py:1062-1068 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) haystack/components/routers/openai_decisions_image_router.py:194— haystack/components/routers/openai_decisions_image_router.py:194-200 | haystack/components/routers/openai_decisions_text_router.py:177-183 — before extracting anything, compare `haystack/components/routers/openai_decisions_image_router.py` and `haystack/components/routers/openai_decisions_text_router.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 4) haystack/components/evaluators/llm_evaluator.py:124— haystack/components/evaluators/llm_evaluator.py:124-130 | haystack/components/extractors/image/llm_document_content_extractor.py:193-199 | haystack/components/rankers/llm_ranker.py:192-196 | haystack/components/routers/llm_messages_router.py:111-115 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (5 lines × 4) haystack/components/evaluators/llm_evaluator.py:140— haystack/components/evaluators/llm_evaluator.py:140-146 | haystack/components/extractors/image/llm_document_content_extractor.py:209-215 | haystack/components/rankers/llm_ranker.py:204-208 | haystack/components/routers/llm_messages_router.py:123-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Tool.__post_init__ (cyclomatic 42) haystack/tools/tool.py:112— Tool.__post_init__ has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
openai_responses._convert_streaming_chunks_to_chat_message (cyclomatic 34) haystack/components/generators/chat/openai_responses.py:931— openai_responses._convert_streaming_chunks_to_chat_message has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PipelineBase.connect (cyclomatic 31) haystack/core/pipeline/base.py:600— PipelineBase.connect has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
type_utils._strict_types_are_compatible (cyclomatic 28) haystack/core/type_utils.py:136— type_utils._strict_types_are_compatible has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
draw._validate_mermaid_params (cyclomatic 26) haystack/core/pipeline/draw.py:109— draw._validate_mermaid_params has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Pipeline.run_async_generator (cyclomatic 26) haystack/core/pipeline/pipeline.py:808— Pipeline.run_async_generator has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnswerBuilder.run (cyclomatic 24) haystack/components/builders/answer_builder.py:130— AnswerBuilder.run has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils._convert_streaming_chunks_to_chat_message (cyclomatic 24) haystack/components/generators/utils.py:117— utils._convert_streaming_chunks_to_chat_message has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XLSXToDocument._extract_tables (cyclomatic 23) haystack/components/converters/xlsx.py:220— XLSXToDocument._extract_tables has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
type_utils._get_conversion_strategy (cyclomatic 23) haystack/core/type_utils.py:229— type_utils._get_conversion_strategy has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChatMessage.from_openai_dict_format (cyclomatic 23) haystack/dataclasses/chat_message.py:756— ChatMessage.from_openai_dict_format has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
openai._convert_chat_completion_chunk_to_streaming_chunk (cyclomatic 22) haystack/components/generators/chat/openai.py:778— openai._convert_chat_completion_chunk_to_streaming_chunk has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChatMessageExtension._validate_build_chat_message (cyclomatic 22) haystack/utils/jinja2_chat_extension.py:344— ChatMessageExtension._validate_build_chat_message has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MetaFieldRanker.run (cyclomatic 21) haystack/components/rankers/meta_field.py:163— MetaFieldRanker.run has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Agent.__init__ (cyclomatic 20) haystack/components/agents/agent.py:424— Agent.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatPromptBuilder.__init__ (cyclomatic 20) haystack/components/builders/chat_prompt_builder.py:131— ChatPromptBuilder.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
openai_responses._convert_chat_message_to_responses_api_format (cyclomatic 20) haystack/components/generators/chat/openai_responses.py:1078— openai_responses._convert_chat_message_to_responses_api_format has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JsonSchemaValidator.run (cyclomatic 20) haystack/components/validators/json_schema.py:115— JsonSchemaValidator.run has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Pipeline.run (cyclomatic 20) haystack/core/pipeline/pipeline.py:200— Pipeline.run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EvaluationRunResult.comparative_detailed_report (cyclomatic 20) haystack/evaluation/eval_run_result.py:180— EvaluationRunResult.comparative_detailed_report has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
from_function.create_tool_from_function (cyclomatic 20) haystack/tools/from_function.py:18— from_function.create_tool_from_function has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hf.convert_message_to_hf_format (cyclomatic 20) haystack/utils/hf.py:54— hf.convert_message_to_hf_format has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MarkdownHeaderSplitter._split_text_by_markdown_headers (cyclomatic 19) haystack/components/preprocessors/markdown_header_splitter.py:141— MarkdownHeaderSplitter._split_text_by_markdown_headers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JSONConverter._get_content_and_meta (cyclomatic 18) haystack/components/converters/json.py:188— JSONConverter._get_content_and_meta has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PDFMinerToDocument._convert_page (cyclomatic 18) haystack/components/converters/pdfminer.py:176— PDFMinerToDocument._convert_page has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DocumentCleaner.run (cyclomatic 18) haystack/components/preprocessors/document_cleaner.py:112— DocumentCleaner.run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PythonCodeSplitter._extract_units (cyclomatic 18) haystack/components/preprocessors/python_code_splitter.py:337— PythonCodeSplitter._extract_units has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LostInTheMiddleRanker.run (cyclomatic 18) haystack/components/rankers/lost_in_the_middle.py:63— LostInTheMiddleRanker.run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
draw._to_mermaid_text (cyclomatic 18) haystack/core/pipeline/draw.py:341— draw._to_mermaid_text has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils._check_union_compatibility (cyclomatic 18) haystack/core/super_component/utils.py:63— utils._check_union_compatibility has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
strategies._apply_tool_execution_decisions (cyclomatic 18) haystack/hooks/human_in_the_loop/strategies.py:546— strategies._apply_tool_execution_decisions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
base_serialization._serialize_value_with_schema (cyclomatic 18) haystack/utils/base_serialization.py:20— base_serialization._serialize_value_with_schema has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
openai_responses._convert_response_chunk_to_streaming_chunk (cyclomatic 17) haystack/components/generators/chat/openai_responses.py:793— openai_responses._convert_response_chunk_to_streaming_chunk has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Agent._register_prompt_variables (cyclomatic 16) haystack/components/agents/agent.py:588— Agent._register_prompt_variables has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChatPromptBuilder.run (cyclomatic 16) haystack/components/builders/chat_prompt_builder.py:205— ChatPromptBuilder.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSVToDocument.run (cyclomatic 16) haystack/components/converters/csv.py:86— CSVToDocument.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ConditionalRouter.run (cyclomatic 16) haystack/components/routers/conditional_router.py:403— ConditionalRouter.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
serialization.default_from_dict (cyclomatic 16) haystack/core/serialization.py:257— serialization.default_from_dict has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ComponentTool.__init__ (cyclomatic 16) haystack/tools/component_tool.py:93— ComponentTool.__init__ has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
type_serialization.serialize_type (cyclomatic 16) haystack/utils/type_serialization.py:72— type_serialization.serialize_type has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Tool.__post_init__ (cognitive 89) haystack/tools/tool.py:112— Tool.__post_init__ has cognitive complexity 89 (threshold 15). Drivers by points: if/else 24 (63 pts), loops 5 (13 pts), boolean chains 12, error handling 1 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PDFMinerToDocument._convert_page (cognitive 60) haystack/components/converters/pdfminer.py:176— PDFMinerToDocument._convert_page has cognitive complexity 60 (threshold 15). Drivers by points: if/else 11 (41 pts), ternaries 1 (8 pts), error handling 1 (4 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
XLSXToDocument._extract_tables (cognitive 56) haystack/components/converters/xlsx.py:220— XLSXToDocument._extract_tables has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 6 (14 pts), ternaries 1 (5 pts), boolean chains 4 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openai_responses._convert_streaming_chunks_to_chat_message (cognitive 55) haystack/components/generators/chat/openai_responses.py:931— openai_responses._convert_streaming_chunks_to_chat_message has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 7 (10 pts), ternaries 3 (7 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pipeline.run_async_generator (cognitive 46) haystack/core/pipeline/pipeline.py:808— Pipeline.run_async_generator has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 7 (16 pts), boolean chains 6 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineBase.connect (cognitive 43) haystack/core/pipeline/base.py:600— PipelineBase.connect has cognitive complexity 43 (threshold 15). Drivers by points: if/else 24 (34 pts), boolean chains 4, error handling 2, ternaries 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSONConverter._get_content_and_meta (cognitive 42) haystack/components/converters/json.py:188— JSONConverter._get_content_and_meta has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 3 (8 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils._convert_streaming_chunks_to_chat_message (cognitive 42) haystack/components/generators/utils.py:117— utils._convert_streaming_chunks_to_chat_message has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 5 (7 pts), ternaries 5 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecursiveDocumentSplitter._chunk_text (cognitive 41) haystack/components/preprocessors/recursive_splitter.py:352— RecursiveDocumentSplitter._chunk_text has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (32 pts), ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatPromptBuilder.__init__ (cognitive 39) haystack/components/builders/chat_prompt_builder.py:131— ChatPromptBuilder.__init__ has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (9 pts), boolean chains 7 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PipelineBase._from_dict_impl (cognitive 38) haystack/core/pipeline/base.py:229— PipelineBase._from_dict_impl has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (24 pts), error handling 3 (11 pts), loops 2, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnswerBuilder.run (cognitive 37) haystack/components/builders/answer_builder.py:130— AnswerBuilder.run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 7 (13 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConditionalRouter.run (cognitive 35) haystack/components/routers/conditional_router.py:403— ConditionalRouter.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 3 (6 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineBase._merge_super_component_pipelines (cognitive 35) haystack/core/pipeline/base.py:1803— PipelineBase._merge_super_component_pipelines has cognitive complexity 35 (threshold 15). Drivers by points: loops 8 (21 pts), if/else 4 (14 pts) (nesting depth added 23). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ChatMessageExtension._validate_build_chat_message (cognitive 35) haystack/utils/jinja2_chat_extension.py:344— ChatMessageExtension._validate_build_chat_message has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (28 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileTypeRouter.run (cognitive 34) haystack/components/routers/file_type_router.py:149— FileTypeRouter.run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pipeline.run (cognitive 34) haystack/core/pipeline/pipeline.py:200— Pipeline.run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatPromptBuilder.run (cognitive 33) haystack/components/builders/chat_prompt_builder.py:205— ChatPromptBuilder.run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MarkdownHeaderSplitter._apply_secondary_splitting (cognitive 33) haystack/components/preprocessors/markdown_header_splitter.py:285— MarkdownHeaderSplitter._apply_secondary_splitting has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConditionalRouter._validate_routes (cognitive 32) haystack/components/routers/conditional_router.py:488— ConditionalRouter._validate_routes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (20 pts), ternaries 3 (6 pts), loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
type_utils._get_conversion_strategy (cognitive 32) haystack/core/type_utils.py:229— type_utils._get_conversion_strategy has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatMessage.from_openai_dict_format (cognitive 32) haystack/dataclasses/chat_message.py:756— ChatMessage.from_openai_dict_format has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EvaluationRunResult.comparative_detailed_report (cognitive 32) haystack/evaluation/eval_run_result.py:180— EvaluationRunResult.comparative_detailed_report has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 5 (13 pts), boolean chains 3, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocumentCleaner.run (cognitive 31) haystack/components/preprocessors/document_cleaner.py:112— DocumentCleaner.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownHeaderSplitter._split_text_by_markdown_headers (cognitive 31) haystack/components/preprocessors/markdown_header_splitter.py:141— MarkdownHeaderSplitter._split_text_by_markdown_headers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineBase._write_component_outputs (cognitive 30) haystack/core/pipeline/base.py:1670— PipelineBase._write_component_outputs has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 4 (16 pts), if/else 6 (9 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serialization.default_from_dict (cognitive 30) haystack/core/serialization.py:257— serialization.default_from_dict has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (5 pts), boolean chains 4, error handling 1 (4 pts), loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
type_utils._strict_types_are_compatible (cognitive 30) haystack/core/type_utils.py:136— type_utils._strict_types_are_compatible has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 11, ternaries 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CSVToDocument.run (cognitive 29) haystack/components/converters/csv.py:86— CSVToDocument.run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draw._validate_mermaid_params (cognitive 29) haystack/core/pipeline/draw.py:109— draw._validate_mermaid_params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 12 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
openai._convert_chat_completion_chunk_to_streaming_chunk (cognitive 28) haystack/components/generators/chat/openai.py:778— openai._convert_chat_completion_chunk_to_streaming_chunk has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 8, if/else 7, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils._check_union_compatibility (cognitive 28) haystack/core/super_component/utils.py:63— utils._check_union_compatibility has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (7 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
from_function.create_tool_from_function (cognitive 28) haystack/tools/from_function.py:18— from_function.create_tool_from_function has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (5 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnswerBuilder._extract_reference_idxs (cognitive 27) haystack/components/builders/answer_builder.py:292— AnswerBuilder._extract_reference_idxs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PyPDFToDocument._extract_links (cognitive 27) haystack/components/converters/pypdf.py:174— PyPDFToDocument._extract_links has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 1 (5 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
JsonSchemaValidator.run (cognitive 27) haystack/components/validators/json_schema.py:115— JsonSchemaValidator.run has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 8, boolean chains 5, loops 2 (4 pts), error handling 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
strategies._apply_tool_execution_decisions (cognitive 27) haystack/hooks/human_in_the_loop/strategies.py:546— strategies._apply_tool_execution_decisions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hf.convert_message_to_hf_format (cognitive 27) haystack/utils/hf.py:54— hf.convert_message_to_hf_format has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Agent._register_prompt_variables (cognitive 26) haystack/components/agents/agent.py:588— Agent._register_prompt_variables has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draw._to_mermaid_text (cognitive 26) haystack/core/pipeline/draw.py:341— draw._to_mermaid_text has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (8 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XLSXToDocument._map_hyperlinks_to_dataframe (cognitive 25) haystack/components/converters/xlsx.py:185— XLSXToDocument._map_hyperlinks_to_dataframe has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 6 (12 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openai_responses._convert_chat_message_to_responses_api_format (cognitive 25) haystack/components/generators/chat/openai_responses.py:1078— openai_responses._convert_chat_message_to_responses_api_format has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecursiveDocumentSplitter._apply_overlap (cognitive 25) haystack/components/preprocessors/recursive_splitter.py:176— RecursiveDocumentSplitter._apply_overlap has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocumentMAPEvaluator.run (cognitive 24) haystack/components/evaluators/document_map.py:95— DocumentMAPEvaluator.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openai_responses._convert_response_to_chat_message (cognitive 24) haystack/components/generators/chat/openai_responses.py:720— openai_responses._convert_response_to_chat_message has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.print_streaming_chunk (cognitive 24) haystack/components/generators/utils.py:52— utils.print_streaming_chunk has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PythonCodeSplitter._extract_units (cognitive 24) haystack/components/preprocessors/python_code_splitter.py:337— PythonCodeSplitter._extract_units has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecursiveDocumentSplitter._fall_back_to_fixed_chunking (cognitive 23) haystack/components/preprocessors/recursive_splitter.py:444— RecursiveDocumentSplitter._fall_back_to_fixed_chunking has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetaFieldRanker.run (cognitive 23) haystack/components/rankers/meta_field.py:163— MetaFieldRanker.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
serde_utils.deserialize_tools_or_toolset_inplace (cognitive 23) haystack/tools/serde_utils.py:38— serde_utils.deserialize_tools_or_toolset_inplace has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Agent.__init__ (cognitive 22) haystack/components/agents/agent.py:424— Agent.__init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, loops 2, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MSGToDocument._convert (cognitive 22) haystack/components/converters/msg.py:84— MSGToDocument._convert has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
base_serialization._serialize_value_with_schema (cognitive 22) haystack/utils/base_serialization.py:20— base_serialization._serialize_value_with_schema has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
base_serialization._deserialize_value_with_schema (cognitive 22) haystack/utils/base_serialization.py:192— base_serialization._deserialize_value_with_schema has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LostInTheMiddleRanker.run (cognitive 21) haystack/components/rankers/lost_in_the_middle.py:63— LostInTheMiddleRanker.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineBase._consume_component_inputs (cognitive 21) haystack/core/pipeline/base.py:1348— PipelineBase._consume_component_inputs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tool_calling._schedule_tool_calls (cognitive 20) haystack/components/agents/tool_calling.py:456— tool_calling._schedule_tool_calls has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PythonCodeSplitter.run (cognitive 20) haystack/components/preprocessors/python_code_splitter.py:601— PythonCodeSplitter.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecursiveDocumentSplitter._run_one (cognitive 20) haystack/components/preprocessors/recursive_splitter.py:508— RecursiveDocumentSplitter._run_one has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetaFieldGroupingRanker.run (cognitive 20) haystack/components/rankers/meta_field_grouping_ranker.py:77— MetaFieldGroupingRanker.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 1 (4 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocumentTypeRouter.run (cognitive 20) haystack/components/routers/document_type_router.py:118— DocumentTypeRouter.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
logging.configure_logging (cognitive 20) haystack/logging.py:415— logging.configure_logging has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 2, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
callable_serialization.deserialize_callable (cognitive 20) haystack/utils/callable_serialization.py:70— callable_serialization.deserialize_callable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_imports.validate_module_imports (cognitive 19) .github/utils/check_imports.py:10— check_imports.validate_module_imports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 1 (4 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocumentMRREvaluator.run (cognitive 19) haystack/components/evaluators/document_mrr.py:93— DocumentMRREvaluator.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PythonCodeSplitter._emit_class_units (cognitive 19) haystack/components/preprocessors/python_code_splitter.py:233— PythonCodeSplitter._emit_class_units has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineBase.validate_input (cognitive 19) haystack/core/pipeline/base.py:1140— PipelineBase.validate_input has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ComponentTool.__init__ (cognitive 19) haystack/tools/component_tool.py:93— ComponentTool.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tool_calling._run_tool_async (cognitive 18) haystack/components/agents/tool_calling.py:631— tool_calling._run_tool_async has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HTMLToDocument.run (cognitive 18) haystack/components/converters/html.py:88— HTMLToDocument.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
image_utils._extract_image_sources_info (cognitive 18) haystack/components/converters/image/image_utils.py:228— image_utils._extract_image_sources_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecursiveDocumentSplitter._apply_word_overlap (cognitive 18) haystack/components/preprocessors/recursive_splitter.py:279— RecursiveDocumentSplitter._apply_word_overlap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConditionalRouter._output_matches_type (cognitive 18) haystack/components/routers/conditional_router.py:574— ConditionalRouter._output_matches_type has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InMemoryDocumentStore.bm25_retrieval (cognitive 18) haystack/document_stores/in_memory/document_store.py:811— InMemoryDocumentStore.bm25_retrieval has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
from_function._remove_title_from_schema (cognitive 18) haystack/tools/from_function.py:382— from_function._remove_title_from_schema has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
type_serialization.serialize_type (cognitive 18) haystack/utils/type_serialization.py:72— type_serialization.serialize_type has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
state._validate_schema (cognitive 17) haystack/components/agents/state/state.py:57— state._validate_schema has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAIChatGenerator._prepare_api_call (cognitive 17) haystack/components/generators/chat/openai.py:539— OpenAIChatGenerator._prepare_api_call has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAIResponsesChatGenerator._prepare_api_call (cognitive 17) haystack/components/generators/chat/openai_responses.py:549— OpenAIResponsesChatGenerator._prepare_api_call has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), boolean chains 2, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownHeaderSplitter.run (cognitive 17) haystack/components/preprocessors/markdown_header_splitter.py:416— MarkdownHeaderSplitter.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConditionalRouter.__init__ (cognitive 17) haystack/components/routers/conditional_router.py:186— ConditionalRouter.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 4 (5 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JsonSchemaValidator._recursive_json_to_object (cognitive 17) haystack/components/validators/json_schema.py:237— JsonSchemaValidator._recursive_json_to_object has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineBase._prepare_component_input_data (cognitive 17) haystack/core/pipeline/base.py:1234— PipelineBase._prepare_component_input_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InMemoryDocumentStore.write_documents (cognitive 17) haystack/document_stores/in_memory/document_store.py:527— InMemoryDocumentStore.write_documents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parameters_schema_utils._get_component_param_descriptions (cognitive 17) haystack/tools/parameters_schema_utils.py:121— parameters_schema_utils._get_component_param_descriptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), error handling 1 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
misc.expand_page_range (cognitive 17) haystack/utils/misc.py:49— misc.expand_page_range has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
docs_search_sync.collect_docs_files (cognitive 16) .github/utils/docs_search_sync.py:30— docs_search_sync.collect_docs_files has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (7 pts), ternaries 1 (5 pts), if/else 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent._validate_hooks (cognitive 16) haystack/components/agents/agent.py:126— agent._validate_hooks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils._select_tools_by_name (cognitive 16) haystack/components/agents/utils.py:115— utils._select_tools_by_name has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (3 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAIDecisionsDocumentClassifier.__init__ (cognitive 16) haystack/components/classifiers/openai_decisions_document_classifier.py:85— OpenAIDecisionsDocumentClassifier.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageFileToImageContent.run (cognitive 16) haystack/components/converters/image/file_to_image.py:73— ImageFileToImageContent.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LLMEvaluator.run_async (cognitive 16) haystack/components/evaluators/llm_evaluator.py:299— LLMEvaluator.run_async has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CSVDocumentSplitter.run (cognitive 16) haystack/components/preprocessors/csv_document_splitter.py:77— CSVDocumentSplitter.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HierarchicalDocumentSplitter.build_hierarchy_from_doc (cognitive 16) haystack/components/preprocessors/hierarchical_document_splitter.py:116— HierarchicalDocumentSplitter.build_hierarchy_from_doc has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), ternaries 2 (6 pts), if/else 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_SuperComponent._resolve_input_types_from_mapping (cognitive 16) haystack/core/super_component/super_component.py:217— _SuperComponent._resolve_input_types_from_mapping has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
streaming_chunk.select_streaming_callback (cognitive 16) haystack/dataclasses/streaming_chunk.py:229— streaming_chunk.select_streaming_callback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Near-duplicate member pair (32 shared lines) haystack/components/agents/agent.py:1071— haystack/components/agents/agent.py:1071-1136 | haystack/components/agents/agent.py:1139-1206 — These two members are variants of one another: 32 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (72 corresponding lines) · ×1
Edited copy of a member (72 corresponding lines) haystack/components/query/query_expander.py:202— haystack/components/query/query_expander.py:202-273 | haystack/components/query/query_expander.py:277-352 — These two members are one piece of code written twice and then edited apart: 72 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) haystack/components/evaluators/llm_evaluator.py:229— haystack/components/evaluators/llm_evaluator.py:229-296 | haystack/components/evaluators/llm_evaluator.py:300-380 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) haystack/components/embedders/openai_document_embedder.py:250— haystack/components/embedders/openai_document_embedder.py:250-287 | haystack/components/embedders/openai_document_embedder.py:292-332 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 49+ corresponding lines) · ×1
Edited copies of one member (3 members, 49+ corresponding lines) haystack/document_stores/in_memory/document_store.py:260— haystack/document_stores/in_memory/document_store.py:260-308 | haystack/document_stores/in_memory/document_store.py:311-366 | haystack/document_stores/in_memory/document_store.py:369-420 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 49 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (67 corresponding lines) · ×1
Edited copy of a member (67 corresponding lines) haystack/components/rankers/llm_ranker.py:242— haystack/components/rankers/llm_ranker.py:242-308 | haystack/components/rankers/llm_ranker.py:314-384 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) haystack/hooks/human_in_the_loop/strategies.py:416— haystack/hooks/human_in_the_loop/strategies.py:416-473 | haystack/hooks/human_in_the_loop/strategies.py:482-543 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) haystack/components/generators/chat/azure_responses.py:194— haystack/components/generators/chat/azure_responses.py:194-249 | haystack/components/generators/chat/openai_responses.py:316-362 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) haystack/testing/document_store.py:807— haystack/testing/document_store.py:807-832 | haystack/testing/document_store.py:849-878 | haystack/testing/document_store_async.py:433-457 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) haystack/components/converters/docx.py:207— haystack/components/converters/docx.py:207-255 | haystack/components/converters/html.py:94-156 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) haystack/components/routers/llm_messages_router.py:130— haystack/components/routers/llm_messages_router.py:130-172 | haystack/components/routers/llm_messages_router.py:175-221 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) haystack/components/evaluators/document_map.py:98— haystack/components/evaluators/document_map.py:98-159 | haystack/components/evaluators/document_mrr.py:96-148 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) haystack/components/converters/pptx.py:163— haystack/components/converters/pptx.py:163-203 | haystack/components/converters/txt.py:59-101 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (70 corresponding lines) · ×1
Edited copy of a member (70 corresponding lines) haystack/utils/requests_utils.py:20— haystack/utils/requests_utils.py:20-89 | haystack/utils/requests_utils.py:95-201 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 64+ corresponding lines) · ×1
Edited copies of one member (3 members, 64+ corresponding lines) haystack/components/generators/chat/openai.py:372— haystack/components/generators/chat/openai.py:372-438 | haystack/components/generators/chat/openai.py:450-521 | haystack/components/generators/chat/openai_responses.py:404-467 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 64 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) haystack/components/extractors/image/llm_document_content_extractor.py:290— haystack/components/extractors/image/llm_document_content_extractor.py:290-321 | haystack/components/extractors/image/llm_document_content_extractor.py:326-357 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) haystack/hooks/compaction/summarization.py:245— haystack/hooks/compaction/summarization.py:245-279 | haystack/hooks/compaction/summarization.py:284-318 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) haystack/components/generators/openai_image_generator.py:153— haystack/components/generators/openai_image_generator.py:153-181 | haystack/components/generators/openai_image_generator.py:191-224 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) haystack/hooks/human_in_the_loop/user_interfaces.py:87— haystack/hooks/human_in_the_loop/user_interfaces.py:87-111 | haystack/hooks/human_in_the_loop/user_interfaces.py:184-213 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) haystack/components/embedders/azure_document_embedder.py:216— haystack/components/embedders/azure_document_embedder.py:216-246 | haystack/components/embedders/azure_text_embedder.py:192-217 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) haystack/components/evaluators/context_relevance.py:113— haystack/components/evaluators/context_relevance.py:113-164 | haystack/components/evaluators/faithfulness.py:98-153 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) haystack/dataclasses/byte_stream.py:83— haystack/dataclasses/byte_stream.py:83-92 | haystack/dataclasses/file_content.py:68-79 | haystack/dataclasses/image_content.py:110-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) haystack/testing/document_store.py:117— haystack/testing/document_store.py:117-124 | haystack/testing/document_store_async.py:508-515 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 29+ corresponding lines) · ×1
Edited copies of one member (4 members, 29+ corresponding lines) haystack/components/retrievers/in_memory/bm25_retriever.py:128— haystack/components/retrievers/in_memory/bm25_retriever.py:128-156 | haystack/components/retrievers/in_memory/bm25_retriever.py:166-196 | haystack/components/retrievers/in_memory/embedding_retriever.py:145-185 | haystack/components/retrievers/in_memory/embedding_retriever.py:196-236 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) haystack/utils/type_serialization.py:137— haystack/utils/type_serialization.py:137-156 | haystack/utils/type_serialization.py:160-187 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) haystack/core/pipeline/base.py:1067— haystack/core/pipeline/base.py:1067-1082 | haystack/core/pipeline/base.py:1097-1109 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) haystack/hooks/human_in_the_loop/strategies.py:324— haystack/hooks/human_in_the_loop/strategies.py:324-359 | haystack/hooks/human_in_the_loop/strategies.py:370-407 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) haystack/testing/document_store.py:1179— haystack/testing/document_store.py:1179-1200 | haystack/testing/document_store_async.py:684-705 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) haystack/testing/document_store.py:102— haystack/testing/document_store.py:102-107 | haystack/testing/document_store_async.py:491-496 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) haystack/components/converters/pypdf.py:39— haystack/components/converters/pypdf.py:39-47 | haystack/components/evaluators/document_recall.py:30-38 | haystack/dataclasses/chat_message.py:44-52 | haystack/document_stores/types/filter_policy.py:31-42 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) haystack/testing/document_store.py:278— haystack/testing/document_store.py:278-281 | haystack/testing/document_store_async.py:920-925 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) haystack/components/embedders/openai_text_embedder.py:165— haystack/components/embedders/openai_text_embedder.py:165-183 | haystack/components/generators/openai_image_generator.py:227-244 | haystack/token_counters/openai_counter.py:129-143 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) haystack/components/generators/chat/openai.py:347— haystack/components/embedders/mock_document_embedder.py:124-129 | haystack/components/embedders/mock_text_embedder.py:107-112 | haystack/components/generators/chat/openai.py:347-360 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 6+ corresponding lines) · ×1
Edited copies of one member (6 members, 6+ corresponding lines) haystack/components/extractors/llm_metadata_extractor.py:230— haystack/components/extractors/llm_metadata_extractor.py:230-237 | haystack/components/generators/chat/fallback.py:110-115 | haystack/components/retrievers/multi_query_embedding_retriever.py:121-128 | haystack/components/retrievers/multi_retriever.py:220-227 | haystack/components/retrievers/text_embedding_retriever.py:99-106 | haystack/hooks/compaction/hooks.py:305-310 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) haystack/testing/document_store.py:999— haystack/testing/document_store.py:999-1005 | haystack/testing/document_store_async.py:247-253 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (86–101 lines × 2) haystack/components/generators/chat/openai.py:148— haystack/components/generators/chat/openai.py:148-233 | haystack/components/generators/chat/openai_responses.py:144-244 — before extracting anything, compare `haystack/components/generators/chat/openai.py` and `haystack/components/generators/chat/openai_responses.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/generators/chat/openai.py:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `haystack/components/generators/chat/openai.py:235` calls `_check_duplicate_tool_names`, `flatten_tools_or_toolsets` and `haystack/components/generators/chat/openai_responses.py:246` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (55–92 lines × 2) haystack/utils/requests_utils.py:20— haystack/utils/requests_utils.py:20-74 | haystack/utils/requests_utils.py:95-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (52–54 lines × 2) haystack/hooks/human_in_the_loop/strategies.py:416— haystack/hooks/human_in_the_loop/strategies.py:416-467 | haystack/hooks/human_in_the_loop/strategies.py:482-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (41 lines × 2) haystack/components/query/query_expander.py:233— haystack/components/query/query_expander.py:233-273 | haystack/components/query/query_expander.py:312-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (33–37 lines × 2) haystack/components/rankers/llm_ranker.py:242— haystack/components/rankers/llm_ranker.py:242-274 | haystack/components/rankers/llm_ranker.py:314-350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (34 lines × 2) haystack/components/evaluators/llm_evaluator.py:263— haystack/components/evaluators/llm_evaluator.py:263-296 | haystack/components/evaluators/llm_evaluator.py:347-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (26–28 lines × 2) haystack/core/pipeline/pipeline.py:170— haystack/core/pipeline/pipeline.py:170-197 | haystack/core/pipeline/pipeline.py:587-612 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (27 lines × 2) haystack/components/evaluators/document_map.py:98— haystack/components/evaluators/document_map.py:98-124 | haystack/components/evaluators/document_mrr.py:96-122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24–27 lines × 2) haystack/components/generators/chat/azure_responses.py:213— haystack/components/generators/chat/azure_responses.py:213-236 | haystack/components/generators/chat/openai_responses.py:323-349 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/generators/chat/azure_responses.py:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (29 lines × 2) haystack/components/retrievers/multi_query_embedding_retriever.py:162— haystack/components/retrievers/multi_query_embedding_retriever.py:162-190 | haystack/components/retrievers/multi_query_text_retriever.py:140-168 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24 lines × 2) haystack/components/generators/chat/fallback.py:183— haystack/components/generators/chat/fallback.py:183-206 | haystack/components/generators/chat/fallback.py:240-263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21–24 lines × 2) haystack/document_stores/in_memory/document_store.py:260— haystack/document_stores/in_memory/document_store.py:260-280 | haystack/document_stores/in_memory/document_store.py:369-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23 lines × 6) haystack/components/converters/image/file_to_document.py:60— haystack/components/converters/image/file_to_document.py:60-87 | haystack/components/converters/pdfminer.py:263-287 | haystack/components/converters/pptx.py:163-186 | haystack/components/converters/pypdf.py:239-261 | haystack/components/converters/txt.py:59-82 | haystack/components/converters/xlsx.py:115-138 — before extracting anything, compare `haystack/components/converters/image/file_to_document.py` and `haystack/components/converters/pptx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) haystack/components/embedders/openai_document_embedder.py:268— haystack/components/embedders/openai_document_embedder.py:268-287 | haystack/components/embedders/openai_document_embedder.py:313-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) haystack/components/embedders/azure_document_embedder.py:216— haystack/components/embedders/azure_document_embedder.py:216-233 | haystack/components/embedders/azure_text_embedder.py:192-209 — before extracting anything, compare `haystack/components/embedders/azure_document_embedder.py` and `haystack/components/embedders/azure_text_embedder.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/embedders/azure_document_embedder.py:216` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 3) haystack/document_stores/in_memory/document_store.py:294— haystack/document_stores/in_memory/document_store.py:294-308 | haystack/document_stores/in_memory/document_store.py:352-366 | haystack/document_stores/in_memory/document_store.py:406-420 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `doc_len` to `int` in one and `float` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12–15 lines × 2) haystack/components/extractors/image/llm_document_content_extractor.py:458— haystack/components/extractors/image/llm_document_content_extractor.py:458-472 | haystack/components/extractors/llm_metadata_extractor.py:488-499 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/extractors/image/llm_document_content_extractor.py:458` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14–15 lines × 2) haystack/testing/document_store_async.py:345— haystack/testing/document_store_async.py:345-359 | haystack/testing/document_store_async.py:368-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `haystack/testing/document_store_async.py:361` calls `filter_documents_async` and `haystack/testing/document_store_async.py:383` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 4) haystack/components/evaluators/document_map.py:63— haystack/components/evaluators/document_map.py:63-76 | haystack/components/evaluators/document_mrr.py:61-74 | haystack/components/evaluators/document_ndcg.py:54-67 | haystack/components/evaluators/document_recall.py:96-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `Document` names `haystack` in one and `haystack.dataclasses` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 4) haystack/testing/document_store.py:312— haystack/testing/document_store.py:312-322 | haystack/testing/document_store.py:357-367 | haystack/testing/document_store.py:402-412 | haystack/testing/document_store.py:447-457 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/testing/document_store.py:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–11 lines × 2) haystack/components/embedders/openai_document_embedder.py:359— haystack/components/embedders/openai_document_embedder.py:359-366 | haystack/components/embedders/openai_document_embedder.py:392-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/embedders/openai_document_embedder.py:392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8–10 lines × 3) haystack/components/converters/image/file_to_document.py:87— haystack/components/converters/image/file_to_document.py:87-94 | haystack/components/converters/pptx.py:191-200 | haystack/components/converters/txt.py:88-97 — before extracting anything, compare `haystack/components/converters/image/file_to_document.py` and `haystack/components/converters/pptx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–10 lines × 2) haystack/testing/document_store.py:807— haystack/testing/document_store.py:807-815 | haystack/testing/document_store.py:849-858 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/testing/document_store.py:807` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 7) haystack/components/converters/csv.py:115— haystack/components/converters/csv.py:115-124 | haystack/components/converters/msg.py:172-180 | haystack/components/converters/pdfminer.py:282-290 | haystack/components/converters/pptx.py:181-189 | haystack/components/converters/pypdf.py:256-264 | haystack/components/converters/txt.py:77-85 | haystack/components/converters/xlsx.py:133-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–9 lines × 2) haystack/components/converters/pdfminer.py:217— haystack/components/converters/pdfminer.py:217-225 | haystack/components/converters/pypdf.py:200-207 — before extracting anything, compare `haystack/components/converters/pdfminer.py` and `haystack/components/converters/pypdf.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 8) haystack/components/converters/csv.py:115— haystack/components/converters/csv.py:115-122 | haystack/components/converters/image/file_to_document.py:82-89 | haystack/components/converters/msg.py:172-179 | haystack/components/converters/pdfminer.py:282-289 | haystack/components/converters/pptx.py:181-188 | haystack/components/converters/pypdf.py:256-263 | haystack/components/converters/txt.py:77-84 | haystack/components/converters/xlsx.py:133-140 — before extracting anything, compare `haystack/components/converters/image/file_to_document.py` and `haystack/components/converters/pptx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) haystack/components/retrievers/auto_merging_retriever.py:153— haystack/components/retrievers/auto_merging_retriever.py:153-160 | haystack/components/retrievers/auto_merging_retriever.py:219-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `haystack/components/retrievers/auto_merging_retriever.py:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 3) haystack/components/converters/markdown.py:154— haystack/components/converters/markdown.py:154-160 | haystack/components/converters/pypdf.py:281-286 | haystack/components/converters/txt.py:96-101 — before extracting anything, compare `haystack/components/converters/pypdf.py` and `haystack/components/converters/txt.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) haystack/components/evaluators/context_relevance.py:233— haystack/components/evaluators/context_relevance.py:233-237 | haystack/components/evaluators/faithfulness.py:242-246 — before extracting anything, compare `haystack/components/evaluators/context_relevance.py` and `haystack/components/evaluators/faithfulness.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 9) haystack/components/classifiers/openai_decisions_document_classifier.py:170— haystack/components/classifiers/openai_decisions_document_classifier.py:170-179 | haystack/components/embedders/azure_document_embedder.py:156-171 | haystack/components/embedders/azure_text_embedder.py:132-147 | haystack/components/embedders/openai_document_embedder.py:133-143 | haystack/components/embedders/openai_text_embedder.py:104-114 | haystack/components/generators/chat/openai.py:241-251 | haystack/components/generators/openai_image_generator.py:91-101 | haystack/components/routers/openai_decisions_image_router.py:136-145 | haystack/components/routers/openai_decisions_text_router.py:128-137 — before extracting anything, compare `haystack/components/embedders/azure_document_embedder.py` and `haystack/components/embedders/azure_text_embedder.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Low cohesion: _SuperComponent (LCOM4 5) haystack/core/super_component/super_component.py:35— _SuperComponent's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×1
JavaScript dependencies are not locked docs-website/package.json:20— docs-website/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Swallowed exception (caught, then discarded) haystack/utils/misc.py:148— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (empty catch) haystack/components/converters/csv.py:162— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Duplicated predicate haystack/tools/component_tool.py:351— `"outputs_to_state" in inner_data and inner_data["outputs_to_state"]` appears character-identically in 2 files — haystack/tools/component_tool.py, haystack/tools/pipeline_tool.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/routers/openai_decisions_image_router.py:196— `answer.type != "choice" or not isinstance(answer.choice, str) or answer.choice not in self.labels` appears character-identically in 2 files — haystack/components/routers/openai_decisions_image_router.py, haystack/components/routers/openai_decisions_text_router.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/embedders/azure_document_embedder.py:128— `api_key is None and azure_ad_token is None` appears character-identically in 3 files — haystack/components/embedders/azure_document_embedder.py, haystack/components/embedders/azure_text_embedder.py, haystack/components/generators/chat/azure.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/embedders/azure_document_embedder.py:124— `azure_endpoint or os.environ.get("AZURE_OPENAI_ENDPOINT")` appears character-identically in 3 files — haystack/components/embedders/azure_document_embedder.py, haystack/components/embedders/azure_text_embedder.py, haystack/components/generators/chat/azure.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/converters/output_adapter.py:190— `custom_filters and not _is_unsafe_deserialization()` appears character-identically in 2 files — haystack/components/converters/output_adapter.py, haystack/components/routers/conditional_router.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/embedders/mock_document_embedder.py:167— `documents and not isinstance(documents[0], Document)` appears character-identically in 3 files — haystack/components/embedders/mock_document_embedder.py, haystack/components/preprocessors/document_splitter.py, haystack/components/preprocessors/embedding_based_document_splitter.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/embedders/mock_document_embedder.py:90— `embedding is None and embedding_fn is None and dimension <= 0` appears character-identically in 2 files — haystack/components/embedders/mock_document_embedder.py, haystack/components/embedders/mock_text_embedder.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/embedders/mock_document_embedder.py:88— `embedding is not None and embedding_fn is not None` appears character-identically in 2 files — haystack/components/embedders/mock_document_embedder.py, haystack/components/embedders/mock_text_embedder.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/converters/output_adapter.py:183— `init_params.get("unsafe") and not _is_unsafe_deserialization()` appears character-identically in 2 files — haystack/components/converters/output_adapter.py, haystack/components/routers/conditional_router.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/hooks/human_in_the_loop/strategies.py:227— `isinstance(key, tuple) and tool_name in key` appears character-identically in 2 files — haystack/hooks/human_in_the_loop/strategies.py, haystack/hooks/tool_result_offloading/hooks.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/generators/chat/azure_responses.py:269— `isinstance(tools, dict) and "type" in tools and "data" in tools or isinstance(tools, list) and isinstance(tools[0], dict) and "type" in tool…` appears character-identically in 2 files — haystack/components/generators/chat/azure_responses.py, haystack/components/generators/chat/openai_responses.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/embedders/openai_document_embedder.py:238— `key in doc.meta and doc.meta[key] is not None` appears character-identically in 2 files — haystack/components/embedders/openai_document_embedder.py, haystack/document_stores/in_memory/document_store.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/evaluators/document_map.py:113— `len(ground_truth_documents) == 0 or len(retrieved_documents) == 0` appears character-identically in 3 files — haystack/components/evaluators/document_map.py, haystack/components/evaluators/document_mrr.py, haystack/components/evaluators/document_recall.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/builders/chat_prompt_builder.py:188— `len(self.variables) > 0 and required_variables is None` appears character-identically in 2 files — haystack/components/builders/chat_prompt_builder.py, haystack/components/builders/prompt_builder.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/routers/document_type_router.py:147— `mime_type == bucket_key or pattern.fullmatch(mime_type)` appears character-identically in 2 files — haystack/components/routers/document_type_router.py, haystack/components/routers/file_type_router.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/routers/openai_decisions_image_router.py:103— `min_confidence is not None and not 0 <= min_confidence <= 1` appears character-identically in 2 files — haystack/components/routers/openai_decisions_image_router.py, haystack/components/routers/openai_decisions_text_router.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/generators/chat/openai_responses.py:1116— `not has_content and not message.is_from(ChatRole.ASSISTANT)` appears character-identically in 2 files — haystack/components/generators/chat/openai_responses.py, haystack/utils/hf.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/embedders/azure_document_embedder.py:118— `not isinstance(batch_size, int) or batch_size < 1` appears character-identically in 3 files — haystack/components/embedders/azure_document_embedder.py, haystack/components/embedders/openai_document_embedder.py, haystack/components/evaluators/sas_evaluator.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/embedders/openai_document_embedder.py:347— `not isinstance(documents, list) or documents and not isinstance(documents[0], Document)` appears character-identically in 2 files — haystack/components/embedders/openai_document_embedder.py, haystack/components/preprocessors/document_cleaner.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/query/query_expander.py:218— `not isinstance(query, str) or not query.strip()` appears character-identically in 2 files — haystack/components/query/query_expander.py, haystack/components/rankers/llm_ranker.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/evaluators/document_map.py:74— `not isinstance(value, dict) or part not in value` appears character-identically in 4 files — haystack/components/evaluators/document_map.py, haystack/components/evaluators/document_mrr.py, haystack/components/evaluators/document_ndcg.py, haystack/components/evaluators/document_recall.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/converters/csv.py:136— `not self.store_full_path and "file_path" in bytestream.meta` appears character-identically in 5 files — haystack/components/converters/csv.py, haystack/components/converters/docx.py, haystack/components/converters/html.py, haystack/components/converters/msg.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/generators/chat/azure.py:331— `response_format and isinstance(response_format, type) and issubclass(response_format, BaseModel)` appears character-identically in 2 files — haystack/components/generators/chat/azure.py, haystack/components/generators/chat/openai.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/routers/openai_decisions_image_router.py:198— `self.min_confidence is not None and answer.confidence < self.min_confidence` appears character-identically in 2 files — haystack/components/routers/openai_decisions_image_router.py, haystack/components/routers/openai_decisions_text_router.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate haystack/components/builders/chat_prompt_builder.py:199— `self.required_variables == "*" or var in self.required_variables` appears character-identically in 2 files — haystack/components/builders/chat_prompt_builder.py, haystack/components/builders/prompt_builder.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Orphaned file haystack/testing/factory.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file haystack/document_stores/types/protocol.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file haystack/telemetry/_environment.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file haystack/components/agents/state/state_utils.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file haystack/components/evaluators/answer_exact_match.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 8 significant file(s) lose their only recent owner: haystack/hooks/compaction/summarization.py, haystack/hooks/tool_result_offloading/hooks.py, haystack/hooks/compaction/tool_result_offloading.py, haystack/hooks/compaction/utils.py, haystack/hooks/tool_result_offloading/utils.py, haystack/token_counters/utils.py, haystack/hooks/tool_result_offloading/types/protocol.py, haystack/hooks/invocation.py. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (10 single-owned of 200 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 200 of the 300 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: haystack/core/serialization_security.py, haystack/testing/telemetry.py.
Scattered collaborators — 77 % of calls cross a namespace and only 44 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 5 of 200 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 200 of the 300 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: haystack/testing/factory.py, haystack/document_stores/types/protocol.py, haystack/telemetry/_environment.py, haystack/components/agents/state/state_utils.py, haystack/components/evaluators/answer_exact_match.py. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D8 · Code Coverage· Tests reach code only in some runs · ×1
Tests reach code only in some runs: haystack/telemetry/_telemetry.py haystack/telemetry/_telemetry.py:70— 5 line(s) (70-74) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
No security response headers detected docs-website/vercel.json:1— None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `vercel.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
Silent fallback default on parse failure scripts/generate_platform_components_table.py:159— `_parse_frontmatter` returns `{}` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1e4bf-6765-7c80-873c-e7609f41f57c · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 30 · Warnings: 470 · Recommendations: 44 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 14:25 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.