Public report of deepset-ai/haystack, published 20 October 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.10.5). Watchdog 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, 20 October 2026, 18:27 UTC · Survey ID cd_bd7e2a7326264f49a1c62ab44878923f
deepset-ai/haystack
Measured 20 October 2026, 18:12 UTC, at code version 68c782c
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 7 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: 50,300 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.9 person-years · Weakest lens: Maturity, 49
Findings by how serious they are
34 critical324 serious82 minor
8 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
20 October 2026, 18:12 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 Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸
74of 79 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
420of 440 findings point to an exact file and line, so you can open each one in the code. The other 20 concern the repository as a whole, such as missing documentation.
79dimensions across 7 lenses, read from 50,300 lines of product code in 2 projects.
deepset-ai/haystack scores 55 out of 100 and is rated Adequate, while five of its seven lenses score higher still: Performance at 100, rated Exemplary, and Architecture at 89, Security and Compliance at 81, Code Health at 67 and Production Readiness at 56, all rated Adequate.
The score is lower than those five because the weakest lens counts most, and here that is Maturity, which scores 49 and is rated Weak. Its Documentation accuracy dimension scores 0 out of 10, and until that reaches 4, Maturity can't be rated higher than Adequate. The first actions are to reconcile the README with reality: docs-website/README.md names `haystack/docs-website`, but no file or folder `haystack/docs-website` exists; docs-website/docs/token-counters.mdx links to `/reference/token-counters-api`, but `reference/token-counters-api` does not exist; docs-website/docs/concepts/data-classes.mdx links to `/reference/data-classes-api`, but `reference/data-classes-api` does not exist; docs-website/docs/concepts/secret-management.mdx links to `/reference/utils-api`, but `reference/utils-api` does not exist; docs-website/docs/development/hayhooks.mdx documents the setting `HAYHOOKS_HOST:HAYHOOKS_PORT`, but no code or configuration file names `HAYHOOKS_HOST` and to make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href, and if Maturity rose to 70, the score would rise from 55 to about 59.
34 findings are critical: 27 in Static Analysis (SAST), four in Dependency Hygiene, two in Keyboard semantics and one in IaC & Container Security.
Watchdog couldn't measure 7 dimensions in this code, among them Code Coverage, Dependency Hygiene and Navigability, so they are left out of the score. The product code is 50,300 lines, which would take an estimated 0.9 person-years, around €130,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.
Large Files · docs-website/src/theme/SearchBar.js: 442 lines of code docs-website/src/theme/SearchBar.js
Dead Code · Dead file (~46 LoC) docs-website/src/components/PlatformBadge/index.tsx
Visual & motion safety · Animation without a prefers-reduced-motion guard docs-website/src/theme/styles.module.css
Visual & motion safety · Animation without a prefers-reduced-motion guard docs-website/src/css/custom.css
Visual & motion safety · Animation without a prefers-reduced-motion guard docs-website/src/components/CopyDropdown/styles.module.css
Watchdog compares 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: 24 findings
These 24 critical or serious findings were in the previous survey, on 4 October 2026, and are gone from this one.
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) haystack/components/evaluators/document_map.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) haystack/components/extractors/image/llm_document_content_extractor.py
€43,000 to €210,000, for 708 to 2,247 hours of work, about 0.9 person-years for 1 to 2 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
×0.8 at a score of 55. 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: 50,300 lines of product code
How the estimate is made: Watchdog prices 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
Reconcile the README with reality: docs-website/README.md names `haystack/docs-website`, but no file or folder `haystack/docs-website` exists; docs-website/docs/token-counters.mdx links to `/reference/token-counters-api`, but `reference/token-counters-api` does not exist; docs-website/docs/concepts/data-classes.mdx links to `/reference/data-classes-api`, but `reference/data-classes-api` does not exist; docs-website/docs/concepts/secret-management.mdx links to `/reference/utils-api`, but `reference/utils-api` does not exist; docs-website/docs/development/hayhooks.mdx documents the setting `HAYHOOKS_HOST:HAYHOOKS_PORT`, but no code or configuration file names `HAYHOOKS_HOST`.
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.
Where the investment is most exposed · Value at risk
This code would cost about €130,000 to build again, about 0.9 person-years of work. Its weakest lens is Maturity, at 49 (Weak). Maturity is about how well the project explains and looks after itself, which decides whether a new developer, or a new supplier, can take over. Because the weakest lens counts most in the score, work on Maturity also moves the score most.
Based on: the rebuild estimate · the Maturity grade · how much each lens counts
What to do: Start with the Maturity actions in Top priorities.
If you do one thing first · First action
Reconcile the README with reality: docs-website/README.md names `haystack/docs-website`, but no file or folder `haystack/docs-website` exists; docs-website/docs/token-counters.mdx links to `/reference/token-counters-api`, but `reference/token-counters-api` does not exist; docs-website/docs/concepts/data-classes.mdx links to `/reference/data-classes-api`, but `reference/data-classes-api` does not exist; docs-website/docs/concepts/secret-management.mdx links to `/reference/utils-api`, but `reference/utils-api` does not exist; docs-website/docs/development/hayhooks.mdx documents the setting `HAYHOOKS_HOST:HAYHOOKS_PORT`, but no code or configuration file names `HAYHOOKS_HOST`. Of all the actions in this report, it raises the score most for the work it takes: about 4 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
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 173 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.classifiers.openai_decisions_document_classifier uses dataclasses.document, so a change to dataclasses.document can break components.classifiers.openai_decisions_document_classifier, while a change to components.classifiers.openai_decisions_document_classifier can't break dataclasses.document.
Position
Below the diagonal: components.classifiers.openai_decisions_document_classifier uses a module listed above it, which is the healthy direction.
components.classifiers.openai_decisions_document_classifier uses utils.auth, so a change to utils.auth can break components.classifiers.openai_decisions_document_classifier, while a change to components.classifiers.openai_decisions_document_classifier can't break utils.auth.
Position
Below the diagonal: components.classifiers.openai_decisions_document_classifier uses a module listed above it, which is the healthy direction.
components.embedders.openai_document_embedder uses utils.auth, so a change to utils.auth can break components.embedders.openai_document_embedder, while a change to components.embedders.openai_document_embedder can't break utils.auth.
Position
Below the diagonal: components.embedders.openai_document_embedder 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.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.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
31
High / Critical
A03:2025 — Software Supply Chain Failures
4
Medium
A02:2025 — Security Misconfiguration
2
High / Critical
A08:2025 — Software or Data Integrity Failures
1
Medium
Roadmap
First, reconcile the documentation with the actual codebase to eliminate broken links and references to non-existent files or configurations. Next, ensure all custom controls are fully keyboard-operable and anchors have valid hrefs to improve usability. Then, establish a clear record of significant design decisions by creating Architecture Decision Records in a dedicated folder. Finally, clean up dependencies by removing unused packages and explicitly declaring imports, while enforcing accessibility standards through linting and automated testing in the CI pipeline.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Reconcile the README with reality: docs-website/README.md names `haystack/docs-website`, but no file or folder `haystack/docs-website` exists; docs-website/docs/token-counters.mdx links to `/reference/token-counters-api`, but `reference/token-counters-api` does not exist; docs-website/docs/concepts/data-classes.mdx links to `/reference/data-classes-api`, but `reference/data-classes-api` does not exist; docs-website/docs/concepts/secret-management.mdx links to `/reference/utils-api`, but `reference/utils-api` does not exist; docs-website/docs/development/hayhooks.mdx documents the setting `HAYHOOKS_HOST:HAYHOOKS_PORT`, but no code or configuration file names `HAYHOOKS_HOST`.
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.
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
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.
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 — 34
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 — 324
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 — 82
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 8
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
Watchdog 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. 74 of 79 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 79 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, 420 of 440 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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.
D8 Code Coverage — not measured this run — Watchdog 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. Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D12 Dependency Hygiene — not measured this run — Watchdog 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 — 18 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 — Watchdog measured this, but not all of it. What it 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.
D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
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; REDACTED was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that REDACTED is free of known-vulnerable dependencies.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog 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. `REDACTED` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
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; REDACTED was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that REDACTED is free of known-vulnerable dependencies.
AXR1 Runtime accessibility — not measured this run — Watchdog 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 Dockerfile (.clusterfuzzlite/Dockerfile). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/bui…; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog 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 — Watchdog 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 and Scala source only, and this repository's Python is most of its product and 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 — Watchdog 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 and Scala source only, and this repository's Python is most of its product and 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 — Watchdog measured this, but not all of it. What it 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. 125 further occurrence(s) are not listed individually; the score already reflects all 165.
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.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs 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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
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.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
The LLM boundary
LLM-set scores this run (5): D19, D21, D22, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
+ 38 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with Tool.__post_init__ (cyclomatic 43), SearchBar (cyclomatic 34), SearchBar.SearchBar (cyclomatic 33). — 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 5 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.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
+ 88 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 87). — Refactoring it lifts Cognitive Complexity from 4.3 to about 5.1/10.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.0 / 10Stronggated by 13 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).
Resolve the 2 FunctionTooLong finding(s) in God Classes — start with index.js, index.tsx. — One of this dimension's main actionable groups (2 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
90 duplicated block group(s) detected. A further 3 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 47 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 8 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 (8 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 5 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with file_to_image.py, openai.py, llm_messages_router.py. — One of this dimension's main actionable groups (5 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
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).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
4729 test methods: 4727 unit, 0 integration, 0 BDD, 2 e2e. The Python suite contributes 4729 test function(s) across 227 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.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 18 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (26 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 (15×31=465); haystack/core/pipeline/base.py (11×31=341); haystack/components/agents/agent.py (17×20=340) Repeated repair below the complexity floor: haystack/document_stores/in_memory/document_store.py (8 of 8 changes were fixes); haystack/components/preprocessors/document_splitter.py (5 of 7 changes were fixes); haystack/components/fetchers/link_content.py (5 of 6 changes were fixes)
Resolve the 17 Hotspot finding(s) in Churn × Complexity Hotspots — start with openai_responses.py, base.py, agent.py. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 14 Repeated repair finding(s) in Churn × Complexity Hotspots — start with document_store.py, document_splitter.py, link_content.py. — One of this dimension's main actionable groups (14 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.4 / 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.
11 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 199 of the 306 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 50300 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_openai_responses_conversion.py, test_pipeline_base.py. — One of this dimension's main actionable groups (2 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The Haystack documentation is clear and complete for its repository root README, docker/README, and docs-website directory. The root README gives an overview of the project (Haystack by deepset — end-to-end LLM framework), CI status, and links to a blue banner; it also documents installation, usage examples, contribution guidance, and licence. The docker/README is focused on the docker/ directory and explains what it does without referencing the root repository's overview. The docs-website README provides an exhaustive table of contents (About, Prerequisites, Quick Start, Common tasks, Project Structure, Technology Stack, Available Scripts, Contributing, CI/CD and Automation) plus detailed installation, a clone-and-run quick start with live reload, and project structure guidance for the docs site.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 0 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyStronggated by 1 serious finding◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
1 API inconsistencies across a 400-member sample of 386 exposed types.
While having both sync and async variants is common, the `Agent` class exposes `run` and `run_async` directly on the main component. In contrast, other components like `OpenAIDocumentEmbedder` and `CacheChecker` also expose both, but `MockTextEmbedder` and `MockDocumentEmbedder` do the same. However, looking at `PromptBuilder` vs `ChatPromptBuilder`, there is a subtle inconsistency in return types and input handling that suggests a lack of unified interface for 'building' prompts, though not strictly a naming collision. The most glaring potential inconsistency is between `Agent.run` and `ChatPromptBuilder.run`. `Agent.run` takes `messages` directly, while `ChatPromptBuilder.run` takes `template` and `template_variables`. This is a domain difference (execution vs building), so it is NOT an inconsistency.
What to do
Resolve the 1 While having both sync and async variants is common, the `Agent` class… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 2 build units (Python, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_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).
31 finding(s): 0 critical, 27 high, 4 medium, 0 low. semgrep hit a parse error in 3 file(s) — `REDACTED` (line 8), `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 the named regions is evidence of anything; rows reported elsewhere in those files are real. 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
+ 3 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 REDACTED.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.
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. REDACTED was not scanned (REDACTED: 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.
REDACTED
✓ On the Gold path — maintain.
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
3 of 199 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 199 of the 306 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned file · ×3haystack/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 4 Change coupling finding(s) in Change Coupling — start with bm25_retriever.py, azure_document_embedder.py, context_relevance.py. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with cache_checker.py. — One of this dimension's main actionable groups (1 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. Scored 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. SCORED, not informational.
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. REDACTED was not scanned (REDACTED: 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.
REDACTED
✓ On the Gold path — maintain.
Detailed fixes: d43_recommendation.md · top locations in Appendix A, every location in findings.md.
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 18 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.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 8 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
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.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
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 repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
docs-website/README.md names `haystack/docs-website`, but no file or folder `haystack/docs-website` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/README.md:34
docs-website/docs/token-counters.mdx links to `/reference/token-counters-api`, but `reference/token-counters-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/token-counters.mdx:25
docs-website/docs/concepts/data-classes.mdx links to `/reference/data-classes-api`, but `reference/data-classes-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/concepts/data-classes.mdx:14
docs-website/docs/concepts/secret-management.mdx links to `/reference/utils-api`, but `reference/utils-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/concepts/secret-management.mdx:16
docs-website/docs/development/hayhooks.mdx documents the setting `HAYHOOKS_HOST:HAYHOOKS_PORT`, but no code or configuration file names `HAYHOOKS_HOST`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/development/hayhooks.mdx:73
docs-website/docs/development/hayhooks.mdx names `pipeline_wrapper.py`, but no file or folder `pipeline_wrapper.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/development/hayhooks.mdx:79
docs-website/docs/document-stores/alloydbdocumentstore.mdx links to `/reference/integrations-alloydb`, but `reference/integrations-alloydb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/alloydbdocumentstore.mdx:13
docs-website/docs/document-stores/alloydbdocumentstore.mdx documents the environment variable `ALLOYDB_INSTANCE_URI`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/alloydbdocumentstore.mdx:40
docs-website/docs/document-stores/alloydbdocumentstore.mdx documents the environment variable `ALLOYDB_USER`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/alloydbdocumentstore.mdx:41
docs-website/docs/document-stores/alloydbdocumentstore.mdx names `.gserviceaccount.com`, but no file or folder `.gserviceaccount.com` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/alloydbdocumentstore.mdx:41
docs-website/docs/document-stores/alloydbdocumentstore.mdx documents the environment variable `ALLOYDB_PASSWORD`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/alloydbdocumentstore.mdx:42
docs-website/docs/document-stores/arangodocumentstore.mdx links to `/reference/integrations-arangodb`, but `reference/integrations-arangodb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/arangodocumentstore.mdx:16
docs-website/docs/document-stores/arangodocumentstore.mdx documents the environment variable `ARANGO_USERNAME`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/arangodocumentstore.mdx:45
docs-website/docs/document-stores/arangodocumentstore.mdx documents the environment variable `ARANGO_PASSWORD`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/arangodocumentstore.mdx:45
docs-website/docs/document-stores/arcadedbdocumentstore.mdx links to `/reference/integrations-arcadedb`, but `reference/integrations-arcadedb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/arcadedbdocumentstore.mdx:13
docs-website/docs/document-stores/arcadedbdocumentstore.mdx documents the environment variable `ARCADEDB_USERNAME`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/arcadedbdocumentstore.mdx:43
docs-website/docs/document-stores/arcadedbdocumentstore.mdx documents the environment variable `ARCADEDB_PASSWORD`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/arcadedbdocumentstore.mdx:44
docs-website/docs/document-stores/astradocumentstore.mdx links to `/reference/integrations-astra`, but `reference/integrations-astra` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/astradocumentstore.mdx:13
docs-website/docs/document-stores/azureaisearchdocumentstore.mdx links to `/reference/integrations-azure_ai_search`, but `reference/integrations-azure_ai_search` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/azureaisearchdocumentstore.mdx:16
docs-website/docs/document-stores/azuredocumentdbdocumentstore.mdx links to `/reference/integrations-azure-documentdb`, but `reference/integrations-azure-documentdb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/azuredocumentdbdocumentstore.mdx:16
docs-website/docs/document-stores/chromadocumentstore.mdx links to `/reference/integrations-chroma`, but `reference/integrations-chroma` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/chromadocumentstore.mdx:13
docs-website/docs/document-stores/dynamodbdocumentstore.mdx links to `/reference/integrations-dynamodb`, but `reference/integrations-dynamodb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/dynamodbdocumentstore.mdx:13
docs-website/docs/document-stores/elasticsearch-document-store.mdx links to `/reference/integrations-elasticsearch`, but `reference/integrations-elasticsearch` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/elasticsearch-document-store.mdx:16
docs-website/docs/document-stores/elasticsearch-document-store.mdx names `docker-compose.yml`, but no file or folder `docker-compose.yml` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/elasticsearch-document-store.mdx:36
docs-website/docs/document-stores/faissdocumentstore.mdx links to `/reference/integrations-faiss`, but `reference/integrations-faiss` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/faissdocumentstore.mdx:13
docs-website/docs/document-stores/falkordbdocumentstore.mdx links to `/reference/integrations-falkordb`, but `reference/integrations-falkordb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/falkordbdocumentstore.mdx:16
docs-website/docs/document-stores/mariadbdocumentstore.mdx links to `/reference/integrations-mariadb`, but `reference/integrations-mariadb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/mariadbdocumentstore.mdx:13
docs-website/docs/document-stores/mariadbdocumentstore.mdx documents the environment variable `MARIADB_USER`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/mariadbdocumentstore.mdx:60
docs-website/docs/document-stores/mariadbdocumentstore.mdx documents the environment variable `MARIADB_PASSWORD`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/mariadbdocumentstore.mdx:61
docs-website/docs/document-stores/mongodbatlasdocumentstore.mdx links to `/reference/integrations-mongodb-atlas`, but `reference/integrations-mongodb-atlas` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/mongodbatlasdocumentstore.mdx:13
docs-website/docs/document-stores/mongodbatlasdocumentstore.mdx documents the environment variable `MONGO_CONNECTION_STRING`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/mongodbatlasdocumentstore.mdx:34
docs-website/docs/document-stores/opensearch-document-store.mdx links to `/reference/integrations-opensearch`, but `reference/integrations-opensearch` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/opensearch-document-store.mdx:16
docs-website/docs/document-stores/opensearch-document-store.mdx names `docker-compose.yml`, but no file or folder `docker-compose.yml` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/opensearch-document-store.mdx:44
docs-website/docs/document-stores/oracledocumentstore.mdx links to `/reference/integrations-oracle`, but `reference/integrations-oracle` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/oracledocumentstore.mdx:14
docs-website/docs/document-stores/oracledocumentstore.mdx documents the environment variable `ORACLE_USER`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/oracledocumentstore.mdx:44
docs-website/docs/document-stores/oracledocumentstore.mdx documents the environment variable `ORACLE_PASSWORD`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/oracledocumentstore.mdx:45
docs-website/docs/document-stores/oracledocumentstore.mdx documents the environment variable `ORACLE_DSN`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/oracledocumentstore.mdx:46
docs-website/docs/document-stores/pgvectordocumentstore.mdx links to `/reference/integrations-pgvector`, but `reference/integrations-pgvector` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/pgvectordocumentstore.mdx:13
docs-website/docs/document-stores/pgvectordocumentstore.mdx documents the environment variable `PG_CONN_STR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/pgvectordocumentstore.mdx:44
docs-website/docs/document-stores/pinecone-document-store.mdx links to `/reference/integrations-pinecone`, but `reference/integrations-pinecone` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs-website/docs/document-stores/pinecone-document-store.mdx:16
What to do
Reconcile the README with reality: docs-website/README.md names `haystack/docs-website`, but no file or folder `haystack/docs-website` exists; docs-website/docs/token-counters.mdx links to `/reference/token-counters-api`, but `reference/token-counters-api` does not exist; docs-website/docs/concepts/data-classes.mdx links to `/reference/data-classes-api`, but `reference/data-classes-api` does not exist; docs-website/docs/concepts/secret-management.mdx links to `/reference/utils-api`, but `reference/utils-api` does not exist; docs-website/docs/development/hayhooks.mdx documents the setting `HAYHOOKS_HOST:HAYHOOKS_PORT`, but no code or configuration file names `HAYHOOKS_HOST`.
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 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 the language 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.
Do you agree with this assessment?
R1 · Type Safety4.2 / 10Weak✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
10 typed · 14 plain JS — the untyped files are docs-website/plugins/txtLoaderPlugin.js, docs-website/reference-sidebars.js, docs-website/scripts/extract_sidebar.mjs, docs-website/sidebars.js, docs-website/src/pages/index.js, docs-website/src/pages/versions.js (+8 more).
What to do
Migrate the remaining .js/.jsx files to TypeScript.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
docs-website/src/remark/versionedReferenceLinks.js:89 · docs-website/src/remark/versionedReferenceLinks.js:108 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — docs-website/src/remark/versionedReferenceLinks.js:89
docs-website/src/components/CopyDropdown/index.tsx:235 · docs-website/src/components/CopyDropdown/index.tsx:243 · docs-website/src/components/CopyDropdown/index.tsx:253 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — docs-website/src/components/CopyDropdown/index.tsx:235
docs-website/src/components/CopyDropdown/index.tsx:245 · docs-website/src/components/CopyDropdown/index.tsx:255 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — docs-website/src/components/CopyDropdown/index.tsx:245
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
(anonymous) has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — docs-website/src/theme/NavbarItem/DocNavbarItem/index.js:35
(anonymous) has cyclomatic complexity 13 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — docs-website/src/remark/versionedReferenceLinks.js:86
SearchBar has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — docs-website/src/theme/SearchBar.js:176
handler has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — docs-website/api/mcp.ts:4
(anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — docs-website/src/remark/versionedReferenceLinks.js:41
handler has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — docs-website/api/search.ts:5
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files6.7 / 10Adequate✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
docs-website/src/theme/SearchBar.js has 442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — docs-website/src/theme/SearchBar.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R6 · Tooling6.6 / 10Adequate✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✗ · lint ✓ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add a test runner (vitest / jest / playwright) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code7.2 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 17 application, 1 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (17 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×6) — docs-website/src/components/CopyDropdown/index.tsx, docs-website/src/components/ClickableImage/index.tsx, docs-website/src/components/PlatformBadge/index.tsx, …
Nothing imports this binding — it is safe to review for removal. — docs-website/plugins/txtLoaderPlugin.js:1
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×4) — docs-website/src/pages/index.js:6, docs-website/src/theme/NavbarItem/DocsVersionDropdownNavbarItem/index.js:10, docs-website/src/theme/DocItem/Content/index.tsx:9, …
Declared in docs-website/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
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?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. 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 `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. 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.
`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
`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
`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
`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
`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
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 a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
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 unescaped5.2 / 10Adequate✓ Tool-verified
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.
`result.snippet` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — docs-website/src/theme/SearchBar.js:467
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
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.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. 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.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. 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.
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
`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
What to do
Swallowed exception (empty catch)
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.
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
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, so there is nothing missing here.
X10 Duplicated predicate — 25 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 — 50 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 JavaScript 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; 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; this repository's TypeScript 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
AX6 Interface segregation — no exported interface declares behaviour
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 — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/bui…; runtime evidence skipped 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 — ~77870 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 — 18 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.
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. 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 — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.py), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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
D8 Code Coverage — Coverage not included — suite not readable by the collector
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 and Scala, 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 JavaScript/TypeScript, 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 — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
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 applicable: Python runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — the JS/TS workspace (21 production file(s)) has no JavaScript/TypeScript test, but it is 5.11% of this repository's production source and the other 94.89% carries 77,870 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
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.
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.
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.
Unlisted import '@docusaurus/router' docs-website/src/pages/index.js:6— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import '@docusaurus/theme-common' docs-website/src/theme/NavbarItem/DocsVersionDropdownNavbarItem/index.js:10— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import '@site/src' docs-website/src/theme/DocItem/Content/index.tsx:9— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'lodash' docs-website/src/theme/SearchBar.js:14— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Hotspot: haystack/components/generators/chat/openai_responses.py haystack/components/generators/chat/openai_responses.py:869— haystack/components/generators/chat/openai_responses.py changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in openai_responses._convert_streaming_chunks_to_chat_message at line 869. 5 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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:586— haystack/core/pipeline/base.py changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in PipelineBase.connect at line 586. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/agents/agent.py haystack/components/agents/agent.py:420— haystack/components/agents/agent.py changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in Agent.__init__ at line 420. 3 of those changes were fix/bug commits, and the other 14 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/components/agents/agent.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 8 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. 4 of those changes were fix/bug commits, and the other 4 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/dataclasses/chat_message.py haystack/dataclasses/chat_message.py:756— haystack/dataclasses/chat_message.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ChatMessage.from_openai_dict_format at line 756. 3 of those changes were fix/bug commits, and the other 4 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/preprocessors/markdown_header_splitter.py haystack/components/preprocessors/markdown_header_splitter.py:128— haystack/components/preprocessors/markdown_header_splitter.py changed 8 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 128. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/components/rankers/meta_field.py haystack/components/rankers/meta_field.py:163— haystack/components/rankers/meta_field.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in MetaFieldRanker.run at line 163. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/components/preprocessors/recursive_splitter.py haystack/components/preprocessors/recursive_splitter.py:345— haystack/components/preprocessors/recursive_splitter.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in RecursiveDocumentSplitter._chunk_text at line 345. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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.
Hotspot: haystack/components/builders/chat_prompt_builder.py haystack/components/builders/chat_prompt_builder.py:131— haystack/components/builders/chat_prompt_builder.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ChatPromptBuilder.__init__ at line 131. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/hooks/human_in_the_loop/strategies.py haystack/hooks/human_in_the_loop/strategies.py:544— haystack/hooks/human_in_the_loop/strategies.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in strategies._apply_tool_execution_decisions at line 544. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/hooks/human_in_the_loop/strategies.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 17 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/converters/xlsx.py haystack/components/converters/xlsx.py:161— haystack/components/converters/xlsx.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in XLSXToDocument._extract_tables at line 161. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/components/validators/json_schema.py haystack/components/validators/json_schema.py:115— haystack/components/validators/json_schema.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/components/converters/json.py haystack/components/converters/json.py:179— 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 179. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/utils/type_serialization.py haystack/utils/type_serialization.py:72— haystack/utils/type_serialization.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in type_serialization.serialize_type at line 72. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/utils/type_serialization.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/utils/base_serialization.py haystack/utils/base_serialization.py:20— haystack/utils/base_serialization.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in base_serialization._serialize_value_with_schema at line 20. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/utils/base_serialization.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/in_memory/document_store.py haystack/document_stores/in_memory/document_store.py:772— haystack/document_stores/in_memory/document_store.py changed 8 times in last 90 days and 8 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 InMemoryDocumentStore.bm25_retrieval at line 772), 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 container metadata in document evaluators (#13206)”; “fix: skip documents without content in InMemoryDocumentStore BM25 stats (#13238)”; “fix: skip BM25L/BM25Plus lower bound for query terms missing from a document (#12895)”; “fix: default BM25 tokenizer splits CJK characters for bare-term retrieval (#12837)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/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), 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: 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)”; “fix: add standard split metadata when DocumentSplitter uses split_by="function" (#12505)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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 6 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), 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 `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)”; “fix: honor LinkContentFetcher retry attempts (#12401)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/core/pipeline/breakpoint.py haystack/core/pipeline/breakpoint.py:141— haystack/core/pipeline/breakpoint.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 9 (its worst body is breakpoint._save_pipeline_snapshot at line 141), 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 return a snapshot path when saving the pipeline snapshot fails (#13174)”; “fix: reject pipeline snapshot component mismatches (#12674)”; “fix!: resume a pipeline snapshot taken on a later loop visit (#12162)”; “fix: fix serialization of `State` and `PipelineSnapshot` (#12113)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/core/pipeline/breakpoint.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 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 11 (its worst body is filters._prepare_ordering_comparison at line 128), 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 datetime numeric ordering filters (#13202)”; “fix: treat dotted filter fields with unknown root as missing instead of raising AttributeError (#12744)”; “fix: make strict datetime filter comparison opt-in (#12257)”; “fix: normalize ISO date equality filters (#11963)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/converters/docx.py haystack/components/converters/docx.py:191— haystack/components/converters/docx.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 DOCXToDocument.run at line 191), 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: 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)”; “fix: keep a DOCX cell from breaking the markdown table (#12779)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/agents/tool_calling.py haystack/components/agents/tool_calling.py:441— haystack/components/agents/tool_calling.py changed 5 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 tool_calling._schedule_tool_calls at line 441), 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: unwrap Annotated in _unwrap_optional for State parameter detection (#13169)”; “fix: fix agent tool spans not getting nested under each other (#12380)”; “fix: deferred annotation pickup in Agent (#12185)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/components/agents/tool_calling.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/answer_joiner.py haystack/components/joiners/answer_joiner.py:120— haystack/components/joiners/answer_joiner.py changed 5 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 AnswerJoiner.run at line 120), 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: log when AnswerJoiner demotes answers that have no score (#12698)”; “fix: recursive_splitter validation message and docstring accuracy (#12440)”; “fix: DocumentJoiner top_k=0 is treated as unset instead of returning … (#12217)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/components/joiners/answer_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/extractors/image/llm_document_content_extractor.py haystack/components/extractors/image/llm_document_content_extractor.py:260— haystack/components/extractors/image/llm_document_content_extractor.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 4 (its worst body is LLMDocumentContentExtractor._process_response at line 260), 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: 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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:268— haystack/components/extractors/llm_metadata_extractor.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 LLMMetadataExtractor._prepare_prompts at line 268), 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 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/retrievers/multi_retriever.py haystack/components/retrievers/multi_retriever.py:221— haystack/components/retrievers/multi_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 9 (its worst body is MultiRetriever.run at line 221), 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 top_k in MultiRetriever (#12719)”; “fix: honour max_workers in the multi-retrievers' run_async (#12662)”; “fix: cancel sibling tasks when concurrent retrieval fails (#11967)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/components/joiners/document_joiner.py haystack/components/joiners/document_joiner.py:225— haystack/components/joiners/document_joiner.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 8 (its worst body is DocumentJoiner._distribution_based_rank_fusion at line 225), 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 negative weights in DocumentJoiner (#12718)”; “fix: preserve constant scores in DocumentJoiner (#12508)”; “fix: DocumentJoiner top_k=0 is treated as unset instead of returning … (#12217)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +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/converters/output_adapter.py haystack/components/converters/output_adapter.py:111— haystack/components/converters/output_adapter.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 7 (its worst body is OutputAdapter.run at line 111), 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: preserve string outputs in OutputAdapter (#12322)”; “fix!: require unsafe loading for serialized Jinja filters (#12415)”; “fix: prevent RCE by hardening deserialization and Jinja sandbox (#12312)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/components/converters/output_adapter.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/callable_serialization.py haystack/utils/callable_serialization.py:70— haystack/utils/callable_serialization.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 callable_serialization.deserialize_callable at line 70), 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 modules during callable traversal (#12416)”; “fix: harden deserialization by blocking internal interfaces to prevent RCE (#12378)”; “fix: prevent RCE by hardening deserialization and Jinja sandbox (#12312)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 14:21:50 +00:00' --until='2026-10-20 14:21:50 +00:00' --full-history --no-merges -- haystack/utils/callable_serialization.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 — 952 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 452 over it, 1.90× 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 — 625 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 125 over it, 1.25× 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 — 616 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 116 over it, 1.23× 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 — 596 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 96 over it, 1.19× 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:1091— haystack/components/agents/agent.py:1091-1102 | haystack/components/agents/agent.py:1161-1172 — 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:307— haystack/components/extractors/image/llm_document_content_extractor.py:307-318 | haystack/components/extractors/image/llm_document_content_extractor.py:343-354 — 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:171-183 — 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/components/query/query_expander.py:220— haystack/components/query/query_expander.py:220-231 | haystack/components/query/query_expander.py:299-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 (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:1121— haystack/components/agents/agent.py:1121-1129 | haystack/components/agents/agent.py:1191-1199 — 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:234— haystack/components/converters/docx.py:234-242 | 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:1825— haystack/core/pipeline/base.py:1825-1833 | haystack/core/pipeline/base.py:1843-1853 — 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:1825` 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:34-42 — 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:97— haystack/components/converters/docx.py:97-105 | 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/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.
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/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/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/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.
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/generators/chat/openai.py:460— haystack/components/generators/chat/openai.py:460-472 | haystack/components/generators/chat/openai_responses.py:501-513 — 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 3 separate duplicated blocks between them, totalling at least 35 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/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:243-255 — 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.
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 94% of the time (15 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 15 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: 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 73% of the time (11 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 11 shared commits counted here, the most recent 3 are `07b22cb3` feat(embedders)!: default to text-embedding-3-small (#11742); `63e94e2e` chore: unpin openai (#12348); `49863778` feat: Allow OpenAI client config in `OpenAIChatGenerator` and `AzureO… — 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 70% of the time (14 of the 20 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.
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:287— haystack/components/extractors/image/llm_document_content_extractor.py:287-305 | haystack/components/extractors/image/llm_document_content_extractor.py:323-341 — 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 (11 lines × 2) haystack/components/agents/agent.py:1079— haystack/components/agents/agent.py:1079-1089 | haystack/components/agents/agent.py:1147-1157 — 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:314— haystack/components/extractors/llm_metadata_extractor.py:314-324 | haystack/components/extractors/llm_metadata_extractor.py:337-347 — 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/retrievers/auto_merging_retriever.py:142— haystack/components/retrievers/auto_merging_retriever.py:142-152 | haystack/components/retrievers/auto_merging_retriever.py:201-211 — 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 (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.
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:83— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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.
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/components/retrievers/auto_merging_retriever.py:132— haystack/components/retrievers/auto_merging_retriever.py:132-139 | haystack/components/retrievers/auto_merging_retriever.py:189-198 — 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:189` 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:640— haystack/core/pipeline/base.py:640-647 | haystack/core/pipeline/base.py:650-659 — 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:646` calls `join`, `items` and `haystack/core/pipeline/base.py:635` 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 (6 lines × 2) haystack/components/agents/utils.py:252— haystack/components/agents/utils.py:252-257 | haystack/components/agents/utils.py:260-265 — 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 (6 lines × 2) haystack/components/classifiers/openai_decisions_document_classifier.py:247— haystack/components/classifiers/openai_decisions_document_classifier.py:247-252 | haystack/components/classifiers/openai_decisions_document_classifier.py:278-283 — 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/components/routers/openai_decisions_image_router.py:194— haystack/components/routers/openai_decisions_image_router.py:194-199 | haystack/components/routers/openai_decisions_text_router.py:177-182 — 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 86 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 (11 lines × 3) haystack/components/embedders/azure_document_embedder.py:169— haystack/components/embedders/azure_document_embedder.py:169-179 | haystack/components/embedders/azure_text_embedder.py:150-160 | haystack/components/generators/chat/azure.py:262-272 — 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 142 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/azure_document_embedder.py:182— haystack/components/embedders/azure_document_embedder.py:182-192 | haystack/components/embedders/azure_text_embedder.py:163-173 | haystack/components/generators/chat/azure.py:275-285 — 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 142 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:259-269 | 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/components/generators/chat/test_openai_responses_conversion.py:1293— # 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.
TodoComment test/core/pipeline/test_pipeline_base.py:1824— # 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.
FunctionTooLong: index.DocsVersionDropdownNavbarItem docs-website/src/theme/NavbarItem/DocsVersionDropdownNavbarItem/index.js:77— FunctionTooLong — DocsVersionDropdownNavbarItem runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.CopyDropdown docs-website/src/components/CopyDropdown/index.tsx:131— FunctionTooLong — CopyDropdown runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
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:61— haystack/components/evaluators/document_map.py:61-80 | haystack/components/evaluators/document_mrr.py:59-78 | 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.
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 86 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:526— haystack/components/agents/tool_calling.py:526-556 | haystack/components/agents/tool_calling.py:615-645 — 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:128— haystack/components/retrievers/multi_query_embedding_retriever.py:128-152 | haystack/components/retrievers/multi_query_text_retriever.py:106-130 — 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:259— haystack/components/generators/chat/azure_responses.py:259-275 | haystack/components/generators/chat/openai_responses.py:358-375 — 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:253` calls `get`, `isinstance`, `deserialize_callable` and `haystack/components/generators/chat/openai_responses.py:354` 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:236— haystack/components/preprocessors/python_code_splitter.py:236-252 | haystack/components/preprocessors/python_code_splitter.py:265-282 — 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 (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/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 (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/embedders/azure_document_embedder.py:245— haystack/components/embedders/azure_document_embedder.py:245-258 | 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 142 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 (10–11 lines × 2) haystack/components/extractors/image/llm_document_content_extractor.py:302— haystack/components/extractors/image/llm_document_content_extractor.py:302-312 | haystack/components/extractors/llm_metadata_extractor.py:309-318 — 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:302` 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:300` calls `from_user`, `TextContent` and `haystack/components/extractors/llm_metadata_extractor.py:307` 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:338— haystack/components/extractors/image/llm_document_content_extractor.py:338-348 | haystack/components/extractors/llm_metadata_extractor.py:332-341 — 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:338` 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:336` calls `from_user`, `TextContent` and `haystack/components/extractors/llm_metadata_extractor.py:330` 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 lines × 2) haystack/components/evaluators/llm_evaluator.py:245— haystack/components/evaluators/llm_evaluator.py:245-254 | haystack/components/evaluators/llm_evaluator.py:319-328 — 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 (7 lines × 2) haystack/components/agents/agent.py:961— haystack/components/agents/agent.py:961-967 | haystack/components/agents/agent.py:1057-1063 — 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/conditional_router.py:519— haystack/components/routers/conditional_router.py:519-525 | haystack/components/routers/conditional_router.py:532-538 — 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 (11 lines × 5) haystack/components/embedders/openai_document_embedder.py:142— haystack/components/embedders/openai_document_embedder.py:142-152 | haystack/components/embedders/openai_text_embedder.py:117-127 | haystack/components/generators/chat/openai.py:229-239 | haystack/components/generators/chat/openai_responses.py:252-262 | 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 × 5) haystack/components/embedders/openai_document_embedder.py:155— haystack/components/embedders/openai_document_embedder.py:155-165 | haystack/components/embedders/openai_text_embedder.py:130-140 | haystack/components/generators/chat/openai.py:242-252 | haystack/components/generators/chat/openai_responses.py:265-275 | 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 (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:190-196 | 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:206-212 | 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.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 8 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
Tool.__post_init__ (cyclomatic 43) haystack/tools/tool.py:112— Tool.__post_init__ has cyclomatic complexity 43 (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.
SearchBar (cyclomatic 34) docs-website/src/theme/SearchBar.js:176— SearchBar has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 12 of the 34 points are its own statements and the rest belongs to 24 function items inside it that branch (a function literal at line 193, (anonymous)::handleClickOutside, a function literal at line 255, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
openai_responses._convert_streaming_chunks_to_chat_message (cyclomatic 31) haystack/components/generators/chat/openai_responses.py:869— openai_responses._convert_streaming_chunks_to_chat_message 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.
PipelineBase.connect (cyclomatic 31) haystack/core/pipeline/base.py:586— 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.
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.
type_utils._strict_types_are_compatible (cyclomatic 26) haystack/core/type_utils.py:136— type_utils._strict_types_are_compatible 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.
openai_responses._convert_chat_message_to_responses_api_format (cyclomatic 24) haystack/components/generators/chat/openai_responses.py:979— openai_responses._convert_chat_message_to_responses_api_format 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.
versionedReferenceLinks.versionedReferenceLinks (cyclomatic 24) docs-website/src/remark/versionedReferenceLinks.js:37— versionedReferenceLinks.versionedReferenceLinks has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 86, 41, 79). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AnswerBuilder.run (cyclomatic 23) haystack/components/builders/answer_builder.py:126— AnswerBuilder.run 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:223— 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.
openai._convert_chat_completion_chunk_to_streaming_chunk (cyclomatic 22) haystack/components/generators/chat/openai.py:743— 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.
ChatMessage.from_openai_dict_format (cyclomatic 22) haystack/dataclasses/chat_message.py:756— ChatMessage.from_openai_dict_format 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.
XLSXToDocument._extract_tables (cyclomatic 21) haystack/components/converters/xlsx.py:161— XLSXToDocument._extract_tables has cyclomatic complexity 21 (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.
Root.RootWrapper (cyclomatic 21) docs-website/src/theme/Root.js:9— Root.RootWrapper has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 7 function items inside it that branch (getProduct, a function literal at line 96, a function literal at line 56, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Agent.__init__ (cyclomatic 20) haystack/components/agents/agent.py:420— 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.
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.
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:128— 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.
PythonCodeSplitter._emit_class_units (cyclomatic 19) haystack/components/preprocessors/python_code_splitter.py:211— PythonCodeSplitter._emit_class_units 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.
PythonCodeSplitter._extract_units (cyclomatic 19) haystack/components/preprocessors/python_code_splitter.py:322— PythonCodeSplitter._extract_units 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.
DocNavbarItem (cyclomatic 19) docs-website/src/theme/NavbarItem/DocNavbarItem/index.js:14— DocNavbarItem has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 35, 28, 93). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
JSONConverter._get_content_and_meta (cyclomatic 18) haystack/components/converters/json.py:179— 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:110— 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.
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:544— 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_to_chat_message (cyclomatic 17) haystack/components/generators/chat/openai_responses.py:664— openai_responses._convert_response_to_chat_message 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.
from_function.create_tool_from_function (cyclomatic 17) haystack/tools/from_function.py:18— from_function.create_tool_from_function 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.
DocsVersionDropdownNavbarItem (cyclomatic 17) docs-website/src/theme/NavbarItem/DocsVersionDropdownNavbarItem/index.js:77— DocsVersionDropdownNavbarItem has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 16 function items inside it that branch. 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._register_prompt_variables (cyclomatic 16) haystack/components/agents/agent.py:584— 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.
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 87) haystack/tools/tool.py:112— Tool.__post_init__ has cognitive complexity 87 (threshold 15). Drivers by points: if/else 24 (60 pts), boolean chains 13, loops 5 (13 pts), error handling 1 (nesting depth added 44). 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 55) haystack/components/converters/xlsx.py:161— XLSXToDocument._extract_tables has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 6 (14 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 33). 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 50) haystack/components/generators/chat/openai_responses.py:869— openai_responses._convert_streaming_chunks_to_chat_message has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 6 (9 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1 (2 pts) (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_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:586— 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:179— 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:345— 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:215— 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.
openai_responses._convert_chat_message_to_responses_api_format (cognitive 37) haystack/components/generators/chat/openai_responses.py:979— openai_responses._convert_chat_message_to_responses_api_format has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 2 (6 pts), boolean chains 5, loops 3 (5 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.
AnswerBuilder.run (cognitive 36) haystack/components/builders/answer_builder.py:126— AnswerBuilder.run has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 5 (12 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.
versionedReferenceLinks.versionedReferenceLinks (cognitive 36) docs-website/src/remark/versionedReferenceLinks.js:37— versionedReferenceLinks.versionedReferenceLinks has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 8 (nesting depth added 12). None of this is in the body itself: all 36 points belong to 3 function literals inside it that branch (lines 86, 41, 79). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
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:1786— 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.
SearchBar (cognitive 35) docs-website/src/theme/SearchBar.js:176— SearchBar has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 10, ternaries 6, error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 11 of the 35 points are its own statements and the rest belongs to 24 function items inside it that branch (a function literal at line 193, a function literal at line 255, (anonymous)::handleClickOutside, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
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:272— 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.
openai_responses._convert_response_to_chat_message (cognitive 32) haystack/components/generators/chat/openai_responses.py:664— openai_responses._convert_response_to_chat_message has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 2, ternaries 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.
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:223— 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.
DocumentCleaner.run (cognitive 31) haystack/components/preprocessors/document_cleaner.py:110— 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:128— 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.
ChatMessage.from_openai_dict_format (cognitive 31) haystack/dataclasses/chat_message.py:756— ChatMessage.from_openai_dict_format has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 6, 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.
PipelineBase._write_component_outputs (cognitive 30) haystack/core/pipeline/base.py:1653— 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.
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:743— 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.
type_utils._strict_types_are_compatible (cognitive 28) haystack/core/type_utils.py:136— type_utils._strict_types_are_compatible has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 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.
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.
PythonCodeSplitter._extract_units (cognitive 27) haystack/components/preprocessors/python_code_splitter.py:322— PythonCodeSplitter._extract_units has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 8, loops 2 (4 pts), ternaries 1 (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.
strategies._apply_tool_execution_decisions (cognitive 27) haystack/hooks/human_in_the_loop/strategies.py:544— 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:584— 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.
AnswerBuilder._extract_reference_idxs (cognitive 26) haystack/components/builders/answer_builder.py:281— AnswerBuilder._extract_reference_idxs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (4 pts) (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.
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.
PythonCodeSplitter._emit_class_units (cognitive 25) haystack/components/preprocessors/python_code_splitter.py:211— PythonCodeSplitter._emit_class_units has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 3 (5 pts), boolean chains 4, 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.
RecursiveDocumentSplitter._apply_overlap (cognitive 25) haystack/components/preprocessors/recursive_splitter.py:174— 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.
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.
RecursiveDocumentSplitter._fall_back_to_fixed_chunking (cognitive 23) haystack/components/preprocessors/recursive_splitter.py:437— 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.
from_function.create_tool_from_function (cognitive 23) haystack/tools/from_function.py:18— from_function.create_tool_from_function has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 4 (5 pts), boolean chains 3, loops 2, error handling 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.
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.
RootWrapper (cognitive 23) docs-website/src/theme/Root.js:9— RootWrapper has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 9, ternaries 1 (nesting depth added 2). None of this is in the body itself: all 23 points belong to 12 function items inside it that branch (getProduct, a function literal at line 96, a function literal at line 56, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Agent.__init__ (cognitive 22) haystack/components/agents/agent.py:420— 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.
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.
tool_calling._schedule_tool_calls (cognitive 20) haystack/components/agents/tool_calling.py:441— 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.
DocumentMAPEvaluator.run (cognitive 20) haystack/components/evaluators/document_map.py:93— DocumentMAPEvaluator.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 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.
PythonCodeSplitter.run (cognitive 20) haystack/components/preprocessors/python_code_splitter.py:574— 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:501— 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.
JsonSchemaValidator.run (cognitive 19) haystack/components/validators/json_schema.py:115— JsonSchemaValidator.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (6 pts), boolean chains 2, error handling 1, loops 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.
PipelineBase.validate_input (cognitive 19) haystack/core/pipeline/base.py:1126— 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.
PipelineBase._consume_component_inputs (cognitive 19) haystack/core/pipeline/base.py:1333— PipelineBase._consume_component_inputs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, 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.
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.
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.
PipelineBase._prepare_component_input_data (cognitive 18) haystack/core/pipeline/base.py:1220— PipelineBase._prepare_component_input_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 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.
from_function._remove_title_from_schema (cognitive 18) haystack/tools/from_function.py:356— 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.
index.createTurndownService (cognitive 18) docs-website/src/components/CopyDropdown/index.tsx:37— index.createTurndownService has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 6, if/else 2 (nesting depth added 6). None of this is in the body itself: all 18 points belong to 6 function literals inside it that branch (lines 86, 55, 102, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
DocNavbarItem (cognitive 18) docs-website/src/theme/NavbarItem/DocNavbarItem/index.js:14— DocNavbarItem has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 7, other 2, ternaries 2. Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 35, 28, 93). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
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.
OpenAIResponsesChatGenerator._prepare_api_call (cognitive 17) haystack/components/generators/chat/openai_responses.py:528— 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:396— 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:226— 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.
InMemoryDocumentStore.write_documents (cognitive 17) haystack/document_stores/in_memory/document_store.py:496— 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.
InMemoryDocumentStore.bm25_retrieval (cognitive 17) haystack/document_stores/in_memory/document_store.py:772— InMemoryDocumentStore.bm25_retrieval has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 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.
parameters_schema_utils._get_component_param_descriptions (cognitive 17) haystack/tools/parameters_schema_utils.py:118— 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:124— 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:111— 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:297— 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.
RecursiveDocumentSplitter._apply_word_overlap (cognitive 16) haystack/components/preprocessors/recursive_splitter.py:277— RecursiveDocumentSplitter._apply_word_overlap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), ternaries 1 (3 pts), boolean chains 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.
_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.
generate_platform_components_table.scan_for_components (cognitive 16) scripts/generate_platform_components_table.py:216— generate_platform_components_table.scan_for_components has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 2 (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.
D22 · Internal API Consistency· While having both sync and async variants is common, the `Agent` class exposes `run` and `run_async` directly on the main component. In contrast, other components like `OpenAIDocumentEmbedder` and `CacheChecker` also expose both, but `MockTextEmbedder` and `MockDocumentEmbedder` do the same. However, looking at `PromptBuilder` vs `ChatPromptBuilder`, there is a subtle inconsistency in return types and input handling that suggests a lack of unified interface for 'building' prompts, though not strictly a naming collision. The most glaring potential inconsistency is between `Agent.run` and `ChatPromptBuilder.run`. `Agent.run` takes `messages` directly, while `ChatPromptBuilder.run` takes `template` and `template_variables`. This is a domain difference (execution vs building), so it is NOT an inconsistency. · ×1
While having both sync and async variants is common, the `Agent` class exposes `run` and `run_async` directly on the main component. In contrast, other components like `OpenAIDocumentEmbedder` and `CacheChecker` also expose both, but `MockTextEmbedder` and `MockDocumentEmbedder` do the same. However, looking at `PromptBuilder` vs `ChatPromptBuilder`, there is a subtle inconsistency in return types and input handling that suggests a lack of unified interface for 'building' prompts, though not strictly a naming collision. The most glaring potential inconsistency is between `Agent.run` and `ChatPromptBuilder.run`. `Agent.run` takes `messages` directly, while `ChatPromptBuilder.run` takes `template` and `template_variables`. This is a domain difference (execution vs building), so it is NOT an inconsistency. — No action needed. The API is consistent in its use of `run`/`run_async` for execution and `to_dict`/`from_dict` for serialization across all major components (Agent, Embedders, Converters, Evaluators). The distinction between 'Builder' components (which construct data) and 'Executor' components (which run logic) is maintained. (signatures: Agent.run(self, messages: list[ChatMessage], ...) | Agent.run_async(self, messages: list[ChatMessage], ...))
Change coupling clique: cache_checker.py, filter_retriever.py, document_writer.py haystack/components/caching/cache_checker.py— 3 files — `haystack/components/caching/cache_checker.py`, `haystack/components/retrievers/filter_retriever.py`, `haystack/components/writers/document_writer.py` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Near-duplicate member pair (32 shared lines) haystack/components/agents/agent.py:1066— haystack/components/agents/agent.py:1066-1131 | haystack/components/agents/agent.py:1134-1201 — 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.
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 (65–72 lines × 2) haystack/components/embedders/azure_document_embedder.py:62— haystack/components/embedders/azure_document_embedder.py:62-133 | haystack/components/embedders/azure_text_embedder.py:55-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 142 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:62` 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 (52–54 lines × 2) haystack/hooks/human_in_the_loop/strategies.py:414— haystack/hooks/human_in_the_loop/strategies.py:414-465 | haystack/hooks/human_in_the_loop/strategies.py:480-533 — 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:261— haystack/components/evaluators/llm_evaluator.py:261-294 | haystack/components/evaluators/llm_evaluator.py:345-378 — 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 (29 lines × 2) haystack/components/retrievers/multi_query_embedding_retriever.py:158— haystack/components/retrievers/multi_query_embedding_retriever.py:158-186 | haystack/components/retrievers/multi_query_text_retriever.py:136-164 — 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 (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:96— haystack/components/evaluators/document_map.py:96-122 | haystack/components/evaluators/document_mrr.py:94-120 — 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:206— haystack/components/generators/chat/azure_responses.py:206-229 | haystack/components/generators/chat/openai_responses.py:307-333 — 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:206` 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 (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:237— haystack/document_stores/in_memory/document_store.py:237-257 | haystack/document_stores/in_memory/document_store.py:346-369 — 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:118-141 | haystack/components/converters/pypdf.py:239-261 | haystack/components/converters/txt.py:59-82 | haystack/components/converters/xlsx.py:99-122 — 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:264— haystack/components/embedders/openai_document_embedder.py:264-283 | haystack/components/embedders/openai_document_embedder.py:309-328 — 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:211— haystack/components/embedders/azure_document_embedder.py:211-228 | 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 142 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:211` 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 (16–17 lines × 2) haystack/tools/component_tool.py:182— haystack/tools/component_tool.py:182-198 | haystack/tools/component_tool.py:202-217 — 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 (15 lines × 3) haystack/document_stores/in_memory/document_store.py:271— haystack/document_stores/in_memory/document_store.py:271-285 | haystack/document_stores/in_memory/document_store.py:329-343 | haystack/document_stores/in_memory/document_store.py:383-397 — 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:455— haystack/components/extractors/image/llm_document_content_extractor.py:455-469 | haystack/components/extractors/llm_metadata_extractor.py:485-496 — 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:455` 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:61— haystack/components/evaluators/document_map.py:61-74 | haystack/components/evaluators/document_mrr.py:59-72 | 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:355— haystack/components/embedders/openai_document_embedder.py:355-362 | haystack/components/embedders/openai_document_embedder.py:388-398 — 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:388` 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:146-155 | 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:160-168 | haystack/components/converters/pdfminer.py:282-290 | haystack/components/converters/pptx.py:136-144 | haystack/components/converters/pypdf.py:256-264 | haystack/components/converters/txt.py:77-85 | haystack/components/converters/xlsx.py:117-126 — before extracting anything, compare `haystack/components/converters/pdfminer.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. 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 (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:160-167 | haystack/components/converters/pdfminer.py:282-289 | haystack/components/converters/pptx.py:136-143 | haystack/components/converters/pypdf.py:256-263 | haystack/components/converters/txt.py:77-84 | haystack/components/converters/xlsx.py:117-124 — 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 (6 lines × 3) haystack/components/converters/markdown.py:138— haystack/components/converters/markdown.py:138-144 | 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:232-236 — 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:151-166 | haystack/components/embedders/azure_text_embedder.py:132-147 | haystack/components/embedders/openai_document_embedder.py:129-139 | haystack/components/embedders/openai_text_embedder.py:104-114 | haystack/components/generators/chat/openai.py:216-226 | 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 142 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.
Duplicated block (11 lines × 2 locations) docs-website/src/remark/versionedReferenceLinks.js:89— docs-website/src/remark/versionedReferenceLinks.js:89 · docs-website/src/remark/versionedReferenceLinks.js:108 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 3 locations) docs-website/src/components/CopyDropdown/index.tsx:235— docs-website/src/components/CopyDropdown/index.tsx:235 · docs-website/src/components/CopyDropdown/index.tsx:243 · docs-website/src/components/CopyDropdown/index.tsx:253 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (7 lines × 2 locations) docs-website/src/components/CopyDropdown/index.tsx:245— docs-website/src/components/CopyDropdown/index.tsx:245 · docs-website/src/components/CopyDropdown/index.tsx:255 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Complex function (anonymous) (cyclomatic 14, cognitive 13) docs-website/src/theme/NavbarItem/DocNavbarItem/index.js:35— (anonymous) has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 13, cognitive 25) docs-website/src/remark/versionedReferenceLinks.js:86— (anonymous) has cyclomatic complexity 13 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function SearchBar (cyclomatic 12, cognitive 11) docs-website/src/theme/SearchBar.js:176— SearchBar has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handler (cyclomatic 11, cognitive 10) docs-website/api/mcp.ts:4— handler has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 11, cognitive 10) docs-website/src/remark/versionedReferenceLinks.js:41— (anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handler (cyclomatic 11, cognitive 9) docs-website/api/search.ts:5— handler has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· docs-website/src/theme/SearchBar.js · ×1
docs-website/src/theme/SearchBar.js: 442 lines of code docs-website/src/theme/SearchBar.js:1— docs-website/src/theme/SearchBar.js has 442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
No test script — test ✗ · lint ✓ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Dead file (~284 LoC) docs-website/src/components/CopyDropdown/index.tsx— no import path from any entry point (17 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~51 LoC) docs-website/src/components/ClickableImage/index.tsx— no import path from any entry point (17 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~46 LoC) docs-website/src/components/PlatformBadge/index.tsx— no import path from any entry point (17 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~37 LoC) docs-website/src/components/ProductOnly/index.tsx— no import path from any entry point (17 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~34 LoC) docs-website/src/components/YoutubeEmbed/index.tsx— no import path from any entry point (17 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~13 LoC) docs-website/api/well-known.ts— no import path from any entry point (17 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency '@docusaurus/faster' — Declared in docs-website/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@docusaurus/module-type-aliases' — Declared in docs-website/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@mdx-js/react' — Declared in docs-website/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×1
JavaScript dependencies are not locked — No package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock — JS installs aren't reproducible (SSDF PW.4.4). Commit your package manager's lockfile and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×1
Untrusted text written into markup unescaped docs-website/src/theme/SearchBar.js:467— `result.snippet` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
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.
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.
README/code drift docs-website/README.md:34— docs-website/README.md names `haystack/docs-website`, but no file or folder `haystack/docs-website` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/token-counters.mdx:25— docs-website/docs/token-counters.mdx links to `/reference/token-counters-api`, but `reference/token-counters-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/concepts/data-classes.mdx:14— docs-website/docs/concepts/data-classes.mdx links to `/reference/data-classes-api`, but `reference/data-classes-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/concepts/secret-management.mdx:16— docs-website/docs/concepts/secret-management.mdx links to `/reference/utils-api`, but `reference/utils-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/development/hayhooks.mdx:73— docs-website/docs/development/hayhooks.mdx documents the setting `HAYHOOKS_HOST:HAYHOOKS_PORT`, but no code or configuration file names `HAYHOOKS_HOST`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/development/hayhooks.mdx:79— docs-website/docs/development/hayhooks.mdx names `pipeline_wrapper.py`, but no file or folder `pipeline_wrapper.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/alloydbdocumentstore.mdx:13— docs-website/docs/document-stores/alloydbdocumentstore.mdx links to `/reference/integrations-alloydb`, but `reference/integrations-alloydb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/alloydbdocumentstore.mdx:40— docs-website/docs/document-stores/alloydbdocumentstore.mdx documents the environment variable `ALLOYDB_INSTANCE_URI`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/alloydbdocumentstore.mdx:41— docs-website/docs/document-stores/alloydbdocumentstore.mdx documents the environment variable `ALLOYDB_USER`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/alloydbdocumentstore.mdx:41— docs-website/docs/document-stores/alloydbdocumentstore.mdx names `.gserviceaccount.com`, but no file or folder `.gserviceaccount.com` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/alloydbdocumentstore.mdx:42— docs-website/docs/document-stores/alloydbdocumentstore.mdx documents the environment variable `ALLOYDB_PASSWORD`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/arangodocumentstore.mdx:16— docs-website/docs/document-stores/arangodocumentstore.mdx links to `/reference/integrations-arangodb`, but `reference/integrations-arangodb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/arangodocumentstore.mdx:45— docs-website/docs/document-stores/arangodocumentstore.mdx documents the environment variable `ARANGO_USERNAME`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/arangodocumentstore.mdx:45— docs-website/docs/document-stores/arangodocumentstore.mdx documents the environment variable `ARANGO_PASSWORD`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/arcadedbdocumentstore.mdx:13— docs-website/docs/document-stores/arcadedbdocumentstore.mdx links to `/reference/integrations-arcadedb`, but `reference/integrations-arcadedb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/arcadedbdocumentstore.mdx:43— docs-website/docs/document-stores/arcadedbdocumentstore.mdx documents the environment variable `ARCADEDB_USERNAME`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/arcadedbdocumentstore.mdx:44— docs-website/docs/document-stores/arcadedbdocumentstore.mdx documents the environment variable `ARCADEDB_PASSWORD`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/astradocumentstore.mdx:13— docs-website/docs/document-stores/astradocumentstore.mdx links to `/reference/integrations-astra`, but `reference/integrations-astra` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/azureaisearchdocumentstore.mdx:16— docs-website/docs/document-stores/azureaisearchdocumentstore.mdx links to `/reference/integrations-azure_ai_search`, but `reference/integrations-azure_ai_search` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/azuredocumentdbdocumentstore.mdx:16— docs-website/docs/document-stores/azuredocumentdbdocumentstore.mdx links to `/reference/integrations-azure-documentdb`, but `reference/integrations-azure-documentdb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/chromadocumentstore.mdx:13— docs-website/docs/document-stores/chromadocumentstore.mdx links to `/reference/integrations-chroma`, but `reference/integrations-chroma` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/dynamodbdocumentstore.mdx:13— docs-website/docs/document-stores/dynamodbdocumentstore.mdx links to `/reference/integrations-dynamodb`, but `reference/integrations-dynamodb` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/elasticsearch-document-store.mdx:16— docs-website/docs/document-stores/elasticsearch-document-store.mdx links to `/reference/integrations-elasticsearch`, but `reference/integrations-elasticsearch` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/elasticsearch-document-store.mdx:36— docs-website/docs/document-stores/elasticsearch-document-store.mdx names `docker-compose.yml`, but no file or folder `docker-compose.yml` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs-website/docs/document-stores/faissdocumentstore.mdx:13— docs-website/docs/document-stores/faissdocumentstore.mdx links to `/reference/integrations-faiss`, but `reference/integrations-faiss` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Duplicated predicate haystack/tools/component_tool.py:325— `"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:123— `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:119— `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:225— `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:261— `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:234— `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:111— `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:1017— `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/openai_document_embedder.py:343— `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:72— `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:318— `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.
Duplicated predicate haystack/components/generators/chat/azure_responses.py:222— `self.tools and isinstance(self.tools, list) and isinstance(self.tools[0], dict)` 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.
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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 7 significant file(s) lose their only recent owner: haystack/hooks/compaction/summarization.py, haystack/hooks/compaction/utils.py, haystack/token_counters/utils.py, haystack/hooks/tool_result_offloading/types/protocol.py, haystack/hooks/compaction/types/protocol.py, haystack/hooks/invocation.py, haystack/skill_stores/types/protocol.py. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 4 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 (11 single-owned of 199 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 199 of the 306 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (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, docs-website/src/components/CopyDropdown/index.tsx, haystack/testing/telemetry.py, haystack/components/routers/document_length_router.py.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (49696 LoC, 391 module-visible types across 61 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D30 · Dependency Vulnerabilities· Scanner failed to run · ×1
REDACTED
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 3 of 199 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 and example/demo trees and test files identified by path convention, largest first; 199 of the 306 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. 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.
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 src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
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. semgrep could not parse 1 file(s) — `REDACTED` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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 01a15a84-3898-7f96-8f2c-0e325aa8f1ff · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 34 · Warnings: 324 · Recommendations: 82 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 20-10-2026 @ 18:12 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.