Public report of ruvnet/RuVector, published 28 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). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 28 October 2026, 13:36 UTC · Survey ID cd_c316b928d5fd4e80b679f053f670e689
ruvnet/RuVector
Measured 28 October 2026, 13:27 UTC, at code version 4f6bbf9
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Test reliability is not measured: The rust executor ran against the .rs half and never executed.
CAI scoreAt riskDown 1 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 very large codebase: 1,317,610 lines of product code in 421 projects, tests not counted · Estimated rebuild effort: about 15.9 person-years · Weakest lens: Production Readiness, 40
Findings by how serious they are
474 critical6614 serious964 minor
12 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
28 October 2026, 13:27 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.
A critical security finding is open, such as a library with a known critical vulnerability or a REDACTED or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
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 ▸
104of 104 dimensions measured by tools.
7904of 8052 findings point to an exact file and line, so you can open each one in the code. The other 148 concern the repository as a whole, such as missing documentation.
104dimensions across 9 lenses, read from 1,317,610 lines of product code in 421 projects.
ruvnet/RuVector is rated At risk because critical security findings are open, most of them in its code. Its score is held back because three passwords or keys sit in the current code and it has uses of packages that aren't listed. It scores 50 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 40, is the weakest lens and counts most in the score. The best first step is replacing the three exposed passwords or keys and switching the old ones off, worth about 9 points. Replacing each retired release comes next, worth about 7 points. Raising Production Readiness to 70 would lift the score to about 58.
126 weaknesses in the code could be used by an attacker. 113 places in the code run text as code, which an attacker could use, and thirty-nine settings leave the servers or containers unsafe. Fixing the weaknesses the scanner points to, replacing text run as code with direct calls and correcting the unsafe settings would close these risks. Pinning each tool to an exact version would fix the 38 pipeline tools referenced by a changeable name, and the 18 passwords or keys in the code's history and the three passwords or keys in the code need replacing, with the old ones switched off. The 30 parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.
The product code is 1,317,610 lines, about €2,300,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 40 to 70, the lowest score rated Strong, the score would rise from 50 to about 58.
Code composition: what the lines of code are
Product code 64%Tests 36%
New since the last survey: 1543 findings
These 1543 critical or serious findings weren't in the previous survey, on 14 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
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: 1138 findings
These 1138 critical or serious findings were in the previous survey, on 14 October 2026, and are gone from this one. The first 100 are listed here.
€770,000 to €3,900,000, for 12,831 to 40,704 hours of work, about 15.9 person-years for 9 to 31 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.7 at a score of 50. 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
Very large: 1,317,610 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: 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
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED.
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 €2,300,000 to build again, about 15.9 person-years of work. Its weakest lens is Production Readiness, at 40 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 9 points for low effort, because it clears the 3 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
3027 modules, with 6350 dependencies between them. 23 loops run through 229 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 2987 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.
candle_core.shape uses agentic_robotics_core.error, so a change to agentic_robotics_core.error can break candle_core.shape, while a change to candle_core.shape can't break agentic_robotics_core.error.
Position
Below the diagonal: candle_core.shape uses a module listed above it, which is the healthy direction.
prime_radiant.coherence.engine uses prime_radiant.types, so a change to prime_radiant.types can break prime_radiant.coherence.engine, while a change to prime_radiant.coherence.engine can't break prime_radiant.types.
Position
Below the diagonal: prime_radiant.coherence.engine uses a module listed above it, which is the healthy direction.
ruvector_attention.traits uses ruvector_graph_transformer_node.transformer, so a change to ruvector_graph_transformer_node.transformer can break ruvector_attention.traits, while a change to ruvector_attention.traits can't break ruvector_graph_transformer_node.transformer.
Position
Below the diagonal: ruvector_attention.traits uses a module listed above it, which is the healthy direction.
ruvector_consciousness.types uses ruvix_queue, so a change to ruvix_queue can break ruvector_consciousness.types, while a change to ruvector_consciousness.types can't break ruvix_queue.
Position
Below the diagonal: ruvector_consciousness.types uses a module listed above it, which is the healthy direction.
ruvector_edge_registry.authz uses ruvector_edge_auth.scopes, so a change to ruvector_edge_auth.scopes can break ruvector_edge_registry.authz, while a change to ruvector_edge_registry.authz can't break ruvector_edge_auth.scopes.
Position
Below the diagonal: ruvector_edge_registry.authz uses a module listed above it, which is the healthy direction.
ruvector_edge_registry.authz uses ruvector_edge_tenancy.names, so a change to ruvector_edge_tenancy.names can break ruvector_edge_registry.authz, while a change to ruvector_edge_registry.authz can't break ruvector_edge_tenancy.names.
Position
Below the diagonal: ruvector_edge_registry.authz uses a module listed above it, which is the healthy direction.
ruvector_edge_store.context uses ruvector_edge_auth.scopes, so a change to ruvector_edge_auth.scopes can break ruvector_edge_store.context, while a change to ruvector_edge_store.context can't break ruvector_edge_auth.scopes.
Position
Below the diagonal: ruvector_edge_store.context uses a module listed above it, which is the healthy direction.
ruvector_edge_store.context uses ruvector_edge_tenancy.names, so a change to ruvector_edge_tenancy.names can break ruvector_edge_store.context, while a change to ruvector_edge_store.context can't break ruvector_edge_tenancy.names.
Position
Below the diagonal: ruvector_edge_store.context uses a module listed above it, which is the healthy direction.
ruvector_edge_store.ports uses agentic_robotics_core.message, so a change to agentic_robotics_core.message can break ruvector_edge_store.ports, while a change to ruvector_edge_store.ports can't break agentic_robotics_core.message.
Position
Below the diagonal: ruvector_edge_store.ports uses a module listed above it, which is the healthy direction.
ruvector_graph_wasm.cypher_exec uses prime_radiant.types, so a change to prime_radiant.types can break ruvector_graph_wasm.cypher_exec, while a change to ruvector_graph_wasm.cypher_exec can't break prime_radiant.types.
Position
Below the diagonal: ruvector_graph_wasm.cypher_exec uses a module listed above it, which is the healthy direction.
mcp_brain_server.types uses ruvector_edge_store.ports, so a change to ruvector_edge_store.ports can break mcp_brain_server.types, while a change to mcp_brain_server.types can't break ruvector_edge_store.ports.
Position
Below the diagonal: mcp_brain_server.types uses a module listed above it, which is the healthy direction.
mcp_brain_server.types uses ruvix_sched, so a change to ruvix_sched can break mcp_brain_server.types, while a change to mcp_brain_server.types can't break ruvix_sched.
Position
Below the diagonal: mcp_brain_server.types uses a module listed above it, which is the healthy direction.
ruvix_fs.path uses ruvector_edge_store.mem_store.parse, so a change to ruvector_edge_store.mem_store.parse can break ruvix_fs.path, while a change to ruvix_fs.path can't break ruvector_edge_store.mem_store.parse.
Position
Below the diagonal: ruvix_fs.path uses a module listed above it, which is the healthy direction.
ruvix_fs.path uses ruvector_edge_registry.authz, so a change to ruvector_edge_registry.authz can break ruvix_fs.path, while a change to ruvix_fs.path can't break ruvector_edge_registry.authz.
Position
Below the diagonal: ruvix_fs.path uses a module listed above it, which is the healthy direction.
ruvix_fs.path uses ruvector_graph_wasm.cypher_exec, so a change to ruvector_graph_wasm.cypher_exec can break ruvix_fs.path, while a change to ruvix_fs.path can't break ruvector_graph_wasm.cypher_exec.
Position
Below the diagonal: ruvix_fs.path uses a module listed above it, which is the healthy direction.
ruvix_qemu_swarm.consensus uses ruvix_queue, so a change to ruvix_queue can break ruvix_qemu_swarm.consensus, while a change to ruvix_qemu_swarm.consensus can't break ruvix_queue.
Position
Below the diagonal: ruvix_qemu_swarm.consensus uses a module listed above it, which is the healthy direction.
ruvix_qemu_swarm.consensus uses candle_core.shape, so a change to candle_core.shape can break ruvix_qemu_swarm.consensus, while a change to ruvix_qemu_swarm.consensus can't break candle_core.shape.
Position
Below the diagonal: ruvix_qemu_swarm.consensus uses a module listed above it, which is the healthy direction.
rvagent_middleware.types uses agentic_robotics_core.message, so a change to agentic_robotics_core.message can break rvagent_middleware.types, while a change to rvagent_middleware.types can't break agentic_robotics_core.message.
Position
Below the diagonal: rvagent_middleware.types uses a module listed above it, which is the healthy direction.
rvagent_middleware.types uses emergent_time.agentic_time, so a change to emergent_time.agentic_time can break rvagent_middleware.types, while a change to rvagent_middleware.types can't break emergent_time.agentic_time.
Position
Below the diagonal: rvagent_middleware.types uses a module listed above it, which is the healthy direction.
rvagent_middleware.types uses ruvector_edge_store.ports, so a change to ruvector_edge_store.ports can break rvagent_middleware.types, while a change to rvagent_middleware.types can't break ruvector_edge_store.ports.
Position
Below the diagonal: rvagent_middleware.types uses a module listed above it, which is the healthy direction.
ruvector_core.agenticdb uses micro_hnsw_wasm, so a change to micro_hnsw_wasm can break ruvector_core.agenticdb, while a change to ruvector_core.agenticdb can't break micro_hnsw_wasm.
Position
Below the diagonal: ruvector_core.agenticdb uses a module listed above it, which is the healthy direction.
ruvector_core.agenticdb uses ruvector_core.types, so a change to ruvector_core.types can break ruvector_core.agenticdb, while a change to ruvector_core.agenticdb can't break ruvector_core.types.
Position
Below the diagonal: ruvector_core.agenticdb uses a module listed above it, which is the healthy direction.
ruvector_core.agenticdb uses mcp_brain_server.types, so a change to mcp_brain_server.types can break ruvector_core.agenticdb, while a change to ruvector_core.agenticdb can't break mcp_brain_server.types.
Position
Below the diagonal: ruvector_core.agenticdb uses a module listed above it, which is the healthy direction.
rvagent_middleware uses agentic_robotics_core.error, so a change to agentic_robotics_core.error can break rvagent_middleware, while a change to rvagent_middleware can't break agentic_robotics_core.error.
Position
Below the diagonal: rvagent_middleware uses a module listed above it, which is the healthy direction.
rvagent_middleware uses emergent_time.agentic_time, so a change to emergent_time.agentic_time can break rvagent_middleware, while a change to rvagent_middleware can't break emergent_time.agentic_time.
Position
Below the diagonal: rvagent_middleware uses a module listed above it, which is the healthy direction.
rvagent_middleware uses ruvector_edge_store.ports, so a change to ruvector_edge_store.ports can break rvagent_middleware, while a change to rvagent_middleware can't break ruvector_edge_store.ports.
Position
Below the diagonal: rvagent_middleware uses a module listed above it, which is the healthy direction.
rvagent_middleware uses rvagent_middleware.types, so a change to rvagent_middleware.types can break rvagent_middleware, while a change to rvagent_middleware can't break rvagent_middleware.types.
Position
Below the diagonal: rvagent_middleware uses a module listed above it, which is the healthy direction.
rvf_runtime.store uses agentic_robotics_core.error, so a change to agentic_robotics_core.error can break rvf_runtime.store, while a change to rvf_runtime.store can't break agentic_robotics_core.error.
Position
Below the diagonal: rvf_runtime.store uses a module listed above it, which is the healthy direction.
rvf_runtime.store uses micro_hnsw_wasm, so a change to micro_hnsw_wasm can break rvf_runtime.store, while a change to rvf_runtime.store can't break micro_hnsw_wasm.
Position
Below the diagonal: rvf_runtime.store uses a module listed above it, which is the healthy direction.
rvf_runtime.store uses ruvector_core.types, so a change to ruvector_core.types can break rvf_runtime.store, while a change to rvf_runtime.store can't break ruvector_core.types.
Position
Below the diagonal: rvf_runtime.store uses a module listed above it, which is the healthy direction.
rvf_runtime.store uses ruvector_edge_store.error, so a change to ruvector_edge_store.error can break rvf_runtime.store, while a change to rvf_runtime.store can't break ruvector_edge_store.error.
Position
Below the diagonal: rvf_runtime.store uses a module listed above it, which is the healthy direction.
rvf_runtime.store uses ruvector_graph_wasm.cypher_exec, so a change to ruvector_graph_wasm.cypher_exec can break rvf_runtime.store, while a change to rvf_runtime.store can't break ruvector_graph_wasm.cypher_exec.
Position
Below the diagonal: rvf_runtime.store uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rvf_runtime.store uses a type in ruvix_sched.
The types involved
rvf_runtime.store.RvfStore → ruvix_sched.Instant
Direction
rvf_runtime.store uses ruvix_sched, so a change to ruvix_sched can break rvf_runtime.store, while a change to rvf_runtime.store can't break ruvix_sched.
Position
Below the diagonal: rvf_runtime.store uses a module listed above it, which is the healthy direction.
rvf_runtime.store uses ruvix_fs.path, so a change to ruvix_fs.path can break rvf_runtime.store, while a change to rvf_runtime.store can't break ruvix_fs.path.
Position
Below the diagonal: rvf_runtime.store uses a module listed above it, which is the healthy direction.
ruvector_fpga_transformer.types uses ruvector_core.agenticdb, so a change to ruvector_core.agenticdb can break ruvector_fpga_transformer.types, while a change to ruvector_fpga_transformer.types can't break ruvector_core.agenticdb.
Position
Below the diagonal: ruvector_fpga_transformer.types uses a module listed above it, which is the healthy direction.
ruvector_temporal_tensor.store uses ruvector_core.agenticdb, so a change to ruvector_core.agenticdb can break ruvector_temporal_tensor.store, while a change to ruvector_temporal_tensor.store can't break ruvector_core.agenticdb.
Position
Below the diagonal: ruvector_temporal_tensor.store uses a module listed above it, which is the healthy direction.
ruvix_nucleus.kernel uses ruvix_queue, so a change to ruvix_queue can break ruvix_nucleus.kernel, while a change to ruvix_nucleus.kernel can't break ruvix_queue.
Position
Below the diagonal: ruvix_nucleus.kernel uses a module listed above it, which is the healthy direction.
ruvix_nucleus.kernel uses ruvector_core.agenticdb, so a change to ruvector_core.agenticdb can break ruvix_nucleus.kernel, while a change to ruvix_nucleus.kernel can't break ruvector_core.agenticdb.
Position
Below the diagonal: ruvix_nucleus.kernel uses a module listed above it, which is the healthy direction.
candle_core.cuda_backend uses ruvector_edge_store.mem_store.parse, so a change to ruvector_edge_store.mem_store.parse can break candle_core.cuda_backend, while a change to candle_core.cuda_backend can't break ruvector_edge_store.mem_store.parse.
Position
Below the diagonal: candle_core.cuda_backend uses a module listed above it, which is the healthy direction.
candle_core.cuda_backend uses candle_core.shape, so a change to candle_core.shape can break candle_core.cuda_backend, while a change to candle_core.cuda_backend can't break candle_core.shape.
Position
Below the diagonal: candle_core.cuda_backend uses a module listed above it, which is the healthy direction.
candle_core.cuda_backend uses ruvector_fpga_transformer.types, so a change to ruvector_fpga_transformer.types can break candle_core.cuda_backend, while a change to candle_core.cuda_backend can't break ruvector_fpga_transformer.types.
Position
Below the diagonal: candle_core.cuda_backend uses a module listed above it, which is the healthy direction.
candle_core.cuda_backend uses ruvector_temporal_tensor.store, so a change to ruvector_temporal_tensor.store can break candle_core.cuda_backend, while a change to candle_core.cuda_backend can't break ruvector_temporal_tensor.store.
Position
Below the diagonal: candle_core.cuda_backend uses a module listed above it, which is the healthy direction.
candle_core.device uses candle_core.shape, so a change to candle_core.shape can break candle_core.device, while a change to candle_core.device can't break candle_core.shape.
Position
Below the diagonal: candle_core.device uses a module listed above it, which is the healthy direction.
candle_core.device uses ruvector_temporal_tensor.store, so a change to ruvector_temporal_tensor.store can break candle_core.device, while a change to candle_core.device can't break ruvector_temporal_tensor.store.
Position
Below the diagonal: candle_core.device uses a module listed above it, which is the healthy direction.
37→39 candle_core.device uses candle_core.cpu_backendpart of a loop✕
Connections
1 pair of types, where a type in candle_core.device uses a type in candle_core.cpu_backend.
candle_core.device uses candle_core.cpu_backend, so a change to candle_core.cpu_backend can break candle_core.device, while a change to candle_core.device can't break candle_core.cpu_backend.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ruvllm.backends uses ruvector_graph_wasm.cypher_exec, so a change to ruvector_graph_wasm.cypher_exec can break ruvllm.backends, while a change to ruvllm.backends can't break ruvector_graph_wasm.cypher_exec.
Position
Below the diagonal: ruvllm.backends uses a module listed above it, which is the healthy direction.
ruvllm.backends uses ruvix_fs.path, so a change to ruvix_fs.path can break ruvllm.backends, while a change to ruvllm.backends can't break ruvix_fs.path.
Position
Below the diagonal: ruvllm.backends uses a module listed above it, which is the healthy direction.
ruvllm.backends uses ruvector_temporal_tensor.store, so a change to ruvector_temporal_tensor.store can break ruvllm.backends, while a change to ruvllm.backends can't break ruvector_temporal_tensor.store.
Position
Below the diagonal: ruvllm.backends uses a module listed above it, which is the healthy direction.
candle_core.cpu_backend uses agentic_robotics_core.error, so a change to agentic_robotics_core.error can break candle_core.cpu_backend, while a change to candle_core.cpu_backend can't break agentic_robotics_core.error.
Position
Below the diagonal: candle_core.cpu_backend uses a module listed above it, which is the healthy direction.
candle_core.cpu_backend uses ruvector_edge_store.mem_store.parse, so a change to ruvector_edge_store.mem_store.parse can break candle_core.cpu_backend, while a change to candle_core.cpu_backend can't break ruvector_edge_store.mem_store.parse.
Position
Below the diagonal: candle_core.cpu_backend uses a module listed above it, which is the healthy direction.
candle_core.cpu_backend uses candle_core.shape, so a change to candle_core.shape can break candle_core.cpu_backend, while a change to candle_core.cpu_backend can't break candle_core.shape.
Position
Below the diagonal: candle_core.cpu_backend uses a module listed above it, which is the healthy direction.
candle_core.cpu_backend uses ruvector_fpga_transformer.types, so a change to ruvector_fpga_transformer.types can break candle_core.cpu_backend, while a change to candle_core.cpu_backend can't break ruvector_fpga_transformer.types.
Position
Below the diagonal: candle_core.cpu_backend uses a module listed above it, which is the healthy direction.
candle_core.cpu_backend uses ruvector_temporal_tensor.store, so a change to ruvector_temporal_tensor.store can break candle_core.cpu_backend, while a change to candle_core.cpu_backend can't break ruvector_temporal_tensor.store.
Position
Below the diagonal: candle_core.cpu_backend uses a module listed above it, which is the healthy direction.
candle_core.cpu_backend uses candle_core.device, so a change to candle_core.device can break candle_core.cpu_backend, while a change to candle_core.cpu_backend can't break candle_core.device.
Position
Below the diagonal: candle_core.cpu_backend uses a module listed above it, which is the healthy direction.
ruvector_mincut.graph uses prime_radiant.types, so a change to prime_radiant.types can break ruvector_mincut.graph, while a change to ruvector_mincut.graph can't break prime_radiant.types.
Position
Below the diagonal: ruvector_mincut.graph uses a module listed above it, which is the healthy direction.
ruvector_mincut.graph uses candle_core.cuda_backend, so a change to candle_core.cuda_backend can break ruvector_mincut.graph, while a change to ruvector_mincut.graph can't break candle_core.cuda_backend.
Position
Below the diagonal: ruvector_mincut.graph 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
514
High / Critical
A02:2025 — Security Misconfiguration
145
High / Critical
A03:2025 — Software Supply Chain Failures
75
High / Critical
A07:2025 — Authentication Failures
22
High / Critical
Roadmap
Immediately resolve the three leaked secrets in configuration and source files, and address the single yanked dependency release to restore baseline security and stability. Clean up the dependency tree by removing unused packages and explicitly declaring unlisted imports to reduce maintenance overhead. Strengthen outbound HTTP resilience by enforcing request timeouts and adding retry logic with back-off for all client calls. Finally, improve test coverage by adding tests for currently unreached production modules to ensure code reliability.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED.
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
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 — 474
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 — 6614
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 — 964
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 12
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. 104 of 104 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. 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 — 104 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, 7904 of 8052 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: this repository's production source spans .ts, .tsx, .rs, and our analyzer cannot run the .rs test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 95.3% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero. In the meantime, produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`, or lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) 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 and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) 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 both halves are read on the next scan.
D10 Test Quality — 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. The 2,537 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 2,225 test source file(s) (.rs, .py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — 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. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `npm install --ignore-scripts` (no lockfile) in .claude/intelligence/ (1 tests); node:test via `npm install --ignore-scripts` (no lockfile) in crates/ruvector-attention-node/; node:test via `npm install --ignore-scripts` (no lockfile) in crates/ruvector-gnn-node/ (43 tests); node:test via `npm install --ignore-scripts` (no lockfile) in crates/ruvector-solver-node/; node:test via `npm ci --ignore-scripts` in crates/ruvector-sota-bench/harness/ (167 tests); vitest via `npm install --ignore-scripts` (no lockfile) in examples/delta-behavior/wasm/ (0 tests); vitest via `npm install --ignore-scripts` (no lockfile) in examples/dragnes/ (48 tests); vitest via `npm install --ignore-scripts` (no lockfile) in examples/edge-net/dashboard/; node:test via `npm install --ignore-scripts` (no lockfile) in examples/edge-net/relay/ (24 tests); jest via `npm install --ignore-scripts` (no lockfile) in examples/edge-net/tests/ (26 tests); node:test via `npm install --ignore-scripts` (no lockfile) in examples/mragent/ (14 tests); node:test via `npm install --ignore-scripts` (no lockfile) in examples/neural-trader/): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
D11 Test Reliability — 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. Test reliability for the vitest suite in examples/edge-net/dashboard/ was NOT MEASURED: the dependency install for examples/edge-net/dashboard/ failed in the analyzer sandbox (npm error Cannot read properties of null (reading 'edgesOut')), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the node:test suite in crates/ruvector-attention-node/ was NOT MEASURED: the node:test run in crates/ruvector-attention-node/ produced no per-test report (> @ruvector/attention@0.1.4 test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the node:test suite in crates/ruvector-solver-node/ was NOT MEASURED: the node:test run in crates/ruvector-solver-node/ produced no per-test report (> @ruvector/solver@0.1.0 test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
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 crate 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.
D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (25 contributor(s) across 3575 commit(s) sampled, automation and bot accounts excluded). One of them holds 88% of the history; the other 24 hold 0.5% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — 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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — 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 kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D20 ADR Quality — 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. The ADR lexicon (adr-lexicon-1) covers de, en, it, nl. A record identified as another language, or whose language could not be identified (fewer than 25 words of prose, or no clear winner), is never read with English rules: its missing-section, status, consequence-cost and same-question rules abstain, and only the structural rules (title, single option, dangling link, enforcement field) run.
D21 Naming Consistency — 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. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — 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. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — 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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
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.
D28 Secrets (history) — 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. D28's history REDACTED rule (WD-SECRET-0005) walks the history with git, and walking the history with `git log -p` outran its 344 s budget — so its 0 row(s) are what was read before it stopped, not a statement that the rest of the history holds no such REDACTED.
D31 IaC & Container Security — 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. Checkov ran but its report could not be read (checkov produced no output — not a clean result). Every misconfiguration only checkov reports — most of its Terraform, CloudFormation, Bicep and Ansible policies — is absent from this card, so its absence here is not evidence those resources are configured correctly.
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`, `docs/explorer/capability-lab.js`, `docs/explorer/experience-labs.js`, `docs/research/claude-code-rvsource/extracted/source/config/model-provider.js`, `docs/research/claude-code-rvsource/extracted/source/core/agent-loop.js`, … (+368 more) 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.
D41 Kernel & Syscall Confinement — 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. Ui/ruvocal/chart/templates/deployment.yaml:2 did not read as a pod spec (a templated manifest such as Helm's that is not YAML until rendered, or a workload whose pod spec this check does not locate), so the seccomp/AppArmor profile in force there was not judged and no row about them can appear on this card.
AC6 Visual & motion safety — 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. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
AX1 Captive dependencies — 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in npm/packages/ruvllm/src/lora.ts, whose lifetimes are not modelled 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.
AX6 Interface segregation — 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 is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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.
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 DockerCompose (examples/edge-net/dashboard/docker-compose.yml). compose up failed (exit 17 — an image could not be built) — failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1; runtime evidence skipped.
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, Rust, Svelte components, c, cpp, verilog 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, Rust, Svelte components, c, cpp, verilog 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P2 Observability — 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. 279 further occurrence(s) are not listed individually; the score already reflects all 319.
P8 Schema migrations — 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. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
R10 Code Duplication — 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. 525 further occurrence(s) are not listed individually; the score already reflects all 565.
R11 Import Boundaries — 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. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
R3 Large Files — 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. 51 further occurrence(s) are not listed individually; the score already reflects all 91.
R4 Test Coverage — 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. 443 further occurrence(s) are not listed individually; the score already reflects all 483.
R7 Dead Code — 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. 104 further occurrence(s) are not listed individually; the score already reflects all 144.
X15 Unvalidated length from an untrusted reader — 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. 2 further occurrence(s) are not listed individually; the score already reflects all 42.
X2 Cancellation propagation — 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. 30 further occurrence(s) are not listed individually; the score already reflects all 70.
X3 Exception handling — 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. 180 further occurrence(s) are not listed individually; the score already reflects all 220.
X4 Structured logging — 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. 358 further occurrence(s) are not listed individually; the score already reflects all 398.
X7 Silent fallback defaults — 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. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
Repo exclusion declarations: 30 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
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.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
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.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
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.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED 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.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
D25 ADR Conformance: ADR conformance is the LLM-scored fraction of sampled code that follows recorded decisions — it checks the decisions that were written down and the slices it sampled, not unrecorded rules or the whole tree.
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.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
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 REDACTED (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.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
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".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
337 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ruvector_hailo_cluster::bin::embed::main at 90. A further 78 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being MetalStorage::unary_impl at 170 — they are counted neither in the figure above nor in this dimension's score. 35 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/rvf/rvf-types/src/error.rs (ErrorCode::try_from at 84), crates/ruvector-postgres/src/graph/sparql/functions.rs (ruvector_postgres::graph::sparql::functions::evaluate_function at 40), crates/mcp-brain-server/src/types.rs (BrainCategory::fmt at 35), crates/ruvix/crates/fs/src/error.rs (FsError::to_errno at 34), crates/rvm/crates/rvm-types/src/error.rs (RvmError::fmt at 34), and 30 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 189 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 9 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with ruvector_hailo_cluster::bin::embed::main (cyclomatic 90), Tensor::backward (cyclomatic 88), Tensor::backward (cyclomatic 86). — 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 9 together lifts Cyclomatic Complexity from 6.1 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; 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.
+ 533 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 120 down to 120 or less in Cognitive Complexity — start with ruvector_temporal_tensor::quantizer::dequantize_f32 (cognitive 147), SubquadraticSparseAttention::forward_flash_inner (cognitive 146), ruvector_hailo_cluster::bin::embed::main (cognitive 137). — 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 Cognitive Complexity from 5.5 to about 5.7/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
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.1 / 10Stronggated by 396 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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 150 FileTooLong finding(s) in God Classes — start with mod.rs (9), lib.rs (7), parser.rs (5). — One of this dimension's main actionable groups (150 warning-level).
Resolve the 78 FunctionTooLong finding(s) in God Classes — start with benchmark.rs (17), main.rs (10), matmul.rs (3). — One of this dimension's main actionable groups (78 warning-level).
Resolve the 76 MethodTooLong finding(s) in God Classes — start with mod.rs (12), store.rs (6), backprop.rs (4). — One of this dimension's main actionable groups (76 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.
3086 duplicated block group(s) detected. A further 233 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 2 of the 3319 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 511 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 235 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with mod.rs (40), tensor.rs (9), safetensors.rs (8). — One of this dimension's main actionable groups (235 warning-level).
Resolve the 198 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with mod.rs (16), tensor.rs (10), simd.rs (7). — One of this dimension's main actionable groups (198 warning-level).
Resolve the 188 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with mod.rs (32), hnsw.rs (7), lib.rs (6). — One of this dimension's main actionable groups (188 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.
Do you agree with this assessment?
D5 · Coupling8.7 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
421 production modules (Cargo+npm+Python), 0 dependency cycle(s), 6 unstable depended-on module(s). Read from the build's own module declarations; 61 module(s) off the main sequence, with abstractness counted on 272 of the 421 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: cognitum-gate-tilezero · ×61
Unstable project @ruvector/router
Unstable project @ruvector/tiny-dancer
Unstable project ruvector
Unstable project ruvector-edge-registry
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 61 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (61 warning-level).
Resolve the 1 Unstable project @ruvector/router finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project @ruvector/tiny-dancer finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_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 30 Low cohesion finding(s) in Cohesion (LCOM4) — start with config.rs (3), lib.rs (2), tensor.rs. — One of this dimension's main actionable groups (30 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.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Resolve the 510 Classify ADR enforcement finding(s) in Architectural Integrity — start with ADR-001-architecture.md (2), ADR-004-self-optimization-loop.md (2), ADR-005-security-model.md (2). — One of this dimension's main actionable groups (510 recommendation-level).
Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d7_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution9.9 / 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.
28821 test methods: 21250 unit, 7285 integration, 0 BDD, 286 e2e. The JavaScript/TypeScript suite contributes 2537 `it`/`test` case(s) across 182 test file(s) declaring at least one beside 11 .NET test method(s); its tier split is read from package names and paths only. The Rust suite contributes 25854 `#[test]` function(s) across 3383 file(s) declaring at least one; its unit/integration split is Cargo's own — 556 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 419 test function(s) across 39 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?
D10 · Test Quality9.9 / 10Stronggated by 24 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
14 skipped (14 with a documented reason), 29 zero-assertion, 3 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 2537 tests (1 harness-style project(s) excluded from the assertion penalty). Measured on the JavaScript/TypeScript suite only — at least 2,225 test source file(s) (.rs, .py) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: should add training data · ×21npm/packages/ruvllm/test/advanced-features.test.js:637
Fixed-sleep synchronisation: should re-queue running task when agent goes offline · ×3npm/packages/ruvbot/tests/integration/core/swarm-coordinator.test.ts:420
No direct assertions: Multi-Head Attention can be instantiated · ×8examples/meta-cognition-spiking-neural-network/verification/functional-test.js:31
Test project verifies nothing: examples/meta-cognition-spiking-neural-networkexamples/meta-cognition-spiking-neural-network/verification/functional-test.js:31
Skipped (documented): integrates with the default native/WASM binding when one is present · ×14npm/packages/typesafe/test/api.test.mjs:156
What to do
Resolve the 21 No assertions finding(s) in Test Quality — start with persistence.test.ts (8), e2e-wasm-test.mjs (7), swarm-coordinator.test.ts (2). — One of this dimension's main actionable groups (21 warning-level).
Resolve the 8 No direct assertions finding(s) in Test Quality — start with functional-test.js (8). — One of this dimension's main actionable groups (8 recommendation-level).
Resolve the 3 Fixed-sleep synchronisation finding(s) in Test Quality — start with swarm-coordinator.test.ts (3). — One of this dimension's main actionable groups (3 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
61 outdated, 1 yanked direct Cargo dependencies. 227 of 305 direct crates were graded against crates.io (0 not published there, 78 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Yanked release: spin
Outdated: arbitrary · ×61
What to do
Resolve the 1 Yanked release finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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 1097 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate 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: crates/rvf/rvf-types/src/error.rs (5×84=420); crates/rvf/rvf-runtime/src/store.rs (9×32=288); crates/rvf/rvf-wire/src/stream/verifier.rs (7×29=203) Repeated repair below the complexity floor: crates/ruvllm-cli/src/commands/serve.rs (4 of 4 changes were fixes); crates/ruvector-context/src/index.rs (4 of 4 changes were fixes); npm/packages/ruvector/src/index.ts (3 of 4 changes were fixes)
Resolve the 19 Hotspot finding(s) in Churn × Complexity Hotspots — start with error.rs, store.rs, verifier.rs. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 9 Repeated repair finding(s) in Churn × Complexity Hotspots — start with serve.rs, index.rs, REDACTED. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d15_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.
556 deducted task-comment markers across 1317610 LoC (0.0/KLoC) → score 9.9. 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 549 TodoComment finding(s) in Explicit Debt — start with distributed_tests.rs (44), mod.rs (30), exotic_tests.rs (25). — One of this dimension's main actionable groups (549 warning-level).
Resolve the 4 XxxComment finding(s) in Explicit Debt — start with safetensors.rs (4). — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 HackComment finding(s) in Explicit Debt — start with npy.rs (2), title.ts. — One of this dimension's main actionable groups (3 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: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 1036 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality9.8 / 10Exemplary✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
44 of 492 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
ADR declares no status · ×27docs/adr/ADR-026-rvcow-branching-and-real-cognitive-containers.md:1detected by adr-integrity
ADR superseded but its status says otherwise · ×7docs/adr/ADR-001-ruvector-core-architecture.md:3detected by adr-integrity
ADR has no Context section · ×5docs/adr/ADR-275-rvagent-subagent-topology.md:12detected by adr-integrity
ADR has no Consequences section · ×2docs/adr/quantum-engine/ADR-QE-013-deutsch-theorem-proof-verification.md:1detected by adr-integrity
ADR links a record that does not exist · ×2docs/adr/ADR-029-rvf-canonical-format.md:8detected by adr-integrity
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
✓ On the Gold path — maintain.
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
What it measures: Whether the code actually follows the decisions recorded in the project's ADRs.
Method: Judged by language model at low temperature against ADRs plus a deterministic structural code summary; findings linked to repo-rooted ADR paths for traceability. Advisory.
0 of 6 checkable records are broken by the code or by their own declared delivery (6 of 255 binding records state a rule in checkable form or declare their delivery; prose decisions are unverifiable).
16 of 280 build units (Cargo, 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: REDACTED 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.
18 finding(s): 0 critical, 18 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 16 REDACTED finding(s) in Secrets (history) — start with REDACTED (8), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (16 issue-level).
Resolve the 2 High secret finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
515 finding(s): 0 critical, 319 high, 191 medium, 5 low. 37 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 440 file(s) — `REDACTED`, `REDACTED` (line 23), `REDACTED`, `crates/mcp-brain-server/scripts/pubmed_discover.sh` (line 19), `crates/profiling/scripts/run_all_analysis.sh` (lines 122–155), … (+435 more) — 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 37 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
+ 32 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 118 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED (10), REDACTED (8). — One of this dimension's main actionable groups (118 issue-level).
Resolve the 107 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (22), REDACTED (14), REDACTED (13). — One of this dimension's main actionable groups (107 issue-level).
No action in Static Analysis (SAST) — all 37 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (37 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 8 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 issue-level).
Resolve the 8 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5), REDACTED (3). — One of this dimension's main actionable groups (8 warning-level).
Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 92 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (38), REDACTED (23), REDACTED (7). — One of this dimension's main actionable groups (92 warning-level).
Resolve the 37 High IaC finding(s) in IaC & Container Security — start with REDACTED (12), REDACTED (6), REDACTED (5). — One of this dimension's main actionable groups (37 issue-level).
Resolve the 2 Critical IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-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.
110 of 3000 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/rvm/crates/rvm-kernel/src/lib.rs. Counted over 3000 of the 3876 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 30 Orphaned knowledge finding(s) in Knowledge Freshness — start with lib.rs, pi_quant_simd.rs, pi_quant.rs. — One of this dimension's main actionable groups (30 issue-level).
Resolve the 80 Orphaned file finding(s) in Knowledge Freshness — start with lib.rs (7), manager.rs (2), calibration.rs (2). — One of this dimension's main actionable groups (80 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
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.
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.
+ 5 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 17 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 15 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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 Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
0/1 workload(s) run every container under a seccomp profile; 0/1 declare an AppArmor/SELinux profile.
What to do
Improve Kernel & Syscall Confinement — currently 6.0/10. — 0/1 workload(s) run every container under a seccomp profile; 0/1 declare an AppArmor/SELinux profile.
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.
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.
4 end-of-life runtime(s) and 0 end-of-life framework(s), read from 56 platform declaration(s) and 13 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.
Resolve the 4 End-of-life runtime finding(s) in Platform End-of-Life — start with package.json (4). — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives4.8 / 10Weak✓ Tool-verified
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.
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×4) — crates/mcp-brain-server/static/index.html:418, crates/mcp-brain-server/static/origin.html:111, ui/ruvocal/src/lib/components/FoundationBackground.svelte:226, …
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — ui/ruvocal/src/lib/components/chat/UploadedFile.svelte:166
An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. — ui/ruvocal/src/lib/components/icons/IconPro.svelte:0
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels6.1 / 10Adequate✓ Tool-verified
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.
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×8) — crates/mcp-brain-server/static/index.html:932, crates/mcp-brain-server/static/index.html:1255, npm/packages/ruvbot/src/api/public/index.html:646, …
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×10) — npm/packages/ruvbot/src/api/public/index.html:606, ui/ruvocal/src/lib/components/NavConversationItem.svelte:70, ui/ruvocal/src/lib/components/ShareConversationModal.svelte:127, …
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). — npm/packages/ruvbot/src/api/public/index.html:652
This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — ui/ruvocal/src/lib/components/chat/ImageLightbox.svelte:59
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
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.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — crates/mcp-brain-server/static/index.html:2, crates/mcp-brain-server/static/origin.html:2, crates/sona/wasm-example/index.html:2
Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×2) — crates/mcp-brain-server/static/index.html:604, crates/mcp-brain-server/static/index.html:654
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — ui/ruvocal/src/app.html:2
user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — ui/ruvocal/src/app.html:5
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
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".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×3) — crates/mcp-brain-server/static/index.html:645, crates/mcp-brain-server/static/index.html:925, crates/mcp-brain-server/static/index.html:1054
An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. — crates/mcp-brain-server/static/index.html:1022
A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0". (×3) — ui/ruvocal/src/lib/components/chat/ChatMessage.svelte:305, ui/ruvocal/src/lib/components/chat/ImageLightbox.svelte:44, ui/ruvocal/src/lib/components/chat/ImageLightbox.svelte:59
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.
`.fi` moves (`animation: fi 1s ease both`) 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. — crates/mcp-brain-server/static/index.html:302
`.hero h1` moves (`animation: pixelIn 2s cubic-bezier(0.16,1,0.3,1) 0.3s both`) 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. — crates/mcp-brain-server/static/index.html:312
`.hero .lead` moves (`animation: fi 1.2s ease 1.5s both`) 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. — crates/mcp-brain-server/static/index.html:313
`.hero-actions` moves (`animation: fi 1s ease 2s both`) 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. — crates/mcp-brain-server/static/index.html:314
`.hero .stats` moves (`animation: fi 1s ease 2.3s both`) 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. — crates/mcp-brain-server/static/index.html:315
`.key-display` moves (`animation: fi 0.8s ease both`) 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. — crates/mcp-brain-server/static/index.html:319
`#narrator` moves (`transition: opacity 0.8s ease, transform 0.8s 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. — crates/mcp-brain-server/static/origin.html:30
`#progress-bar` moves (`transition: width 0.3s 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. — crates/mcp-brain-server/static/origin.html:93
`.spinner` moves (`animation: spin 1s 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. — crates/sona/wasm-example/index.html:172
`.message` moves (`animation: fadeIn 0.3s 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. — npm/packages/ruvbot/src/api/public/index.html:202
`.typing-indicator span` moves (`animation: typing 1.4s 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. — npm/packages/ruvbot/src/api/public/index.html:305
`.input-wrapper textarea:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — npm/packages/ruvbot/src/api/public/index.html:356
<button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×4) — ui/ruvocal/src/lib/components/DeleteConversationModal.svelte:38, ui/ruvocal/src/lib/components/DeleteConversationModal.svelte:57, ui/ruvocal/src/lib/components/ExpandNavigation.svelte:11, …
<input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — ui/ruvocal/src/lib/components/NavConversationItem.svelte:70, ui/ruvocal/src/lib/components/ShareConversationModal.svelte:127
<textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — ui/ruvocal/src/lib/components/chat/ChatInput.svelte:236, ui/ruvocal/src/lib/components/chat/ChatMessage.svelte:488
This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade. (×4) — ui/ruvocal/src/lib/components/chat/ChatMessage.svelte:488, ui/ruvocal/src/lib/components/chat/ChatWindow.svelte:693, ui/ruvocal/src/lib/components/chat/ToolUpdate.svelte:144, …
<span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — ui/ruvocal/src/lib/components/chat/TaskGroup.svelte:63
<div> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×3) — ui/ruvocal/src/lib/components/icons/IconLoading.svelte:10, ui/ruvocal/src/lib/components/icons/IconLoading.svelte:14, ui/ruvocal/src/lib/components/icons/IconLoading.svelte:18
<iconrefresh> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×2) — ui/ruvocal/src/lib/components/mcp/MCPServerManager.svelte:119, ui/ruvocal/src/lib/components/mcp/ServerCard.svelte:170
<div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — ui/ruvocal/src/lib/components/wasm/GalleryPanel.svelte:168
`.btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/ruvocal/src/styles/main.css:160
`.base-tool` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/ruvocal/src/styles/main.css:173
`.animate-in` moves (`animation: pixelIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both`) 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. — ui/ruvocal/src/styles/main.css:127
`.qd1` moves (`animation: qdot 2.2s ease-in-out 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. — ui/ruvocal/src/lib/components/NavMenu.svelte:294
`.qd2` moves (`animation: qdot 2.2s ease-in-out infinite 0.35s`) 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. — ui/ruvocal/src/lib/components/NavMenu.svelte:298
`.qd3` moves (`animation: qdot 2.2s ease-in-out infinite 0.7s`) 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. — ui/ruvocal/src/lib/components/NavMenu.svelte:302
`.stop-generating-btn--spinning::after` moves (`animation: stop-generating-rotate 1.2s 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. — ui/ruvocal/src/lib/components/StopGeneratingBtn.svelte:53
`.rv-hero` moves (`animation: pixelIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both`) 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. — ui/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:97
`.animate-in` moves (`animation: pixelIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both`) 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. — ui/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:109
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · 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.
An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 92 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
Accessibility linting is already configured — assert with vitest-axe 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.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
`sparql$module.load_store_from_tables` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — crates/ruvector-postgres/src/graph/sparql/mod.rs:70
What to do
Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
Do you agree with this assessment?
C1 · Data Protection6.5 / 10Adequate✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
What to do
Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, GCP KMS / REDACTED Manager, Azure Key Vault, HashiCorp Vault — not a key read from an environment variable beside the data) and encrypt the most sensitive columns (an AEAD over the field before Diesel/sqlx write it, SQLCipher, pgcrypto) — partial coverage still leaves gaps.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Do you agree with this assessment?
C3 · Audit Trail7.5 / 10Strong✓ Tool-verified
Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.
An audit mechanism is present, but the trail is not yet complete — missing: a write-side hook every change flows through (a SeaORM ActiveModelBehavior hook or a database trigger recording each change, or an event-sourced store), per-entity coverage (an event-sourced aggregate, or a hook on each entity that needs a who-changed-what trail).
What to do
Back the audit convention with a structural mechanism: a SeaORM ActiveModelBehavior before_save/after_save hook or a database trigger writing each sensitive change to an audit-log table, with the acting user and time on every entry.
Do you agree with this assessment?
C4 · Data Retention10.0 / 10Exemplary✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
Other · Domain Modelling — Whether an aggregate references another aggregate by identity rather than embedding it by object reference.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Other · Domain Modelling — Whether domain identifiers are strongly typed (a newtype wrapper) rather than raw primitives — consistency once an idiom exists.
Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.
Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model8.0 / 10Strong✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`KernelDescriptor` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside. (×3) — crates/ruvector-wasm/kernels/rmsnorm.rs:33, crates/ruvector-wasm/kernels/rope.rs:34, crates/ruvector-wasm/kernels/swiglu.rs:38
`TierThresholds` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside. — crates/rvm/crates/rvm-memory/src/tier.rs:57
What to do
Move the domain logic onto the entity (invariant-enforcing `&mut self` commands) instead of a foreign service.
Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (diesel/sea-orm/sqlx) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
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.
Add a README to the 227 of 551 project(s) that lack one — worth up to 0.8 pts.
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.
crates/agentic-robotics-core/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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. — crates/agentic-robotics-core/README.md:744
crates/agentic-robotics-core/README.md links to `../../PERFORMANCE_REPORT.md`, but `PERFORMANCE_REPORT.md` 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. — crates/agentic-robotics-core/README.md:764
crates/agentic-robotics-core/README.md links to `../../OPTIMIZATIONS.md`, but `OPTIMIZATIONS.md` 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. — crates/agentic-robotics-core/README.md:765
crates/agentic-robotics-rt/README.md links to `../../PERFORMANCE_REPORT.md`, but `PERFORMANCE_REPORT.md` 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. — crates/agentic-robotics-rt/README.md:390
crates/cognitum-gate-tilezero/README.md links to `../ruQu/README.md`, but `crates/ruQu/README.md` 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. — crates/cognitum-gate-tilezero/README.md:532
crates/ruvector-attention/README.md links to `CONTRIBUTING.md`, but `crates/ruvector-attention/CONTRIBUTING.md` 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. — crates/ruvector-attention/README.md:833
crates/ruvector-bench/README.md links to `../../benchmarks/LOAD_TEST_SCENARIOS.md`, but `benchmarks/LOAD_TEST_SCENARIOS.md` 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. — crates/ruvector-bench/README.md:556
crates/ruvector-bench/README.md links to `../../docs/IMPLEMENTATION_SUMMARY.md`, but `docs/IMPLEMENTATION_SUMMARY.md` 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. — crates/ruvector-bench/README.md:558
crates/ruvector-cli/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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. — crates/ruvector-cli/README.md:652
crates/ruvector-core/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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. — crates/ruvector-core/README.md:441
crates/ruvector-core/README.md links to `../../docs/guide/ADVANCED_FEATURES.md`, but `docs/guide/ADVANCED_FEATURES.md` 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. — crates/ruvector-core/README.md:443
crates/ruvector-fpga-transformer/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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. — crates/ruvector-fpga-transformer/README.md:301
crates/ruvector-math/README.md links to `CONTRIBUTING.md`, but `crates/ruvector-math/CONTRIBUTING.md` 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. — crates/ruvector-math/README.md:414
crates/ruvector-mincut/README.md links to `src/agentic/compact.rs`, but `crates/ruvector-mincut/src/agentic/compact.rs` 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. — crates/ruvector-mincut/README.md:104
crates/ruvector-mincut/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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. — crates/ruvector-mincut/README.md:818
crates/ruvector-nervous-system/README.md links to `docs/nervous-system/architecture.md`, but `crates/ruvector-nervous-system/docs/nervous-system/architecture.md` 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. — crates/ruvector-nervous-system/README.md:412
crates/ruvector-nervous-system/README.md links to `docs/nervous-system/deployment.md`, but `crates/ruvector-nervous-system/docs/nervous-system/deployment.md` 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. — crates/ruvector-nervous-system/README.md:413
crates/ruvector-nervous-system/README.md links to `docs/nervous-system/test-plan.md`, but `crates/ruvector-nervous-system/docs/nervous-system/test-plan.md` 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. — crates/ruvector-nervous-system/README.md:414
crates/ruvector-node/README.md links to `../../docs/TECHNICAL_PLAN.md`, but `docs/TECHNICAL_PLAN.md` 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. — crates/ruvector-node/README.md:7
crates/ruvector-node/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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. — crates/ruvector-node/README.md:1035
crates/ruvector-postgres/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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. — crates/ruvector-postgres/README.md:1021
crates/ruvector-router-cli/README.md links to `../router-core/README.md`, but `crates/router-core/README.md` 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. — crates/ruvector-router-cli/README.md:565
crates/ruvector-router-cli/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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. — crates/ruvector-router-cli/README.md:570
crates/ruvector-router-cli/README.md links to `../../docs/guide/INSTALLATION.md`, but `docs/guide/INSTALLATION.md` 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. — crates/ruvector-router-cli/README.md:571
crates/ruvector-router-cli/README.md links to `../../docs/guide/BASIC_TUTORIAL.md`, but `docs/guide/BASIC_TUTORIAL.md` 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. — crates/ruvector-router-cli/README.md:572
crates/ruvector-router-cli/README.md links to `../../docs/guide/ADVANCED_FEATURES.md`, but `docs/guide/ADVANCED_FEATURES.md` 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. — crates/ruvector-router-cli/README.md:575
crates/ruvector-router-core/README.md links to `../../docs/TECHNICAL_PLAN.md`, but `docs/TECHNICAL_PLAN.md` 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. — crates/ruvector-router-core/README.md:5
crates/ruvector-router-core/README.md links to `../../CODE_OF_CONDUCT.md`, but `CODE_OF_CONDUCT.md` 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. — crates/ruvector-router-core/README.md:735
crates/ruvector-router-wasm/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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. — crates/ruvector-router-wasm/README.md:786
crates/ruvector-router-wasm/README.md links to `../../docs/getting-started/wasm-api.md`, but `docs/getting-started/wasm-api.md` 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. — crates/ruvector-router-wasm/README.md:787
crates/ruvector-tiny-dancer-core/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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. — crates/ruvector-tiny-dancer-core/README.md:376
crates/ruvector-wasm/README.md links to `../../docs/getting-started/wasm-api.md`, but `docs/getting-started/wasm-api.md` 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. — crates/ruvector-wasm/README.md:756
crates/ruvector-wasm/README.md links to `../../docs/getting-started/wasm-troubleshooting.md`, but `docs/getting-started/wasm-troubleshooting.md` 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. — crates/ruvector-wasm/README.md:953
crates/ruvector-wasm/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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. — crates/ruvector-wasm/README.md:959
crates/ruvix/README.md links to `../docs/adr/ADR-087-ruvix-cognition-kernel.md`, but `crates/docs/adr/ADR-087-ruvix-cognition-kernel.md` 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. — crates/ruvix/README.md:477
crates/ruvllm/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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. — crates/ruvllm/README.md:968
crates/rvAgent/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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. — crates/rvAgent/README.md:583
crates/rvf/README.md links to `docs/adr/ADR-030-rvf-computational-container.md`, but `crates/rvf/docs/adr/ADR-030-rvf-computational-container.md` 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. — crates/rvf/README.md:772
What to do
Reconcile the README with reality: crates/agentic-robotics-core/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` does not exist; crates/agentic-robotics-core/README.md links to `../../PERFORMANCE_REPORT.md`, but `PERFORMANCE_REPORT.md` does not exist; crates/agentic-robotics-core/README.md links to `../../OPTIMIZATIONS.md`, but `OPTIMIZATIONS.md` does not exist; crates/agentic-robotics-rt/README.md links to `../../PERFORMANCE_REPORT.md`, but `PERFORMANCE_REPORT.md` does not exist; crates/cognitum-gate-tilezero/README.md links to `../ruQu/README.md`, but `crates/ruQu/README.md` does not exist.
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.
`cargo fmt -p ruvector-typesafe-core -p ruvector-typesafe-ffi \` invokes cargo fmt in the mode that REWRITES the files it reformats and exits 0 whatever it changed. The rewrite happens inside the runner's throwaway checkout and is then discarded, so the step passes on a badly-formatted change exactly as it passes on a clean one — it enforces nothing, and no other step in this file reads the result. `--check` is the flag that turns the same invocation into a gate: it leaves the files alone and exits non-zero when anything would have been reformatted. — REDACTED:51
What to do
Add `--check` to the cargo fmt step in `REDACTED` so a change that is not formatted fails CI, instead of being silently reformatted into a checkout that is thrown away — or, if reformatting the branch is the intent, commit the result back so the fix reaches the repository.
Do you agree with this assessment?
P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified
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.
7466/8516 types (88%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
What to do
Keep implementation types off the public surface (Rust: `pub(crate)`, or keep the module private) so internals can change without breaking consumers.
Do you agree with this assessment?
P2 · Observability8.2 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 47/115 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/agentic-robotics-mcp`, `crates/photonlayer-bench`, `crates/photonlayer-cli`, `crates/ruos-thermal` and 63 more.
`REDACTED` reports through `console.*` at line 83 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:83
`REDACTED` reports through `console.*` at line 177 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:177
`REDACTED` reports through `console.*` at line 182 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:182
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 11 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:11
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 12 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:12
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 13 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:13
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 22 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:22
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 23 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:23
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:24
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 25 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:25
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:26
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 27 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:27
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 30 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:30
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 41 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:41
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 55 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:55
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 73 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:73
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 81 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:81
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 92 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:92
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 100 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:100
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 108 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:108
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 110 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:110
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 113 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:113
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 121 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:121
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 128 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:128
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 136 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:136
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 143 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:143
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 151 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:151
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 159 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:159
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 161 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:161
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 164 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:164
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 174 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:174
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 182 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:182
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 195 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:195
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 207 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:207
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 218 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:218
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 226 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:226
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 235 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:235
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 237 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:237
`crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 240 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — crates/micro-hnsw-wasm/benchmark.js:240
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
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
Dependabot is configured but does not watch `pip`, `gitsubmodule` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
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.
Do you agree with this assessment?
P5 · DR & Backup10.0 / 10Exemplary✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×5) — crates/mcp-brain-server/src/gist.rs:358, crates/mcp-brain-server/src/gist.rs:728, crates/mcp-brain-server/src/notify.rs:213, …
`reqwest::blocking::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/ruvector-core/src/embeddings.rs:934
`httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — crates/ruvector-py/python/ruvector/integrations/salesforce.py:142, crates/ruvector-py/python/ruvector/integrations/salesforce.py:195
`reqwest::blocking::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/ruvector-sota-bench/src/datasets/ann_benchmarks.rs:71
`ureq::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/ruvector-typesafe-train/src/pins.rs:127
`fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — REDACTED:390, REDACTED:600, npm/packages/typesafe/scripts/fetch-models.mjs:151
`Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — scripts/seed-brain.rs:46
What to do
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
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 Safety10.0 / 10Exemplary✓ 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.
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.
99 duplicated blocks under npm/packages/ have copies in at least two of the sibling directories agentic-integration, agentic-synth, agentic-synth-examples, burst-scaling, cli, cloud-run (+25 more sibling(s) not listed) — 56 of them are reported below, and 43 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 99 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 99 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 99 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — npm/packages/agentic-synth-examples/src/dspy/training-session.ts:15
23 duplicated blocks under the repository root have copies in at least two of the sibling directories crates, npm, scripts, ui — 13 of them are reported below, and 10 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 23 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — npm/packages/ruvector/src/decompiler/statement-parser.js:191
7 duplicated blocks under npm/packages/agentic-synth-examples/src/ have copies in at least two of the sibling directories cicd, security, self-learning, stock-market, swarm — 4 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — npm/packages/agentic-synth-examples/src/cicd/index.ts:184
7 duplicated blocks under ui/ruvocal/src/lib/ have copies in at least two of the sibling directories components, server, stores, types, utils, wasm — 6 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — REDACTED:48
6 duplicated blocks under ui/ruvocal/src/ have copies in at least two of the sibling directories lib, routes — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — ui/ruvocal/src/lib/server/conversation.ts:54
6 of the duplicated blocks reported below have copies in at least two of the sibling directories api, conversation, models, r, settings under ui/ruvocal/src/routes/. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — ui/ruvocal/src/routes/api/v2/user/settings/+REDACTED:79
5 duplicated blocks under npm/packages/ruvllm/ have copies in at least two of the sibling directories bin, scripts, src — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — npm/packages/ruvllm/bin/cli.js:607
npm/packages/agentic-synth-examples/src/dspy/training-session.ts:15 · npm/packages/agentic-synth/training/dspy-learning-session.ts:15 — these 2 files are line-for-line copies of one another — 628 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — npm/packages/agentic-synth-examples/src/dspy/training-session.ts:15
scripts/adr-index.mjs:71 · scripts/frozen-weights-check.mjs:298 — the two spans are one implementation copied and then locally edited — 693 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/adr-index.mjs:71
npm/packages/agentic-synth/training/openrouter-learning-session.ts:116 · npm/packages/agentic-synth/training/openrouter-training-fixed.ts:115 — the two spans are one implementation copied and then locally edited — 829 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/agentic-synth/training/openrouter-learning-session.ts:116
npm/packages/kge/scripts/check-security.mjs:21 · npm/packages/typesafe/scripts/check-security.mjs:21 — the two spans are one implementation copied and then locally edited — 1066 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/kge/scripts/check-security.mjs:21
npm/packages/kge/src/serve.ts:19 · npm/packages/typesafe/src/serve.ts:20 — the two spans are one implementation copied and then locally edited — 722 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/kge/src/serve.ts:19
npm/packages/ruvbot/src/channels/adapters/DiscordAdapter.ts:97 · npm/packages/ruvbot/src/channels/adapters/SlackAdapter.ts:96 — the two spans are one implementation copied and then locally edited — 510 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/ruvbot/src/channels/adapters/DiscordAdapter.ts:97
npm/packages/graph-data-generator/src/generators/entity-relationships.ts:20 · npm/packages/graph-data-generator/src/generators/social-network.ts:15 — the two spans are one implementation copied and then locally edited — 548 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/graph-data-generator/src/generators/entity-relationships.ts:20
npm/wasm/src/browser.ts:5 · npm/wasm/src/node.ts:5 — these 2 files are line-for-line copies of one another — 66 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — npm/wasm/src/browser.ts:5
npm/packages/kge/src/cli/main.ts:24 · npm/packages/typesafe/src/cli/main.ts:19 — the two spans are one implementation copied and then locally edited — 409 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/kge/src/cli/main.ts:24
ui/ruvocal/src/routes/+page.svelte:67 · ui/ruvocal/src/routes/models/[...model]/+page.svelte:50 — the 2 copies are spread across 2 files, 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. — ui/ruvocal/src/routes/+page.svelte:67
ui/ruvocal/src/lib/utils/parseIncompleteMarkdown.ts:92 · ui/ruvocal/src/lib/utils/parseIncompleteMarkdown.ts:144 — 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. — ui/ruvocal/src/lib/utils/parseIncompleteMarkdown.ts:92
npm/packages/kge/bin/cli.js:15 · npm/packages/typesafe/bin/cli.js:15 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — npm/packages/kge/bin/cli.js:15
npm/packages/kge/src/cli/args.ts:9 · npm/packages/typesafe/src/cli/args.ts:9 — the two spans are one implementation copied and then locally edited — 365 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/kge/src/cli/args.ts:9
npm/packages/ruvector/src/decompiler/statement-parser.js:191 · REDACTED:117 — the two spans are one implementation copied and then locally edited — 290 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/ruvector/src/decompiler/statement-parser.js:191
npm/packages/ruvbot/src/cli/commands/channels.ts:171 · npm/packages/ruvbot/src/cli/commands/channels.ts:259 — the two spans are one implementation copied and then locally edited — 363 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/ruvbot/src/cli/commands/channels.ts:171
npm/packages/ruvector/src/core/parallel-intelligence.ts:62 · npm/packages/ruvector/src/core/parallel-workers.ts:148 — the two spans are one implementation copied and then locally edited — 329 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/ruvector/src/core/parallel-intelligence.ts:62
REDACTED:94 · REDACTED:68 — the two spans are one implementation copied and then locally edited — 342 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:94
npm/packages/ruvbot/src/integration/providers/AnthropicProvider.ts:352 · npm/packages/ruvbot/src/integration/providers/OpenRouterProvider.ts:535 — the 2 copies are spread across 2 files, 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. — npm/packages/ruvbot/src/integration/providers/AnthropicProvider.ts:352
npm/packages/agentic-synth/src/generators/events.ts:61 · npm/packages/agentic-synth/src/generators/timeseries.ts:62 — the two spans are one implementation copied and then locally edited — 251 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/agentic-synth/src/generators/events.ts:61
npm/packages/kge/index.js:24 · npm/packages/typesafe/index.js:24 — the two spans are one implementation copied and then locally edited — 217 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/kge/index.js:24
npm/packages/ruvector/bin/cli.js:3403 · npm/packages/ruvector/bin/mcp-server.js:357 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — npm/packages/ruvector/bin/cli.js:3403
npm/packages/kge/scripts/hash-fixtures.mjs:19 · npm/packages/typesafe/scripts/hash-fixtures.mjs:15 — the two spans are one implementation copied and then locally edited — 264 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/kge/scripts/hash-fixtures.mjs:19
REDACTED:137 · REDACTED:267 — the 2 copies are spread across 2 files, 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. — REDACTED:137
crates/rvforge-reader/ui/dock.js:17 · crates/rvforge-reader/ui/library.js:19 — the 2 copies are spread across 2 files, 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. — crates/rvforge-reader/ui/dock.js:17
npm/packages/graph-data-generator/bin/cli.js:27 · npm/packages/graph-data-generator/bin/cli.js:146 — 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. — npm/packages/graph-data-generator/bin/cli.js:27
npm/packages/router/index.js:20 · npm/packages/tiny-dancer/index.js:48 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — npm/packages/router/index.js:20
REDACTED:78 · REDACTED:92 · REDACTED:153 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — REDACTED:78
npm/packages/ruvector/bin/mcp-server.js:3743 · npm/packages/ruvector/bin/mcp-server.js:3775 · npm/packages/ruvector/bin/mcp-server.js:3806 — all 3 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. — npm/packages/ruvector/bin/mcp-server.js:3743
npm/packages/rvforge/src/config.ts:59 · npm/packages/rvforge/src/project.ts:226 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — npm/packages/rvforge/src/config.ts:59
REDACTED:123 · REDACTED:173 — 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. — REDACTED:123
npm/packages/agentic-integration/regional-agent.ts:82 · npm/packages/agentic-integration/regional-agent.ts:531 — the two spans are one implementation copied and then locally edited — 177 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — npm/packages/agentic-integration/regional-agent.ts:82
npm/packages/graph-data-generator/src/generators/entity-relationships.ts:47 · npm/packages/graph-data-generator/src/generators/knowledge-graph.ts:72 — the 2 copies are spread across 2 files, 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. — npm/packages/graph-data-generator/src/generators/entity-relationships.ts:47
npm/packages/rudag/src/dag.ts:529 · npm/packages/rudag/src/dag.ts:564 — 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. — npm/packages/rudag/src/dag.ts:529
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 · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
crates/ruvector-attention-wasm/js/index.ts:6 reaches into another package with a relative path (../pkg/ruvector_attention_wasm) — import the package by name instead. — crates/ruvector-attention-wasm/js/index.ts:6
crates/ruvector-sota-bench/harness/test/metrics.test.ts:3 reaches past another workspace package's public entry into its internals with a relative path (../src/metrics.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — crates/ruvector-sota-bench/harness/test/metrics.test.ts:3
crates/ruvector-wasm/scripts/benchmark-hnsw.mjs:5 imports crates/ruvector-wasm/tests/fixtures.mjs, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — crates/ruvector-wasm/scripts/benchmark-hnsw.mjs:5
npm/packages/agentic-synth-examples/src/dspy/benchmark.js:60 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — npm/packages/agentic-synth-examples/src/dspy/benchmark.js:60
npm/packages/agentic-synth-examples/src/dspy/benchmark.ts:26 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — npm/packages/agentic-synth-examples/src/dspy/benchmark.ts:26
npm/packages/agentic-synth/training/dspy-multi-model-benchmark.js:60 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — npm/packages/agentic-synth/training/dspy-multi-model-benchmark.js:60
npm/packages/agentic-synth/training/dspy-multi-model-benchmark.ts:27 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — npm/packages/agentic-synth/training/dspy-multi-model-benchmark.ts:27
npm/packages/agentic-synth/training/dspy-real-integration.js:21 reaches into another package with a relative path (../node_modules/dspy.ts/dist/src/index.js) — import the package by name instead. — npm/packages/agentic-synth/training/dspy-real-integration.js:21
npm/packages/agentic-synth/training/dspy-real-integration.ts:19 reaches into another package with a relative path (../node_modules/dspy.ts/dist/src/index.js) — import the package by name instead. — npm/packages/agentic-synth/training/dspy-real-integration.ts:19
npm/packages/agentic-synth/training/test-benchmark-import.cjs:11 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — npm/packages/agentic-synth/training/test-benchmark-import.cjs:11
npm/packages/mincut-wasm/routing/worker.mjs:11 reaches into another package with a relative path (../node/ruvector_mincut_wasm.js) — import the package by name instead. — npm/packages/mincut-wasm/routing/worker.mjs:11
npm/packages/mincut-wasm/routing/worker.mjs:15 reaches into another package with a relative path (../web/ruvector_mincut_wasm.js) — import the package by name instead. — npm/packages/mincut-wasm/routing/worker.mjs:15
npm/packages/rudag/src/dag.js:98 reaches into another package with a relative path (../pkg/ruvector_dag_wasm.js) — import the package by name instead. — npm/packages/rudag/src/dag.js:98
npm/packages/rudag/src/dag.js:109 reaches into another package with a relative path (../pkg-node/ruvector_dag_wasm.js) — import the package by name instead. — npm/packages/rudag/src/dag.js:109
npm/packages/rudag/src/dag.ts:137 reaches into another package with a relative path (../pkg/ruvector_dag_wasm.js) — import the package by name instead. — npm/packages/rudag/src/dag.ts:137
npm/packages/rudag/src/dag.ts:147 reaches into another package with a relative path (../pkg-node/ruvector_dag_wasm.js) — import the package by name instead. — npm/packages/rudag/src/dag.ts:147
npm/packages/ruvector/bin/mcp-server.js:3750 imports rvlite, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — npm/packages/ruvector/bin/mcp-server.js:3750
npm/packages/ruvector/bin/mcp-server.js:3781 imports rvlite, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — npm/packages/ruvector/bin/mcp-server.js:3781
npm/packages/ruvector/bin/mcp-server.js:3812 imports rvlite, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — npm/packages/ruvector/bin/mcp-server.js:3812
REDACTED:40 reaches into another package with a relative path (../../wasm/ruvector_decompiler_wasm) — import the package by name instead. — REDACTED:40
REDACTED:2 imports katex/dist/contrib/mhchem.mjs, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:2
REDACTED:11 imports highlight.js/lib/core, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:11
REDACTED:13 imports highlight.js/lib/languages/javascript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:13
REDACTED:14 imports highlight.js/lib/languages/typescript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:14
REDACTED:15 imports highlight.js/lib/languages/json, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:15
REDACTED:16 imports highlight.js/lib/languages/bash, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:16
REDACTED:17 imports highlight.js/lib/languages/shell, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:17
REDACTED:18 imports highlight.js/lib/languages/python, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:18
REDACTED:19 imports highlight.js/lib/languages/go, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:19
REDACTED:20 imports highlight.js/lib/languages/rust, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:20
REDACTED:21 imports highlight.js/lib/languages/java, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:21
REDACTED:22 imports highlight.js/lib/languages/csharp, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:22
REDACTED:23 imports highlight.js/lib/languages/cpp, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:23
REDACTED:24 imports highlight.js/lib/languages/c, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:24
REDACTED:25 imports highlight.js/lib/languages/xml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:25
REDACTED:26 imports highlight.js/lib/languages/css, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:26
REDACTED:27 imports highlight.js/lib/languages/scss, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:27
REDACTED:28 imports highlight.js/lib/languages/markdown, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:28
REDACTED:29 imports highlight.js/lib/languages/yaml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:29
REDACTED:30 imports highlight.js/lib/languages/sql, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:30
What to do
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (37 rows); declare the workspace packages these files import in the importing package's own package.json dependencies (3 rows) — those imports are already bare package specifiers, so the import statements do not change, only the manifest; move the shared test helper into a source directory production code may depend on (1 row).
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 502 and cognitive complexity 680; 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. — npm/packages/ruvector/bin/mcp-server.js:1911
runMcpFlow has cyclomatic complexity 182 and cognitive complexity 315; 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. — ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:40
generateTags has cyclomatic complexity 163 and cognitive complexity 129; 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. — scripts/wet-filter-inject.js:130
executeWasmTool has cyclomatic complexity 97 and cognitive complexity 134; 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. — REDACTED:187
(anonymous) has cyclomatic complexity 83 and cognitive complexity 109; 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. — npm/packages/ruvector/bin/cli.js:4053
(anonymous) has cyclomatic complexity 78 and cognitive complexity 98; 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. — ui/ruvocal/src/lib/server/textGeneration/mcp/wasmTools.test.ts:55
(anonymous) has cyclomatic complexity 76 and cognitive complexity 124; 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. — npm/packages/ruvector/bin/cli.js:6702
writeMessage has cyclomatic complexity 67 and cognitive complexity 110; 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. — ui/ruvocal/src/routes/conversation/[id]/+page.svelte:102
handle_message has cyclomatic complexity 61 and cognitive complexity 91; 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. — REDACTED:481
generate has cyclomatic complexity 59 and cognitive complexity 104; 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. — ui/ruvocal/src/lib/server/textGeneration/generate.ts:16
matchesFilter has cyclomatic complexity 55 and cognitive complexity 111; 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. — ui/ruvocal/src/lib/server/database/rvf.ts:222
stripComments has cyclomatic complexity 54 and cognitive complexity 89; 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. — scripts/frozen-weights-check.mjs:214
(anonymous) has cyclomatic complexity 49 and cognitive complexity 52; 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. — ui/ruvocal/src/lib/server/hooks/handle.ts:35
update has cyclomatic complexity 48 and cognitive complexity 66; 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. — ui/ruvocal/src/routes/conversation/[id]/+REDACTED:400
main has cyclomatic complexity 48 and cognitive complexity 55; 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. — npm/packages/ruvllm/bin/cli.js:884
POST has cyclomatic complexity 40 and cognitive complexity 49; 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. — ui/ruvocal/src/routes/api/mcp/health/+REDACTED:175
main has cyclomatic complexity 39 and cognitive complexity 60; 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. — npm/packages/rudag/bin/cli.js:127
(anonymous) has cyclomatic complexity 38 and cognitive complexity 59; 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. — npm/packages/ruvector/bin/cli.js:10042
openAIChatToTextGenerationStream has cyclomatic complexity 37 and cognitive complexity 52; 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. — ui/ruvocal/src/lib/server/endpoints/openai/openAIChatToTextGenerationStream.ts:8
splitMegaStatement has cyclomatic complexity 37 and cognitive complexity 49; 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. — REDACTED:217
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files6.2 / 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.
npm/packages/ruvector/src/core/intelligence-engine.ts has 1274 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector/src/core/intelligence-engine.ts:1
ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts has 1259 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:1
npm/packages/ruvector/src/core/neural-embeddings.ts has 1185 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector/src/core/neural-embeddings.ts:1
REDACTED has 1140 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 1137 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
npm/packages/rvf/src/backend.ts has 1120 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/rvf/src/backend.ts:1
npm/packages/postgres-cli/src/client.ts has 1099 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/postgres-cli/src/client.ts:1
npm/packages/agentic-synth/training/dspy-learning-session.ts has 1045 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/agentic-synth/training/dspy-learning-session.ts:1
npm/packages/agentic-synth-examples/src/dspy/training-session.ts has 1038 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/agentic-synth-examples/src/dspy/training-session.ts:1
npm/packages/ruvector-extensions/src/exporters.ts has 1035 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector-extensions/src/exporters.ts:1
npm/packages/cli/src/cli.ts has 1023 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/cli/src/cli.ts:1
REDACTED has 1013 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
npm/packages/postgres-cli/src/cli.ts has 980 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/postgres-cli/src/cli.ts:1
ui/ruvocal/src/lib/server/database/rvf.ts has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/ruvocal/src/lib/server/database/rvf.ts:1
npm/packages/ruvector-extensions/src/temporal.ts has 944 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector-extensions/src/temporal.ts:1
npm/packages/ruvector/src/core/adaptive-embedder.ts has 937 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector/src/core/adaptive-embedder.ts:1
REDACTED has 909 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
npm/packages/cognitum-gate-wasm/src/index.ts has 880 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/cognitum-gate-wasm/src/index.ts:1
ui/ruvocal/src/lib/components/chat/ChatWindow.svelte has 858 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/ruvocal/src/lib/components/chat/ChatWindow.svelte:1
REDACTED has 839 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
npm/packages/agentic-synth/training/dspy-real-integration.ts has 822 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/agentic-synth/training/dspy-real-integration.ts:1
npm/packages/rvlite/src/index.ts has 802 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/rvlite/src/index.ts:1
npm/packages/ruvector/src/core/parallel-workers.ts has 798 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector/src/core/parallel-workers.ts:1
npm/packages/ruvector/src/core/attention-fallbacks.ts has 749 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector/src/core/attention-fallbacks.ts:1
npm/packages/ruvector/src/core/neural-perf.ts has 740 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector/src/core/neural-perf.ts:1
npm/packages/ruvllm/src/types.ts has 724 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvllm/src/types.ts:1
npm/packages/ruvector/src/core/onnx-embedder.ts has 710 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector/src/core/onnx-embedder.ts:1
npm/packages/ruvllm/src/contrastive.ts has 708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvllm/src/contrastive.ts:1
ui/ruvocal/src/routes/conversation/[id]/+REDACTED has 681 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/ruvocal/src/routes/conversation/[id]/+REDACTED:1
npm/packages/agentic-integration/integration-tests.ts has 680 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/agentic-integration/integration-tests.ts:1
npm/packages/ruvllm/src/training.ts has 673 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvllm/src/training.ts:1
npm/packages/ruvector/src/core/learning-engine.ts has 670 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector/src/core/learning-engine.ts:1
npm/packages/ruvbot/src/security/AIDefenceGuard.ts has 668 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvbot/src/security/AIDefenceGuard.ts:1
REDACTED has 659 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
npm/packages/cli/src/storage.ts has 657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/cli/src/storage.ts:1
npm/packages/agentic-integration/coordination-protocol.ts has 655 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/agentic-integration/coordination-protocol.ts:1
REDACTED has 637 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
ui/ruvocal/src/lib/server/database/postgres.ts has 630 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/ruvocal/src/lib/server/database/postgres.ts:1
npm/packages/ruvector-wasm-unified/src/exotic.ts has 622 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/ruvector-wasm-unified/src/exotic.ts:1
npm/packages/rudag/src/dag.ts has 612 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — npm/packages/rudag/src/dag.ts: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?
R4 · Test Coverage3.2 / 10Weak✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — npm/packages/rvlite/bin/cli.js:1, ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:1, npm/packages/ruvllm/scripts/training/generate-ecosystem-triplets.js:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ 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.
Do you agree with this assessment?
R7 · Dead Code5.1 / 10Adequate✓ 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.
48 file(s) (~13033 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: scripts/training/generate-deobfuscation-data.mjs imports './data/identifier-dictionaries.mjs', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here.
2 file(s) (~520 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — crates/ruvector-attention-wasm
2 file(s) (~334 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — crates/ruvector-gnn-node
Unreachable from the 392 application, 346 tooling and 243 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 (392 application, 346 tooling, 243 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 (×33) — npm/packages/postgres-cli/src/client.ts, npm/packages/agentic-synth/training/dspy-learning-session.ts, npm/packages/agentic-synth/training/dspy-benchmarks.ts, …
no import path from any entry point (392 application, 346 tooling, 243 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (npm/packages/cloud-run/streaming-service-optimized.js, npm/packages/cloud-run/streaming-service-optimized.ts, npm/packages/cloud-run/streaming-service.js and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — npm/packages/cloud-run/load-balancer.ts, npm/packages/cloud-run/vector-client.ts
no import path from any entry point (392 application, 346 tooling, 243 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (npm/packages/ruvector/src/workers/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — npm/packages/ruvector/src/workers/benchmark.ts
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. (×19) — npm/tests/security-dependency-consumer.cjs:10, npm/packages/cloud-run/load-balancer.js:15, npm/tests/security-dependency-consumer.cjs:4, …
Declared in the root 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.
Declared in npm/packages/cognitum-gate-wasm/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.
Declared in npm/packages/postgres-cli/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.
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.
npm/packages/ruvector/src/core/agentdb-fast.ts → npm/packages/ruvector/src/index.ts → npm/packages/ruvector/src/core/index.ts → npm/packages/ruvector/src/core/agentdb-fast.ts (one verified cycle inside a mutually-dependent group of 4 files) — npm/packages/ruvector/src/core/agentdb-fast.ts:30
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. This repository serves HTTP itself (`axum::serve(` (crates/rvf/rvf-server/src/lib.rs:99)), so its Rust source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.
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.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for REDACTED storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×4) — crates/ruvllm/src/context/semantic_cache.rs:184, crates/ruvllm/src/context/semantic_cache.rs:285, crates/ruvllm/src/context/working_memory.rs:394, …
`https://d3js.org/d3.v7.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. — npm/packages/ruvector-extensions/src/ui/index.html:8
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 4 sites, not one: `crates/ruvllm/src/context/semantic_cache.rs:184` (`md5::compute`), `crates/ruvllm/src/context/semantic_cache.rs:285` (`md5::compute`), `crates/ruvllm/src/context/working_memory.rs:394` (`md5::compute`), `crates/ruvllm/src/context/working_memory.rs:423` (`md5::compute`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
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.
`forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape. (×2) — ui/ruvocal/src/routes/api/v2/export/+REDACTED:61, ui/ruvocal/scripts/populate.ts:155
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 reader3.0 / 10Weak✓ Tool-verified
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.
`serialized_len` is read from the bytes being parsed at line 203 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 207 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating. (×2) — scripts/patches/hnsw_rs/src/datamap.rs:207, patches/hnsw_rs/src/datamap.rs:207
`nbpoints` is read from the bytes being parsed at line 667 (`usize::from_ne_bytes`), then used to size a `Vec::with_capacity` at line 669 — and nowhere in its scope is `nbpoints` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `nbpoints` against the bytes actually remaining and a maximum the format allows before allocating. (×2) — scripts/patches/hnsw_rs/src/hnswio.rs:669, patches/hnsw_rs/src/hnswio.rs:669
`serialized_len` is read from the bytes being parsed at line 1151 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 1153 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating. (×2) — scripts/patches/hnsw_rs/src/hnswio.rs:1153, patches/hnsw_rs/src/hnswio.rs:1153
`serialized_len` is read from the bytes being parsed at line 1203 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 1208 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating. (×2) — scripts/patches/hnsw_rs/src/hnswio.rs:1208, patches/hnsw_rs/src/hnswio.rs:1208
`nb_neighbours` is read from the bytes being parsed at line 1258 (`usize::from_ne_bytes`), then used to size a `Vec::with_capacity` at line 1259 — and nowhere in its scope is `nb_neighbours` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `nb_neighbours` against the bytes actually remaining and a maximum the format allows before allocating. (×2) — scripts/patches/hnsw_rs/src/hnswio.rs:1259, patches/hnsw_rs/src/hnswio.rs:1259
`len` is read from the bytes being parsed at line 483 (`read_u32`), then used to size a `vec![…; n]` at line 484 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.9.2/src/pickle.rs:484
`len` is read from the bytes being parsed at line 110 (`read_u32`), then used to size a `vec![…; n]` at line 111 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating. (×2) — patches/candle-core-0.9.2/src/quantized/ggml_file.rs:111, patches/candle-core-0.8.4/src/quantized/ggml_file.rs:111
`n_dims` is read from the bytes being parsed at line 196 (`read_u32`), then used to size a `vec![…; n]` at line 200 — and nowhere in its scope is `n_dims` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dims` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.9.2/src/quantized/ggml_file.rs:200
`name_len` is read from the bytes being parsed at line 197 (`read_u32`), then used to size a `vec![…; n]` at line 205 — and nowhere in its scope is `name_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `name_len` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.9.2/src/quantized/ggml_file.rs:205
`n_dimensions` is read from the bytes being parsed at line 423 (`read_u32`), then used to size a `vec![…; n]` at line 427 — and nowhere in its scope is `n_dimensions` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dimensions` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.9.2/src/quantized/gguf_file.rs:427
`len` is read from the bytes being parsed at line 42 (`read_i32`), then used to size a `vec![…; n]` at line 51 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.9.2/src/quantized/imatrix_file.rs:51
`len` is read from the bytes being parsed at line 472 (`read_u32`), then used to size a `vec![…; n]` at line 473 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.8.4/src/pickle.rs:473
`n_dims` is read from the bytes being parsed at line 195 (`read_u32`), then used to size a `vec![…; n]` at line 199 — and nowhere in its scope is `n_dims` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dims` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.8.4/src/quantized/ggml_file.rs:199
`name_len` is read from the bytes being parsed at line 196 (`read_u32`), then used to size a `vec![…; n]` at line 204 — and nowhere in its scope is `name_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `name_len` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.8.4/src/quantized/ggml_file.rs:204
`n_dimensions` is read from the bytes being parsed at line 422 (`read_u32`), then used to size a `vec![…; n]` at line 426 — and nowhere in its scope is `n_dimensions` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dimensions` against the bytes actually remaining and a maximum the format allows before allocating. — patches/candle-core-0.8.4/src/quantized/gguf_file.rs:426
`restart_count` is read from the bytes being parsed at line 120 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 125 — and nowhere in its scope is `restart_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `restart_count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-wire/src/index_seg_codec.rs:125
`block_count` is read from the bytes being parsed at line 54 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 59 — and nowhere in its scope is `block_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `block_count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-wire/src/vec_seg_codec.rs:59
`seg_dim` is read from the bytes being parsed at line 469 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 494 — and nowhere in its scope is `seg_dim` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `seg_dim` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-wasm/src/lib.rs:494
`dim` is read from the bytes being parsed at line 194 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 204 — and nowhere in its scope is `dim` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `dim` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-server/src/tcp.rs:204
`count` is read from the bytes being parsed at line 246 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 258 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-server/src/tcp.rs:258
`count` is read from the bytes being parsed at line 93 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 101 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-runtime/src/cow_map.rs:101
`count` is read from the bytes being parsed at line 573 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 583 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-runtime/src/read_path.rs:583
`vector_count` is read from the bytes being parsed at line 615 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 629 — and nowhere in its scope is `vector_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `vector_count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-runtime/src/read_path.rs:629
`count` is read from the bytes being parsed at line 194 (`u32::from_le_bytes`), then used to size a `.reserve` at line 205 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-runtime/src/vector_slab.rs:205
`restart_count` is read from the bytes being parsed at line 211 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 222 — and nowhere in its scope is `restart_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `restart_count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/rvf/rvf-index/src/codec.rs:222
`vector_count` is read from the bytes being parsed at line 324 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 326 — and nowhere in its scope is `vector_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `vector_count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvix/crates/nucleus/src/checkpoint.rs:326
`graph_count` is read from the bytes being parsed at line 335 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 337 — and nowhere in its scope is `graph_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `graph_count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvix/crates/nucleus/src/checkpoint.rs:337
`count` is read from the bytes being parsed at line 501 (`u64::from_le_bytes`), then used to size a `Vec::with_capacity` at line 508 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvix/crates/nucleus/src/witness_log.rs:508
`n_dims` is read from the bytes being parsed at line 255 (`read_u32`), then used to size a `Vec::with_capacity` at line 258 — and nowhere in its scope is `n_dims` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dims` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvector-sparse-inference/src/model/gguf.rs:258
`len` is read from the bytes being parsed at line 284 (`read_u64`), then used to size a `vec![…; n]` at line 285 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvector-sparse-inference/src/model/gguf.rs:285
`array_len` is read from the bytes being parsed at line 311 (`read_u64`), then used to size a `Vec::with_capacity` at line 312 — and nowhere in its scope is `array_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `array_len` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvector-sparse-inference/src/model/gguf.rs:312
`nnz` is read from the bytes being parsed at line 298 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 309 — and nowhere in its scope is `nnz` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `nnz` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvector-postgres/src/types/sparsevec.rs:309
`graph_n` is read from the bytes being parsed at line 628 (`u64::from_le_bytes`), then used to size a `Vec::with_capacity` at line 630 — and nowhere in its scope is `graph_n` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `graph_n` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvector-diskann/src/index.rs:630
`deg` is read from the bytes being parsed at line 634 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 636 — and nowhere in its scope is `deg` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `deg` against the bytes actually remaining and a maximum the format allows before allocating. — crates/ruvector-diskann/src/index.rs:636
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
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.8 / 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.
`deepestChild` is exported and takes `el: HTMLElement` from its caller, and it calls itself at line 3 (`deepestChild`) with a piece of `el` — and nowhere in `deepestChild` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deepestChild` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — ui/ruvocal/src/lib/utils/deepestChild.ts:3
`attachFileRefsToArgs` is exported, takes a document from its caller (line 104) and hands it to `visit`, which calls itself at line 114 (`visit`) with a piece of `node` (and at line 121) — and nowhere in `visit` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `visit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — REDACTED:114
`stableHash` is exported, takes a document from its caller (line 6) and hands it to `sortObject`, which calls itself at line 11 (`sortObject`) with a piece of `value` (and at line 17) — and nowhere in `sortObject` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sortObject` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/metabiohacker/src/ledger/stableHash.ts:11
`canonicalJson` is exported, takes a document from its caller (line 26) and hands it to `encode`, which calls itself at line 38 (`encode`) with a piece of `value` (and at line 45) — and nowhere in `encode` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — npm/packages/rvforge/src/hash.ts:38
`generateFromJSONSchema` is exported, takes a document from its caller (line 169) and hands it to `convertJSONSchema`, which calls itself at line 194 (`this.convertJSONSchema`) with a piece of `jsonSchema` — and nowhere in `convertJSONSchema` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `convertJSONSchema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — npm/packages/agentic-synth/src/generators/structured.ts:194
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 async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. 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 question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 21/90 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`__wbg_init` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — ui/ruvocal/static/wasm/rvagent_wasm.js:1513, npm/packages/ruvector-cnn/ruvector_cnn_wasm.js:778
`RequestHandler` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/routes/api/v2/user/billing-orgs/+REDACTED:8
`createShareLink` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/createShareLink.ts:6
`loadAttachmentsFromUrls` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/utils/loadAttachmentsFromUrls.ts:69
`refreshMcpServers` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/stores/mcpServers.ts:167
`healthCheckServer` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/stores/mcpServers.ts:404
`setSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/stores/settings.ts:55
`initValue` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/stores/settings.ts:95
`authenticateRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/server/auth.ts:398
`processModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/server/models.ts:121
`buildModels` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/server/models.ts:297
`sendSlack` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/ruvocal/src/lib/server/sendSlack.ts:4
`fetchBrain` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/analyze-evolution.js:11
`callGemini` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/gemini-agents.js:29
`brainSearch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/gemini-agents.js:55
`brainList` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/gemini-agents.js:69
`groundProposition` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/gemini-agents.js:97
`researchDirector` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/gemini-agents.js:327
`grade` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/metabiohacker/tools/evidenceRefresh.mjs:33
`fetchTo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/typesafe/scripts/fetch-models.mjs:149
`init` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/rvf-wasm/pkg/rvf_wasm.js:23
`download` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — npm/packages/ruvllm/src/models.ts:229, npm/packages/ruvllm/src/models.js:195
`callClaude` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvllm/scripts/training/claude-hard-negatives.js:50
`embedTexts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — REDACTED:583, REDACTED:377
`loadInitialData` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector-extensions/src/ui/app.js:116
`findSimilarNodes` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector-extensions/src/ui/app.js:276
`searchNodes` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector-extensions/src/ui/app.js:325
`sendAnthropic` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector/src/decompiler/api-prober.js:123
`sendOpenAI` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector/src/decompiler/api-prober.js:145
`sendGoogle` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector/src/decompiler/api-prober.js:163
`testToolUse` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector/src/decompiler/api-prober.js:191
`decompileUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:362
`fetchPackageInfo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector/src/decompiler/npm-fetch.js:19
`fetchPackageFileList` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector/src/decompiler/npm-fetch.js:50
`fetchFileContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector/src/decompiler/npm-fetch.js:68
`fetchWithProgress` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — npm/packages/ruvector/src/core/onnx/loader.js:316
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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.
`debug` at line 80 is called with an argument built by `servers.map((s) => ({ name : s.name, url : s.url }))` (line 81), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:80
`debug` at line 109 is called with an argument built by `servers.map((s) => ({ name : s.name, url : s.url, hasAuth : !!s.headers?.Authorization, }))` (line 112), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:109
`debug` at line 131 is called with an argument built by `servers.map((s) => s.name)` (line 132), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:131
`debug` at line 257 is called with an argument built by `servers.map((s) => s.name)` (line 258), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:257
`debug` at line 1145 is called with an argument built by `calls.map(c => ({ id : c.id, name : c.name, argsLen : c.arguments.length }))` (line 1145), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:1145
`debug` at line 1157 is called with an argument built by `calls.map(c => ({ id : c.id, name : c.name, argsLen : c.arguments.length }))` (line 1157), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:1157
`debug` at line 86 is called with an argument built by `tools.map((t) => t?.name)` (line 91), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ui/ruvocal/src/lib/server/mcp/tools.ts:86
What to do
Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is JavaScript's evaluation order, not a guess — then put the construction behind the level check the logger offers (`if (logger.isLevelEnabled('debug'))` for pino and winston, `isDebugEnabled()` for log4js, the repository's own debug flag where it has one), or hand the logger the object and a format string (`logger.debug({ payload }, 'raw request')`) so the serialising happens only when the line is written. Moving the call is not the fix: it is the join/projection/stringify in the argument that is paid, wherever the call sits.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped6.7 / 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.
`node.id` is text this program did not author, and it is written into the text of an element through `innerHTML` 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. — npm/packages/ruvector-extensions/src/ui/app.js:257
`escapeHTML(source.link)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — REDACTED:238
`escapeHTML(safeHref)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — REDACTED:355
`safeTitle` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. (×2) — REDACTED:367, REDACTED:370
`safeSrc` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — REDACTED:372
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 `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. 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 element7.5 / 10Strong✓ Tool-verified
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.
This loop runs once per element of `patterns`, and the statement it guards acts on the element it is on — `patterns[j]`. The test deciding whether that statement runs does not: `let Some(target) = p.get_mut(& patterns[i].id)` reads `patterns[i]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out. — crates/ruvllm/src/reasoning_bank/pattern_store.rs:744
This loop runs once per element of `patterns`, and the statement it guards acts on the element it is on — `patterns[j]`. The test deciding whether that statement runs does not: `let Some(mut entry_i) = self.patterns.get_mut(& patterns[i] .0)` reads `patterns[i]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out. — crates/ruvector-postgres/src/learning/reasoning_bank.rs:119
What to do
Each finding names the test and the statement it guards, which index the same collection at two different subscripts — one fixed, one the loop variable. Confirm from the two, then decide which subscript the test meant. If it was meant to be per-element, give it the loop variable so each element is judged on itself. If it really is one answer for the whole collection, hoist the test OUT of the loop, where a reader can see it is asked once and where it is not re-evaluated on every pass — leaving it inside, reading a fixed element, is the one arrangement that cannot be right under either reading.
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.
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×3) — ui/ruvocal/src/routes/+layout.svelte:139, ui/ruvocal/src/lib/utils/haptics.ts:41, ui/ruvocal/src/lib/server/mcp/httpClient.ts:106
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. (×36) — ui/ruvocal/src/routes/settings/(nav)/application/+page.svelte:72, ui/ruvocal/src/routes/r/[id]/+page.ts:20, ui/ruvocal/src/routes/conversation/[id]/+page.ts:38, …
`except` 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. — scripts/vote-boost.py:15
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.
`debug` at line 103 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:103
`error` at line 27 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/routes/api/v2/user/billing-orgs/+REDACTED:27
`info` at line 51 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/routes/api/v2/user/billing-orgs/+REDACTED:51
`info` at line 256 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/routes/api/mcp/health/+REDACTED:256
`info` at line 263 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/routes/api/mcp/health/+REDACTED:263
`info` at line 331 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/routes/api/mcp/health/+REDACTED:331
`info` at line 58 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/server/adminToken.ts:58
`info` at line 237 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/server/metrics.ts:237
`error` at line 21 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/server/sendSlack.ts:21
`info` at line 248 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/server/textGeneration/generate.ts:248
`warn` at line 164 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/server/database/postgres.ts:164
`debug` at line 52 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/migrations/migrations.ts:52
`debug` at line 59 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/migrations/migrations.ts:59
`debug` at line 66 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/migrations/migrations.ts:66
`error` at line 89 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/migrations/migrations.ts:89
`info` at line 73 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ui/ruvocal/src/lib/migrations/routines/09-delete-empty-conversations.ts:73
`info!` at line 77 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/hitl.rs:77
`trace!` at line 813 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/hnsw.rs:813
`warn!` at line 153 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/memory.rs:153
`warn!` at line 167 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/memory.rs:167
`warn!` at line 174 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/memory.rs:174
`warn!` at line 73 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/patch_tool_calls.rs:73
`warn!` at line 200 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/skills.rs:200
`warn!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/skills.rs:219
`warn!` at line 250 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/skills.rs:250
`trace!` at line 345 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/sona.rs:345
`debug!` at line 350 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/sona.rs:350
`debug!` at line 410 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/sona.rs:410
`info!` at line 419 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/sona.rs:419
`debug!` at line 478 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/sona.rs:478
`info!` at line 482 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/sona.rs:482
`warn!` at line 75 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/unicode_security_middleware.rs:75
`warn!` at line 81 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-middleware/src/unicode_security_middleware.rs:81
`info!` at line 121 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-mcp/src/main.rs:121
`info!` at line 130 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-mcp/src/main.rs:130
`info!` at line 144 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-mcp/src/main.rs:144
`info!` at line 172 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-mcp/src/main.rs:172
`error!` at line 191 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-mcp/src/main.rs:191
`error!` at line 199 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-mcp/src/main.rs:199
`info!` at line 211 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/rvAgent/rvagent-mcp/src/main.rs:211
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.
56/57 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
~1.3 `!` null assertions per 1k TypeScript source lines — 162 assertion(s) across the 124771 source line(s) of the 576 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: npm/packages/ruvector/src/core/graph-algorithms.ts (21), npm/packages/ruvector/src/core/intelligence-engine.ts (12), npm/packages/agentic-synth/training/dspy-real-integration.ts (10). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
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 — 4 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.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 5 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.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
Not included — 31 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 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
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. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1; 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.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
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.
D21 Naming Consistency — Naming consistency is measured on C# only; Python, Rust, Swift not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python, Rust, Swift surface was not measured.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rs, .swift, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), 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) — 373 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.
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
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 — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P8 Schema migrations — sqlx is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
P9 Domain vs controller coverage — coverage data present for 54 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb. TypeScript/JavaScript 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.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
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.
Orphaned knowledge crates/rvm/crates/rvm-kernel/src/lib.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/quantize/pi_quant_simd.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/quantize/pi_quant.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/moe/router.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/moe/sram_mapper.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/rvm/crates/rvm-memory/src/reconstruction.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/rvm/crates/rvm-proof/src/signer.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/rvm/crates/rvm-coherence/src/graph.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/moe/precision_allocator.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/moe/affinity.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/quantize/security.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/rvm/crates/rvm-memory/src/tier.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge benchmarks/vector-search/benchmark_quantized_search.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge crates/ruvllm/src/quantize/quip.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/quantize/hadamard.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/quantize/incoherence.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/rvm/crates/rvm-partition/src/ipc.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/qat/training_loop.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/rvm/crates/rvm-cap/src/verify.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvector-cnn/src/quantize/graph_rewrite.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/qat/differentiable_quant.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/rvm/crates/rvm-memory/src/allocator.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm-wasm/src/pi_quant_wasm.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/ruvllm/src/qat/lora_qat.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge crates/rvm/crates/rvm-proof/src/policy.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
AC2 · Forms & labels· <input> without a programmatic label · ×9
<input> without a programmatic label crates/mcp-brain-server/static/index.html:932— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label crates/mcp-brain-server/static/index.html:1255— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label npm/packages/ruvector-extensions/src/ui/index.html:41— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label ui/ruvocal/src/lib/components/NavConversationItem.svelte:70— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ui/ruvocal/src/lib/components/ShareConversationModal.svelte:127— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ui/ruvocal/src/lib/components/Switch.svelte:24— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ui/ruvocal/src/lib/components/mcp/AddServerForm.svelte:298— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label ui/ruvocal/src/lib/components/mcp/AddServerForm.svelte:304— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label ui/ruvocal/src/lib/components/wasm/GalleryPanel.svelte:183— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC2 · Forms & labels· <select> without a programmatic label · ×5
<select> without a programmatic label npm/packages/ruvbot/src/api/public/index.html:606— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label ui/ruvocal/src/lib/components/chat/ModelSwitch.svelte:48— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label ui/ruvocal/src/routes/settings/(nav)/application/+page.svelte:202— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label ui/ruvocal/src/routes/settings/(nav)/application/+page.svelte:246— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label ui/ruvocal/src/routes/settings/(nav)/application/+page.svelte:283— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <textarea> without a programmatic label · ×4
<textarea> without a programmatic label npm/packages/ruvbot/src/api/public/index.html:646— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label ui/ruvocal/src/lib/components/SystemPromptModal.svelte:37— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label ui/ruvocal/src/lib/components/chat/ChatInput.svelte:236— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label ui/ruvocal/src/lib/components/chat/ChatMessage.svelte:488— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×4
Click handler on a non-interactive <div> crates/mcp-brain-server/static/index.html:925— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <div> crates/mcp-brain-server/static/index.html:1054— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <div> ui/ruvocal/src/lib/components/chat/ChatMessage.svelte:305— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
Click handler on a non-interactive <div> ui/ruvocal/src/lib/components/chat/ImageLightbox.svelte:44— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
DM4 · Rich vs anemic domain model· Anemic domain model · ×4
Anemic domain model: KernelDescriptor crates/ruvector-wasm/kernels/rmsnorm.rs:33— `KernelDescriptor` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside.
Anemic domain model: KernelDescriptor crates/ruvector-wasm/kernels/rope.rs:34— `KernelDescriptor` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside.
Anemic domain model: KernelDescriptor crates/ruvector-wasm/kernels/swiglu.rs:38— `KernelDescriptor` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside.
Anemic domain model: TierThresholds crates/rvm/crates/rvm-memory/src/tier.rs:57— `TierThresholds` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside.
AC1 · Text alternatives· <svg role="img"> without an accessible name · ×1
<svg role="img"> without an accessible name ui/ruvocal/src/lib/components/icons/IconPro.svelte— An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
AC2 · Forms & labels· <button> with no accessible text · ×1
<button> with no accessible text npm/packages/ruvbot/src/api/public/index.html:652— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels· Custom control with no accessible name on <img> · ×1
Custom control with no accessible name on <img> ui/ruvocal/src/lib/components/chat/ImageLightbox.svelte:59— This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC3 · Page structure· Document without a <title> · ×1
Document without a <title> ui/ruvocal/src/app.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Viewport restricts zoom ui/ruvocal/src/app.html:5— user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC4 · Keyboard semantics· Click handler on a non-interactive <code> · ×1
Click handler on a non-interactive <code> crates/mcp-brain-server/static/index.html:645— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics· Click handler on a non-interactive <img> · ×1
Click handler on a non-interactive <img> ui/ruvocal/src/lib/components/chat/ImageLightbox.svelte:59— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
AX9 · CQS / query purity· Query writes persistent state on the read path · ×1
Query writes persistent state on the read path: sparql$module.load_store_from_tables crates/ruvector-postgres/src/graph/sparql/mod.rs:70— `sparql$module.load_store_from_tables` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
D11 · Test Reliability· Test suite cannot be installed from its own lockfile · ×1
Test suite cannot be installed from its own lockfile: examples/neural-trader/ — The node:test suite in examples/neural-trader/ was never exercised because its dependency install refused the committed lockfile — the dependency install for examples/neural-trader/ refused the committed lockfile (npm error code ERESOLVE), so the suite never ran. The suite is declared and committed but cannot be installed from what the repository ships, so neither this scan nor a new contributor can run it. The ask is the one the owner performs: run the install locally and commit the lockfile it writes.
Unlisted import '@modelcontextprotocol/sdk' npm/tests/security-dependency-consumer.cjs:10— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import '@opentelemetry/api' npm/packages/cloud-run/load-balancer.js:15— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'axios' npm/tests/security-dependency-consumer.cjs:4— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'compression' npm/tests/security-dependency-consumer.cjs:5— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'fast-copy' npm/tests/security-dependency-consumer.cjs:9— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'ioredis' npm/packages/cloud-run/streaming-service-optimized.js:345— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'ip-address' npm/tests/security-dependency-consumer.cjs:8— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'lru-cache' npm/packages/cloud-run/vector-client.js:10— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'prom-client' npm/packages/cloud-run/load-balancer.js:16— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'proxy-addr' npm/tests/security-dependency-consumer.cjs:7— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'qs' npm/tests/security-dependency-consumer.cjs:6— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'ws' npm/packages/cloud-run/streaming-service.js:18— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'zod' npm/tests/security-dependency-consumer.cjs:13— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'js-yaml' npm/packages/agentic-synth/src/config/config.js:6— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'commander' npm/packages/graph-data-generator/bin/cli.js:7— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'tsup' npm/packages/ruvbot/tsup.config.js:3— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'glob' npm/packages/ruvector/src/workers/native-worker.js:52— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import '@google/generative-ai' npm/packages/ruvllm/scripts/training/claude-code-synth.js:15— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'dotenv' npm/packages/ruvllm/scripts/training/claude-hard-negatives.js:11— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
TodoComment ui/ruvocal/src/routes/conversation/[id]/+REDACTED:246— // todo: make configurable — 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 ui/ruvocal/src/routes/conversation/[id]/+REDACTED:700— // Todo: maybe we should wait for the message to be saved before ending the response - in case of errors — 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 REDACTED:443— // Todo list for task tracking — 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 REDACTED:26— // Todo list for task tracking — 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 ui/ruvocal/src/lib/utils/tree/addSibling.spec.ts:50— // TODO: This behaviour should be fixed, we do not need to fail on the root message. — 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 ui/ruvocal/src/lib/types/Settings.ts:79— // TODO: move this to a constant file along with other constants — 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 ui/ruvocal/src/lib/server/auth.ts:525— // TODO: Handle errors if provider is not responding — 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 ui/ruvocal/src/lib/server/endpoints/images.ts:107— // TODO: blocking heif may be incorrect considering it also supports av1, so we should instead — 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 ui/ruvocal/src/lib/server/endpoints/images.ts:109— // TODO: consider what to do about animated formats: apng, gif, animated webp, ... — 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 tests/graph_full_integration.rs:46— // TODO: Once the graph API is exposed, test: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/graph_full_integration.rs:60— // TODO: Test Cypher queries: — 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 tests/graph_full_integration.rs:74— // TODO: Test hybrid search: — 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 tests/graph_full_integration.rs:88— // TODO: Test distributed features: — 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 tests/graph_full_integration.rs:110— // TODO: Run actual performance tests — 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 tests/graph_full_integration.rs:122— // TODO: Verify Neo4j compatibility: — 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 tests/graph_full_integration.rs:135— // TODO: Test integration between vector and graph: — 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 tests/graph_full_integration.rs:148— // TODO: Test CLI functionality: — 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 tests/graph_full_integration.rs:161— // TODO: Test persistence: — 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 tests/graph_full_integration.rs:174— // TODO: Test concurrency: — 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 tests/graph_full_integration.rs:187— // TODO: Test memory constraints: — 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 tests/graph_full_integration.rs:199— // TODO: Test error scenarios: — 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 tests/graph_full_integration.rs:215— // TODO: Implement Bolt protocol tests — 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 tests/graph_full_integration.rs:222— // TODO: Test standard Cypher queries — 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 tests/graph_full_integration.rs:229— // TODO: Verify property graph semantics — 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 tests/graph_full_integration.rs:243— // TODO: Implement benchmark — 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.
Duplicated block (5 lines × 2) crates/emergent-time/src/entropic.rs:85— crates/emergent-time/src/entropic.rs:85-89 | crates/emergent-time/src/entropic.rs:98-102 — 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 (5 lines × 2) crates/mcp-brain-server/src/graph.rs:1049— crates/mcp-brain-server/src/graph.rs:1049-1053 | crates/mcp-brain-server/src/graph/rebuild.rs:184-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/mcp-brain-server/src/quantization.rs:113— crates/mcp-brain-server/src/quantization.rs:113-117 | crates/ruvector-gnn/src/compress.rs:441-445 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/mcp-brain-server/src/routes.rs:122— crates/mcp-brain-server/src/routes.rs:122-126 | crates/mcp-brain-server/src/routes.rs:140-145 — 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 (5 lines × 2) crates/photonlayer-bench/src/learn.rs:124— crates/photonlayer-bench/src/learn.rs:124-128 | crates/photonlayer-bench/src/mnist_bench.rs:241-245 — 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 (5 lines × 2) crates/prime-radiant/src/cohomology/cohomology_group.rs:433— crates/prime-radiant/src/cohomology/cohomology_group.rs:433-437 | crates/prime-radiant/src/cohomology/cohomology_group.rs:443-447 — 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 (5 lines × 2) crates/prime-radiant/src/distributed/adapter.rs:83— crates/prime-radiant/src/distributed/adapter.rs:83-87 | crates/prime-radiant/src/distributed/adapter.rs:105-109 — 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 (5 lines × 2) crates/ruvector-attention-unified-wasm/src/graph.rs:280— crates/ruvector-attention-unified-wasm/src/graph.rs:280-284 | crates/ruvector-gnn-wasm/src/lib.rs:320-326 — before extracting anything, compare `crates/ruvector-attention-unified-wasm/src/graph.rs` and `crates/ruvector-gnn-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 (5 lines × 2) crates/ruvector-attention/src/graph/dual_space.rs:22— crates/ruvector-attention/src/graph/dual_space.rs:22-26 | crates/ruvector-attention/src/moe/expert.rs:111-115 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/ruvector-attention/src/hyperbolic/poincare.rs:114— crates/ruvector-attention/src/hyperbolic/poincare.rs:114-118 | crates/ruvector-hyperbolic-hnsw/src/poincare.rs:447-451 — before extracting anything, compare `crates/ruvector-attention/src/hyperbolic/poincare.rs` and `crates/ruvector-hyperbolic-hnsw/src/poincare.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 (5 lines × 2) crates/ruvector-bench/src/bin/turbo4_ablation.rs:101— crates/ruvector-bench/src/bin/turbo4_ablation.rs:101-105 | crates/ruvector-bench/src/bin/turbo4_ablation.rs:303-307 — 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 (5 lines × 2) crates/ruvector-bench/src/lib.rs:249— crates/ruvector-bench/src/lib.rs:249-253 | crates/ruvector-bench/src/lib.rs:265-269 — 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 (5 lines × 2) crates/ruvector-bounded-rag/src/lib.rs:264— crates/ruvector-bounded-rag/src/lib.rs:264-270 | crates/ruvector-bounded-rag/src/lib.rs:574-578 — 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 (5 lines × 2) crates/ruvector-capgated/src/bin/benchmark.rs:156— crates/ruvector-capgated/src/bin/benchmark.rs:156-160 | crates/ruvector-capgated/src/bin/benchmark.rs:166-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.
Duplicated block (5 lines × 2) crates/ruvector-cluster-rag/src/search.rs:30— crates/ruvector-cluster-rag/src/search.rs:30-34 | crates/ruvector-cluster-rag/src/search.rs:73-77 — 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 (5 lines × 2) crates/ruvector-cnn/src/contrastive/augmentation.rs:502— crates/ruvector-cnn/src/contrastive/augmentation.rs:502-506 | crates/ruvector-cnn/src/contrastive/augmentation.rs:527-531 — 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 (5 lines × 2) crates/ruvector-cnn/src/layers/conv.rs:407— crates/ruvector-cnn/src/layers/conv.rs:407-411 | crates/ruvector-cnn/src/layers/conv.rs:636-640 — 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 (5 lines × 2) crates/ruvector-consciousness/src/bounds.rs:84— crates/ruvector-consciousness/src/bounds.rs:84-88 | crates/ruvector-consciousness/src/phi.rs:404-408 — 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 (5 lines × 2) crates/ruvector-consciousness/src/chebyshev_phi.rs:84— crates/ruvector-consciousness/src/chebyshev_phi.rs:84-88 | crates/ruvector-consciousness/src/sparse_accel.rs:71-75 — before extracting anything, compare `crates/ruvector-consciousness/src/chebyshev_phi.rs` and `crates/ruvector-consciousness/src/sparse_accel.rs` 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.
Duplicated block (5 lines × 2) crates/ruvector-core/src/advanced_features/hybrid_search.rs:317— crates/ruvector-core/src/advanced_features/hybrid_search.rs:317-321 | crates/ruvector-postgres/src/hybrid/bm25.rs:306-310 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/ruvector-core/src/advanced_features/sparse_vector.rs:408— crates/ruvector-core/src/advanced_features/sparse_vector.rs:408-412 | crates/ruvector-hybrid/src/fusion.rs:250-257 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/ruvector-core/src/embeddings.rs:1348— crates/ruvector-core/src/embeddings.rs:1348-1352 | crates/ruvector-hailo/src/cpu_embedder.rs:242-246 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/ruvector-core/src/index/flat.rs:49— crates/ruvector-core/src/index/flat.rs:49-53 | crates/ruvector-core/src/index/flat.rs:61-65 — 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 (5 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:172— crates/ruvector-core/src/simd_intrinsics.rs:172-176 | crates/ruvector-core/src/simd_intrinsics.rs:1148-1152 — 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 (5 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:292— crates/ruvector-core/src/simd_intrinsics.rs:292-296 | crates/ruvector-core/src/simd_intrinsics.rs:358-362 — 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) crates/emergent-time/src/agentic_time.rs:568— crates/emergent-time/src/agentic_time.rs:568-574 | crates/emergent-time/src/weight_learning.rs:127-132 — before extracting anything, compare `crates/emergent-time/src/agentic_time.rs` and `crates/emergent-time/src/weight_learning.rs` as WHOLE FILES: this scan already matched 5 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 (6 lines × 2) crates/emergent-time/src/complex_matrix.rs:188— crates/emergent-time/src/complex_matrix.rs:188-193 | crates/emergent-time/src/complex_matrix.rs:197-202 — 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) crates/mcp-brain-server/src/routes.rs:2468— crates/mcp-brain-server/src/routes.rs:2468-2473 | crates/mcp-brain-server/src/routes.rs:2475-2480 — 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) crates/prime-radiant/src/coherence/energy.rs:526— crates/prime-radiant/src/coherence/energy.rs:526-531 | crates/prime-radiant/src/substrate/restriction.rs:549-554 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/prime-radiant/src/governance/repository.rs:613— crates/prime-radiant/src/governance/repository.rs:613-618 | crates/prime-radiant/src/governance/repository.rs:854-859 — 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) crates/prime-radiant/src/simd/energy.rs:254— crates/prime-radiant/src/simd/energy.rs:254-259 | crates/prime-radiant/src/simd/vectors.rs:90-95 — before extracting anything, compare `crates/prime-radiant/src/simd/energy.rs` and `crates/prime-radiant/src/simd/vectors.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (6 lines × 2) crates/prime-radiant/src/substrate/graph.rs:644— crates/prime-radiant/src/substrate/graph.rs:644-649 | crates/prime-radiant/src/substrate/mod.rs:139-144 — 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 (6 lines × 2) crates/prime-radiant/src/substrate/restriction.rs:67— crates/prime-radiant/src/substrate/restriction.rs:67-73 | crates/ruvector-solver/src/types.rs:301-306 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/ruos-thermal/src/lib.rs:206— crates/ruos-thermal/src/lib.rs:206-211 | crates/ruos-thermal/src/lib.rs:225-230 — 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) crates/ruvector-attention/src/hyperbolic/lorentz_cascade.rs:131— crates/ruvector-attention/src/hyperbolic/lorentz_cascade.rs:131-136 | crates/ruvector-graph-transformer/src/manifold.rs:1250-1255 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/ruvector-attention/src/hyperbolic/poincare.rs:48— crates/ruvector-attention/src/hyperbolic/poincare.rs:48-53 | crates/ruvector-graph-transformer/src/manifold.rs:1174-1179 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/ruvector-attention/src/hyperbolic/poincare.rs:164— crates/ruvector-attention/src/hyperbolic/poincare.rs:164-169 | crates/ruvector-hyperbolic-hnsw/src/poincare.rs:520-525 — before extracting anything, compare `crates/ruvector-attention/src/hyperbolic/poincare.rs` and `crates/ruvector-hyperbolic-hnsw/src/poincare.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 (6 lines × 2) crates/ruvector-attention/src/moe/moe_attention.rs:126— crates/ruvector-attention/src/moe/moe_attention.rs:126-131 | crates/ruvector-attention/src/moe/moe_attention.rs:168-173 — 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) crates/ruvector-attention/src/utils.rs:189— crates/ruvector-attention/src/utils.rs:189-194 | crates/ruvector-attention/src/utils.rs:222-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/ruvector-cnn/src/layers/conv.rs:114— crates/ruvector-cnn/src/layers/conv.rs:114-119 | crates/ruvector-cnn/src/layers/conv.rs:157-162 — 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) crates/ruvector-cnn/src/layers/conv.rs:480— crates/ruvector-cnn/src/layers/conv.rs:480-485 | crates/ruvector-cnn/src/layers/conv.rs:487-492 — 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) crates/ruvector-cnn/src/layers/quantized_conv2d.rs:253— crates/ruvector-cnn/src/layers/quantized_conv2d.rs:253-258 | crates/ruvector-cnn/src/layers/quantized_depthwise.rs:207-212 — before extracting anything, compare `crates/ruvector-cnn/src/layers/quantized_conv2d.rs` and `crates/ruvector-cnn/src/layers/quantized_depthwise.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 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 (6 lines × 2) crates/ruvector-cnn/src/simd/scalar.rs:344— crates/ruvector-cnn/src/simd/scalar.rs:344-349 | crates/ruvector-cnn/src/simd/scalar.rs:383-388 — 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) crates/ruvector-consciousness/src/phi.rs:406— crates/ruvector-consciousness/src/phi.rs:406-411 | crates/ruvector-consciousness/src/phi.rs:439-444 — 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) crates/ruvector-consciousness/src/rsvd_emergence.rs:160— crates/ruvector-consciousness/src/rsvd_emergence.rs:160-165 | crates/ruvector-consciousness/src/rsvd_emergence.rs:204-209 — 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) crates/ruvector-core/src/advanced_features/matryoshka.rs:450— crates/ruvector-core/src/advanced_features/matryoshka.rs:450-455 | crates/ruvector-core/src/advanced_features/multi_vector.rs:339-344 — before extracting anything, compare `crates/ruvector-core/src/advanced_features/matryoshka.rs` and `crates/ruvector-core/src/advanced_features/multi_vector.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 (6 lines × 2) crates/ruvector-core/src/cache_optimized.rs:328— crates/ruvector-core/src/cache_optimized.rs:328-333 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:408-413 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/ruvector-core/src/embeddings.rs:758— crates/ruvector-core/src/embeddings.rs:758-763 | crates/ruvllm/src/backends/candle_backend.rs:290-295 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/ruvector-core/src/storage.rs:183— crates/ruvector-core/src/storage.rs:183-188 | crates/ruvector-graph/src/storage.rs:179-184 — before extracting anything, compare `crates/ruvector-core/src/storage.rs` and `crates/ruvector-graph/src/storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (6 lines × 2) crates/ruvector-diverse-beam/src/lib.rs:65— crates/ruvector-diverse-beam/src/lib.rs:65-70 | crates/ruvllm/src/qat/reasoning_loss.rs:398-403 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) crates/mcp-brain-server/src/routes.rs:1589— crates/mcp-brain-server/src/routes.rs:1589-1595 | crates/mcp-brain-server/src/routes.rs:3693-3699 — 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 (7 lines × 2) crates/mcp-brain-server/src/store.rs:790— crates/mcp-brain-server/src/store.rs:790-796 | crates/mcp-brain-server/src/store.rs:832-838 — 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 (7 lines × 2) crates/mcp-brain-server/src/types.rs:1117— crates/mcp-brain-server/src/types.rs:1117-1123 | crates/mcp-brain-server/src/types.rs:1132-1138 — 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 (7 lines × 2) crates/prime-radiant/src/cohomology/diffusion.rs:331— crates/prime-radiant/src/cohomology/diffusion.rs:331-337 | crates/prime-radiant/src/cohomology/obstruction.rs:325-331 — 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 (7 lines × 2) crates/prime-radiant/src/distributed/adapter.rs:36— crates/prime-radiant/src/distributed/adapter.rs:36-42 | crates/prime-radiant/src/distributed/adapter.rs:52-58 — 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 (7 lines × 2) crates/prime-radiant/src/ruvllm_integration/pattern_bridge.rs:544— crates/prime-radiant/src/ruvllm_integration/pattern_bridge.rs:544-550 | crates/prime-radiant/src/ruvllm_integration/pattern_bridge.rs:558-565 — 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 (7 lines × 2) crates/prime-radiant/src/substrate/graph.rs:577— crates/prime-radiant/src/substrate/graph.rs:577-583 | crates/prime-radiant/src/substrate/graph.rs:616-622 — 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 (7 lines × 2) crates/prime-radiant/src/types.rs:602— crates/prime-radiant/src/types.rs:602-608 | crates/ruvector-decompiler/src/witness.rs:164-170 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) crates/ruvector-attention-unified-wasm/src/dag.rs:149— crates/ruvector-attention-unified-wasm/src/dag.rs:149-155 | crates/ruvector-attention-unified-wasm/src/dag.rs:462-468 — 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 (7 lines × 2) crates/ruvector-attention-unified-wasm/src/neural.rs:50— crates/ruvector-attention-unified-wasm/src/neural.rs:50-56 | crates/ruvector-attention-wasm/src/attention.rs:30-36 — before extracting anything, compare `crates/ruvector-attention-unified-wasm/src/neural.rs` and `crates/ruvector-attention-wasm/src/attention.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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 (7 lines × 2) crates/ruvector-bench/src/bin/turbo4_ablation.rs:81— crates/ruvector-bench/src/bin/turbo4_ablation.rs:81-87 | crates/ruvector-bench/src/bin/turbo4_ablation.rs:278-284 — 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 (7 lines × 2) crates/ruvector-bet4-ivf-bench/src/kernel.rs:78— crates/ruvector-bet4-ivf-bench/src/kernel.rs:78-84 | crates/ruvector-bet4-ivf-bench/src/pq.rs:89-95 — 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 (7 lines × 2) crates/ruvector-bounded-rag/src/lib.rs:272— crates/ruvector-bounded-rag/src/lib.rs:272-278 | crates/ruvector-bounded-rag/src/lib.rs:580-587 — 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 (7 lines × 2) crates/ruvector-coherence-hnsw/src/dataset.rs:17— crates/ruvector-coherence-hnsw/src/dataset.rs:17-23 | crates/ruvector-coherence-hnsw/src/dataset.rs:67-73 — 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 (7 lines × 2) crates/ruvector-core/src/advanced_features/mmr.rs:202— crates/ruvector-core/src/advanced_features/mmr.rs:202-209 | crates/ruvector-core/src/advanced_features/product_quantization.rs:299-305 — 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 (7 lines × 2) crates/ruvector-core/src/storage.rs:250— crates/ruvector-core/src/storage.rs:250-260 | crates/ruvector-core/src/storage_memory.rs:73-79 — 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 (7 lines × 2) crates/ruvector-delta-wasm/src/simd.rs:123— crates/ruvector-delta-wasm/src/simd.rs:123-129 | crates/ruvector-delta-wasm/src/simd.rs:158-164 — 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 (7 lines × 2) crates/ruvector-diskann/src/distance.rs:283— crates/ruvector-diskann/src/distance.rs:283-289 | crates/ruvector-diskann/src/distance.rs:384-390 — 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 (7 lines × 2) crates/ruvector-edge-store/src/ops/vector.rs:104— crates/ruvector-edge-store/src/ops/vector.rs:104-110 | edge/gateway/src/vectors.rs:87-93 — before extracting anything, compare `crates/ruvector-edge-store/src/ops/vector.rs` and `edge/gateway/src/vectors.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 (7 lines × 2) crates/ruvector-graph-transformer/src/temporal.rs:241— crates/ruvector-graph-transformer/src/temporal.rs:241-247 | crates/ruvector-graph-transformer/src/temporal.rs:353-359 — 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 (7 lines × 2) crates/ruvector-graph/src/cypher/ast.rs:361— crates/ruvector-graph/src/cypher/ast.rs:361-367 | crates/rvlite/src/cypher/ast.rs:361-367 — before extracting anything, compare `crates/ruvector-graph/src/cypher/ast.rs` and `crates/rvlite/src/cypher/ast.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 52 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 (7 lines × 2) crates/ruvector-graph/src/cypher/ast.rs:385— crates/ruvector-graph/src/cypher/ast.rs:385-391 | crates/rvlite/src/cypher/ast.rs:385-391 — before extracting anything, compare `crates/ruvector-graph/src/cypher/ast.rs` and `crates/rvlite/src/cypher/ast.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 52 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 (7 lines × 2) crates/ruvector-hailo-cluster/src/bin/fakeworker.rs:200— crates/ruvector-hailo-cluster/src/bin/fakeworker.rs:200-206 | crates/ruvector-hailo-cluster/src/bin/worker.rs:486-492 — 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 (7 lines × 2) crates/ruvector-hailo/src/cpu_embedder.rs:233— crates/ruvector-hailo/src/cpu_embedder.rs:233-239 | crates/ruvector-hailo/src/hef_embedder.rs:126-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) crates/ruvector-kge-ffi/src/model.rs:257— crates/ruvector-kge-ffi/src/model.rs:257-263 | crates/ruvector-kge-wasm/src/model.rs:257-263 — before extracting anything, compare `crates/ruvector-kge-ffi/src/model.rs` and `crates/ruvector-kge-wasm/src/model.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 189 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 (8 lines × 2) crates/emergent-time/src/agentic_time.rs:598— crates/emergent-time/src/agentic_time.rs:598-605 | crates/emergent-time/src/weight_learning.rs:156-163 — before extracting anything, compare `crates/emergent-time/src/agentic_time.rs` and `crates/emergent-time/src/weight_learning.rs` as WHOLE FILES: this scan already matched 5 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 (8 lines × 2) crates/mcp-brain-server/src/graph.rs:1084— crates/mcp-brain-server/src/graph.rs:1084-1091 | crates/mcp-brain-server/src/graph/rebuild.rs:165-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/mcp-brain-server/src/routes.rs:4925— crates/mcp-brain-server/src/routes.rs:4925-4932 | crates/mcp-brain-server/src/routes.rs:5000-5007 — 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 (8 lines × 2) crates/prime-radiant/src/simd/vectors.rs:93— crates/prime-radiant/src/simd/vectors.rs:93-101 | crates/prime-radiant/src/simd/vectors.rs:330-337 — 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 (8 lines × 2) crates/ruvector-attention-unified-wasm/src/lib.rs:273— crates/ruvector-attention-unified-wasm/src/lib.rs:273-280 | crates/ruvector-gnn-wasm/src/lib.rs:358-365 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/ruvector-cli/src/cli/hooks.rs:1555— crates/ruvector-cli/src/cli/hooks.rs:1555-1562 | crates/ruvector-cli/src/cli/hooks.rs:1601-1608 — 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 (8 lines × 2) crates/ruvector-cnn/src/contrastive/infonce.rs:364— crates/ruvector-cnn/src/contrastive/infonce.rs:364-373 | crates/ruvector-retrieval-receipt/src/index.rs:105-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/ruvector-cnn/src/kernels/int8_scalar.rs:170— crates/ruvector-cnn/src/kernels/int8_scalar.rs:170-178 | crates/ruvector-cnn/src/kernels/int8_scalar.rs:279-286 — 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 (8 lines × 2) crates/ruvector-cnn/src/layers/quantized_residual.rs:67— crates/ruvector-cnn/src/layers/quantized_residual.rs:67-74 | crates/ruvector-cnn/src/layers/quantized_residual.rs:114-121 — 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 (8 lines × 2) crates/ruvector-cnn/src/simd/avx2.rs:13— crates/ruvector-cnn/src/simd/avx2.rs:13-20 | crates/ruvector-cnn/src/simd/avx2.rs:44-51 — 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 (8 lines × 2) crates/ruvector-cnn/src/simd/wasm.rs:58— crates/ruvector-cnn/src/simd/wasm.rs:58-65 | crates/ruvector-cnn/src/simd/wasm.rs:84-91 — 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 (8 lines × 2) crates/ruvector-cnn/src/simd/wasm.rs:199— crates/ruvector-cnn/src/simd/wasm.rs:199-206 | crates/ruvector-cnn/src/simd/wasm.rs:291-298 — 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 (8 lines × 2) crates/ruvector-coherence/src/spectral.rs:243— crates/ruvector-coherence/src/spectral.rs:243-250 | crates/ruvector-consciousness/src/simd.rs:226-235 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/ruvector-consciousness/src/simd.rs:288— crates/ruvector-consciousness/src/simd.rs:288-295 | crates/ruvector-solver/src/simd.rs:217-224 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/ruvector-core/src/encoding/codecs.rs:122— crates/ruvector-core/src/encoding/codecs.rs:122-129 | crates/rvf/rvf-wasm/src/lib.rs:409-416 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/ruvector-core/src/quantization.rs:173— crates/ruvector-core/src/quantization.rs:173-180 | crates/ruvector-core/src/quantization.rs:564-571 — 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 (8 lines × 2) crates/ruvector-decompiler/src/parser.rs:277— crates/ruvector-decompiler/src/parser.rs:277-284 | crates/ruvector-decompiler/src/parser.rs:288-295 — 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 (8 lines × 2) crates/ruvector-delta-core/src/window.rs:326— crates/ruvector-delta-core/src/window.rs:326-333 | crates/ruvector-delta-core/src/window.rs:409-416 — 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 (8 lines × 2) crates/ruvector-delta-graph/src/lib.rs:438— crates/ruvector-delta-graph/src/lib.rs:438-445 | crates/ruvector-delta-graph/src/lib.rs:460-467 — 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 (8 lines × 2) crates/ruvector-delta-wasm/src/simd.rs:91— crates/ruvector-delta-wasm/src/simd.rs:91-98 | crates/ruvector-delta-wasm/src/simd.rs:252-259 — 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 (8 lines × 2) crates/ruvector-edge-store/src/shard/read.rs:138— crates/ruvector-edge-store/src/shard/read.rs:138-145 | edge/gateway/src/quant_query.rs:46-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/ruvector-gnn/src/search.rs:30— crates/ruvector-gnn/src/search.rs:30-37 | crates/ruvector-nervous-system/src/hopfield/retrieval.rs:38-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/ruvector-graph-node/src/lib.rs:263— crates/ruvector-graph-node/src/lib.rs:263-270 | crates/ruvector-graph-node/src/lib.rs:277-284 — 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 (8 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:889— crates/ruvector-graph-transformer-node/src/transformer.rs:889-896 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:945-952 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (8 lines × 2) crates/ruvector-hailo-cluster/src/bin/bench.rs:55— crates/ruvector-hailo-cluster/src/bin/bench.rs:55-62 | crates/ruvector-hailo-cluster/src/bin/embed.rs:76-83 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 × 2) crates/cognitum-gate-kernel/src/evidence.rs:86— crates/cognitum-gate-kernel/src/evidence.rs:86-95 | crates/cognitum-gate-kernel/src/evidence.rs:119-128 — 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) crates/mcp-brain-server/src/routes.rs:683— crates/mcp-brain-server/src/routes.rs:683-692 | crates/mcp-brain-server/src/routes.rs:968-977 — 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) crates/photonlayer-bench/src/privacy.rs:76— crates/photonlayer-bench/src/privacy.rs:76-85 | crates/ruvector-consciousness/src/rsvd_emergence.rs:122-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/prime-radiant/src/coherence/engine.rs:629— crates/prime-radiant/src/coherence/engine.rs:629-638 | crates/prime-radiant/src/coherence/engine.rs:686-695 — 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) crates/prime-radiant/src/ruvllm_integration/memory_layer.rs:1025— crates/prime-radiant/src/ruvllm_integration/memory_layer.rs:1025-1034 | crates/rvAgent/rvagent-middleware/src/hnsw.rs:173-182 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/prime-radiant/src/security/validation.rs:138— crates/prime-radiant/src/security/validation.rs:138-147 | crates/prime-radiant/src/security/validation.rs:348-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:169— crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:169-178 | crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:226-235 — 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) crates/ruvector-bench/src/bin/comparison_benchmark.rs:197— crates/ruvector-bench/src/bin/comparison_benchmark.rs:197-206 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:255-264 — 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) crates/ruvector-bet4-ivf-bench/src/kernel.rs:88— crates/ruvector-bet4-ivf-bench/src/kernel.rs:88-97 | crates/ruvector-bet4-ivf-bench/src/pq.rs:97-106 — 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 (10 lines × 2) crates/ruvector-cnn/src/kernels/int8_avx2.rs:47— crates/ruvector-cnn/src/kernels/int8_avx2.rs:47-56 | crates/ruvector-mincut-gated-transformer/src/kernel/qgemm.rs:238-247 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:19— crates/ruvector-cnn/src/simd/neon.rs:19-28 | crates/ruvllm/src/kernels/matmul.rs:1185-1194 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvllm/src/kernels/matmul.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 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 (10 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:260— crates/ruvector-cnn/src/simd/neon.rs:260-269 | crates/ruvector-cnn/src/simd/neon.rs:345-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.
Duplicated block (10 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:358— crates/ruvector-cnn/src/simd/neon.rs:358-367 | crates/ruvector-cnn/src/simd/scalar.rs:174-183 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/scalar.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 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 × 2) crates/ruvector-core/src/advanced/tda.rs:215— crates/ruvector-core/src/advanced/tda.rs:215-224 | crates/ruvector-core/src/advanced/tda.rs:264-273 — 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) crates/ruvector-core/src/advanced_features/matryoshka.rs:437— crates/ruvector-core/src/advanced_features/matryoshka.rs:437-446 | crates/ruvector-core/src/advanced_features/multi_vector.rs:325-335 — before extracting anything, compare `crates/ruvector-core/src/advanced_features/matryoshka.rs` and `crates/ruvector-core/src/advanced_features/multi_vector.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 × 2) crates/ruvector-crv/src/session.rs:155— crates/ruvector-crv/src/session.rs:155-164 | crates/ruvector-crv/src/session.rs:233-242 — 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) crates/ruvector-dag/src/attention/parallel_branch.rs:202— crates/ruvector-dag/src/attention/parallel_branch.rs:202-211 | crates/ruvector-dag/src/attention/temporal_btsp.rs:124-133 — 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 (10 lines × 2) crates/ruvector-dag/src/mincut/local_kcut.rs:73— crates/ruvector-dag/src/mincut/local_kcut.rs:73-82 | crates/ruvector-mincut/src/localkcut/mod.rs:302-311 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs:198— crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs:198-207 | crates/ruvector-dag/src/qudag/crypto/ml_kem.rs:231-240 — before extracting anything, compare `crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs` and `crates/ruvector-dag/src/qudag/crypto/ml_kem.rs` 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 × 2) crates/ruvector-delta-core/src/encoding.rs:128— crates/ruvector-delta-core/src/encoding.rs:128-137 | crates/rvf/rvf-server/src/tcp.rs:205-214 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/ruvector-gnn/src/mmap.rs:152— crates/ruvector-gnn/src/mmap.rs:152-161 | crates/ruvector-gnn/src/mmap.rs:413-422 — 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) crates/ruvector-graph-node/src/cypher_exec.rs:256— crates/ruvector-graph-node/src/cypher_exec.rs:256-265 | crates/ruvector-py/src/graph/cypher_eval.rs:243-252 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_eval.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 197 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 (10 lines × 2) crates/ruvector-kge-ffi/src/optimize.rs:226— crates/ruvector-kge-ffi/src/optimize.rs:226-235 | crates/ruvector-kge-wasm/src/optimize.rs:222-231 — before extracting anything, compare `crates/ruvector-kge-ffi/src/optimize.rs` and `crates/ruvector-kge-wasm/src/optimize.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 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 (10 lines × 2) crates/ruvector-math/src/optimal_transport/sinkhorn.rs:174— crates/ruvector-math/src/optimal_transport/sinkhorn.rs:174-183 | crates/ruvector-math/src/optimal_transport/sinkhorn.rs:187-196 — 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) crates/ruvector-math/src/optimization/sos.rs:281— crates/ruvector-math/src/optimization/sos.rs:281-290 | crates/ruvector-math/src/optimization/sos.rs:312-321 — 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.
FileTooLong: src/routes.rs crates/mcp-brain-server/src/routes.rs— FileTooLong — 5878 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 106 free functions. The bar is 500 significant lines; this is 5378 over it, 11.76× 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: src/store.rs crates/rvf/rvf-runtime/src/store.rs— FileTooLong — 2860 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: RvfStore (2 blocks, 145-4231). The bar is 500 significant lines; this is 2360 over it, 5.72× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: cpu_backend/mod.rs patches/candle-core-0.9.2/src/cpu_backend/mod.rs— FileTooLong — 2368 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1868 over it, 4.74× 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: cuda_backend/mod.rs patches/candle-core-0.9.2/src/cuda_backend/mod.rs— FileTooLong — 2139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1639 over it, 4.28× 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: bitnet/backend.rs crates/ruvllm/src/bitnet/backend.rs— FileTooLong — 2096 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 74% of them inside a single declaration: BitNetBackend (4 blocks, 612-3370). The bar is 500 significant lines; this is 1596 over it, 4.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: cpu_backend/mod.rs patches/candle-core-0.8.4/src/cpu_backend/mod.rs— FileTooLong — 1906 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1406 over it, 3.81× 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: metal_backend/mod.rs patches/candle-core-0.8.4/src/metal_backend/mod.rs— FileTooLong — 1784 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 88% of them inside a single declaration: MetalStorage (3 blocks, 71-1912). The bar is 500 significant lines; this is 1284 over it, 3.57× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: metal_backend/mod.rs patches/candle-core-0.9.2/src/metal_backend/mod.rs— FileTooLong — 1780 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 88% of them inside a single declaration: MetalStorage (3 blocks, 74-1922). The bar is 500 significant lines; this is 1280 over it, 3.56× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: quantized/k_quants.rs patches/candle-core-0.9.2/src/quantized/k_quants.rs— FileTooLong — 1744 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1244 over it, 3.49× 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: src/tensor.rs patches/candle-core-0.9.2/src/tensor.rs— FileTooLong — 1690 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: Tensor (4 blocks, 45-3116). The bar is 500 significant lines; this is 1190 over it, 3.38× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: cuda_backend/mod.rs patches/candle-core-0.8.4/src/cuda_backend/mod.rs— FileTooLong — 1607 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1107 over it, 3.21× 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: cli/hooks.rs crates/ruvector-cli/src/cli/hooks.rs— FileTooLong — 1580 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 37 free functions. The bar is 500 significant lines; this is 1080 over it, 3.16× 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: src/tensor.rs patches/candle-core-0.8.4/src/tensor.rs— FileTooLong — 1499 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 89% of them inside a single declaration: Tensor (3 blocks, 45-2583). The bar is 500 significant lines; this is 999 over it, 3.00× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: sparql/parser.rs crates/rvlite/src/sparql/parser.rs— FileTooLong — 1479 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 979 over it, 2.96× 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: sparql/parser.rs crates/ruvector-postgres/src/graph/sparql/parser.rs— FileTooLong — 1475 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 975 over it, 2.95× 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: training/tool_dataset.rs crates/ruvllm/src/training/tool_dataset.rs— FileTooLong — 1401 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 83% of them inside a single declaration: ToolDatasetGenerator (2 blocks, 435-2029). The bar is 500 significant lines; this is 901 over it, 2.80× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/attention.rs crates/ruvllm_sparse_attention/src/attention.rs— FileTooLong — 1349 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 849 over it, 2.70× 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: quantized/k_quants.rs patches/candle-core-0.8.4/src/quantized/k_quants.rs— FileTooLong — 1339 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 839 over it, 2.68× 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: index/hnsw_am.rs crates/ruvector-postgres/src/index/hnsw_am.rs— FileTooLong — 1311 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 50 free functions. The bar is 500 significant lines; this is 811 over it, 2.62× 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: index/ivfflat_am.rs crates/ruvector-postgres/src/index/ivfflat_am.rs— FileTooLong — 1276 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 49 free functions. The bar is 500 significant lines; this is 776 over it, 2.55× 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: backends/candle_backend.rs crates/ruvllm/src/backends/candle_backend.rs— FileTooLong — 1176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 676 over it, 2.35× 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: src/hnsw.rs patches/hnsw_rs/src/hnsw.rs— FileTooLong — 1081 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 581 over it, 2.16× 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: bin/local.rs crates/mcp-brain-server/src/bin/local.rs— FileTooLong — 1073 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 40 free functions. The bar is 500 significant lines; this is 573 over it, 2.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: sparql/executor.rs crates/ruvector-postgres/src/graph/sparql/executor.rs— FileTooLong — 1073 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 573 over it, 2.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: src/types.rs crates/mcp-brain-server/src/types.rs— FileTooLong — 1070 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 570 over it, 2.14× 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 (9 lines × 2) crates/mcp-brain-server/src/bin/ruvbrain_sse.rs:314— crates/mcp-brain-server/src/bin/ruvbrain_sse.rs:314-322 | crates/mcp-brain-server/src/main.rs:6-14 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/mcp-brain-server/src/bin/ruvbrain_sse.rs:385— crates/mcp-brain-server/src/bin/ruvbrain_sse.rs:385-393 | crates/mcp-brain-server/src/main.rs:266-274 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/mcp-brain-server/src/graph.rs:744— crates/mcp-brain-server/src/graph.rs:744-752 | crates/mcp-brain-server/src/graph.rs:856-864 — 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) crates/mcp-brain-server/src/graph.rs:1075— crates/mcp-brain-server/src/graph.rs:1075-1083 | crates/mcp-brain-server/src/graph/rebuild.rs:162-170 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/prime-radiant/src/gpu/dispatch.rs:158— crates/prime-radiant/src/gpu/dispatch.rs:158-166 | crates/prime-radiant/src/gpu/dispatch.rs:313-321 — 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) crates/prime-radiant/src/simd/energy.rs:63— crates/prime-radiant/src/simd/energy.rs:63-72 | crates/prime-radiant/src/simd/vectors.rs:204-212 — before extracting anything, compare `crates/prime-radiant/src/simd/energy.rs` and `crates/prime-radiant/src/simd/vectors.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (9 lines × 2) crates/prime-radiant/src/simd/matrix.rs:253— crates/prime-radiant/src/simd/matrix.rs:253-261 | crates/prime-radiant/src/simd/vectors.rs:260-269 — 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 (9 lines × 2) crates/ruvector-acorn/src/graph.rs:152— crates/ruvector-acorn/src/graph.rs:152-160 | crates/ruvector-acorn/src/search.rs:140-148 — 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 (9 lines × 2) crates/ruvector-attention/src/attention/flash.rs:258— crates/ruvector-attention/src/attention/flash.rs:258-266 | crates/ruvector-attention/src/attention/flash.rs:427-435 — 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) crates/ruvector-attention/src/graph/dual_space.rs:216— crates/ruvector-attention/src/graph/dual_space.rs:216-224 | crates/ruvector-attention/src/moe/moe_attention.rs:152-160 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/ruvector-attention/src/moe/expert.rs:161— crates/ruvector-attention/src/moe/expert.rs:161-169 | crates/ruvector-attention/src/sparse/linear.rs:50-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/ruvector-attention/src/sparse/local_global.rs:45— crates/ruvector-attention/src/sparse/local_global.rs:45-53 | crates/ruvector-attention/src/sparse/local_global.rs:62-70 — 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) crates/ruvector-attention/src/transport/cached_projections.rs:31— crates/ruvector-attention/src/transport/cached_projections.rs:31-39 | crates/ruvector-coherence-hnsw/src/dataset.rs:50-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/ruvector-bench/src/bin/memory_benchmark.rs:97— crates/ruvector-bench/src/bin/memory_benchmark.rs:97-105 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:135-143 — before extracting anything, compare `crates/ruvector-bench/src/bin/memory_benchmark.rs` and `crates/ruvector-bench/src/bin/profiling_benchmark.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 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 (9 lines × 2) crates/ruvector-cnn/src/simd/avx2.rs:18— crates/ruvector-cnn/src/simd/avx2.rs:18-26 | crates/ruvector-sparse-inference/src/backend/cpu.rs:194-202 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:154— crates/ruvector-cnn/src/simd/neon.rs:154-162 | crates/ruvector-cnn/src/simd/wasm.rs:120-128 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/wasm.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 132 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 (9 lines × 2) crates/ruvector-cnn/src/simd/winograd.rs:149— crates/ruvector-cnn/src/simd/winograd.rs:149-157 | crates/ruvector-cnn/src/simd/winograd.rs:191-199 — 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) crates/ruvector-coherence/src/spectral.rs:86— crates/ruvector-coherence/src/spectral.rs:86-94 | crates/ruvector-solver/src/simd.rs:316-325 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/ruvector-consciousness/src/bounds.rs:257— crates/ruvector-consciousness/src/bounds.rs:257-265 | crates/ruvector-consciousness/src/sparse_accel.rs:131-139 — 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 (9 lines × 2) crates/ruvector-context/src/index.rs:294— crates/ruvector-context/src/index.rs:294-302 | crates/ruvector-context/src/index.rs:354-362 — 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) crates/ruvector-core/src/quantization.rs:300— crates/ruvector-core/src/quantization.rs:300-308 | crates/ruvector-postgres/src/quantization/binary.rs:11-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:531— crates/ruvector-core/src/simd_intrinsics.rs:531-541 | crates/ruvllm/src/kernels/attention.rs:1274-1282 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvllm/src/kernels/attention.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 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 (9 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:1375— crates/ruvector-core/src/simd_intrinsics.rs:1375-1383 | crates/ruvector-mincut-gated-transformer/src/kernel/qgemm.rs:231-239 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/ruvector-dag/src/attention/causal_cone.rs:44— crates/ruvector-dag/src/attention/causal_cone.rs:44-54 | crates/ruvector-dag/src/attention/critical_path.rs:97-105 — 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 (9 lines × 2) crates/ruvector-delta-core/src/encoding.rs:376— crates/ruvector-delta-core/src/encoding.rs:376-384 | crates/rvf/rvf-runtime/src/qr_seed.rs:587-595 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) crates/mcp-brain-server/src/routes.rs:6760— crates/mcp-brain-server/src/routes.rs:6760-6770 | crates/mcp-brain-server/src/routes.rs:8110-8120 — 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) crates/mcp-brain-server/src/symbolic.rs:483— crates/mcp-brain-server/src/symbolic.rs:483-493 | crates/mcp-brain-server/src/symbolic.rs:496-506 — 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) crates/mcp-brain/src/server.rs:58— crates/mcp-brain/src/server.rs:58-68 | crates/mcp-gate/src/server.rs:129-139 — before extracting anything, compare `crates/mcp-brain/src/server.rs` and `crates/mcp-gate/src/server.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (11 lines × 2) crates/prime-radiant/src/gpu/dispatch.rs:165— crates/prime-radiant/src/gpu/dispatch.rs:165-175 | crates/prime-radiant/src/gpu/dispatch.rs:288-298 — 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) crates/ruvector-attention/src/hyperbolic/hyperbolic_attention.rs:110— crates/ruvector-attention/src/hyperbolic/hyperbolic_attention.rs:110-120 | crates/ruvector-attention/src/hyperbolic/hyperbolic_attention.rs:136-146 — 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) crates/ruvector-cnn/src/simd/avx2.rs:297— crates/ruvector-cnn/src/simd/avx2.rs:297-307 | crates/ruvector-cnn/src/simd/avx2.rs:450-460 — 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) crates/ruvector-cnn/src/simd/neon.rs:274— crates/ruvector-cnn/src/simd/neon.rs:274-284 | crates/ruvector-cnn/src/simd/scalar.rs:126-136 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/scalar.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:399— crates/ruvector-cnn/src/simd/neon.rs:399-409 | crates/ruvector-cnn/src/simd/wasm.rs:374-384 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/wasm.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) crates/ruvector-cnn/src/simd/scalar.rs:113— crates/ruvector-cnn/src/simd/scalar.rs:113-123 | crates/ruvector-cnn/src/simd/scalar.rs:162-172 — 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) crates/ruvector-cnn/src/simd/wasm.rs:235— crates/ruvector-cnn/src/simd/wasm.rs:235-245 | crates/ruvector-cnn/src/simd/wasm.rs:326-336 — 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) crates/ruvector-coherence-hnsw/src/coherence.rs:24— crates/ruvector-coherence-hnsw/src/coherence.rs:24-34 | crates/ruvector-recall-bounded/src/lib.rs:51-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) crates/ruvector-core/src/advanced_features/product_quantization.rs:425— crates/ruvector-core/src/advanced_features/product_quantization.rs:425-435 | crates/ruvector-core/src/quantization.rs:570-580 — before extracting anything, compare `crates/ruvector-core/src/advanced_features/product_quantization.rs` and `crates/ruvector-core/src/quantization.rs` 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. 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 (11 lines × 2) crates/ruvector-core/src/quantization.rs:355— crates/ruvector-core/src/quantization.rs:355-365 | crates/ruvector-core/src/quantization.rs:617-627 — 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) crates/ruvector-core/src/storage.rs:206— crates/ruvector-core/src/storage.rs:206-216 | crates/ruvector-core/src/storage.rs:251-261 — 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) crates/ruvector-crv/src/stage_iii.rs:173— crates/ruvector-crv/src/stage_iii.rs:173-183 | crates/ruvector-crv/src/stage_vi.rs:68-78 — 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 (11 lines × 2) crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs:178— crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs:178-188 | crates/ruvector-dag/src/qudag/crypto/ml_kem.rs:214-224 — before extracting anything, compare `crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs` and `crates/ruvector-dag/src/qudag/crypto/ml_kem.rs` 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 (11 lines × 2) crates/ruvector-decompiler/src/model_decompiler.rs:120— crates/ruvector-decompiler/src/model_decompiler.rs:120-130 | crates/ruvector-decompiler/src/model_decompiler.rs:154-164 — 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) crates/ruvector-delta-core/src/compression.rs:221— crates/ruvector-delta-core/src/compression.rs:221-231 | crates/ruvector-delta-core/src/compression.rs:255-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 (11 lines × 2) crates/ruvector-delta-index/src/lib.rs:432— crates/ruvector-delta-index/src/lib.rs:432-442 | crates/ruvector-delta-index/src/lib.rs:720-730 — 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) crates/ruvector-edge-store/src/ops/vector.rs:91— crates/ruvector-edge-store/src/ops/vector.rs:91-101 | edge/gateway/src/vectors.rs:75-85 — before extracting anything, compare `crates/ruvector-edge-store/src/ops/vector.rs` and `edge/gateway/src/vectors.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 (11 lines × 2) crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:315— crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:315-325 | crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:355-365 — 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) crates/ruvector-gnn/src/mmap.rs:100— crates/ruvector-gnn/src/mmap.rs:100-110 | crates/ruvector-gnn/src/mmap_fixed.rs:71-81 — before extracting anything, compare `crates/ruvector-gnn/src/mmap.rs` and `crates/ruvector-gnn/src/mmap_fixed.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) crates/ruvector-graph-node/src/lib.rs:1003— crates/ruvector-graph-node/src/lib.rs:1003-1013 | crates/ruvector-graph-node/src/lib.rs:1048-1058 — 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) crates/ruvector-hailo/src/cpu_embedder.rs:115— crates/ruvector-hailo/src/cpu_embedder.rs:115-125 | crates/ruvector-hailo/src/host_embeddings.rs:60-70 — before extracting anything, compare `crates/ruvector-hailo/src/cpu_embedder.rs` and `crates/ruvector-hailo/src/host_embeddings.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) crates/ruvector-kge-ffi/src/model.rs:213— crates/ruvector-kge-ffi/src/model.rs:213-223 | crates/ruvector-kge-wasm/src/model.rs:213-223 — before extracting anything, compare `crates/ruvector-kge-ffi/src/model.rs` and `crates/ruvector-kge-wasm/src/model.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 189 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 (12 lines × 2) crates/mcp-brain-server/src/routes.rs:1542— crates/mcp-brain-server/src/routes.rs:1542-1553 | crates/mcp-brain-server/src/routes.rs:3648-3659 — 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) crates/mcp-brain-server/src/routes.rs:2290— crates/mcp-brain-server/src/routes.rs:2290-2301 | crates/mcp-brain-server/src/routes.rs:4809-4820 — 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) crates/prime-radiant/src/governance/repository.rs:809— crates/prime-radiant/src/governance/repository.rs:809-820 | crates/prime-radiant/src/governance/repository.rs:827-838 — 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) crates/prime-radiant/src/simd/energy.rs:75— crates/prime-radiant/src/simd/energy.rs:75-86 | crates/prime-radiant/src/simd/vectors.rs:215-226 — before extracting anything, compare `crates/prime-radiant/src/simd/energy.rs` and `crates/prime-radiant/src/simd/vectors.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (12 lines × 2) crates/prime-radiant/src/simd/energy.rs:245— crates/prime-radiant/src/simd/energy.rs:245-256 | crates/prime-radiant/src/simd/vectors.rs:71-82 — before extracting anything, compare `crates/prime-radiant/src/simd/energy.rs` and `crates/prime-radiant/src/simd/vectors.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (12 lines × 2) crates/ruvector-cnn/src/kernels/int8_avx2.rs:311— crates/ruvector-cnn/src/kernels/int8_avx2.rs:311-322 | crates/ruvector-cnn/src/kernels/int8_neon.rs:296-307 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (12 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:188— crates/ruvector-cnn/src/simd/neon.rs:188-199 | crates/ruvector-cnn/src/simd/wasm.rs:156-167 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/wasm.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 132 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 (12 lines × 2) crates/ruvector-cnn/src/simd/scalar.rs:266— crates/ruvector-cnn/src/simd/scalar.rs:266-277 | crates/ruvector-cnn/src/simd/scalar.rs:304-315 — 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) crates/ruvector-core/src/advanced_features/multi_vector.rs:261— crates/ruvector-core/src/advanced_features/multi_vector.rs:261-272 | crates/ruvector-core/src/advanced_features/multi_vector.rs:307-318 — 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) crates/ruvector-core/src/advanced_features/product_quantization.rs:191— crates/ruvector-core/src/advanced_features/product_quantization.rs:191-202 | crates/ruvector-core/src/advanced_features/product_quantization.rs:229-240 — 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) crates/ruvector-delta-core/src/delta.rs:345— crates/ruvector-delta-core/src/delta.rs:345-356 | crates/ruvector-delta-wasm/src/apply.rs:14-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) crates/ruvector-delta-wasm/src/apply.rs:9— crates/ruvector-delta-wasm/src/apply.rs:9-20 | crates/ruvector-delta-wasm/src/apply.rs:113-124 — 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) crates/ruvector-diskann/src/distance.rs:265— crates/ruvector-diskann/src/distance.rs:265-276 | crates/ruvector-diskann/src/distance.rs:368-379 — 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) crates/ruvector-diskann/src/distance.rs:292— crates/ruvector-diskann/src/distance.rs:292-303 | crates/ruvector-diskann/src/distance.rs:392-403 — 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) crates/ruvector-edge-store/src/ops/vector.rs:234— crates/ruvector-edge-store/src/ops/vector.rs:234-245 | edge/gateway/src/vectors.rs:248-259 — before extracting anything, compare `crates/ruvector-edge-store/src/ops/vector.rs` and `edge/gateway/src/vectors.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 (12 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:1121— crates/ruvector-graph-transformer-node/src/transformer.rs:1121-1132 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:1204-1215 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (12 lines × 2) crates/ruvector-graph-transformer/src/economic.rs:540— crates/ruvector-graph-transformer/src/economic.rs:540-551 | crates/ruvector-graph-transformer/src/economic.rs:553-564 — 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) crates/ruvector-graph-transformer/src/sublinear_attention.rs:148— crates/ruvector-graph-transformer/src/sublinear_attention.rs:148-159 | crates/ruvector-graph-transformer/src/sublinear_attention.rs:206-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 (12 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:77— crates/ruvector-graph/src/cypher/parser.rs:77-88 | crates/rvlite/src/cypher/parser.rs:77-88 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (12 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:171— crates/ruvector-graph/src/cypher/parser.rs:171-182 | crates/rvlite/src/cypher/parser.rs:171-182 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (12 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:978— crates/ruvector-graph/src/cypher/parser.rs:978-989 | crates/rvlite/src/cypher/parser.rs:911-922 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (12 lines × 2) crates/ruvector-graph/src/cypher/semantic.rs:206— crates/ruvector-graph/src/cypher/semantic.rs:206-217 | crates/ruvector-graph/src/cypher/semantic.rs:400-411 — 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) crates/ruvector-hyperbolic-hnsw/src/poincare.rs:136— crates/ruvector-hyperbolic-hnsw/src/poincare.rs:136-147 | crates/ruvector-hyperbolic-hnsw/src/poincare.rs:314-325 — 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) crates/ruvector-kge-ffi/src/model.rs:267— crates/ruvector-kge-ffi/src/model.rs:267-278 | crates/ruvector-kge-wasm/src/model.rs:267-278 — before extracting anything, compare `crates/ruvector-kge-ffi/src/model.rs` and `crates/ruvector-kge-wasm/src/model.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 189 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 (12 lines × 2) crates/ruvector-kge-ffi/src/model.rs:329— crates/ruvector-kge-ffi/src/model.rs:329-340 | crates/ruvector-kge-wasm/src/model.rs:329-340 — before extracting anything, compare `crates/ruvector-kge-ffi/src/model.rs` and `crates/ruvector-kge-wasm/src/model.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 189 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 (13 lines × 2) crates/emergent-time/src/state.rs:19— crates/emergent-time/src/state.rs:19-31 | crates/emergent-time/src/state.rs:35-47 — 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 (13 lines × 2) crates/mcp-brain-server/src/notify.rs:278— crates/mcp-brain-server/src/notify.rs:278-290 | crates/mcp-brain-server/src/notify.rs:335-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.
Duplicated block (13 lines × 2) crates/mcp-brain-server/src/routes.rs:1338— crates/mcp-brain-server/src/routes.rs:1338-1350 | crates/ruvllm/src/claude_flow/reasoning_bank.rs:706-718 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) crates/mcp-brain-server/src/routes.rs:6558— crates/mcp-brain-server/src/routes.rs:6558-6570 | crates/mcp-brain-server/src/routes.rs:6584-6596 — 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 (13 lines × 2) crates/prime-radiant/src/governance/witness.rs:345— crates/prime-radiant/src/governance/witness.rs:345-357 | crates/prime-radiant/src/ruvllm_integration/witness_log.rs:329-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.
Duplicated block (13 lines × 2) crates/prime-radiant/src/simd/energy.rs:168— crates/prime-radiant/src/simd/energy.rs:168-180 | crates/prime-radiant/src/simd/energy.rs:237-249 — 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 (13 lines × 2) crates/prime-radiant/src/storage/file.rs:402— crates/prime-radiant/src/storage/file.rs:402-414 | crates/prime-radiant/src/storage/file.rs:457-469 — 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 (13 lines × 2) crates/ruvector-attention-unified-wasm/src/graph.rs:144— crates/ruvector-attention-unified-wasm/src/graph.rs:144-156 | crates/ruvector-gnn-wasm/src/lib.rs:195-207 — before extracting anything, compare `crates/ruvector-attention-unified-wasm/src/graph.rs` and `crates/ruvector-gnn-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 (13 lines × 2) crates/ruvector-attention/src/training/loss.rs:52— crates/ruvector-attention/src/training/loss.rs:52-64 | crates/ruvector-attention/src/training/loss.rs:81-93 — 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 (13 lines × 2) crates/ruvector-cli/src/cli/hooks.rs:1677— crates/ruvector-cli/src/cli/hooks.rs:1677-1689 | crates/ruvector-cli/src/cli/hooks.rs:1713-1725 — 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 (13 lines × 2) crates/ruvector-cnn/src/simd/avx2.rs:612— crates/ruvector-cnn/src/simd/avx2.rs:612-624 | crates/ruvector-cnn/src/simd/wasm.rs:340-352 — before extracting anything, compare `crates/ruvector-cnn/src/simd/avx2.rs` and `crates/ruvector-cnn/src/simd/wasm.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:481— crates/ruvector-cnn/src/simd/neon.rs:481-493 | crates/ruvector-cnn/src/simd/wasm.rs:462-474 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/wasm.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/ruvector-consciousness/src/geomip.rs:187— crates/ruvector-consciousness/src/geomip.rs:187-199 | crates/ruvector-consciousness/src/phi.rs:235-247 — 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 (13 lines × 2) crates/ruvector-consciousness/src/iit4.rs:119— crates/ruvector-consciousness/src/iit4.rs:119-131 | crates/ruvector-consciousness/src/iit4.rs:161-173 — 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 (13 lines × 2) crates/ruvector-economy-wasm/src/ledger.rs:15— crates/ruvector-economy-wasm/src/ledger.rs:15-27 | crates/ruvector-economy-wasm/src/stake.rs:15-27 — 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 (13 lines × 2) crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:434— crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:434-446 | crates/ruvector-fpga-transformer/src/backend/fpga_pcie.rs:514-526 — 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 (13 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:124— crates/ruvector-graph-node/src/cypher_exec.rs:124-136 | crates/ruvector-py/src/graph/cypher_eval.rs:111-123 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_eval.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 197 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 (13 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:84— crates/ruvector-graph-transformer-node/src/transformer.rs:84-96 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:94-106 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (13 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:312— crates/ruvector-graph-transformer-node/src/transformer.rs:312-324 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:332-344 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (13 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:391— crates/ruvector-graph-transformer-node/src/transformer.rs:391-403 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:406-418 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (13 lines × 2) crates/ruvector-graph-transformer/src/biological.rs:290— crates/ruvector-graph-transformer/src/biological.rs:290-302 | crates/ruvector-graph-transformer/src/biological.rs:310-322 — 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 (13 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:120— crates/ruvector-graph/src/cypher/parser.rs:120-132 | crates/rvlite/src/cypher/parser.rs:120-132 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (13 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:793— crates/ruvector-graph/src/cypher/parser.rs:793-805 | crates/rvlite/src/cypher/parser.rs:793-805 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (13 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:808— crates/ruvector-graph/src/cypher/parser.rs:808-820 | crates/rvlite/src/cypher/parser.rs:808-820 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (13 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:938— crates/ruvector-graph/src/cypher/parser.rs:938-950 | crates/rvlite/src/cypher/parser.rs:871-883 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (15 lines × 2) crates/mcp-brain-server/src/cognitive.rs:129— crates/mcp-brain-server/src/cognitive.rs:129-143 | crates/ruvllm/src/quantize/quip.rs:662-676 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) crates/mcp-brain-server/src/routes.rs:4849— crates/mcp-brain-server/src/routes.rs:4849-4863 | crates/mcp-brain-server/src/routes.rs:5145-5159 — 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) crates/ruvector-acorn/src/index.rs:113— crates/ruvector-acorn/src/index.rs:113-127 | crates/ruvector-acorn/src/index.rs:185-199 — 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) crates/ruvector-cnn/src/simd/neon.rs:163— crates/ruvector-cnn/src/simd/neon.rs:163-177 | crates/ruvector-cnn/src/simd/wasm.rs:129-143 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/wasm.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:221— crates/ruvector-cnn/src/simd/neon.rs:221-235 | crates/ruvector-cnn/src/simd/neon.rs:310-324 — 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) crates/ruvector-core/src/advanced_features/product_quantization.rs:436— crates/ruvector-core/src/advanced_features/product_quantization.rs:436-450 | crates/ruvector-core/src/quantization.rs:582-596 — before extracting anything, compare `crates/ruvector-core/src/advanced_features/product_quantization.rs` and `crates/ruvector-core/src/quantization.rs` 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. 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 (15 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:585— crates/ruvector-core/src/simd_intrinsics.rs:585-599 | crates/ruvector-core/src/simd_intrinsics.rs:839-853 — 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) crates/ruvector-core/src/storage.rs:148— crates/ruvector-core/src/storage.rs:148-162 | crates/ruvector-graph/src/storage.rs:143-157 — before extracting anything, compare `crates/ruvector-core/src/storage.rs` and `crates/ruvector-graph/src/storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (15 lines × 2) crates/ruvector-diverse-beam/src/search.rs:111— crates/ruvector-diverse-beam/src/search.rs:111-125 | crates/ruvector-diverse-beam/src/search.rs:269-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.
Duplicated block (15 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:552— crates/ruvector-graph/src/cypher/parser.rs:552-566 | crates/rvlite/src/cypher/parser.rs:552-566 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (15 lines × 2) crates/ruvector-hailo/src/cpu_embedder.rs:147— crates/ruvector-hailo/src/cpu_embedder.rs:147-161 | crates/ruvector-hailo/src/host_embeddings.rs:79-93 — before extracting anything, compare `crates/ruvector-hailo/src/cpu_embedder.rs` and `crates/ruvector-hailo/src/host_embeddings.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/ruvector-hyperbolic-hnsw/src/tangent.rs:59— crates/ruvector-hyperbolic-hnsw/src/tangent.rs:59-73 | crates/ruvector-hyperbolic-hnsw/src/tangent.rs:82-96 — 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) crates/ruvector-kge-ffi/src/model.rs:383— crates/ruvector-kge-ffi/src/model.rs:383-397 | crates/ruvector-kge-wasm/src/model.rs:383-397 — before extracting anything, compare `crates/ruvector-kge-ffi/src/model.rs` and `crates/ruvector-kge-wasm/src/model.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 189 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 (15 lines × 2) crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:362— crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:362-378 | crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:479-493 — 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) crates/ruvector-mincut-gated-transformer/src/rope.rs:217— crates/ruvector-mincut-gated-transformer/src/rope.rs:217-231 | crates/ruvector-mincut-gated-transformer/src/rope.rs:272-286 — 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) crates/ruvector-postgres/src/graph/sparql/executor.rs:1233— crates/ruvector-postgres/src/graph/sparql/executor.rs:1233-1247 | crates/rvlite/src/sparql/executor.rs:608-622 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (15 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:76— crates/ruvector-postgres/src/graph/sparql/parser.rs:76-90 | crates/rvlite/src/sparql/parser.rs:75-89 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (15 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:775— crates/ruvector-postgres/src/graph/sparql/parser.rs:775-789 | crates/rvlite/src/sparql/parser.rs:781-795 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (15 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:933— crates/ruvector-postgres/src/graph/sparql/parser.rs:933-947 | crates/rvlite/src/sparql/parser.rs:939-953 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (15 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1808— crates/ruvector-postgres/src/graph/sparql/parser.rs:1808-1822 | crates/rvlite/src/sparql/parser.rs:1815-1829 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (15 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:2169— crates/ruvector-postgres/src/graph/sparql/parser.rs:2169-2183 | crates/rvlite/src/sparql/parser.rs:2176-2190 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (15 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:2191— crates/ruvector-postgres/src/graph/sparql/parser.rs:2191-2205 | crates/rvlite/src/sparql/parser.rs:2198-2212 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (15 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:2241— crates/ruvector-postgres/src/graph/sparql/parser.rs:2241-2255 | crates/rvlite/src/sparql/parser.rs:2248-2262 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (15 lines × 2) crates/ruvector-postgres/src/tenancy/validation.rs:176— crates/ruvector-postgres/src/tenancy/validation.rs:176-190 | crates/ruvector-postgres/src/tenancy/validation.rs:222-236 — 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) crates/ruvector-postgres/src/types/scalarvec.rs:75— crates/ruvector-postgres/src/types/scalarvec.rs:75-89 | crates/ruvector-postgres/src/types/scalarvec.rs:101-115 — 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) crates/prime-radiant/src/governance/witness.rs:434— crates/prime-radiant/src/governance/witness.rs:434-447 | crates/prime-radiant/src/ruvllm_integration/witness_log.rs:406-419 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) crates/ruvector-acorn-wasm/src/lib.rs:84— crates/ruvector-acorn-wasm/src/lib.rs:84-97 | crates/ruvector-rabitq-wasm/src/lib.rs:76-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) crates/ruvector-bench/src/bin/comparison_benchmark.rs:229— crates/ruvector-bench/src/bin/comparison_benchmark.rs:229-242 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:287-301 — 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) crates/ruvector-cnn/src/backbone/mobilenet.rs:185— crates/ruvector-cnn/src/backbone/mobilenet.rs:185-198 | crates/ruvector-cnn/src/backbone/mobilenet.rs:297-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) crates/ruvector-cnn/src/quantize/graph_rewrite.rs:310— crates/ruvector-cnn/src/quantize/graph_rewrite.rs:310-323 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:354-367 — 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) crates/ruvector-cnn/src/simd/avx2.rs:25— crates/ruvector-cnn/src/simd/avx2.rs:25-38 | crates/ruvector-cnn/src/simd/avx2.rs:57-70 — 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) crates/ruvector-cnn/src/simd/neon.rs:448— crates/ruvector-cnn/src/simd/neon.rs:448-461 | crates/ruvector-cnn/src/simd/wasm.rs:427-440 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/wasm.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 132 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 (14 lines × 2) crates/ruvector-consciousness/src/phi.rs:333— crates/ruvector-consciousness/src/phi.rs:333-346 | crates/ruvector-consciousness/src/phi.rs:851-864 — 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) crates/ruvector-core/src/index/hnsw.rs:137— crates/ruvector-core/src/index/hnsw.rs:137-150 | crates/ruvector-core/src/index/turbo4.rs:301-314 — 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 (14 lines × 2) crates/ruvector-core/src/integration.rs:48— crates/ruvector-core/src/integration.rs:48-61 | crates/ruvector-core/src/integration.rs:175-188 — 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) crates/ruvector-edge-store/src/ops/vector.rs:285— crates/ruvector-edge-store/src/ops/vector.rs:285-298 | edge/gateway/src/vectors.rs:301-314 — before extracting anything, compare `crates/ruvector-edge-store/src/ops/vector.rs` and `edge/gateway/src/vectors.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 (14 lines × 2) crates/ruvector-fpga-transformer/src/backend/native_sim.rs:293— crates/ruvector-fpga-transformer/src/backend/native_sim.rs:293-306 | crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs:68-81 — before extracting anything, compare `crates/ruvector-fpga-transformer/src/backend/native_sim.rs` and `crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 (14 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:109— crates/ruvector-graph-node/src/cypher_exec.rs:109-122 | crates/ruvector-py/src/graph/cypher_eval.rs:96-109 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_eval.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 197 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 (14 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:415— crates/ruvector-graph-transformer-node/src/transformer.rs:415-428 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:430-443 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (14 lines × 2) crates/ruvector-graph-transformer/src/physics.rs:606— crates/ruvector-graph-transformer/src/physics.rs:606-619 | crates/ruvector-graph-transformer/src/physics.rs:730-743 — 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) crates/ruvector-graph/src/hybrid/vector_index.rs:106— crates/ruvector-graph/src/hybrid/vector_index.rs:106-119 | crates/ruvector-graph/src/hybrid/vector_index.rs:126-139 — 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) crates/ruvector-kge-ffi/src/ops.rs:244— crates/ruvector-kge-ffi/src/ops.rs:244-257 | crates/ruvector-kge-wasm/src/ops.rs:244-257 — before extracting anything, compare `crates/ruvector-kge-ffi/src/ops.rs` and `crates/ruvector-kge-wasm/src/ops.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 238 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 (14 lines × 2) crates/ruvector-math/src/product_manifold/manifold.rs:345— crates/ruvector-math/src/product_manifold/manifold.rs:345-358 | crates/ruvector-math/src/spherical/mod.rs:129-142 — before extracting anything, compare `crates/ruvector-math/src/product_manifold/manifold.rs` and `crates/ruvector-math/src/spherical/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 (14 lines × 2) crates/ruvector-mincut-gated-transformer/src/attention/window.rs:299— crates/ruvector-mincut-gated-transformer/src/attention/window.rs:299-312 | crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs:245-258 — before extracting anything, compare `crates/ruvector-mincut-gated-transformer/src/attention/window.rs` and `crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 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 (14 lines × 2) crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:360— crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:360-373 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:393-406 — 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) crates/ruvector-mincut-node/src/lib.rs:76— crates/ruvector-mincut-node/src/lib.rs:76-89 | crates/ruvector-mincut-node/src/lib.rs:103-116 — 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) crates/ruvector-mincut/src/subpolynomial/mod.rs:435— crates/ruvector-mincut/src/subpolynomial/mod.rs:435-448 | crates/ruvector-mincut/src/subpolynomial/mod.rs:537-550 — 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) crates/ruvector-nervous-system-wasm/src/workspace.rs:218— crates/ruvector-nervous-system-wasm/src/workspace.rs:218-231 | crates/ruvector-nervous-system-wasm/src/workspace.rs:245-258 — 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) crates/ruvector-postgres/src/graph/sparql/executor.rs:879— crates/ruvector-postgres/src/graph/sparql/executor.rs:879-892 | crates/rvlite/src/sparql/executor.rs:502-515 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (14 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:1511— crates/ruvector-postgres/src/graph/sparql/executor.rs:1511-1524 | crates/rvlite/src/sparql/executor.rs:788-801 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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.
FunctionTooLong: ruvector_hailo_cluster::bin::bench::main crates/ruvector-hailo-cluster/src/bin/bench.rs:31— FunctionTooLong — ruvector_hailo_cluster::bin::bench::main runs 432 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 332 over it, 4.32× 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: ruvector_hailo_cluster::bin::embed::main crates/ruvector-hailo-cluster/src/bin/embed.rs:30— FunctionTooLong — ruvector_hailo_cluster::bin::embed::main runs 403 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 303 over it, 4.03× 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: ruvector_hailo_cluster::bin::stats::main crates/ruvector-hailo-cluster/src/bin/stats.rs:31— FunctionTooLong — ruvector_hailo_cluster::bin::stats::main runs 324 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 224 over it, 3.24× 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: ruvector_retrieval_receipt::bin::benchmark::main crates/ruvector-retrieval-receipt/src/bin/benchmark.rs:535— FunctionTooLong — ruvector_retrieval_receipt::bin::benchmark::main runs 270 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 170 over it, 2.70× 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: ruvector_hailo_cluster::bin::worker::main crates/ruvector-hailo-cluster/src/bin/worker.rs:483— FunctionTooLong — ruvector_hailo_cluster::bin::worker::main runs 259 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 159 over it, 2.59× 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: ruvector_temporal_tensor::quantizer::dequantize_f32 crates/ruvector-temporal-tensor/src/quantizer.rs:281— FunctionTooLong — ruvector_temporal_tensor::quantizer::dequantize_f32 runs 242 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 142 over it, 2.42× 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: ruvllm::kernels::matmul::gemm_tile_12x4 crates/ruvllm/src/kernels/matmul.rs:522— FunctionTooLong — ruvllm::kernels::matmul::gemm_tile_12x4 runs 223 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× 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: ruvector_hailo_cluster::bin::ruview-csi-bridge::main crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:138— FunctionTooLong — ruvector_hailo_cluster::bin::ruview-csi-bridge::main runs 215 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 115 over it, 2.15× 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: ruvector_streaming_qng::bin::benchmark::main crates/ruvector-streaming-qng/src/bin/benchmark.rs:235— FunctionTooLong — ruvector_streaming_qng::bin::benchmark::main runs 212 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× 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: ruvector_hailo_cluster::bin::mmwave-bridge::main crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:37— FunctionTooLong — ruvector_hailo_cluster::bin::mmwave-bridge::main runs 210 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× 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: ruvector_typesafe_train::train::run crates/ruvector-typesafe-train/src/train/mod.rs:127— FunctionTooLong — ruvector_typesafe_train::train::run runs 207 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 107 over it, 2.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.
FunctionTooLong: mcp_brain_server::gist::research_and_write_with_gemini crates/mcp-brain-server/src/gist.rs:576— FunctionTooLong — mcp_brain_server::gist::research_and_write_with_gemini runs 203 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× 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: rvf_server::http::discover crates/rvf/rvf-server/src/http.rs:603— FunctionTooLong — rvf_server::http::discover runs 192 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× 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: ruvector_cli::main crates/ruvector-cli/src/main.rs:148— FunctionTooLong — ruvector_cli::main runs 190 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× 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: ruvector_lsm_ann::bin::benchmark::main crates/ruvector-lsm-ann/src/bin/benchmark.rs:23— FunctionTooLong — ruvector_lsm_ann::bin::benchmark::main runs 190 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× 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: ruvector_hailo_cluster::bin::ruvllm-bridge::main crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:50— FunctionTooLong — ruvector_hailo_cluster::bin::ruvllm-bridge::main runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× 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: ruvector_bench::bin::turbo4_ablation::main crates/ruvector-bench/src/bin/turbo4_ablation.rs:126— FunctionTooLong — ruvector_bench::bin::turbo4_ablation::main runs 169 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× 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: ruvector_maxsim::main crates/ruvector-maxsim/src/main.rs:249— FunctionTooLong — ruvector_maxsim::main runs 168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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: ruvector_edge_gateway::m3_ledger::handle edge/gateway/src/m3_ledger.rs:113— FunctionTooLong — ruvector_edge_gateway::m3_ledger::handle runs 168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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: ruvector_adaptive_ann::bin::benchmark::main crates/ruvector-adaptive-ann/src/bin/benchmark.rs:61— FunctionTooLong — ruvector_adaptive_ann::bin::benchmark::main runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× 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: ruvllm::kernels::matmul::gemv_neon_impl crates/ruvllm/src/kernels/matmul.rs:186— FunctionTooLong — ruvllm::kernels::matmul::gemv_neon_impl runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× 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: ruvector_postgres::index::ivfflat_am::ivfflat_ambuild crates/ruvector-postgres/src/index/ivfflat_am.rs:1113— FunctionTooLong — ruvector_postgres::index::ivfflat_am::ivfflat_ambuild runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× 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: ruvector_hailo_cluster::bin::bench::write_prom_textfile crates/ruvector-hailo-cluster/src/bin/bench.rs:703— FunctionTooLong — ruvector_hailo_cluster::bin::bench::write_prom_textfile runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× 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: ruvector_entropy_ann::bin::benchmark::main crates/ruvector-entropy-ann/src/bin/benchmark.rs:95— FunctionTooLong — ruvector_entropy_ann::bin::benchmark::main runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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: rvf_server::http::discover_dyson crates/rvf/rvf-server/src/http.rs:829— FunctionTooLong — rvf_server::http::discover_dyson runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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.
MethodTooLong: ToolDatasetGenerator.define_mcp_tools crates/ruvllm/src/training/tool_dataset.rs:787— MethodTooLong — define_mcp_tools runs 940 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 840 over it, 9.40× 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.
MethodTooLong: Tensor.backward patches/candle-core-0.9.2/src/backprop.rs:165— MethodTooLong — backward runs 444 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 344 over it, 4.44× 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.
MethodTooLong: Tensor.backward patches/candle-core-0.8.4/src/backprop.rs:163— MethodTooLong — backward runs 434 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 334 over it, 4.34× 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.
MethodTooLong: TaskGenerator.build_templates crates/ruvllm/src/claude_flow/task_generator.rs:379— MethodTooLong — build_templates runs 400 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 300 over it, 4.00× 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.
MethodTooLong: WorkerPool.generate_worker_script crates/ruvllm-wasm/src/workers/pool.rs:156— MethodTooLong — generate_worker_script runs 343 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 243 over it, 3.43× 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.
MethodTooLong: CpuStorage.to_dtype patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1847— MethodTooLong — to_dtype runs 309 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 209 over it, 3.09× 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.
MethodTooLong: BrainTrainer.discover_space crates/mcp-brain-server/src/trainer.rs:242— MethodTooLong — discover_space runs 261 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 161 over it, 2.61× 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.
MethodTooLong: Engine.optimize crates/ruvector-typesafe-core/src/engine/optimize/campaign.rs:9— MethodTooLong — optimize runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× 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.
MethodTooLong: MetalStorage.unary_impl patches/candle-core-0.8.4/src/metal_backend/mod.rs:533— MethodTooLong — unary_impl runs 223 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× 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.
MethodTooLong: RvfStore.compact crates/rvf/rvf-runtime/src/store.rs:1664— MethodTooLong — compact runs 205 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× 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.
MethodTooLong: McpBrainTools.list_tools crates/mcp-brain/src/tools.rs:58— MethodTooLong — list_tools runs 201 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× 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.
MethodTooLong: RealContrastiveTrainer.train crates/ruvllm/src/training/real_trainer.rs:232— MethodTooLong — train runs 192 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× 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.
MethodTooLong: CandleBackend.load_gguf crates/ruvllm/src/backends/candle_backend.rs:709— MethodTooLong — load_gguf runs 189 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× 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.
MethodTooLong: RoboticsToolRegistry.register_defaults crates/ruvector-robotics/src/mcp/mod.rs:256— MethodTooLong — register_defaults runs 187 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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.
MethodTooLong: MetalStorage.binary patches/candle-core-0.8.4/src/metal_backend/mod.rs:1691— MethodTooLong — binary runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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.
MethodTooLong: SubquadraticSparseAttention.forward_gqa crates/ruvllm_sparse_attention/src/attention.rs:1301— MethodTooLong — forward_gqa runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× 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.
MethodTooLong: RvfStore.restore_cow_state crates/rvf/rvf-runtime/src/store.rs:3424— MethodTooLong — restore_cow_state runs 161 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× 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.
MethodTooLong: WebGpuInference.matmul crates/ruvllm-wasm/src/webgpu/compute.rs:355— MethodTooLong — matmul runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× 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.
MethodTooLong: SubquadraticSparseAttention.forward crates/ruvllm_sparse_attention/src/attention.rs:137— MethodTooLong — forward runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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.
MethodTooLong: SubquadraticSparseAttention.forward_flash_inner crates/ruvllm_sparse_attention/src/attention.rs:1536— MethodTooLong — forward_flash_inner runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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.
MethodTooLong: BrainTrainer.discover_earth crates/mcp-brain-server/src/trainer.rs:574— MethodTooLong — discover_earth runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× 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.
MethodTooLong: MetalStorage.unary_impl patches/candle-core-0.9.2/src/metal_backend/mod.rs:647— MethodTooLong — unary_impl runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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.
MethodTooLong: DiskAnnIndex.load_impl crates/ruvector-diskann/src/index.rs:473— MethodTooLong — load_impl runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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.
MethodTooLong: LoraAdapter.forward_simd_neon_impl crates/ruvllm/src/lora/micro_lora.rs:311— MethodTooLong — forward_simd_neon_impl runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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.
MethodTooLong: CpuStorage.to_dtype patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1646— MethodTooLong — to_dtype runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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.
+ 51 more in this group — see findings.md.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×69
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/prime-radiant/src/attention/adapter.rs:105— crates/prime-radiant/src/attention/adapter.rs:105-135 | crates/ruvector-attention/src/topology/gated_attention.rs:178-210 | crates/ruvector-gnn/src/search.rs:61-94 | crates/ruvllm/src/bitnet/backend.rs:2201-2246 — 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) crates/prime-radiant/src/simd/energy.rs:159— crates/prime-radiant/src/simd/energy.rs:159-204 | crates/prime-radiant/src/simd/energy.rs:228-270 | crates/prime-radiant/src/simd/vectors.rs:49-109 | crates/prime-radiant/src/simd/vectors.rs:285-346 — 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) crates/prime-radiant/src/substrate/edge.rs:207— crates/prime-radiant/src/substrate/edge.rs:207-227 | crates/prime-radiant/src/substrate/edge.rs:328-350 | crates/prime-radiant/src/substrate/node.rs:85-103 | crates/prime-radiant/src/substrate/node.rs:115-137 — 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) crates/ruvector-attention-node/src/async_ops.rs:138— crates/ruvector-attention-node/src/async_ops.rs:138-183 | crates/ruvector-attention-node/src/async_ops.rs:193-238 | crates/ruvector-attention-node/src/async_ops.rs:273-350 | crates/ruvector-gnn-node/src/lib.rs:372-413 — 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) crates/ruvector-attention-node/src/training.rs:58— crates/ruvector-attention-node/src/training.rs:58-66 | crates/ruvector-attention-node/src/training.rs:135-143 | crates/ruvector-attention-node/src/training.rs:198-203 | crates/ruvector-attention-node/src/training.rs:855-871 — 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) crates/ruvector-attention/src/attention/scaled_dot_product.rs:60— crates/ruvector-attention/src/attention/scaled_dot_product.rs:60-94 | crates/ruvector-attention/src/attention/scaled_dot_product.rs:102-137 | crates/ruvector-attention/src/moe/expert.rs:55-81 | crates/ruvector-attention/src/moe/expert.rs:124-141 — 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) crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:136— crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:136-178 | crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:186-235 | crates/ruvector-attention/src/sheaf/sparse.rs:395-447 | crates/ruvector-gnn/src/layer.rs:505-529 — 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) crates/ruvector-cli/src/cli/hooks.rs:702— crates/ruvector-cli/src/cli/hooks.rs:702-717 | crates/ruvector-mincut/src/snn/optimizer.rs:641-662 | crates/ruvector-robotics/src/cognitive/memory_system.rs:113-126 | crates/ruvllm/src/context/working_memory.rs:358-378 — 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) crates/ruvector-cnn/src/quantize/graph_rewrite.rs:142— crates/ruvector-cnn/src/quantize/graph_rewrite.rs:142-216 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:225-284 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:412-440 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:446-474 — 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) crates/ruvector-cnn/src/simd/avx2.rs:152— crates/ruvector-cnn/src/simd/avx2.rs:152-185 | crates/ruvector-cnn/src/simd/neon.rs:153-200 | crates/ruvector-cnn/src/simd/scalar.rs:71-93 | crates/ruvector-cnn/src/simd/wasm.rs:119-168 — 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) crates/ruvector-core/src/advanced_features/matryoshka.rs:206— crates/ruvector-core/src/advanced_features/matryoshka.rs:206-261 | crates/ruvector-core/src/advanced_features/matryoshka.rs:277-325 | crates/ruvector-core/src/advanced_features/matryoshka.rs:338-423 | crates/ruvector-core/src/advanced_features/multi_vector.rs:174-213 — 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) crates/ruvector-core/src/storage.rs:205— crates/ruvector-core/src/storage.rs:205-239 | crates/ruvector-core/src/storage.rs:242-281 | crates/ruvector-core/src/storage_memory.rs:40-67 | crates/ruvector-core/src/storage_memory.rs:70-101 — 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) crates/ruvector-domain-expansion/src/planning.rs:287— crates/ruvector-domain-expansion/src/planning.rs:287-366 | crates/ruvector-domain-expansion/src/rust_synthesis.rs:238-333 | crates/ruvector-domain-expansion/src/tool_orchestration.rs:303-392 | crates/ruvector-robotics/src/domain_expansion.rs:537-621 — 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) crates/ruvector-filter/src/evaluator.rs:162— crates/ruvector-filter/src/evaluator.rs:162-195 | crates/ruvector-filter/src/evaluator.rs:197-224 | crates/ruvector-filter/src/evaluator.rs:226-253 | crates/ruvector-filter/src/evaluator.rs:255-286 — 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) crates/ruvector-gnn/src/compress.rs:318— crates/ruvector-gnn/src/compress.rs:318-336 | crates/ruvector-postgres/src/quantization/binary.rs:25-38 | crates/ruvector-postgres/src/types/binaryvec.rs:39-61 | crates/ruvector-router-core/src/quantization.rs:116-136 — 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) crates/ruvector-graph-node/src/lib.rs:624— crates/ruvector-graph-node/src/lib.rs:624-636 | crates/ruvector-graph-node/src/lib.rs:979-1013 | crates/ruvector-graph-node/src/lib.rs:1023-1058 | crates/ruvector-graph-node/src/lib.rs:1083-1102 — 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) crates/ruvector-graph-transformer-node/src/lib.rs:332— crates/ruvector-graph-transformer-node/src/lib.rs:332-352 | crates/ruvector-graph-transformer-node/src/lib.rs:572-592 | crates/ruvector-graph-transformer-node/src/lib.rs:657-669 | crates/ruvector-graph-transformer-node/src/lib.rs:738-755 — 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) crates/ruvector-graph/src/cypher/parser.rs:472— crates/ruvector-graph/src/cypher/parser.rs:472-499 | crates/ruvector-graph/src/cypher/parser.rs:1026-1174 | crates/rvlite/src/cypher/parser.rs:472-499 | crates/rvlite/src/cypher/parser.rs:967-1083 — 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) crates/ruvector-graph/src/cypher/parser.rs:568— crates/ruvector-graph/src/cypher/parser.rs:568-604 | crates/ruvector-graph/src/cypher/parser.rs:606-664 | crates/rvlite/src/cypher/parser.rs:568-604 | crates/rvlite/src/cypher/parser.rs:606-664 — 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) crates/ruvector-graph/src/cypher/parser.rs:666— crates/ruvector-graph/src/cypher/parser.rs:666-692 | crates/ruvector-graph/src/cypher/parser.rs:694-730 | crates/rvlite/src/cypher/parser.rs:666-692 | crates/rvlite/src/cypher/parser.rs:694-730 — 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) crates/ruvector-postgres/src/distance/simd.rs:163— crates/ruvector-postgres/src/distance/simd.rs:163-202 | crates/ruvector-postgres/src/distance/simd.rs:503-558 | crates/ruvector-postgres/src/distance/simd.rs:674-695 | crates/ruvector-postgres/src/distance/simd.rs:1339-1436 — 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) crates/ruvector-postgres/src/distance/simd.rs:452— crates/ruvector-postgres/src/distance/simd.rs:452-493 | crates/ruvector-postgres/src/distance/simd.rs:503-558 | crates/ruvector-postgres/src/distance/simd.rs:568-599 | crates/ruvector-postgres/src/distance/simd.rs:609-645 — 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) crates/ruvector-postgres/src/graph/sparql/executor.rs:437— crates/ruvector-postgres/src/graph/sparql/executor.rs:437-478 | crates/ruvector-postgres/src/graph/sparql/executor.rs:489-545 | crates/rvlite/src/sparql/executor.rs:287-363 | crates/rvlite/src/sparql/executor.rs:381-422 — 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) crates/ruvector-postgres/src/graph/sparql/parser.rs:1680— crates/ruvector-postgres/src/graph/sparql/parser.rs:1680-1711 | crates/ruvector-postgres/src/graph/sparql/parser.rs:1713-1764 | crates/rvlite/src/sparql/parser.rs:1687-1718 | crates/rvlite/src/sparql/parser.rs:1720-1771 — 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) crates/ruvector-postgres/src/graph/sparql/parser.rs:2127— crates/ruvector-postgres/src/graph/sparql/parser.rs:2127-2205 | crates/ruvector-postgres/src/graph/sparql/parser.rs:2207-2226 | crates/rvlite/src/sparql/parser.rs:2134-2212 | crates/rvlite/src/sparql/parser.rs:2214-2233 — 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.
Off the main sequence: cognitum-gate-tilezero — cognitum-gate-tilezero: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ruvector-cognitive-container — ruvector-cognitive-container: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: ruvector-coherence — ruvector-coherence: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: ruvector-diskann — ruvector-diskann: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: ruvector-hyperbolic-hnsw — ruvector-hyperbolic-hnsw: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ruvector-metrics — ruvector-metrics: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ruvector-mincut-gated-transformer — ruvector-mincut-gated-transformer: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: ruvector-mmwave — ruvector-mmwave: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ruvector-router-core — ruvector-router-core: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: ruvector-tiny-dancer-core — ruvector-tiny-dancer-core: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: ruvector-turboquant — ruvector-turboquant: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ruvix-types — ruvix-types: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 21 project(s), so it's rigid to change.
Off the main sequence: rvf-federation — rvf-federation: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: rvf-types — rvf-types: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 29 project(s), so it's rigid to change.
Off the main sequence: rvm-types — rvm-types: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
Off the main sequence: ruvector-nervous-system — ruvector-nervous-system: abstractness 0.02, instability 0.00, distance 0.98 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: ruvector-typesafe-core — ruvector-typesafe-core: abstractness 0.02, instability 0.00, distance 0.98 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: ruvector-math — ruvector-math: abstractness 0.03, instability 0.00, distance 0.97 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: sonic_ct — sonic_ct: abstractness 0.03, instability 0.00, distance 0.97 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ruvector-sona (Cargo) — ruvector-sona (Cargo): abstractness 0.03, instability 0.00, distance 0.97 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: emergent-time — emergent-time: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: rvagent-core — rvagent-core: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
Off the main sequence: photonlayer-core — photonlayer-core: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: rvf-index — rvf-index: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: ruvector-fpga-transformer — ruvector-fpga-transformer: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Duplicated block (16 lines × 2) crates/mcp-brain-server/src/routes.rs:911— crates/mcp-brain-server/src/routes.rs:911-926 | crates/mcp-brain-server/src/routes.rs:1106-1121 — 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) crates/mcp-brain/src/server.rs:77— crates/mcp-brain/src/server.rs:77-92 | crates/mcp-gate/src/server.rs:153-168 — before extracting anything, compare `crates/mcp-brain/src/server.rs` and `crates/mcp-gate/src/server.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (16 lines × 2) crates/prime-radiant/src/mincut/adapter.rs:110— crates/prime-radiant/src/mincut/adapter.rs:110-125 | crates/ruvector-mincut/src/subpolynomial/mod.rs:306-321 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (16 lines × 2) crates/ruvector-cnn/src/contrastive/augmentation.rs:508— crates/ruvector-cnn/src/contrastive/augmentation.rs:508-523 | crates/ruvector-cnn/src/contrastive/augmentation.rs:533-548 — 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) crates/ruvector-delta-core/src/encoding.rs:118— crates/ruvector-delta-core/src/encoding.rs:118-133 | crates/ruvector-delta-core/src/encoding.rs:362-377 — 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) crates/ruvector-delta-wasm/src/apply.rs:85— crates/ruvector-delta-wasm/src/apply.rs:85-100 | crates/ruvector-delta-wasm/src/simd.rs:27-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.
Duplicated block (16 lines × 2) crates/ruvector-graph-transformer/src/manifold.rs:1048— crates/ruvector-graph-transformer/src/manifold.rs:1048-1063 | crates/ruvector-graph-transformer/src/manifold.rs:1068-1083 — 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) crates/ruvector-graph/src/cypher/parser.rs:91— crates/ruvector-graph/src/cypher/parser.rs:91-106 | crates/rvlite/src/cypher/parser.rs:91-106 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (16 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:920— crates/ruvector-graph/src/cypher/parser.rs:920-935 | crates/rvlite/src/cypher/parser.rs:853-868 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (16 lines × 2) crates/ruvector-hailo-cluster/src/bin/bench.rs:433— crates/ruvector-hailo-cluster/src/bin/bench.rs:433-448 | crates/ruvector-hailo-cluster/src/bin/embed.rs:442-457 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 (16 lines × 2) crates/ruvector-math/src/optimization/polynomial.rs:272— crates/ruvector-math/src/optimization/polynomial.rs:272-287 | crates/ruvector-math/src/optimization/polynomial.rs:331-346 — 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) crates/ruvector-math/src/spectral/graph_filter.rs:158— crates/ruvector-math/src/spectral/graph_filter.rs:158-173 | crates/ruvector-math/src/spectral/wavelets.rs:227-242 — 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 (16 lines × 2) crates/ruvector-mincut-gated-transformer/src/kv_cache/squat.rs:219— crates/ruvector-mincut-gated-transformer/src/kv_cache/squat.rs:219-234 | crates/ruvector-mincut-gated-transformer/src/kv_cache/squat.rs:238-253 — 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) crates/ruvector-nervous-system-wasm/src/workspace.rs:327— crates/ruvector-nervous-system-wasm/src/workspace.rs:327-342 | crates/ruvector-nervous-system/src/routing/workspace.rs:410-425 — before extracting anything, compare `crates/ruvector-nervous-system-wasm/src/workspace.rs` and `crates/ruvector-nervous-system/src/routing/workspace.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 (16 lines × 2) crates/ruvector-nervous-system/src/hopfield/network.rs:144— crates/ruvector-nervous-system/src/hopfield/network.rs:144-159 | crates/ruvector-nervous-system/src/hopfield/network.rs:205-220 — 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) crates/ruvector-postgres/src/distance/simd.rs:215— crates/ruvector-postgres/src/distance/simd.rs:215-230 | crates/ruvector-postgres/src/distance/simd.rs:279-294 — 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) crates/ruvector-postgres/src/gnn/message_passing.rs:86— crates/ruvector-postgres/src/gnn/message_passing.rs:86-103 | crates/ruvector-postgres/src/gnn/message_passing.rs:147-162 — 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) crates/ruvector-postgres/src/graph/sparql/executor.rs:806— crates/ruvector-postgres/src/graph/sparql/executor.rs:806-821 | crates/rvlite/src/sparql/executor.rs:429-444 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (16 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:1410— crates/ruvector-postgres/src/graph/sparql/executor.rs:1410-1425 | crates/rvlite/src/sparql/executor.rs:700-715 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (16 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:678— crates/ruvector-postgres/src/graph/sparql/parser.rs:678-693 | crates/rvlite/src/sparql/parser.rs:684-699 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (16 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1240— crates/ruvector-postgres/src/graph/sparql/parser.rs:1240-1255 | crates/rvlite/src/sparql/parser.rs:1246-1261 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (16 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1470— crates/ruvector-postgres/src/graph/sparql/parser.rs:1470-1485 | crates/rvlite/src/sparql/parser.rs:1476-1491 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (16 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1783— crates/ruvector-postgres/src/graph/sparql/parser.rs:1783-1798 | crates/rvlite/src/sparql/parser.rs:1790-1805 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (16 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:2018— crates/ruvector-postgres/src/graph/sparql/parser.rs:2018-2033 | crates/rvlite/src/sparql/parser.rs:2025-2040 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (16 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:2211— crates/ruvector-postgres/src/graph/sparql/parser.rs:2211-2226 | crates/rvlite/src/sparql/parser.rs:2218-2233 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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.
ClassTooLong: RvfStore crates/rvf/rvf-runtime/src/store.rs:145— ClassTooLong — 2601 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 108 methods, 2 blocks, lines 145-4231. The bar is 400 significant lines; this is 2201 over it, 6.50× 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.
ClassTooLong: MetalStorage patches/candle-core-0.8.4/src/metal_backend/mod.rs:71— ClassTooLong — 1570 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 4 methods, 3 blocks, lines 71-1912. The bar is 400 significant lines; this is 1170 over it, 3.93× 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.
ClassTooLong: MetalStorage patches/candle-core-0.9.2/src/metal_backend/mod.rs:74— ClassTooLong — 1569 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 3 blocks, lines 74-1922. The bar is 400 significant lines; this is 1169 over it, 3.92× 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.
ClassTooLong: BitNetBackend crates/ruvllm/src/bitnet/backend.rs:612— ClassTooLong — 1557 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 43 methods, 4 blocks, lines 612-3370. The bar is 400 significant lines; this is 1157 over it, 3.89× 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.
ClassTooLong: Tensor patches/candle-core-0.9.2/src/tensor.rs:68— ClassTooLong — 1518 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 4 blocks, lines 45-3116. The bar is 400 significant lines; this is 1118 over it, 3.80× 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.
ClassTooLong: Tensor patches/candle-core-0.8.4/src/tensor.rs:68— ClassTooLong — 1327 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 210 methods, 3 blocks, lines 45-2583. The bar is 400 significant lines; this is 927 over it, 3.32× 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.
ClassTooLong: ToolDatasetGenerator crates/ruvllm/src/training/tool_dataset.rs:435— ClassTooLong — 1163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 2 blocks, lines 435-2029. The bar is 400 significant lines; this is 763 over it, 2.91× 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.
ClassTooLong: CpuStorage patches/candle-core-0.9.2/src/cpu_backend/mod.rs:22— ClassTooLong — 1038 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 3 blocks, lines 22-3024. The bar is 400 significant lines; this is 638 over it, 2.60× 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.
ClassTooLong: CudaStorage patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1192— ClassTooLong — 909 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 3 blocks, lines 1192-2469. The bar is 400 significant lines; this is 509 over it, 2.27× 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.
ClassTooLong: FirestoreClient crates/mcp-brain-server/src/store.rs:45— ClassTooLong — 899 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 56 methods, 3 blocks, lines 45-1518. The bar is 400 significant lines; this is 499 over it, 2.25× 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.
ClassTooLong: SubquadraticSparseAttention crates/ruvllm_sparse_attention/src/attention.rs:75— ClassTooLong — 792 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 6 blocks, lines 75-1822. The bar is 400 significant lines; this is 392 over it, 1.98× 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.
ClassTooLong: WorkerPool crates/ruvllm-wasm/src/workers/pool.rs:49— ClassTooLong — 692 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 3 blocks, lines 49-1131. The bar is 400 significant lines; this is 292 over it, 1.73× 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.
ClassTooLong: CpuStorage patches/candle-core-0.8.4/src/cpu_backend/mod.rs:20— ClassTooLong — 685 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 3 blocks, lines 20-2448. The bar is 400 significant lines; this is 285 over it, 1.71× 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.
ClassTooLong: McpBrainTools crates/mcp-brain/src/tools.rs:34— ClassTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 26 methods, 3 blocks, lines 34-956. The bar is 400 significant lines; this is 275 over it, 1.69× 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.
ClassTooLong: CoreGraphTransformer crates/ruvector-graph-transformer-wasm/src/transformer.rs:249— ClassTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 28 methods, 3 blocks, lines 249-1191. The bar is 400 significant lines; this is 219 over it, 1.55× 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.
ClassTooLong: Storage patches/candle-core-0.9.2/src/storage.rs:10— ClassTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 2 blocks, lines 10-849. The bar is 400 significant lines; this is 215 over it, 1.54× 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.
ClassTooLong: MetalContext crates/ruvllm/src/metal/context.rs:41— ClassTooLong — 608 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 2 blocks, lines 41-1019. The bar is 400 significant lines; this is 208 over it, 1.52× 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.
ClassTooLong: CoreGraphTransformer crates/ruvector-graph-transformer-node/src/transformer.rs:229— ClassTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 27 methods, 3 blocks, lines 229-1108. The bar is 400 significant lines; this is 205 over it, 1.51× 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.
ClassTooLong: CudaStorage patches/candle-core-0.8.4/src/cuda_backend/mod.rs:997— ClassTooLong — 587 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 4 methods, 3 blocks, lines 997-1886. The bar is 400 significant lines; this is 187 over it, 1.47× 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.
ClassTooLong: BrainTrainer crates/mcp-brain-server/src/trainer.rs:128— ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 2 blocks, lines 128-901. The bar is 400 significant lines; this is 185 over it, 1.46× 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.
ClassTooLong: Hnsw patches/hnsw_rs/src/hnsw.rs:741— ClassTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 30 methods, 2 blocks, lines 741-1740. The bar is 400 significant lines; this is 175 over it, 1.44× 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.
ClassTooLong: DatasetGenerator crates/ruvllm/src/training/claude_dataset.rs:333— ClassTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 16 methods, 2 blocks, lines 333-1116. The bar is 400 significant lines; this is 175 over it, 1.44× 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.
ClassTooLong: KnowledgeGraph crates/mcp-brain-server/src/graph.rs:21— ClassTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 41 methods, 3 blocks, lines 21-1027. The bar is 400 significant lines; this is 174 over it, 1.44× 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.
ClassTooLong: Storage patches/candle-core-0.8.4/src/storage.rs:9— ClassTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 38 methods, 2 blocks, lines 9-788. The bar is 400 significant lines; this is 170 over it, 1.43× 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.
ClassTooLong: ThreeLevelHierarchy crates/ruvector-mincut/src/cluster/hierarchy.rs:229— ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 40 methods, 3 blocks, lines 229-1266. The bar is 400 significant lines; this is 143 over it, 1.36× 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 (18 lines × 2) crates/mcp-brain-server/src/gist.rs:880— crates/mcp-brain-server/src/gist.rs:880-897 | crates/mcp-brain-server/src/routes.rs:7933-7950 — 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 (18 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:270— crates/ruvector-graph-node/src/cypher_exec.rs:270-287 | crates/ruvector-py/src/graph/cypher_eval.rs:257-274 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_eval.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 197 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 (18 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:292— crates/ruvector-graph-transformer-node/src/transformer.rs:292-309 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:312-329 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (18 lines × 2) crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:401— crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:401-418 | crates/ruvector-math/src/utils/sorting.rs:23-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18 lines × 2) crates/ruvector-mincut-gated-transformer/src/kernel/norm.rs:20— crates/ruvector-mincut-gated-transformer/src/kernel/norm.rs:20-37 | crates/ruvector-mincut-gated-transformer/src/kernel/norm.rs:45-62 — 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 (18 lines × 2) crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:250— crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:250-267 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:320-337 — 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 (18 lines × 2) crates/ruvector-mincut-wasm/src/routing.rs:60— crates/ruvector-mincut-wasm/src/routing.rs:60-77 | crates/ruvector-mincut-wasm/src/routing.rs:198-215 — 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 (18 lines × 2) crates/ruvector-mincut/src/jtree/hierarchy.rs:473— crates/ruvector-mincut/src/jtree/hierarchy.rs:473-490 | crates/ruvector-mincut/src/jtree/hierarchy.rs:506-523 — 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 (18 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:191— crates/ruvector-postgres/src/graph/sparql/executor.rs:191-208 | crates/rvlite/src/sparql/executor.rs:165-182 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (18 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:208— crates/ruvector-postgres/src/graph/sparql/parser.rs:208-225 | crates/rvlite/src/sparql/parser.rs:207-224 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (18 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:981— crates/ruvector-postgres/src/graph/sparql/parser.rs:981-998 | crates/rvlite/src/sparql/parser.rs:987-1004 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (18 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1587— crates/ruvector-postgres/src/graph/sparql/parser.rs:1587-1604 | crates/rvlite/src/sparql/parser.rs:1594-1611 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (18 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1607— crates/ruvector-postgres/src/graph/sparql/parser.rs:1607-1624 | crates/rvlite/src/sparql/parser.rs:1614-1631 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (18 lines × 2) crates/ruvector-postgres/src/hybrid/executor.rs:249— crates/ruvector-postgres/src/hybrid/executor.rs:249-266 | crates/ruvector-postgres/src/hybrid/executor.rs:268-285 — 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 (18 lines × 2) crates/ruvector-sparse-inference/src/lib.rs:101— crates/ruvector-sparse-inference/src/lib.rs:101-118 | crates/ruvector-sparse-inference/src/lib.rs:127-144 — 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 (18 lines × 2) crates/ruvector-streaming-qng/src/static_pq.rs:55— crates/ruvector-streaming-qng/src/static_pq.rs:55-72 | crates/ruvector-streaming-qng/src/stream_pq.rs:124-141 — 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 (18 lines × 2) crates/ruvllm/src/backends/gemma2.rs:580— crates/ruvllm/src/backends/gemma2.rs:580-597 | crates/ruvllm/src/backends/phi3.rs:458-475 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (18 lines × 2) crates/ruvllm/src/gguf/mod.rs:657— crates/ruvllm/src/gguf/mod.rs:657-674 | crates/ruvllm/src/gguf/mod.rs:693-710 — 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 (18 lines × 2) crates/ruvllm/src/kernels/accelerate.rs:337— crates/ruvllm/src/kernels/accelerate.rs:337-354 | crates/ruvllm/src/kernels/accelerate.rs:405-422 — 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 (18 lines × 2) crates/ruvllm/src/kernels/matmul.rs:910— crates/ruvllm/src/kernels/matmul.rs:910-927 | crates/ruvllm/src/kernels/matmul.rs:1675-1693 — 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 (18 lines × 2) crates/ruvllm/src/kernels/matmul.rs:1118— crates/ruvllm/src/kernels/matmul.rs:1118-1135 | crates/ruvllm/src/kernels/matmul.rs:1143-1160 — 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 (18 lines × 2) crates/rvf/rvf-runtime/src/read_path.rs:635— crates/rvf/rvf-runtime/src/read_path.rs:635-652 | crates/rvf/rvf-server/src/tcp.rs:265-282 — before extracting anything, compare `crates/rvf/rvf-runtime/src/read_path.rs` and `crates/rvf/rvf-server/src/tcp.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 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 (18 lines × 2) crates/timesfm/src/config.rs:59— crates/timesfm/src/config.rs:59-76 | crates/timesfm/src/config.rs:83-100 — 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 (18 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:38— patches/candle-core-0.8.4/src/backprop.rs:38-55 | patches/candle-core-0.9.2/src/backprop.rs:38-55 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (18 lines × 2) patches/candle-core-0.8.4/src/conv.rs:282— patches/candle-core-0.8.4/src/conv.rs:282-299 | patches/candle-core-0.9.2/src/conv.rs:309-326 — before extracting anything, compare `patches/candle-core-0.8.4/src/conv.rs` and `patches/candle-core-0.9.2/src/conv.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 191 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 (17 lines × 2) crates/photonlayer-bench/src/decoder.rs:13— crates/photonlayer-bench/src/decoder.rs:13-29 | crates/photonlayer-bench/src/privacy.rs:165-181 — 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 lines × 2) crates/ruvector-attention/src/sheaf/attention.rs:245— crates/ruvector-attention/src/sheaf/attention.rs:245-261 | crates/ruvector-attention/src/sheaf/sparse.rs:277-293 — 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 lines × 2) crates/ruvector-bench/src/bin/profiling_benchmark.rs:219— crates/ruvector-bench/src/bin/profiling_benchmark.rs:219-235 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:299-315 — 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 (17 lines × 2) crates/ruvector-coherence-hnsw/src/search.rs:263— crates/ruvector-coherence-hnsw/src/search.rs:263-279 | crates/ruvector-coherence-hnsw/src/search.rs:370-386 — 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 (17 lines × 2) crates/ruvector-core/src/storage.rs:125— crates/ruvector-core/src/storage.rs:125-141 | crates/ruvector-graph/src/storage.rs:121-137 — before extracting anything, compare `crates/ruvector-core/src/storage.rs` and `crates/ruvector-graph/src/storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (17 lines × 2) crates/ruvector-delta-core/src/window.rs:269— crates/ruvector-delta-core/src/window.rs:269-285 | crates/ruvector-delta-core/src/window.rs:336-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.
Duplicated block (17 lines × 2) crates/ruvector-gnn/src/compress.rs:220— crates/ruvector-gnn/src/compress.rs:220-236 | crates/ruvector-gnn/src/compress.rs:264-280 — 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 (17 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:200— crates/ruvector-graph-node/src/cypher_exec.rs:200-216 | crates/ruvector-py/src/graph/cypher_eval.rs:187-203 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_eval.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 197 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 (17 lines × 2) crates/ruvector-kge-ffi/src/optimize.rs:189— crates/ruvector-kge-ffi/src/optimize.rs:189-205 | crates/ruvector-kge-wasm/src/optimize.rs:189-205 — before extracting anything, compare `crates/ruvector-kge-ffi/src/optimize.rs` and `crates/ruvector-kge-wasm/src/optimize.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 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 (17 lines × 2) crates/ruvector-memory-admission/src/policy.rs:197— crates/ruvector-memory-admission/src/policy.rs:197-213 | crates/ruvector-memory-admission/src/policy.rs:348-364 — 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 (17 lines × 2) crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:265— crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:265-281 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:294-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.
Duplicated block (17 lines × 2) crates/ruvector-mincut/src/expander/mod.rs:406— crates/ruvector-mincut/src/expander/mod.rs:406-423 | crates/ruvector-mincut/src/expander/mod.rs:617-633 — 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 (17 lines × 2) crates/ruvector-mincut/src/jtree/coordinator.rs:489— crates/ruvector-mincut/src/jtree/coordinator.rs:489-505 | crates/ruvector-mincut/src/jtree/coordinator.rs:520-536 — 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 (17 lines × 2) crates/ruvector-mincut/src/snn/causal.rs:461— crates/ruvector-mincut/src/snn/causal.rs:461-477 | crates/ruvector-mincut/src/snn/causal.rs:481-497 — 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 (17 lines × 2) crates/ruvector-nervous-system/src/compete/kwta.rs:82— crates/ruvector-nervous-system/src/compete/kwta.rs:82-98 | crates/ruvector-nervous-system/src/compete/kwta.rs:116-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 (17 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:445— crates/ruvector-postgres/src/graph/sparql/parser.rs:445-461 | crates/rvlite/src/sparql/parser.rs:444-460 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (17 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:475— crates/ruvector-postgres/src/graph/sparql/parser.rs:475-491 | crates/rvlite/src/sparql/parser.rs:474-490 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (17 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:756— crates/ruvector-postgres/src/graph/sparql/parser.rs:756-772 | crates/rvlite/src/sparql/parser.rs:762-778 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (17 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1221— crates/ruvector-postgres/src/graph/sparql/parser.rs:1221-1237 | crates/rvlite/src/sparql/parser.rs:1227-1243 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (17 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1904— crates/ruvector-postgres/src/graph/sparql/parser.rs:1904-1920 | crates/rvlite/src/sparql/parser.rs:1911-1927 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (17 lines × 2) crates/ruvix/crates/dma/src/config.rs:152— crates/ruvix/crates/dma/src/config.rs:152-168 | crates/ruvix/crates/dma/src/config.rs:175-191 — 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 (17 lines × 2) crates/ruvix/crates/queue/src/ring.rs:260— crates/ruvix/crates/queue/src/ring.rs:260-276 | crates/ruvix/crates/queue/src/ring.rs:322-338 — 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 (17 lines × 2) crates/ruvllm/src/kernels/attention.rs:884— crates/ruvllm/src/kernels/attention.rs:884-900 | crates/ruvllm/src/kernels/attention.rs:970-986 — 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 (17 lines × 2) crates/ruvllm/src/lora/micro_lora.rs:326— crates/ruvllm/src/lora/micro_lora.rs:326-342 | crates/ruvllm/src/lora/micro_lora.rs:422-438 — 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 (17 lines × 2) crates/ruvllm/src/metal/operations.rs:401— crates/ruvllm/src/metal/operations.rs:401-417 | crates/ruvllm/src/metal/operations.rs:531-547 — 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.
ruvector_postgres::graph::sparql::executor::compute_aggregate (cognitive 129) crates/ruvector-postgres/src/graph/sparql/executor.rs:996— ruvector_postgres::graph::sparql::executor::compute_aggregate has cognitive complexity 129 (threshold 15). Drivers by points: if/else 31 (106 pts), loops 7 (14 pts), match/switch 3 (9 pts) (nesting depth added 88). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_postgres::graph::cypher::executor::match_pattern (cognitive 106) crates/ruvector-postgres/src/graph/cypher/executor.rs:94— ruvector_postgres::graph::cypher::executor::match_pattern has cognitive complexity 106 (threshold 15). Drivers by points: if/else 27 (91 pts), loops 4 (7 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 70). 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.
ruvector_postgres::graph::sparql::executor::evaluate_transitive_path (cognitive 53) crates/ruvector-postgres/src/graph/sparql/executor.rs:719— ruvector_postgres::graph::sparql::executor::evaluate_transitive_path has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (46 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 37). 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.
ruvector_postgres::index::hnsw_am::hnsw_search (cognitive 49) crates/ruvector-postgres/src/index/hnsw_am.rs:679— ruvector_postgres::index::hnsw_am::hnsw_search has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 6 (15 pts), boolean chains 1 (nesting depth added 31). 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.
ruvector_postgres::graph::sparql::executor::evaluate_graph_pattern (cognitive 44) crates/ruvector-postgres/src/graph/sparql/executor.rs:221— ruvector_postgres::graph::sparql::executor::evaluate_graph_pattern has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 5 (15 pts), match/switch 2 (3 pts) (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_postgres::graph::sparql::executor::match_simple_triple_with_var_pred (cognitive 44) crates/ruvector-postgres/src/graph/sparql/executor.rs:480— ruvector_postgres::graph::sparql::executor::match_simple_triple_with_var_pred has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (43 pts), loops 1 (nesting depth added 27). 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.
ruvector_postgres::index::hnsw_am::hnsw_rescan (cognitive 42) crates/ruvector-postgres/src/index/hnsw_am.rs:1663— ruvector_postgres::index::hnsw_am::hnsw_rescan has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (36 pts), boolean chains 6 (nesting depth added 22). 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.
ruvector_postgres::index::ivfflat_am::ivfflat_amrescan (cognitive 42) crates/ruvector-postgres/src/index/ivfflat_am.rs:1534— ruvector_postgres::index::ivfflat_am::ivfflat_amrescan has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (37 pts), boolean chains 5 (nesting depth added 23). 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.
ruvector_postgres::graph::sparql::executor::execute_update (cognitive 41) crates/ruvector-postgres/src/graph/sparql/executor.rs:1625— ruvector_postgres::graph::sparql::executor::execute_update has cognitive complexity 41 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 6 (18 pts), match/switch 3 (4 pts) (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_postgres::graph::cypher::parser::parse_relationship_pattern (cognitive 32) crates/ruvector-postgres/src/graph/cypher/parser.rs:167— ruvector_postgres::graph::cypher::parser::parse_relationship_pattern has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 1 (3 pts) (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.
ruvector_postgres::graph::sparql::executor::evaluate_expression (cognitive 31) crates/ruvector-postgres/src/graph/sparql/executor.rs:1232— ruvector_postgres::graph::sparql::executor::evaluate_expression has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_postgres::graph::sparql::executor::project_solutions (cognitive 30) crates/ruvector-postgres/src/graph/sparql/executor.rs:151— ruvector_postgres::graph::sparql::executor::project_solutions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (10 pts), match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_postgres::graph::sparql::executor::match_simple_triple (cognitive 28) crates/ruvector-postgres/src/graph/sparql/executor.rs:429— ruvector_postgres::graph::sparql::executor::match_simple_triple has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 1 (nesting depth added 17). 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.
ruvector_postgres::integrity::stoer_wagner_mincut (cognitive 27) crates/ruvector-postgres/src/integrity/mod.rs:134— ruvector_postgres::integrity::stoer_wagner_mincut has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 4 (11 pts), boolean chains 4 (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.
ruvector_postgres::workers::ipc::submit_and_wait (cognitive 26) crates/ruvector-postgres/src/workers/ipc.rs:794— ruvector_postgres::workers::ipc::submit_and_wait has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 2, match/switch 1 (2 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.
ruvector_postgres::graph::sparql::executor::evaluate_property_path (cognitive 25) crates/ruvector-postgres/src/graph/sparql/executor.rs:547— ruvector_postgres::graph::sparql::executor::evaluate_property_path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_postgres::index::scan::parse_hnsw_config (cognitive 25) crates/ruvector-postgres/src/index/scan.rs:23— ruvector_postgres::index::scan::parse_hnsw_config has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (19 pts), match/switch 1 (4 pts), loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector_postgres::solver::operators::ruvector_graph_centrality (cognitive 25) crates/ruvector-postgres/src/solver/operators.rs:436— ruvector_postgres::solver::operators::ruvector_graph_centrality has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (10 pts), match/switch 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.
ruvector_postgres::dag::functions::attention::dag_attention_configure (cognitive 24) crates/ruvector-postgres/src/dag/functions/attention.rs:153— ruvector_postgres::dag::functions::attention::dag_attention_configure has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_postgres::graph::cypher::executor::evaluate_return_item (cognitive 24) crates/ruvector-postgres/src/graph/cypher/executor.rs:442— ruvector_postgres::graph::cypher::executor::evaluate_return_item has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (4 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_postgres::workers::integrity::stoer_wagner_mincut (cognitive 23) crates/ruvector-postgres/src/workers/integrity.rs:37— ruvector_postgres::workers::integrity::stoer_wagner_mincut has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (5 pts), boolean chains 4 (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.
ruvector_postgres::graph::sparql::executor::execute_describe (cognitive 22) crates/ruvector-postgres/src/graph/sparql/executor.rs:1587— ruvector_postgres::graph::sparql::executor::execute_describe has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 3 (6 pts), match/switch 1 (2 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.
ruvector_postgres::graph::sparql::executor::evaluate_group (cognitive 21) crates/ruvector-postgres/src/graph/sparql/executor.rs:943— ruvector_postgres::graph::sparql::executor::evaluate_group has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (8 pts), match/switch 2 (7 pts), if/else 2 (6 pts) (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.
ruvector_postgres::index::hnsw_am::hnsw_insert_vector (cognitive 21) crates/ruvector-postgres/src/index/hnsw_am.rs:1125— ruvector_postgres::index::hnsw_am::hnsw_insert_vector has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (7 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.
ruvector_postgres::graph::sparql::executor::evaluate_binary_op (cognitive 20) crates/ruvector-postgres/src/graph/sparql/executor.rs:1427— ruvector_postgres::graph::sparql::executor::evaluate_binary_op has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 3 (7 pts), boolean chains 3 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Boundary violation [package:relative-cross-package] crates/ruvector-attention-wasm/js/index.ts:6— crates/ruvector-attention-wasm/js/index.ts:6 reaches into another package with a relative path (../pkg/ruvector_attention_wasm) — import the package by name instead.
Boundary violation [package:test-cross-package-internals] crates/ruvector-sota-bench/harness/test/metrics.test.ts:3— crates/ruvector-sota-bench/harness/test/metrics.test.ts:3 reaches past another workspace package's public entry into its internals with a relative path (../src/metrics.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-suite-dependency] crates/ruvector-wasm/scripts/benchmark-hnsw.mjs:5— crates/ruvector-wasm/scripts/benchmark-hnsw.mjs:5 imports crates/ruvector-wasm/tests/fixtures.mjs, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:third-party-deep-import] npm/packages/agentic-synth-examples/src/dspy/benchmark.js:60— npm/packages/agentic-synth-examples/src/dspy/benchmark.js:60 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] npm/packages/agentic-synth-examples/src/dspy/benchmark.ts:26— npm/packages/agentic-synth-examples/src/dspy/benchmark.ts:26 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] npm/packages/agentic-synth/training/dspy-multi-model-benchmark.js:60— npm/packages/agentic-synth/training/dspy-multi-model-benchmark.js:60 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] npm/packages/agentic-synth/training/dspy-multi-model-benchmark.ts:27— npm/packages/agentic-synth/training/dspy-multi-model-benchmark.ts:27 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:relative-cross-package] npm/packages/agentic-synth/training/dspy-real-integration.js:21— npm/packages/agentic-synth/training/dspy-real-integration.js:21 reaches into another package with a relative path (../node_modules/dspy.ts/dist/src/index.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] npm/packages/agentic-synth/training/dspy-real-integration.ts:19— npm/packages/agentic-synth/training/dspy-real-integration.ts:19 reaches into another package with a relative path (../node_modules/dspy.ts/dist/src/index.js) — import the package by name instead.
Boundary violation [package:third-party-deep-import] npm/packages/agentic-synth/training/test-benchmark-import.cjs:11— npm/packages/agentic-synth/training/test-benchmark-import.cjs:11 imports dspy.ts/dist/src/index, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:relative-cross-package] npm/packages/mincut-wasm/routing/worker.mjs:11— npm/packages/mincut-wasm/routing/worker.mjs:11 reaches into another package with a relative path (../node/ruvector_mincut_wasm.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] npm/packages/mincut-wasm/routing/worker.mjs:15— npm/packages/mincut-wasm/routing/worker.mjs:15 reaches into another package with a relative path (../web/ruvector_mincut_wasm.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] npm/packages/rudag/src/dag.js:98— npm/packages/rudag/src/dag.js:98 reaches into another package with a relative path (../pkg/ruvector_dag_wasm.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] npm/packages/rudag/src/dag.js:109— npm/packages/rudag/src/dag.js:109 reaches into another package with a relative path (../pkg-node/ruvector_dag_wasm.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] npm/packages/rudag/src/dag.ts:137— npm/packages/rudag/src/dag.ts:137 reaches into another package with a relative path (../pkg/ruvector_dag_wasm.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] npm/packages/rudag/src/dag.ts:147— npm/packages/rudag/src/dag.ts:147 reaches into another package with a relative path (../pkg-node/ruvector_dag_wasm.js) — import the package by name instead.
Boundary violation [package:undeclared-workspace-dep] npm/packages/ruvector/bin/mcp-server.js:3750— npm/packages/ruvector/bin/mcp-server.js:3750 imports rvlite, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
Boundary violation [package:undeclared-workspace-dep] npm/packages/ruvector/bin/mcp-server.js:3781— npm/packages/ruvector/bin/mcp-server.js:3781 imports rvlite, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
Boundary violation [package:undeclared-workspace-dep] npm/packages/ruvector/bin/mcp-server.js:3812— npm/packages/ruvector/bin/mcp-server.js:3812 imports rvlite, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
Boundary violation [package:relative-cross-package] REDACTED:40— REDACTED:40 reaches into another package with a relative path (../../wasm/ruvector_decompiler_wasm) — import the package by name instead.
Boundary violation [package:third-party-deep-import] REDACTED:2— REDACTED:2 imports katex/dist/contrib/mhchem.mjs, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:11— REDACTED:11 imports highlight.js/lib/core, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:13— REDACTED:13 imports highlight.js/lib/languages/javascript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:14— REDACTED:14 imports highlight.js/lib/languages/typescript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:15— REDACTED:15 imports highlight.js/lib/languages/json, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
+ 15 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file npm/packages/rvlite/bin/cli.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/ruvllm/scripts/training/generate-ecosystem-triplets.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/postgres-cli/src/client.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/agentic-synth/training/dspy-learning-session.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/ruvector-extensions/src/exporters.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/cli/src/cli.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/postgres-cli/src/cli.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/cognitum-gate-wasm/src/index.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/ruvector-extensions/src/temporal.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/agentic-synth/training/dspy-real-integration.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/agentic-integration/integration-tests.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/agentic-integration/coordination-protocol.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/ruvbot/src/security/AIDefenceGuard.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file ui/ruvocal/src/routes/conversation/[id]/+REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file npm/packages/cli/src/storage.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file ui/ruvocal/src/lib/server/database/postgres.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
+ 15 more in this group — see findings.md.
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×40
Length read from the parsed input is spent without ever being bounded scripts/patches/hnsw_rs/src/datamap.rs:207— `serialized_len` is read from the bytes being parsed at line 203 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 207 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded scripts/patches/hnsw_rs/src/hnswio.rs:669— `nbpoints` is read from the bytes being parsed at line 667 (`usize::from_ne_bytes`), then used to size a `Vec::with_capacity` at line 669 — and nowhere in its scope is `nbpoints` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `nbpoints` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded scripts/patches/hnsw_rs/src/hnswio.rs:1153— `serialized_len` is read from the bytes being parsed at line 1151 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 1153 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded scripts/patches/hnsw_rs/src/hnswio.rs:1208— `serialized_len` is read from the bytes being parsed at line 1203 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 1208 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded scripts/patches/hnsw_rs/src/hnswio.rs:1259— `nb_neighbours` is read from the bytes being parsed at line 1258 (`usize::from_ne_bytes`), then used to size a `Vec::with_capacity` at line 1259 — and nowhere in its scope is `nb_neighbours` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `nb_neighbours` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/hnsw_rs/src/datamap.rs:207— `serialized_len` is read from the bytes being parsed at line 203 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 207 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/hnsw_rs/src/hnswio.rs:669— `nbpoints` is read from the bytes being parsed at line 667 (`usize::from_ne_bytes`), then used to size a `Vec::with_capacity` at line 669 — and nowhere in its scope is `nbpoints` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `nbpoints` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/hnsw_rs/src/hnswio.rs:1153— `serialized_len` is read from the bytes being parsed at line 1151 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 1153 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/hnsw_rs/src/hnswio.rs:1208— `serialized_len` is read from the bytes being parsed at line 1203 (`u64::from_ne_bytes`), then used to size a `vec![…; n]` at line 1208 — and nowhere in its scope is `serialized_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `serialized_len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/hnsw_rs/src/hnswio.rs:1259— `nb_neighbours` is read from the bytes being parsed at line 1258 (`usize::from_ne_bytes`), then used to size a `Vec::with_capacity` at line 1259 — and nowhere in its scope is `nb_neighbours` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `nb_neighbours` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.9.2/src/pickle.rs:484— `len` is read from the bytes being parsed at line 483 (`read_u32`), then used to size a `vec![…; n]` at line 484 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.9.2/src/quantized/ggml_file.rs:111— `len` is read from the bytes being parsed at line 110 (`read_u32`), then used to size a `vec![…; n]` at line 111 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.9.2/src/quantized/ggml_file.rs:200— `n_dims` is read from the bytes being parsed at line 196 (`read_u32`), then used to size a `vec![…; n]` at line 200 — and nowhere in its scope is `n_dims` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dims` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.9.2/src/quantized/ggml_file.rs:205— `name_len` is read from the bytes being parsed at line 197 (`read_u32`), then used to size a `vec![…; n]` at line 205 — and nowhere in its scope is `name_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `name_len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.9.2/src/quantized/gguf_file.rs:427— `n_dimensions` is read from the bytes being parsed at line 423 (`read_u32`), then used to size a `vec![…; n]` at line 427 — and nowhere in its scope is `n_dimensions` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dimensions` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.9.2/src/quantized/imatrix_file.rs:51— `len` is read from the bytes being parsed at line 42 (`read_i32`), then used to size a `vec![…; n]` at line 51 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.8.4/src/pickle.rs:473— `len` is read from the bytes being parsed at line 472 (`read_u32`), then used to size a `vec![…; n]` at line 473 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.8.4/src/quantized/ggml_file.rs:111— `len` is read from the bytes being parsed at line 110 (`read_u32`), then used to size a `vec![…; n]` at line 111 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.8.4/src/quantized/ggml_file.rs:199— `n_dims` is read from the bytes being parsed at line 195 (`read_u32`), then used to size a `vec![…; n]` at line 199 — and nowhere in its scope is `n_dims` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dims` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.8.4/src/quantized/ggml_file.rs:204— `name_len` is read from the bytes being parsed at line 196 (`read_u32`), then used to size a `vec![…; n]` at line 204 — and nowhere in its scope is `name_len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `name_len` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded patches/candle-core-0.8.4/src/quantized/gguf_file.rs:426— `n_dimensions` is read from the bytes being parsed at line 422 (`read_u32`), then used to size a `vec![…; n]` at line 426 — and nowhere in its scope is `n_dimensions` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `n_dimensions` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded crates/rvf/rvf-wire/src/index_seg_codec.rs:125— `restart_count` is read from the bytes being parsed at line 120 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 125 — and nowhere in its scope is `restart_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `restart_count` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded crates/rvf/rvf-wire/src/vec_seg_codec.rs:59— `block_count` is read from the bytes being parsed at line 54 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 59 — and nowhere in its scope is `block_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `block_count` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded crates/rvf/rvf-wasm/src/lib.rs:494— `seg_dim` is read from the bytes being parsed at line 469 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 494 — and nowhere in its scope is `seg_dim` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `seg_dim` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded crates/rvf/rvf-server/src/tcp.rs:204— `dim` is read from the bytes being parsed at line 194 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 204 — and nowhere in its scope is `dim` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `dim` against the bytes actually remaining and a maximum the format allows before allocating.
+ 15 more in this group — see findings.md.
X2 · Cancellation propagation· Async function without AbortSignal · ×39
Async function without AbortSignal: __wbg_init ui/ruvocal/static/wasm/rvagent_wasm.js:1513— `__wbg_init` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: RequestHandler ui/ruvocal/src/routes/api/v2/user/billing-orgs/+REDACTED:8— `RequestHandler` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: createShareLink ui/ruvocal/src/lib/createShareLink.ts:6— `createShareLink` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: loadAttachmentsFromUrls ui/ruvocal/src/lib/utils/loadAttachmentsFromUrls.ts:69— `loadAttachmentsFromUrls` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: refreshMcpServers ui/ruvocal/src/lib/stores/mcpServers.ts:167— `refreshMcpServers` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: healthCheckServer ui/ruvocal/src/lib/stores/mcpServers.ts:404— `healthCheckServer` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: setSettings ui/ruvocal/src/lib/stores/settings.ts:55— `setSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: initValue ui/ruvocal/src/lib/stores/settings.ts:95— `initValue` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: authenticateRequest ui/ruvocal/src/lib/server/auth.ts:398— `authenticateRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: processModel ui/ruvocal/src/lib/server/models.ts:121— `processModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: buildModels ui/ruvocal/src/lib/server/models.ts:297— `buildModels` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: sendSlack ui/ruvocal/src/lib/server/sendSlack.ts:4— `sendSlack` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchBrain scripts/analyze-evolution.js:11— `fetchBrain` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: callGemini scripts/gemini-agents.js:29— `callGemini` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: brainSearch scripts/gemini-agents.js:55— `brainSearch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: brainList scripts/gemini-agents.js:69— `brainList` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: groundProposition scripts/gemini-agents.js:97— `groundProposition` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: researchDirector scripts/gemini-agents.js:327— `researchDirector` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: grade packages/metabiohacker/tools/evidenceRefresh.mjs:33— `grade` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchTo npm/packages/typesafe/scripts/fetch-models.mjs:149— `fetchTo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: init npm/packages/rvf-wasm/pkg/rvf_wasm.js:23— `init` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: download npm/packages/ruvllm/src/models.ts:229— `download` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: download npm/packages/ruvllm/src/models.js:195— `download` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: callClaude npm/packages/ruvllm/scripts/training/claude-hard-negatives.js:50— `callClaude` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: embedTexts REDACTED:583— `embedTexts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Swallowed exception (empty catch) ui/ruvocal/src/routes/+layout.svelte:139— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) ui/ruvocal/src/routes/settings/(nav)/application/+page.svelte:72— 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 (empty catch) ui/ruvocal/src/routes/r/[id]/+page.ts:20— 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 (empty catch) ui/ruvocal/src/routes/conversation/[id]/+page.ts:38— 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 (empty catch) ui/ruvocal/src/routes/api/mcp/health/+REDACTED:213— 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 (empty catch) ui/ruvocal/src/routes/api/mcp/health/+REDACTED:238— 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 (empty catch) ui/ruvocal/src/routes/api/mcp/health/+REDACTED:313— 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 (empty catch) ui/ruvocal/src/routes/api/mcp/health/+REDACTED:361— 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 (empty catch) ui/ruvocal/src/routes/api/mcp/health/+REDACTED:423— 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 (empty catch) ui/ruvocal/src/lib/workers/autopilotWorker.ts:199— 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 (empty catch) ui/ruvocal/src/lib/utils/haptics.ts:41— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) ui/ruvocal/src/lib/utils/loadAttachmentsFromUrls.ts:59— 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 (empty catch) REDACTED:262— 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 (empty catch) ui/ruvocal/src/lib/utils/mime.ts:35— 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 (empty catch) ui/ruvocal/src/lib/stores/wasmMcp.ts:112— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:84— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:120— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:135— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:137— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:189— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:216— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:224— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:227— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:246— 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 (empty catch) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:253— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Duplicated block (19 lines × 2) crates/micro-hnsw-wasm/src/lib.rs:860— crates/micro-hnsw-wasm/src/lib.rs:860-878 | crates/micro-hnsw-wasm/src/lib.rs:1328-1346 — 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 (19 lines × 2) crates/ruvector-collections/src/manager.rs:233— crates/ruvector-collections/src/manager.rs:233-251 | crates/ruvector-collections/src/manager.rs:291-309 — 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 (19 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:1263— crates/ruvector-core/src/simd_intrinsics.rs:1263-1281 | crates/ruvector-core/src/simd_intrinsics.rs:1312-1330 — 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 (19 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:219— crates/ruvector-graph-node/src/cypher_exec.rs:219-237 | crates/ruvector-py/src/graph/cypher_eval.rs:206-224 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_eval.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 197 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 (19 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:648— crates/ruvector-graph-transformer-node/src/transformer.rs:648-666 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:692-710 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (19 lines × 2) crates/ruvector-kge-ffi/src/model.rs:224— crates/ruvector-kge-ffi/src/model.rs:224-242 | crates/ruvector-kge-wasm/src/model.rs:224-242 — before extracting anything, compare `crates/ruvector-kge-ffi/src/model.rs` and `crates/ruvector-kge-wasm/src/model.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 189 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 (19 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:350— crates/ruvector-postgres/src/graph/sparql/executor.rs:350-368 | crates/rvlite/src/sparql/executor.rs:263-281 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (19 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:52— crates/ruvector-postgres/src/graph/sparql/parser.rs:52-70 | crates/rvlite/src/sparql/parser.rs:52-70 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (19 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:228— crates/ruvector-postgres/src/graph/sparql/parser.rs:228-246 | crates/rvlite/src/sparql/parser.rs:227-245 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (19 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:494— crates/ruvector-postgres/src/graph/sparql/parser.rs:494-512 | crates/rvlite/src/sparql/parser.rs:493-511 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (19 lines × 2) crates/ruvector-postgres/src/index/ivfflat.rs:281— crates/ruvector-postgres/src/index/ivfflat.rs:281-299 | crates/ruvector-postgres/src/index/ivfflat.rs:333-351 — 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 (19 lines × 2) crates/ruvector-solver/src/backward_push.rs:118— crates/ruvector-solver/src/backward_push.rs:118-136 | crates/ruvector-solver/src/random_walk.rs:205-223 — 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 (19 lines × 2) crates/ruvector-solver/src/router.rs:815— crates/ruvector-solver/src/router.rs:815-833 | crates/ruvector-solver/src/router.rs:1044-1062 — 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 (19 lines × 2) crates/ruvix/crates/cli/src/commands/dtb.rs:924— crates/ruvix/crates/cli/src/commands/dtb.rs:924-942 | crates/ruvix/crates/cli/src/commands/dtb.rs:1027-1045 — 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 (19 lines × 2) crates/ruvllm/src/witness_log.rs:556— crates/ruvllm/src/witness_log.rs:556-574 | crates/ruvllm/src/witness_log.rs:828-846 — 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 (19 lines × 2) crates/rvf/rvf-runtime/src/store.rs:2078— crates/rvf/rvf-runtime/src/store.rs:2078-2096 | crates/rvf/rvf-runtime/src/store.rs:2159-2177 — 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 (19 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:576— patches/candle-core-0.8.4/src/backprop.rs:576-594 | patches/candle-core-0.9.2/src/backprop.rs:591-609 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (19 lines × 2) patches/candle-core-0.8.4/src/cpu/mod.rs:114— patches/candle-core-0.8.4/src/cpu/mod.rs:114-132 | patches/candle-core-0.9.2/src/cpu/mod.rs:133-151 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu/mod.rs` and `patches/candle-core-0.9.2/src/cpu/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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 (19 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:512— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:512-530 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:654-672 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (19 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1939— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1939-1957 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2379-2397 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (19 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2508— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2508-2526 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:3104-3122 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (19 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2555— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2555-2573 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:3166-3184 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (19 lines × 2) patches/candle-core-0.8.4/src/layout.rs:110— patches/candle-core-0.8.4/src/layout.rs:110-128 | patches/candle-core-0.9.2/src/layout.rs:110-128 — before extracting anything, compare `patches/candle-core-0.8.4/src/layout.rs` and `patches/candle-core-0.9.2/src/layout.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 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 (19 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1257— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1257-1275 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1312-1330 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (19 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1347— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1347-1365 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1513-1531 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (5 lines × 3) crates/ruvector-cnn/src/kernels/int8_avx2.rs:318— crates/ruvector-cnn/src/kernels/int8_avx2.rs:318-322 | crates/ruvector-cnn/src/kernels/int8_neon.rs:303-307 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:276-280 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 × 3) crates/ruvector-cnn/src/simd/winograd.rs:122— crates/ruvector-cnn/src/simd/winograd.rs:122-126 | crates/ruvector-cnn/src/simd/winograd.rs:164-168 | crates/ruvector-cnn/src/simd/winograd.rs:206-210 — 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.
Duplicated block (5 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:138— crates/ruvector-core/src/simd_intrinsics.rs:138-144 | crates/ruvector-postgres/src/distance/simd.rs:985-989 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:408-413 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvector-postgres/src/distance/simd.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 (5 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:174— crates/ruvector-core/src/simd_intrinsics.rs:174-178 | crates/ruvector-postgres/src/distance/simd.rs:987-991 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:410-415 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvector-postgres/src/distance/simd.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 (5 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:420— crates/ruvector-core/src/simd_intrinsics.rs:420-424 | crates/ruvector-core/src/simd_intrinsics.rs:425-429 | crates/ruvector-core/src/simd_intrinsics.rs:430-434 — 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.
Duplicated block (5 lines × 3) crates/ruvector-delta-core/src/delta.rs:239— crates/ruvector-delta-core/src/delta.rs:239-243 | crates/ruvector-delta-core/src/delta.rs:265-269 | crates/ruvector-delta-core/src/delta.rs:441-445 — 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.
Duplicated block (5 lines × 3) crates/ruvector-delta-wasm/src/capture.rs:111— crates/ruvector-delta-wasm/src/capture.rs:111-116 | crates/ruvector-delta-wasm/src/simd.rs:126-130 | crates/ruvector-delta-wasm/src/simd.rs:195-199 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 3) crates/ruvector-diverse-beam/src/dataset.rs:26— crates/ruvector-diverse-beam/src/dataset.rs:26-31 | crates/ruvector-gnn-rerank/src/main.rs:48-52 | crates/ruvector-rairs/src/main.rs:37-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (5 lines × 3) crates/ruvector-graph-transformer-node/src/transformer.rs:83— crates/ruvector-graph-transformer-node/src/transformer.rs:83-87 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:93-97 | crates/ruvector-verified/src/proof_store.rs:86-90 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (5 lines × 3) crates/ruvector-math/src/homology/filtration.rs:136— crates/ruvector-math/src/homology/filtration.rs:136-140 | crates/ruvector-math/src/homology/filtration.rs:155-159 | crates/ruvector-math/src/homology/filtration.rs:221-225 — 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.
Duplicated block (5 lines × 3) crates/ruvector-mincut-wasm/src/lib.rs:118— crates/ruvector-mincut-wasm/src/lib.rs:118-124 | crates/ruvector-mincut-wasm/src/lib.rs:316-320 | crates/ruvector-mincut-wasm/src/lib.rs:346-350 — 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.
Duplicated block (5 lines × 3) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:462— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:462-466 | crates/ruvector-profiler/src/config_hash.rs:57-61 | crates/rvf/rvf-types/src/sha256.rs:146-150 — before extracting anything, compare `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-profiler/src/config_hash.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 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 (5 lines × 3) crates/ruvector-postgres/src/index/ivfflat_am.rs:702— crates/ruvector-postgres/src/index/ivfflat_am.rs:702-706 | crates/ruvector-postgres/src/index/ivfflat_am.rs:847-851 | crates/ruvector-postgres/src/index/ivfflat_storage.rs:102-106 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 3) crates/ruvector-postgres/src/types/halfvec.rs:514— crates/ruvector-postgres/src/types/halfvec.rs:514-518 | crates/ruvector-postgres/src/types/halfvec.rs:535-540 | crates/ruvector-postgres/src/types/halfvec.rs:562-566 — 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.
Duplicated block (5 lines × 3) crates/ruvix/crates/cli/src/commands/dtb.rs:328— crates/ruvix/crates/cli/src/commands/dtb.rs:328-333 | crates/ruvix/crates/cli/src/commands/dtb.rs:400-405 | crates/ruvix/crates/cli/src/commands/dtb.rs:532-536 — 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.
Duplicated block (5 lines × 3) crates/ruvllm/src/bitnet/expert_cache.rs:554— crates/ruvllm/src/bitnet/expert_cache.rs:554-558 | crates/ruvllm/src/bitnet/expert_cache.rs:575-579 | crates/ruvllm/src/bitnet/expert_cache.rs:640-644 — 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.
Duplicated block (5 lines × 3) crates/ruvllm/src/kernels/matmul.rs:603— crates/ruvllm/src/kernels/matmul.rs:603-607 | crates/ruvllm/src/kernels/matmul.rs:631-635 | crates/ruvllm/src/kernels/matmul.rs:659-663 — 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.
Duplicated block (5 lines × 3) crates/ruvllm/src/kernels/matmul.rs:730— crates/ruvllm/src/kernels/matmul.rs:730-734 | crates/ruvllm/src/kernels/matmul.rs:770-774 | crates/ruvllm/src/kernels/matmul.rs:797-801 — 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.
Duplicated block (5 lines × 3) crates/ruvllm/src/quantize/pi_quant.rs:854— crates/ruvllm/src/quantize/pi_quant.rs:854-862 | crates/ruvllm/src/quantize/pi_quant.rs:1047-1051 | crates/ruvllm/src/quantize/pi_quant_simd.rs:694-699 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 3) crates/ruvllm/src/reflection/perspectives.rs:389— crates/ruvllm/src/reflection/perspectives.rs:389-393 | crates/ruvllm/src/reflection/perspectives.rs:602-606 | crates/ruvllm/src/reflection/perspectives.rs:809-813 — 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.
Duplicated block (5 lines × 3) edge/gateway/src/backend.rs:100— edge/gateway/src/backend.rs:100-104 | edge/gateway/src/m3_transport.rs:91-95 | edge/gateway/src/quant_route.rs:39-43 — 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 3 call sites, so a change lands once.
Duplicated block (5 lines × 3) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1497— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1497-1501 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:1093-1097 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1145-1149 — `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.8.4/src/metal_backend/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 37 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (5 lines × 3) patches/candle-core-0.8.4/src/quantized/cuda.rs:454— patches/candle-core-0.8.4/src/quantized/cuda.rs:454-458 | patches/candle-core-0.9.2/src/quantized/cuda.rs:613-617 | patches/candle-core-0.9.2/src/quantized/cuda.rs:641-645 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/cuda.rs` and `patches/candle-core-0.9.2/src/quantized/cuda.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 241 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 (5 lines × 3) patches/candle-core-0.8.4/src/quantized/neon.rs:573— patches/candle-core-0.8.4/src/quantized/neon.rs:573-578 | patches/candle-core-0.8.4/src/quantized/neon.rs:580-584 | patches/candle-core-0.8.4/src/quantized/neon.rs:586-590 — 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.
Duplicated block (5 lines × 3) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:118— patches/candle-core-0.9.2/src/cuda_backend/mod.rs:118-122 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:149-153 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:280-284 — 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.
Duplicated block (8 lines × 3) crates/emergent-time/src/agentic_time.rs:540— crates/emergent-time/src/agentic_time.rs:540-547 | crates/emergent-time/src/structural_clock.rs:386-393 | crates/emergent-time/src/weight_learning.rs:97-104 — before extracting anything, compare `crates/emergent-time/src/agentic_time.rs` and `crates/emergent-time/src/weight_learning.rs` as WHOLE FILES: this scan already matched 5 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 (8 lines × 3) crates/ruvector-attention-node/src/async_ops.rs:59— crates/ruvector-attention-node/src/async_ops.rs:59-66 | crates/ruvector-attention-node/src/async_ops.rs:86-93 | crates/ruvector-attention-node/src/async_ops.rs:118-125 — 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.
Duplicated block (8 lines × 3) crates/ruvector-attention/src/sheaf/attention.rs:251— crates/ruvector-attention/src/sheaf/attention.rs:251-258 | crates/ruvector-attention/src/sheaf/restriction.rs:318-325 | crates/ruvector-attention/src/sheaf/sparse.rs:283-290 — 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 3 call sites, so a change lands once.
Duplicated block (8 lines × 3) crates/ruvector-cnn/src/kernels/int8_wasm.rs:312— crates/ruvector-cnn/src/kernels/int8_wasm.rs:312-319 | crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:226-233 | crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:517-524 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 3) crates/ruvector-cnn/src/layers/conv.rs:232— crates/ruvector-cnn/src/layers/conv.rs:232-239 | crates/ruvector-cnn/src/layers/conv.rs:301-308 | crates/ruvector-cnn/src/layers/conv.rs:547-554 — 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.
Duplicated block (8 lines × 3) crates/ruvector-cnn/src/simd/avx2.rs:178— crates/ruvector-cnn/src/simd/avx2.rs:178-185 | crates/ruvector-cnn/src/simd/neon.rs:193-200 | crates/ruvector-cnn/src/simd/wasm.rs:161-168 — before extracting anything, compare `crates/ruvector-cnn/src/simd/avx2.rs` and `crates/ruvector-cnn/src/simd/neon.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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 × 3) crates/ruvector-cnn/src/simd/avx2.rs:322— crates/ruvector-cnn/src/simd/avx2.rs:322-330 | crates/ruvector-cnn/src/simd/avx2.rs:474-481 | crates/ruvector-cnn/src/simd/avx2.rs:600-607 — 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.
Duplicated block (8 lines × 3) crates/ruvector-consciousness/src/phi.rs:444— crates/ruvector-consciousness/src/phi.rs:444-451 | crates/ruvector-consciousness/src/rsvd_emergence.rs:188-195 | crates/ruvector-consciousness/src/rsvd_emergence.rs:220-227 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 3) crates/ruvector-entropy-ann/src/search.rs:97— crates/ruvector-entropy-ann/src/search.rs:97-106 | crates/ruvector-entropy-ann/src/search.rs:231-238 | crates/ruvector-entropy-ann/src/search.rs:409-416 — 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.
Duplicated block (8 lines × 3) crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:220— crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:220-227 | crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:315-322 | crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:355-362 — 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.
Duplicated block (8 lines × 3) crates/ruvector-graph-wasm/src/lib.rs:67— crates/ruvector-graph-wasm/src/lib.rs:67-74 | crates/ruvector-wasm/src/lib.rs:218-225 | crates/ruvector-wasm/src/lib.rs:548-555 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 3) crates/ruvector-hailo-cluster/src/bin/bench.rs:442— crates/ruvector-hailo-cluster/src/bin/bench.rs:442-449 | crates/ruvector-hailo-cluster/src/bin/embed.rs:451-458 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:246-253 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 × 3) crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:397— crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:397-404 | crates/ruvector-postgres/src/graph/sparql/parser.rs:2089-2096 | crates/rvlite/src/sparql/parser.rs:2096-2103 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (8 lines × 3) crates/ruvector-mincut-gated-transformer/src/kernel/norm.rs:77— crates/ruvector-mincut-gated-transformer/src/kernel/norm.rs:77-84 | crates/ruvector-mincut-gated-transformer/src/kernel/norm.rs:92-99 | crates/ruvector-mincut-gated-transformer/src/kernel/norm.rs:107-114 — 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.
Duplicated block (8 lines × 3) crates/ruvector-postgres/src/distance/simd.rs:1269— crates/ruvector-postgres/src/distance/simd.rs:1269-1277 | crates/ruvector-postgres/src/distance/simd.rs:1340-1348 | crates/ruvector-postgres/src/distance/simd.rs:1442-1449 — 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.
Duplicated block (8 lines × 3) crates/ruvector-postgres/src/types/halfvec.rs:372— crates/ruvector-postgres/src/types/halfvec.rs:372-379 | crates/ruvector-postgres/src/types/halfvec.rs:436-443 | crates/ruvector-postgres/src/types/halfvec.rs:488-495 — 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.
Duplicated block (8 lines × 3) crates/ruvector-turboquant/src/codec.rs:88— crates/ruvector-turboquant/src/codec.rs:88-95 | crates/ruvector-turboquant/src/codec.rs:104-111 | crates/ruvector-turboquant/src/codec.rs:138-145 — 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.
Duplicated block (8 lines × 3) crates/ruvllm/src/backends/gemma2.rs:866— crates/ruvllm/src/backends/gemma2.rs:866-873 | crates/ruvllm/src/backends/phi3.rs:736-743 | crates/ruvllm/src/models/ruvltra.rs:1046-1053 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 × 3) crates/ruvllm/src/backends/mod.rs:690— crates/ruvllm/src/backends/mod.rs:690-697 | crates/ruvllm/src/backends/mod.rs:713-720 | crates/ruvllm/src/backends/mod.rs:739-746 — 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.
Duplicated block (8 lines × 3) crates/ruvllm/src/kernels/attention.rs:1239— crates/ruvllm/src/kernels/attention.rs:1239-1246 | crates/ruvllm/src/kernels/matmul.rs:668-675 | crates/ruvllm/src/kernels/matmul.rs:700-707 — before extracting anything, compare `crates/ruvllm/src/kernels/attention.rs` and `crates/ruvllm/src/kernels/matmul.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 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 × 3) crates/ruvllm/src/metal/context.rs:612— crates/ruvllm/src/metal/context.rs:612-619 | crates/ruvllm/src/metal/context.rs:677-684 | crates/ruvllm/src/metal/context.rs:794-801 — 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.
Duplicated block (8 lines × 3) crates/rvf/rvf-index/src/distance.rs:70— crates/rvf/rvf-index/src/distance.rs:70-77 | crates/rvf/rvf-index/src/distance.rs:113-120 | crates/rvf/rvf-index/src/distance.rs:167-174 — 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.
Duplicated block (8 lines × 3) crates/rvf/rvf-index/src/distance.rs:208— crates/rvf/rvf-index/src/distance.rs:208-215 | crates/rvf/rvf-index/src/distance.rs:241-248 | crates/rvf/rvf-index/src/distance.rs:282-289 — 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.
Duplicated block (8 lines × 3) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1524— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1524-1531 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:1551-1558 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1702-1709 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (8 lines × 3) patches/candle-core-0.8.4/src/quantized/avx.rs:358— patches/candle-core-0.8.4/src/quantized/avx.rs:358-365 | patches/candle-core-0.8.4/src/quantized/avx.rs:366-373 | patches/candle-core-0.8.4/src/quantized/avx.rs:374-381 — 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.
Duplicated block (7 lines × 3) crates/prime-radiant/src/coherence/energy.rs:467— crates/prime-radiant/src/coherence/energy.rs:467-473 | crates/prime-radiant/src/simd/vectors.rs:429-435 | crates/prime-radiant/src/simd/vectors.rs:453-459 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) crates/prime-radiant/src/simd/matrix.rs:182— crates/prime-radiant/src/simd/matrix.rs:182-189 | crates/prime-radiant/src/simd/matrix.rs:252-258 | crates/prime-radiant/src/simd/vectors.rs:259-266 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) crates/ruvector-bench/src/bin/memory_benchmark.rs:124— crates/ruvector-bench/src/bin/memory_benchmark.rs:124-130 | crates/ruvector-bench/src/bin/memory_benchmark.rs:243-249 | crates/ruvector-bench/src/bin/memory_benchmark.rs:337-343 — 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.
Duplicated block (7 lines × 3) crates/ruvector-cluster-rag/src/lib.rs:63— crates/ruvector-cluster-rag/src/lib.rs:63-69 | crates/ruvector-hybrid/src/main.rs:47-53 | crates/ruvector-nervous-system/src/integration/ruvector.rs:395-402 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (7 lines × 3) crates/ruvector-cnn/src/simd/neon.rs:324— crates/ruvector-cnn/src/simd/neon.rs:324-330 | crates/ruvector-cnn/src/simd/neon.rs:356-362 | crates/ruvector-cnn/src/simd/scalar.rs:172-178 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-cnn/src/simd/scalar.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 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 (7 lines × 3) crates/ruvector-cnn/src/simd/winograd.rs:109— crates/ruvector-cnn/src/simd/winograd.rs:109-115 | crates/ruvector-cnn/src/simd/winograd.rs:151-157 | crates/ruvector-cnn/src/simd/winograd.rs:193-199 — 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.
Duplicated block (7 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:528— crates/ruvector-core/src/simd_intrinsics.rs:528-536 | crates/ruvector-core/src/simd_intrinsics.rs:568-576 | crates/ruvector-core/src/simd_intrinsics.rs:815-821 — 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.
Duplicated block (7 lines × 3) crates/ruvector-decompiler/src/parser.rs:96— crates/ruvector-decompiler/src/parser.rs:96-102 | crates/ruvector-decompiler/src/parser.rs:113-119 | crates/ruvector-decompiler/src/parser.rs:130-136 — 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.
Duplicated block (7 lines × 3) crates/ruvector-filter/src/evaluator.rs:207— crates/ruvector-filter/src/evaluator.rs:207-213 | crates/ruvector-filter/src/evaluator.rs:236-242 | crates/ruvector-filter/src/evaluator.rs:266-275 — 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.
Duplicated block (7 lines × 3) crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:498— crates/ruvector-fpga-transformer/src/backend/fpga_daemon.rs:498-504 | crates/ruvector-fpga-transformer/src/backend/fpga_pcie.rs:578-584 | crates/ruvector-fpga-transformer/src/backend/native_sim.rs:410-416 — 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 3 call sites, so a change lands once.
Duplicated block (7 lines × 3) crates/ruvector-graph/src/hybrid/vector_index.rs:220— crates/ruvector-graph/src/hybrid/vector_index.rs:220-226 | crates/ruvector-graph/src/hybrid/vector_index.rs:241-247 | crates/ruvector-graph/src/hybrid/vector_index.rs:261-267 — 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.
Duplicated block (7 lines × 3) crates/ruvector-postgres/src/index/hnsw_am.rs:467— crates/ruvector-postgres/src/index/hnsw_am.rs:467-474 | crates/ruvector-postgres/src/index/ivfflat_am.rs:746-752 | crates/ruvector-postgres/src/index/ivfflat_am.rs:954-960 — before extracting anything, compare `crates/ruvector-postgres/src/index/hnsw_am.rs` and `crates/ruvector-postgres/src/index/ivfflat_am.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 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 (7 lines × 3) crates/ruvector-postgres/src/quantization/binary.rs:92— crates/ruvector-postgres/src/quantization/binary.rs:92-101 | crates/ruvector-turboquant/src/simd.rs:163-169 | crates/ruvector-turboquant/src/simd.rs:249-255 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) crates/ruvix/crates/nucleus/src/checkpoint.rs:213— crates/ruvix/crates/nucleus/src/checkpoint.rs:213-219 | crates/ruvix/crates/nucleus/src/checkpoint.rs:256-262 | crates/ruvix/crates/nucleus/src/witness_log.rs:567-573 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) crates/ruvllm/src/backends/gemma2.rs:381— crates/ruvllm/src/backends/gemma2.rs:381-387 | crates/ruvllm/src/backends/phi3.rs:302-308 | crates/ruvllm/src/models/ruvltra.rs:552-558 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (7 lines × 3) crates/ruvllm/src/kernels/ane_ops.rs:452— crates/ruvllm/src/kernels/ane_ops.rs:452-458 | crates/ruvllm/src/kernels/matmul.rs:883-889 | crates/ruvllm/src/kernels/matmul.rs:1653-1659 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) crates/ruvllm/src/kernels/matmul.rs:586— crates/ruvllm/src/kernels/matmul.rs:586-592 | crates/ruvllm/src/kernels/matmul.rs:614-620 | crates/ruvllm/src/kernels/matmul.rs:642-648 — 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.
Duplicated block (7 lines × 3) crates/ruvllm/src/metal/context.rs:314— crates/ruvllm/src/metal/context.rs:314-320 | crates/ruvllm/src/metal/context.rs:610-616 | crates/ruvllm/src/metal/context.rs:675-681 — 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.
Duplicated block (7 lines × 3) crates/ruvllm/src/metal/operations.rs:442— crates/ruvllm/src/metal/operations.rs:442-449 | crates/ruvllm/src/metal/operations.rs:571-577 | crates/ruvllm/src/metal/operations.rs:681-687 — 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.
Duplicated block (7 lines × 3) crates/rvf/rvf-launch/src/lib.rs:467— crates/rvf/rvf-launch/src/lib.rs:467-473 | crates/rvf/rvf-launch/src/lib.rs:477-483 | crates/rvf/rvf-launch/src/lib.rs:497-503 — 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.
Duplicated block (7 lines × 3) edge/gateway/src/durable.rs:276— edge/gateway/src/durable.rs:276-282 | edge/gateway/src/m3_transport.rs:31-37 | edge/gateway/src/registry_do.rs:226-232 — 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 3 call sites, so a change lands once.
Duplicated block (7 lines × 3) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:614— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:614-620 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:679-685 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:728-734 — 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.
Duplicated block (7 lines × 3) patches/candle-core-0.8.4/src/quantized/metal.rs:160— patches/candle-core-0.8.4/src/quantized/metal.rs:160-166 | patches/candle-core-0.9.2/src/quantized/metal.rs:216-222 | patches/candle-core-0.9.2/src/quantized/metal.rs:278-284 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/metal.rs` and `patches/candle-core-0.9.2/src/quantized/metal.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 107 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 (7 lines × 3) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:735— patches/candle-core-0.9.2/src/cuda_backend/mod.rs:735-741 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:806-812 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:854-860 — 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.
Duplicated block (7 lines × 3) crates/emergent-time/src/agentic_time.rs:30— crates/emergent-time/src/agentic_time.rs:30-36 | crates/emergent-time/src/structural_clock.rs:73-79 | crates/emergent-time/src/weight_learning.rs:65-71 — before extracting anything, compare `crates/emergent-time/src/agentic_time.rs` and `crates/emergent-time/src/weight_learning.rs` as WHOLE FILES: this scan already matched 5 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 (6 lines × 3) crates/ruvector-core/src/encoding/codecs.rs:271— crates/ruvector-core/src/encoding/codecs.rs:271-276 | crates/ruvector-core/src/quantization.rs:48-55 | crates/ruvector-core/src/quantization.rs:211-218 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 3) crates/ruvector-hailo-cluster/src/bin/bench.rs:297— crates/ruvector-hailo-cluster/src/bin/bench.rs:297-302 | crates/ruvector-hailo-cluster/src/bin/embed.rs:288-293 | crates/ruvector-hailo-cluster/src/bin/stats.rs:238-243 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 (6 lines × 3) crates/ruvector-mincut-gated-transformer/src/kv_cache/manager.rs:318— crates/ruvector-mincut-gated-transformer/src/kv_cache/manager.rs:318-323 | crates/ruvllm/src/kernels/ane_ops.rs:640-646 | crates/ruvllm/src/kernels/attention.rs:1064-1070 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (6 lines × 3) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:153— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:153-158 | crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:267-272 | crates/ruvector-mincut/src/canonical/tree_packing/mod.rs:133-138 — `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-mincut/src/canonical/tree_packing/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (6 lines × 3) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:473— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:473-478 | crates/ruvector-profiler/src/config_hash.rs:67-72 | crates/rvf/rvf-types/src/sha256.rs:159-164 — before extracting anything, compare `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-profiler/src/config_hash.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 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 (6 lines × 3) crates/ruvector-postgres/src/attention/flash.rs:353— crates/ruvector-postgres/src/attention/flash.rs:353-358 | crates/ruvector-postgres/src/attention/multi_head.rs:336-341 | crates/ruvector-postgres/src/attention/scaled_dot.rs:297-303 — 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 3 call sites, so a change lands once.
Duplicated block (6 lines × 3) crates/ruvector-postgres/src/distance/simd.rs:526— crates/ruvector-postgres/src/distance/simd.rs:526-532 | crates/ruvector-postgres/src/distance/simd.rs:1396-1401 | crates/rvf/rvf-index/src/distance.rs:119-124 — before extracting anything, compare `crates/ruvector-postgres/src/distance/simd.rs` and `crates/rvf/rvf-index/src/distance.rs` as WHOLE FILES: this scan already matched 5 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. 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 (6 lines × 3) crates/ruvector-postgres/src/graph/sparql/executor.rs:422— crates/ruvector-postgres/src/graph/sparql/executor.rs:422-427 | crates/ruvector-postgres/src/graph/sparql/executor.rs:1740-1745 | crates/rvlite/src/sparql/executor.rs:366-371 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (6 lines × 3) crates/ruvector-postgres/src/index/hnsw_am.rs:511— crates/ruvector-postgres/src/index/hnsw_am.rs:511-516 | crates/ruvector-postgres/src/index/hnsw_am.rs:532-537 | crates/ruvector-postgres/src/index/hnsw_am.rs:577-582 — 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.
Duplicated block (6 lines × 3) crates/ruvix/crates/net/src/stack.rs:280— crates/ruvix/crates/net/src/stack.rs:280-285 | crates/ruvix/crates/net/src/stack.rs:328-333 | crates/ruvix/crates/net/src/stack.rs:505-510 — 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.
Duplicated block (6 lines × 3) crates/ruvllm/src/metal/context.rs:527— crates/ruvllm/src/metal/context.rs:527-534 | crates/ruvllm/src/metal/context.rs:860-865 | crates/ruvllm/src/metal/context.rs:931-936 — 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.
Duplicated block (6 lines × 3) crates/ruvllm/src/metal/context.rs:536— crates/ruvllm/src/metal/context.rs:536-541 | crates/ruvllm/src/metal/context.rs:876-882 | crates/ruvllm/src/metal/context.rs:949-955 — 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.
Duplicated block (6 lines × 3) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:478— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:478-483 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:615-620 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:675-680 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (6 lines × 3) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1528— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1528-1533 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1833-1838 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2018-2023 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (6 lines × 3) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1539— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1539-1544 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1844-1849 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2029-2034 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (6 lines × 3) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1547— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1547-1552 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1852-1857 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2037-2042 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (6 lines × 3) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1555— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1555-1560 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1860-1865 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2045-2050 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (6 lines × 3) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1048— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1048-1053 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1156-1161 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1253-1258 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (6 lines × 3) crates/prime-radiant/src/simd/energy.rs:512— crates/prime-radiant/src/simd/energy.rs:512-517 | crates/prime-radiant/src/simd/matrix.rs:387-392 | crates/prime-radiant/src/simd/vectors.rs:496-501 — before extracting anything, compare `crates/prime-radiant/src/simd/energy.rs` and `crates/prime-radiant/src/simd/vectors.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (6 lines × 3) crates/ruvector-agent-memory/src/ledger.rs:709— crates/ruvector-agent-memory/src/ledger.rs:709-714 | crates/ruvector-staged-workspace/src/workspace.rs:359-364 | crates/rvf/rvf-runtime/src/locking.rs:250-255 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (6 lines × 3) crates/ruvector-attention/src/topology/coherence.rs:117— crates/ruvector-attention/src/topology/coherence.rs:117-122 | crates/ruvector-rabitq/src/index.rs:176-181 | crates/sona/src/reasoning_bank.rs:341-346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (6 lines × 3) crates/ruvector-postgres/src/tenancy/registry.rs:605— crates/ruvector-postgres/src/tenancy/registry.rs:605-610 | crates/rvf/rvf-runtime/src/store.rs:4501-4506 | crates/rvforge-reader/src/install/flow.rs:296-301 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (6 lines × 3) crates/ruvector-verified/src/proof_store.rs:162— crates/ruvector-verified/src/proof_store.rs:162-167 | crates/rvf/rvf-adapters/agentic-flow/src/coordination.rs:159-164 | crates/rvf/rvf-adapters/claude-flow/src/witness.rs:192-197 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (6 lines × 3) crates/rvf/rvf-crypto/src/stream.rs:126— crates/rvf/rvf-crypto/src/stream.rs:126-131 | crates/rvf/rvf-runtime/src/seed_crypto.rs:20-25 | crates/rvf/rvf-runtime/src/seed_crypto.rs:31-36 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 3) edge/gateway/src/durable.rs:115— edge/gateway/src/durable.rs:115-120 | edge/gateway/src/durable_m4.rs:38-43 | edge/gateway/src/registry_do.rs:65-70 — 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 3 call sites, so a change lands once.
Low cohesion: Tensor (LCOM4 14) patches/candle-core-0.8.4/src/tensor.rs:68— Tensor's methods fall into 14 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 14 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.
Low cohesion: FilesystemBackend (LCOM4 9) crates/rvAgent/rvagent-backends/src/filesystem.rs:32— FilesystemBackend's methods fall into 9 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 9 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.
Low cohesion: CudaDevice (LCOM4 9) patches/candle-core-0.8.4/src/cuda_backend/device.rs:28— CudaDevice's methods fall into 9 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 9 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.
Low cohesion: HailoClusterEmbedder (LCOM4 6) crates/ruvector-hailo-cluster/src/lib.rs:144— HailoClusterEmbedder's methods fall into 6 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 6 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.
Low cohesion: PerceptionPipeline (LCOM4 6) crates/ruvector-robotics/src/perception/mod.rs:168— PerceptionPipeline's methods fall into 6 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 6 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.
Low cohesion: MetricsCollector (LCOM4 6) crates/ruvector-tiny-dancer-core/src/metrics.rs:135— MetricsCollector's methods fall into 6 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 6 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.
Low cohesion: Mmu (LCOM4 6) crates/ruvix/crates/aarch64/src/mmu.rs:45— Mmu's methods fall into 6 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 6 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.
Low cohesion: QatConfig (LCOM4 6) crates/ruvllm/src/qat/config.rs:234— QatConfig's methods fall into 6 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 6 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.
Low cohesion: TrainingTemplate (LCOM4 6) crates/sona/src/training/templates.rs:176— TrainingTemplate's methods fall into 6 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 6 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.
Low cohesion: ValidationContext (LCOM4 5) crates/prime-radiant/src/ruvllm_integration/coherence_validator.rs:71— ValidationContext'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.
Low cohesion: IsolationManager (LCOM4 5) crates/ruvector-postgres/src/tenancy/isolation.rs:48— IsolationManager'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.
Low cohesion: Task (LCOM4 5) crates/ruvector-postgres/src/workers/queue.rs:108— Task'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.
Low cohesion: RuLakeBundle (LCOM4 5) crates/ruvector-rulake/src/bundle.rs:114— RuLakeBundle'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.
Low cohesion: DmaConfig (LCOM4 5) crates/ruvix/crates/dma/src/config.rs:119— DmaConfig'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.
Low cohesion: Verifier (LCOM4 4) crates/mcp-brain-server/src/verify.rs:31— Verifier's methods fall into 4 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 4 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.
Low cohesion: Obstruction (LCOM4 4) crates/prime-radiant/src/cohomology/obstruction.rs:60— Obstruction's methods fall into 4 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 4 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.
Low cohesion: ComponentQuantizer (LCOM4 4) crates/ruvector-attention/src/curvature/component_quantizer.rs:50— ComponentQuantizer's methods fall into 4 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 4 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.
Low cohesion: SparseResidualConfig (LCOM4 4) crates/ruvector-attention/src/sheaf/sparse.rs:25— SparseResidualConfig's methods fall into 4 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 4 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.
Low cohesion: StageVEngine (LCOM4 4) crates/ruvector-crv/src/stage_v.rs:20— StageVEngine's methods fall into 4 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 4 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.
Low cohesion: QuDagIdentity (LCOM4 4) crates/ruvector-dag/src/qudag/crypto/identity.rs:7— QuDagIdentity's methods fall into 4 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 4 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.
Low cohesion: RagEngine (LCOM4 4) crates/ruvector-graph/src/hybrid/rag_integration.rs:39— RagEngine's methods fall into 4 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 4 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.
Low cohesion: WassersteinConfig (LCOM4 4) crates/ruvector-math/src/optimal_transport/config.rs:5— WassersteinConfig's methods fall into 4 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 4 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.
Low cohesion: GCNLayer (LCOM4 4) crates/ruvector-postgres/src/gnn/gcn.rs:12— GCNLayer's methods fall into 4 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 4 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.
Low cohesion: RuvLtraConfig (LCOM4 4) crates/ruvllm/src/models/ruvltra.rs:175— RuvLtraConfig's methods fall into 4 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 4 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.
Low cohesion: RouterConfig (LCOM4 4) crates/ruvllm/src/moe/router.rs:210— RouterConfig's methods fall into 4 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 4 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 (20 lines × 2) crates/ruvector-attention/src/sheaf/attention.rs:308— crates/ruvector-attention/src/sheaf/attention.rs:308-327 | crates/ruvector-attention/src/sheaf/attention.rs:405-424 — 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 (20 lines × 2) crates/ruvector-cluster-rag/src/search.rs:76— crates/ruvector-cluster-rag/src/search.rs:76-95 | crates/ruvector-cluster-rag/src/search.rs:152-171 — 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 (20 lines × 2) crates/ruvector-consciousness/src/chebyshev_phi.rs:101— crates/ruvector-consciousness/src/chebyshev_phi.rs:101-120 | crates/ruvector-consciousness/src/sparse_accel.rs:221-240 — before extracting anything, compare `crates/ruvector-consciousness/src/chebyshev_phi.rs` and `crates/ruvector-consciousness/src/sparse_accel.rs` 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.
Duplicated block (20 lines × 2) crates/ruvector-core/src/advanced_features/matryoshka.rs:355— crates/ruvector-core/src/advanced_features/matryoshka.rs:355-374 | crates/ruvector-core/src/advanced_features/matryoshka.rs:387-406 — 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 (20 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:561— crates/ruvector-graph-transformer-node/src/transformer.rs:561-580 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:598-617 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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) crates/ruvector-graph/src/cypher/parser.rs:502— crates/ruvector-graph/src/cypher/parser.rs:502-521 | crates/rvlite/src/cypher/parser.rs:502-521 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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) crates/ruvector-graph/src/cypher/parser.rs:530— crates/ruvector-graph/src/cypher/parser.rs:530-549 | crates/rvlite/src/cypher/parser.rs:530-549 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:275— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:275-294 | crates/ruvector-mincut/src/canonical/tree_packing/mod.rs:234-253 — `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-mincut/src/canonical/tree_packing/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (20 lines × 2) crates/ruvector-postgres/src/gnn/operators.rs:36— crates/ruvector-postgres/src/gnn/operators.rs:36-55 | crates/ruvector-postgres/src/gnn/operators.rs:165-184 — 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 (20 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:1258— crates/ruvector-postgres/src/graph/sparql/executor.rs:1258-1277 | crates/rvlite/src/sparql/executor.rs:624-643 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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) crates/ruvector-postgres/src/graph/sparql/executor.rs:1301— crates/ruvector-postgres/src/graph/sparql/executor.rs:1301-1320 | crates/rvlite/src/sparql/executor.rs:645-664 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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) crates/ruvector-postgres/src/graph/sparql/executor.rs:1561— crates/ruvector-postgres/src/graph/sparql/executor.rs:1561-1580 | crates/rvlite/src/sparql/executor.rs:838-857 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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) crates/ruvector-postgres/src/graph/sparql/parser.rs:1973— crates/ruvector-postgres/src/graph/sparql/parser.rs:1973-1992 | crates/rvlite/src/sparql/parser.rs:1980-1999 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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) crates/ruvector-postgres/src/graph/sparql/parser.rs:2282— crates/ruvector-postgres/src/graph/sparql/parser.rs:2282-2301 | crates/rvlite/src/sparql/parser.rs:2289-2308 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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) crates/ruvector-postgres/src/hybrid/fusion.rs:131— crates/ruvector-postgres/src/hybrid/fusion.rs:131-150 | crates/ruvector-postgres/src/hybrid/fusion.rs:245-264 — 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 (20 lines × 2) crates/ruvllm/src/kernels/accelerate.rs:296— crates/ruvllm/src/kernels/accelerate.rs:296-315 | crates/ruvllm/src/kernels/accelerate.rs:357-376 — 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 (20 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1985— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1985-2004 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2573-2592 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:2040— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:2040-2059 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2632-2651 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1131— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1131-1150 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1184-1203 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1423— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1423-1442 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1591-1610 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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) patches/candle-core-0.8.4/src/npy.rs:281— patches/candle-core-0.8.4/src/npy.rs:281-300 | patches/candle-core-0.9.2/src/npy.rs:308-327 — before extracting anything, compare `patches/candle-core-0.8.4/src/npy.rs` and `patches/candle-core-0.9.2/src/npy.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 283 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) patches/candle-core-0.8.4/src/quantized/cuda.rs:193— patches/candle-core-0.8.4/src/quantized/cuda.rs:193-212 | patches/candle-core-0.9.2/src/quantized/cuda.rs:231-250 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/cuda.rs` and `patches/candle-core-0.9.2/src/quantized/cuda.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 241 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) patches/candle-core-0.8.4/src/quantized/k_quants.rs:906— patches/candle-core-0.8.4/src/quantized/k_quants.rs:906-925 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1014-1033 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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) patches/candle-core-0.8.4/src/streaming.rs:95— patches/candle-core-0.8.4/src/streaming.rs:95-114 | patches/candle-core-0.9.2/src/streaming.rs:95-114 — before extracting anything, compare `patches/candle-core-0.8.4/src/streaming.rs` and `patches/candle-core-0.9.2/src/streaming.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 75 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) patches/candle-core-0.8.4/src/tensor.rs:850— patches/candle-core-0.8.4/src/tensor.rs:850-869 | patches/candle-core-0.9.2/src/tensor.rs:918-937 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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.
SparqlParser::parse_graph_pattern_inner (cognitive 46) crates/ruvector-postgres/src/graph/sparql/parser.rs:248— SparqlParser::parse_graph_pattern_inner has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (43 pts), loops 2, 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.
SparqlParser::parse_graph_pattern_inner (cognitive 46) crates/rvlite/src/sparql/parser.rs:247— SparqlParser::parse_graph_pattern_inner has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (43 pts), loops 2, 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.
SparqlParser::parse_numeric_literal (cognitive 42) crates/ruvector-postgres/src/graph/sparql/parser.rs:2127— SparqlParser::parse_numeric_literal has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 4 (8 pts), boolean chains 6 (nesting depth added 16). 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.
SparqlParser::parse_numeric_literal (cognitive 42) crates/rvlite/src/sparql/parser.rs:2134— SparqlParser::parse_numeric_literal has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 4 (8 pts), boolean chains 6 (nesting depth added 16). 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.
SparqlParser::try_parse_aggregate (cognitive 34) crates/ruvector-postgres/src/graph/sparql/parser.rs:1033— SparqlParser::try_parse_aggregate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (30 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 22). 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.
SparqlParser::try_parse_aggregate (cognitive 34) crates/rvlite/src/sparql/parser.rs:1039— SparqlParser::try_parse_aggregate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (30 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 22). 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.
SparqlParser::parse_primary_expression (cognitive 33) crates/ruvector-postgres/src/graph/sparql/parser.rs:791— SparqlParser::parse_primary_expression has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 2, 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.
SparqlParser::parse_literal (cognitive 33) crates/ruvector-postgres/src/graph/sparql/parser.rs:2035— SparqlParser::parse_literal has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, loops 2 (3 pts), match/switch 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.
SparqlParser::parse_primary_expression (cognitive 33) crates/rvlite/src/sparql/parser.rs:797— SparqlParser::parse_primary_expression has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 2, 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.
SparqlParser::parse_literal (cognitive 33) crates/rvlite/src/sparql/parser.rs:2042— SparqlParser::parse_literal has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, loops 2 (3 pts), match/switch 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.
SparqlParser::parse_solution_modifiers (cognitive 30) crates/ruvector-postgres/src/graph/sparql/parser.rs:1257— SparqlParser::parse_solution_modifiers has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 2, loops 1 (2 pts) (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.
SparqlParser::parse_inline_values (cognitive 30) crates/ruvector-postgres/src/graph/sparql/parser.rs:1364— SparqlParser::parse_inline_values has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (6 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.
SparqlParser::parse_solution_modifiers (cognitive 30) crates/rvlite/src/sparql/parser.rs:1263— SparqlParser::parse_solution_modifiers has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 2, loops 1 (2 pts) (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.
SparqlParser::parse_inline_values (cognitive 30) crates/rvlite/src/sparql/parser.rs:1370— SparqlParser::parse_inline_values has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (6 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.
SparqlParser::parse_triples_block (cognitive 24) crates/ruvector-postgres/src/graph/sparql/parser.rs:367— SparqlParser::parse_triples_block has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 pts), boolean chains 3 (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.
SparqlParser::parse_relational_expression (cognitive 24) crates/ruvector-postgres/src/graph/sparql/parser.rs:677— SparqlParser::parse_relational_expression has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (22 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.
SparqlParser::parse_triples_block (cognitive 24) crates/rvlite/src/sparql/parser.rs:366— SparqlParser::parse_triples_block has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 pts), boolean chains 3 (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.
SparqlParser::parse_relational_expression (cognitive 24) crates/rvlite/src/sparql/parser.rs:683— SparqlParser::parse_relational_expression has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (22 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.
SparqlParser::parse_update (cognitive 22) crates/ruvector-postgres/src/graph/sparql/parser.rs:1533— SparqlParser::parse_update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), 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.
SparqlParser::parse_update (cognitive 22) crates/rvlite/src/sparql/parser.rs:1540— SparqlParser::parse_update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), 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.
SparqlParser::parse_negated_property_set (cognitive 21) crates/ruvector-postgres/src/graph/sparql/parser.rs:599— SparqlParser::parse_negated_property_set has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (2 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.
SparqlParser::parse_negated_property_set (cognitive 21) crates/rvlite/src/sparql/parser.rs:605— SparqlParser::parse_negated_property_set has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (2 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.
SparqlParser::parse_projection (cognitive 20) crates/ruvector-postgres/src/graph/sparql/parser.rs:137— SparqlParser::parse_projection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1, 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.
SparqlParser::parse_projection (cognitive 20) crates/rvlite/src/sparql/parser.rs:136— SparqlParser::parse_projection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1, 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.
SparqlParser::parse_quads (cognitive 19) crates/ruvector-postgres/src/graph/sparql/parser.rs:1626— SparqlParser::parse_quads has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 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.
TooManyMethods: Tensor patches/candle-core-0.8.4/src/tensor.rs:68— TooManyMethods — 210 methods, declared across 14 files: src/tensor.rs (145), src/tensor.rs (18), src/custom_op.rs (12), src/conv.rs (7), +10 more file(s). The bar is 30 methods; this is 180 over it, 7.00× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: RvfStore crates/rvf/rvf-runtime/src/store.rs:145— TooManyMethods — 108 methods, declared across 3 files: src/store.rs (86), store/policy_api.rs (20), store/stream_support.rs (2). The bar is 30 methods; this is 78 over it, 3.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: SparqlParser crates/ruvector-postgres/src/graph/sparql/parser.rs:18— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× 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: SparqlParser crates/rvlite/src/sparql/parser.rs:18— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× 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: VectorShard crates/ruvector-edge-store/src/shard/mod.rs:91— TooManyMethods — 64 methods, declared across 8 files: shard/mod.rs (21), shard/persist.rs (11), shard/maintain.rs (9), shard/write.rs (8), +4 more file(s). The bar is 30 methods; this is 34 over it, 2.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: FirestoreClient crates/mcp-brain-server/src/store.rs:45— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: Kernel crates/rvm/crates/rvm-kernel/src/lib.rs:235— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: Kernel crates/ruvix/crates/nucleus/src/kernel.rs:99— TooManyMethods — 47 methods, declared across 2 files: src/kernel.rs (35), src/shell_backend.rs (12). The bar is 30 methods; this is 17 over it, 1.57× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: Parser crates/ruvector-graph/src/cypher/parser.rs:30— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: HnswIndex crates/ruvector-edge-index/src/hnsw/mod.rs:95— TooManyMethods — 43 methods, declared across 4 files: hnsw/mod.rs (28), hnsw/codec.rs (8), hnsw/search.rs (5), hnsw/compact.rs (2). The bar is 30 methods; this is 13 over it, 1.43× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: BitNetBackend crates/ruvllm/src/bitnet/backend.rs:612— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× 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: Parser crates/rvlite/src/cypher/parser.rs:30— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: KnowledgeGraph crates/mcp-brain-server/src/graph.rs:21— TooManyMethods — 41 methods, declared across 2 files: src/graph.rs (33), graph/rebuild.rs (8). The bar is 30 methods; this is 11 over it, 1.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: ThreeLevelHierarchy crates/ruvector-mincut/src/cluster/hierarchy.rs:229— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: Storage patches/candle-core-0.8.4/src/storage.rs:9— TooManyMethods — 38 methods, declared across 2 files: src/storage.rs (35), src/storage.rs (3). The bar is 30 methods; this is 8 over it, 1.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: Registry crates/ruvector-edge-registry/src/registry/mod.rs:117— TooManyMethods — 37 methods, declared across 7 files: registry/mod.rs (14), registry/flow.rs (9), registry/blobs.rs (5), registry/list.rs (3), +3 more file(s). The bar is 30 methods; this is 7 over it, 1.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: Registry crates/rvforge-registry/src/registry/mod.rs:96— TooManyMethods — 37 methods, declared across 3 files: registry/mod.rs (23), registry/witness.rs (8), registry/publish.rs (6). The bar is 30 methods; this is 7 over it, 1.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: SubpolynomialMinCut crates/ruvector-mincut/src/subpolynomial/mod.rs:203— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: Intelligence crates/ruvector-cli/src/cli/hooks.rs:514— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: TenantLedger crates/ruvector-edge-store/src/ledger/mod.rs:54— TooManyMethods — 34 methods, declared across 4 files: ledger/mod.rs (13), ledger/usage.rs (9), ledger/catalog.rs (8), ledger/idem.rs (4). The bar is 30 methods; this is 4 over it, 1.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: EulerTourTree crates/ruvector-mincut/src/euler/mod.rs:133— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: RvLite crates/rvlite/src/lib.rs:180— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: ProductManifold crates/ruvector-math/src/product_manifold/manifold.rs:10— TooManyMethods — 33 methods, declared across 2 files: product_manifold/manifold.rs (20), product_manifold/operations.rs (13). The bar is 30 methods; this is 3 over it, 1.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VectorCache crates/ruvector-rulake/src/cache.rs:238— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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: TensorNameMapper crates/ruvllm/src/bitnet/backend.rs:167— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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 (21 lines × 2) crates/mcp-brain/src/server.rs:31— crates/mcp-brain/src/server.rs:31-51 | crates/mcp-gate/src/server.rs:101-121 — before extracting anything, compare `crates/mcp-brain/src/server.rs` and `crates/mcp-gate/src/server.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (21 lines × 2) crates/prime-radiant/src/coherence/energy.rs:458— crates/prime-radiant/src/coherence/energy.rs:458-478 | crates/prime-radiant/src/simd/vectors.rs:444-464 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) crates/ruvector-attention/src/sheaf/attention.rs:336— crates/ruvector-attention/src/sheaf/attention.rs:336-356 | crates/ruvector-attention/src/sheaf/attention.rs:458-478 — 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 (21 lines × 2) crates/ruvector-cnn/src/backbone/layer.rs:171— crates/ruvector-cnn/src/backbone/layer.rs:171-191 | crates/ruvector-cnn/src/backbone/layer.rs:195-215 — 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 (21 lines × 2) crates/ruvector-cnn/src/layers/conv.rs:288— crates/ruvector-cnn/src/layers/conv.rs:288-308 | crates/ruvector-cnn/src/layers/conv.rs:534-554 — 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 (21 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:135— crates/ruvector-graph/src/cypher/parser.rs:135-155 | crates/rvlite/src/cypher/parser.rs:135-155 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (21 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:1004— crates/ruvector-graph/src/cypher/parser.rs:1004-1024 | crates/rvlite/src/cypher/parser.rs:945-965 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (21 lines × 2) crates/ruvector-postgres/src/attention/operators.rs:481— crates/ruvector-postgres/src/attention/operators.rs:481-501 | crates/ruvector-postgres/src/attention/operators.rs:816-836 — 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 (21 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1995— crates/ruvector-postgres/src/graph/sparql/parser.rs:1995-2015 | crates/rvlite/src/sparql/parser.rs:2002-2022 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (21 lines × 2) crates/ruvector-rulake/src/bin/rulake-demo.rs:132— crates/ruvector-rulake/src/bin/rulake-demo.rs:132-152 | crates/ruvector-rulake/src/bin/rulake-demo.rs:191-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 (21 lines × 2) crates/ruvllm/src/backends/coreml_backend.rs:1286— crates/ruvllm/src/backends/coreml_backend.rs:1286-1306 | crates/ruvllm/src/backends/coreml_backend.rs:1421-1441 — 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 (21 lines × 2) crates/ruvllm/src/memory_pool.rs:879— crates/ruvllm/src/memory_pool.rs:879-899 | crates/ruvllm/src/memory_pool.rs:1092-1112 — 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 (21 lines × 2) crates/rvAgent/rvagent-backends/src/filesystem.rs:499— crates/rvAgent/rvagent-backends/src/filesystem.rs:499-519 | crates/rvAgent/rvagent-backends/src/filesystem.rs:556-576 — 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 (21 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:656— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:656-676 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:852-872 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (21 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1346— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1346-1366 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1769-1789 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (21 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:751— patches/candle-core-0.8.4/src/metal_backend/mod.rs:751-771 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:787-807 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (21 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:985— patches/candle-core-0.8.4/src/metal_backend/mod.rs:985-1005 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1035-1055 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (21 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1047— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1047-1067 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1098-1118 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (21 lines × 2) patches/candle-core-0.8.4/src/shape.rs:337— patches/candle-core-0.8.4/src/shape.rs:337-357 | patches/candle-core-0.9.2/src/shape.rs:337-357 — before extracting anything, compare `patches/candle-core-0.8.4/src/shape.rs` and `patches/candle-core-0.9.2/src/shape.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 153 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 (21 lines × 2) patches/candle-core-0.8.4/src/storage.rs:371— patches/candle-core-0.8.4/src/storage.rs:371-391 | patches/candle-core-0.9.2/src/storage.rs:380-400 — before extracting anything, compare `patches/candle-core-0.8.4/src/storage.rs` and `patches/candle-core-0.9.2/src/storage.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 490 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 (21 lines × 2) patches/candle-core-0.8.4/src/storage.rs:402— patches/candle-core-0.8.4/src/storage.rs:402-422 | patches/candle-core-0.9.2/src/storage.rs:411-431 — before extracting anything, compare `patches/candle-core-0.8.4/src/storage.rs` and `patches/candle-core-0.9.2/src/storage.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 490 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 (21 lines × 2) patches/candle-core-0.8.4/src/storage.rs:433— patches/candle-core-0.8.4/src/storage.rs:433-453 | patches/candle-core-0.9.2/src/storage.rs:442-462 — before extracting anything, compare `patches/candle-core-0.8.4/src/storage.rs` and `patches/candle-core-0.9.2/src/storage.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 490 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 (21 lines × 2) patches/candle-core-0.8.4/src/storage.rs:464— patches/candle-core-0.8.4/src/storage.rs:464-484 | patches/candle-core-0.9.2/src/storage.rs:473-493 — before extracting anything, compare `patches/candle-core-0.8.4/src/storage.rs` and `patches/candle-core-0.9.2/src/storage.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 490 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 (21 lines × 2) patches/candle-core-0.8.4/src/strided_index.rs:39— patches/candle-core-0.8.4/src/strided_index.rs:39-59 | patches/candle-core-0.9.2/src/strided_index.rs:42-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:762— patches/candle-core-0.8.4/src/tensor.rs:762-782 | patches/candle-core-0.9.2/src/tensor.rs:830-850 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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.
+ 2 more in this group — see findings.md.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×25
Animation without a prefers-reduced-motion guard crates/mcp-brain-server/static/index.html:302— `.fi` moves (`animation: fi 1s ease both`) 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 crates/mcp-brain-server/static/index.html:312— `.hero h1` moves (`animation: pixelIn 2s cubic-bezier(0.16,1,0.3,1) 0.3s both`) 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 crates/mcp-brain-server/static/index.html:313— `.hero .lead` moves (`animation: fi 1.2s ease 1.5s both`) 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 crates/mcp-brain-server/static/index.html:314— `.hero-actions` moves (`animation: fi 1s ease 2s both`) 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 crates/mcp-brain-server/static/index.html:315— `.hero .stats` moves (`animation: fi 1s ease 2.3s both`) 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 crates/mcp-brain-server/static/index.html:319— `.key-display` moves (`animation: fi 0.8s ease both`) 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 crates/mcp-brain-server/static/origin.html:30— `#narrator` moves (`transition: opacity 0.8s ease, transform 0.8s 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 crates/mcp-brain-server/static/origin.html:93— `#progress-bar` moves (`transition: width 0.3s 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 crates/sona/wasm-example/index.html:172— `.spinner` moves (`animation: spin 1s 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 npm/packages/ruvbot/src/api/public/index.html:202— `.message` moves (`animation: fadeIn 0.3s 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 npm/packages/ruvbot/src/api/public/index.html:305— `.typing-indicator span` moves (`animation: typing 1.4s 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 ui/ruvocal/src/lib/components/chat/TaskGroup.svelte:63— <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ui/ruvocal/src/lib/components/icons/IconLoading.svelte:10— <div> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ui/ruvocal/src/lib/components/icons/IconLoading.svelte:14— <div> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ui/ruvocal/src/lib/components/icons/IconLoading.svelte:18— <div> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ui/ruvocal/src/lib/components/mcp/MCPServerManager.svelte:119— <iconrefresh> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ui/ruvocal/src/lib/components/mcp/ServerCard.svelte:170— <iconrefresh> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ui/ruvocal/src/lib/components/wasm/GalleryPanel.svelte:168— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ui/ruvocal/src/styles/main.css:127— `.animate-in` moves (`animation: pixelIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both`) 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 ui/ruvocal/src/lib/components/NavMenu.svelte:294— `.qd1` moves (`animation: qdot 2.2s ease-in-out 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 ui/ruvocal/src/lib/components/NavMenu.svelte:298— `.qd2` moves (`animation: qdot 2.2s ease-in-out infinite 0.35s`) 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 ui/ruvocal/src/lib/components/NavMenu.svelte:302— `.qd3` moves (`animation: qdot 2.2s ease-in-out infinite 0.7s`) 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 ui/ruvocal/src/lib/components/StopGeneratingBtn.svelte:53— `.stop-generating-btn--spinning::after` moves (`animation: stop-generating-rotate 1.2s 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 ui/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:97— `.rv-hero` moves (`animation: pixelIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both`) 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 ui/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:109— `.animate-in` moves (`animation: pixelIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both`) 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.
ruvector_cnn::kernels::int8_avx2::conv2d_int8_avx2 (cognitive 105) crates/ruvector-cnn/src/kernels/int8_avx2.rs:84— ruvector_cnn::kernels::int8_avx2::conv2d_int8_avx2 has cognitive complexity 105 (threshold 15). Drivers by points: loops 20 (91 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 81). 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.
ruvector_cnn::kernels::int8_neon::conv2d_int8_neon (cognitive 105) crates/ruvector-cnn/src/kernels/int8_neon.rs:73— ruvector_cnn::kernels::int8_neon::conv2d_int8_neon has cognitive complexity 105 (threshold 15). Drivers by points: loops 20 (91 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 81). 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.
ruvector_cnn::kernels::int8_wasm::conv2d_int8_wasm (cognitive 105) crates/ruvector-cnn/src/kernels/int8_wasm.rs:80— ruvector_cnn::kernels::int8_wasm::conv2d_int8_wasm has cognitive complexity 105 (threshold 15). Drivers by points: loops 20 (91 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 81). 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.
ruvector_cnn::simd::avx2::depthwise_conv_3x3_avx2 (cognitive 91) crates/ruvector-cnn/src/simd/avx2.rs:508— ruvector_cnn::simd::avx2::depthwise_conv_3x3_avx2 has cognitive complexity 91 (threshold 15). Drivers by points: loops 12 (48 pts), if/else 7 (36 pts), boolean chains 7 (nesting depth added 65). 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.
ruvector_cnn::simd::avx2::conv_3x3_avx2_fma (cognitive 78) crates/ruvector-cnn/src/simd/avx2.rs:201— ruvector_cnn::simd::avx2::conv_3x3_avx2_fma has cognitive complexity 78 (threshold 15). Drivers by points: loops 13 (64 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 61). 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. This shape REPEATS in the file: one other method here (ruvector_cnn::simd::avx2::conv_3x3_avx2) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_cnn::simd::avx2::conv_3x3_avx2 (cognitive 78) crates/ruvector-cnn/src/simd/avx2.rs:360— ruvector_cnn::simd::avx2::conv_3x3_avx2 has cognitive complexity 78 (threshold 15). Drivers by points: loops 13 (64 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 61). 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. This shape REPEATS in the file: one other method here (ruvector_cnn::simd::avx2::conv_3x3_avx2_fma) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_cnn::kernels::int8_avx2::depthwise_conv2d_int8_avx2 (cognitive 73) crates/ruvector-cnn/src/kernels/int8_avx2.rs:240— ruvector_cnn::kernels::int8_avx2::depthwise_conv2d_int8_avx2 has cognitive complexity 73 (threshold 15). Drivers by points: loops 15 (59 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 54). 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.
ruvector_cnn::simd::wasm::conv_3x3_wasm (cognitive 72) crates/ruvector-cnn/src/simd/wasm.rs:179— ruvector_cnn::simd::wasm::conv_3x3_wasm has cognitive complexity 72 (threshold 15). Drivers by points: loops 11 (49 pts), if/else 3 (21 pts), boolean chains 2 (nesting depth added 56). 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.
ruvector_cnn::simd::neon::conv_3x3_neon (cognitive 63) crates/ruvector-cnn/src/simd/neon.rs:209— ruvector_cnn::simd::neon::conv_3x3_neon has cognitive complexity 63 (threshold 15). Drivers by points: loops 11 (49 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 48). 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.
ruvector_cnn::simd::winograd::conv_3x3_winograd (cognitive 62) crates/ruvector-cnn/src/simd/winograd.rs:292— ruvector_cnn::simd::winograd::conv_3x3_winograd has cognitive complexity 62 (threshold 15). Drivers by points: loops 11 (42 pts), if/else 3 (18 pts), boolean chains 2 (nesting depth added 46). 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.
ruvector_cnn::kernels::int8_neon::depthwise_conv2d_int8_neon (cognitive 59) crates/ruvector-cnn/src/kernels/int8_neon.rs:235— ruvector_cnn::kernels::int8_neon::depthwise_conv2d_int8_neon has cognitive complexity 59 (threshold 15). Drivers by points: loops 13 (45 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 42). 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.
ruvector_cnn::simd::neon::depthwise_conv_3x3_neon (cognitive 48) crates/ruvector-cnn/src/simd/neon.rs:299— ruvector_cnn::simd::neon::depthwise_conv_3x3_neon has cognitive complexity 48 (threshold 15). Drivers by points: loops 9 (34 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 35). 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.
ruvector_cnn::simd::wasm::depthwise_conv_3x3_wasm (cognitive 48) crates/ruvector-cnn/src/simd/wasm.rs:274— ruvector_cnn::simd::wasm::depthwise_conv_3x3_wasm has cognitive complexity 48 (threshold 15). Drivers by points: loops 9 (34 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 35). 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.
ruvector_cnn::kernels::int8_scalar::conv2d_int8_scalar (cognitive 36) crates/ruvector-cnn/src/kernels/int8_scalar.rs:133— ruvector_cnn::kernels::int8_scalar::conv2d_int8_scalar has cognitive complexity 36 (threshold 15). Drivers by points: loops 7 (28 pts), if/else 1 (7 pts), boolean chains 1 (nesting depth added 27). 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.
ruvector_cnn::kernels::int8_avx2::matmul_int8_avx2 (cognitive 30) crates/ruvector-cnn/src/kernels/int8_avx2.rs:350— ruvector_cnn::kernels::int8_avx2::matmul_int8_avx2 has cognitive complexity 30 (threshold 15). Drivers by points: loops 10 (30 pts) (nesting depth added 20). 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.
ruvector_cnn::kernels::int8_neon::matmul_int8_neon (cognitive 30) crates/ruvector-cnn/src/kernels/int8_neon.rs:333— ruvector_cnn::kernels::int8_neon::matmul_int8_neon has cognitive complexity 30 (threshold 15). Drivers by points: loops 10 (30 pts) (nesting depth added 20). 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.
ruvector_cnn::kernels::int8_scalar::depthwise_conv2d_int8_scalar (cognitive 29) crates/ruvector-cnn/src/kernels/int8_scalar.rs:247— ruvector_cnn::kernels::int8_scalar::depthwise_conv2d_int8_scalar has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 1 (7 pts), boolean chains 1 (nesting depth added 21). 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.
ruvector_cnn::simd::scalar::conv_3x3_scalar (cognitive 29) crates/ruvector-cnn/src/simd/scalar.rs:97— ruvector_cnn::simd::scalar::conv_3x3_scalar has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (22 pts), if/else 1 (6 pts), boolean chains 1 (nesting depth added 21). 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.
ruvector_cnn::simd::scalar::avg_pool_scalar (cognitive 27) crates/ruvector-cnn/src/simd/scalar.rs:373— ruvector_cnn::simd::scalar::avg_pool_scalar has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 3 (11 pts), boolean chains 1 (nesting depth added 18). 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.
ruvector_cnn::kernels::int8_wasm::depthwise_conv2d_int8_wasm (cognitive 25) crates/ruvector-cnn/src/kernels/int8_wasm.rs:248— ruvector_cnn::kernels::int8_wasm::depthwise_conv2d_int8_wasm has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 1 (6 pts), boolean chains 1 (nesting depth added 16). 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.
ruvector_cnn::quantize::graph_rewrite::insert_qdq_nodes (cognitive 23) crates/ruvector-cnn/src/quantize/graph_rewrite.rs:290— ruvector_cnn::quantize::graph_rewrite::insert_qdq_nodes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (8 pts), loops 3 (5 pts), boolean chains 2 (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.
ruvector_cnn::simd::scalar::depthwise_conv_3x3_scalar (cognitive 22) crates/ruvector-cnn/src/simd/scalar.rs:147— ruvector_cnn::simd::scalar::depthwise_conv_3x3_scalar has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (6 pts), boolean chains 1 (nesting depth added 15). 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. This shape REPEATS in the file: one other method here (ruvector_cnn::simd::scalar::max_pool_scalar) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_cnn::simd::scalar::max_pool_scalar (cognitive 22) crates/ruvector-cnn/src/simd/scalar.rs:334— ruvector_cnn::simd::scalar::max_pool_scalar has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (6 pts), boolean chains 1 (nesting depth added 15). 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. This shape REPEATS in the file: one other method here (ruvector_cnn::simd::scalar::depthwise_conv_3x3_scalar) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_cnn::quantize::graph_rewrite::fuse_batchnorm_to_conv (cognitive 21) crates/ruvector-cnn/src/quantize/graph_rewrite.rs:142— ruvector_cnn::quantize::graph_rewrite::fuse_batchnorm_to_conv has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (10 pts), loops 3 (6 pts), if/else 2 (5 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_cnn::quantize::graph_rewrite::fuse_zp_to_bias (cognitive 19) crates/ruvector-cnn/src/quantize/graph_rewrite.rs:222— ruvector_cnn::quantize::graph_rewrite::fuse_zp_to_bias has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (8 pts), loops 3 (6 pts), if/else 2 (5 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.
Duplicated block (11–12 lines × 2) crates/cognitum-gate-kernel/src/evidence.rs:78— crates/cognitum-gate-kernel/src/evidence.rs:78-89 | crates/cognitum-gate-kernel/src/evidence.rs:108-118 — 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–12 lines × 2) crates/prime-radiant/src/security/validation.rs:343— crates/prime-radiant/src/security/validation.rs:343-354 | crates/prime-radiant/src/security/validation.rs:382-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–12 lines × 2) crates/ruvector-attention/src/hyperbolic/poincare.rs:101— crates/ruvector-attention/src/hyperbolic/poincare.rs:101-111 | crates/ruvector-hyperbolic-hnsw/src/poincare.rs:433-444 — before extracting anything, compare `crates/ruvector-attention/src/hyperbolic/poincare.rs` and `crates/ruvector-hyperbolic-hnsw/src/poincare.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 (11–12 lines × 2) crates/ruvector-bet4-ivf-bench/src/kernel.rs:152— crates/ruvector-bet4-ivf-bench/src/kernel.rs:152-163 | crates/ruvector-bet4-ivf-bench/src/kernel.rs:202-212 — 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–12 lines × 2) crates/ruvector-cli/src/cli/commands.rs:209— crates/ruvector-cli/src/cli/commands.rs:209-220 | crates/ruvector-cli/src/cli/graph.rs:457-467 — 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 (11–12 lines × 2) crates/ruvector-core/src/advanced_features/diskann.rs:177— crates/ruvector-core/src/advanced_features/diskann.rs:177-188 | crates/ruvector-core/src/advanced_features/diskann.rs:288-298 — 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–12 lines × 2) crates/ruvector-graph/src/optimization/cache_hierarchy.rs:291— crates/ruvector-graph/src/optimization/cache_hierarchy.rs:291-301 | crates/ruvector-graph/src/optimization/cache_hierarchy.rs:307-318 — 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–12 lines × 2) crates/ruvector-mincut-gated-transformer/src/kv_cache/hot_buffer.rs:229— crates/ruvector-mincut-gated-transformer/src/kv_cache/hot_buffer.rs:229-240 | crates/ruvector-mincut-gated-transformer/src/kv_cache/hot_buffer.rs:259-269 — 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–12 lines × 2) crates/ruvector-mincut/src/expander/mod.rs:205— crates/ruvector-mincut/src/expander/mod.rs:205-216 | crates/ruvector-mincut/src/expander/mod.rs:245-255 — 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–12 lines × 2) crates/ruvector-nervous-system-wasm/src/hdc.rs:91— crates/ruvector-nervous-system-wasm/src/hdc.rs:91-101 | crates/ruvector-nervous-system/src/hdc/vector.rs:185-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11–12 lines × 2) crates/ruvector-nervous-system-wasm/src/hdc.rs:103— crates/ruvector-nervous-system-wasm/src/hdc.rs:103-113 | crates/ruvector-nervous-system/src/hdc/vector.rs:198-209 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11–12 lines × 2) crates/ruvector-nervous-system/src/separate/sparsification.rs:144— crates/ruvector-nervous-system/src/separate/sparsification.rs:144-155 | crates/ruvector-nervous-system/src/separate/sparsification.rs:177-187 — 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–12 lines × 2) crates/ruvector-postgres/src/quantization/binary.rs:108— crates/ruvector-postgres/src/quantization/binary.rs:108-119 | crates/ruvector-postgres/src/types/binaryvec.rs:225-235 — before extracting anything, compare `crates/ruvector-postgres/src/quantization/binary.rs` and `crates/ruvector-postgres/src/types/binaryvec.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 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 (11–12 lines × 2) crates/ruvector-sparse-inference/src/precision/quantizers.rs:130— crates/ruvector-sparse-inference/src/precision/quantizers.rs:130-141 | crates/ruvector-sparse-inference/src/precision/quantizers.rs:149-159 — 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–12 lines × 2) crates/ruvector-streaming-qng/src/dataset.rs:36— crates/ruvector-streaming-qng/src/dataset.rs:36-47 | crates/ruvector-streaming-qng/src/dataset.rs:71-81 — 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–12 lines × 2) crates/ruvllm/src/bitnet/backend.rs:1686— crates/ruvllm/src/bitnet/backend.rs:1686-1697 | crates/ruvllm/src/bitnet/backend.rs:1921-1931 — 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–12 lines × 2) crates/ruvllm/src/claude_flow/pretrain_pipeline.rs:1291— crates/ruvllm/src/claude_flow/pretrain_pipeline.rs:1291-1301 | crates/ruvllm/src/claude_flow/task_generator.rs:1047-1058 — 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 (11–12 lines × 2) crates/ruvllm/src/claude_flow/reasoning_bank.rs:747— crates/ruvllm/src/claude_flow/reasoning_bank.rs:747-758 | crates/ruvllm/src/claude_flow/reasoning_bank.rs:1131-1141 — 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–12 lines × 2) crates/ruvllm/src/models/openmythos/rope.rs:64— crates/ruvllm/src/models/openmythos/rope.rs:64-74 | crates/ruvllm/src/models/rdt.rs:1152-1163 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11–12 lines × 2) crates/ruvllm/src/quantize/ruvltra_quant.rs:1015— crates/ruvllm/src/quantize/ruvltra_quant.rs:1015-1026 | crates/ruvllm/src/quantize/ruvltra_quant.rs:1054-1064 — 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–12 lines × 2) crates/ruvllm/src/serving/engine.rs:790— crates/ruvllm/src/serving/engine.rs:790-801 | crates/ruvllm/src/serving/engine.rs:1051-1061 — 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–12 lines × 2) crates/rvf/rvf-wasm/src/store.rs:188— crates/rvf/rvf-wasm/src/store.rs:188-199 | crates/rvf/rvf-wasm/src/store.rs:219-229 — 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–12 lines × 2) crates/rvforge-reader/src/receipts.rs:102— crates/rvforge-reader/src/receipts.rs:102-113 | crates/rvforge-reader/src/witness_receipt.rs:210-220 — 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 (11–12 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:955— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:955-966 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1145-1155 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (11–12 lines × 2) patches/candle-core-0.8.4/src/quantized/avx.rs:591— patches/candle-core-0.8.4/src/quantized/avx.rs:591-601 | patches/candle-core-0.8.4/src/quantized/avx.rs:604-615 — 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 × 3) crates/mcp-brain-server/src/symbolic.rs:482— crates/mcp-brain-server/src/symbolic.rs:482-490 | crates/mcp-brain-server/src/symbolic.rs:495-503 | crates/mcp-brain-server/src/symbolic.rs:508-516 — 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.
Duplicated block (9 lines × 3) crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:194— crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:194-202 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:297-305 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:401-409 — 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.
Duplicated block (9 lines × 3) crates/ruvector-delta-core/src/encoding.rs:127— crates/ruvector-delta-core/src/encoding.rs:127-135 | crates/ruvector-delta-core/src/encoding.rs:371-379 | crates/rvf/rvf-server/src/tcp.rs:204-212 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) crates/ruvector-entropy-ann/src/search.rs:170— crates/ruvector-entropy-ann/src/search.rs:170-178 | crates/ruvector-entropy-ann/src/search.rs:286-294 | crates/ruvector-entropy-ann/src/search.rs:450-458 — 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.
Duplicated block (9 lines × 3) crates/ruvector-memory-admission/src/policy.rs:141— crates/ruvector-memory-admission/src/policy.rs:141-149 | crates/ruvector-memory-admission/src/policy.rs:269-277 | crates/ruvector-memory-admission/src/policy.rs:430-438 — 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.
Duplicated block (9 lines × 3) crates/ruvector-postgres/src/distance/simd.rs:1505— crates/ruvector-postgres/src/distance/simd.rs:1505-1513 | crates/ruvector-postgres/src/distance/simd.rs:1571-1579 | crates/ruvector-postgres/src/distance/simd.rs:1597-1605 — 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.
Duplicated block (9 lines × 3) crates/ruvector-postgres/src/distance/simd.rs:1580— crates/ruvector-postgres/src/distance/simd.rs:1580-1588 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:298-306 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:325-333 — before extracting anything, compare `crates/ruvector-postgres/src/distance/simd.rs` and `crates/ruvix/crates/vecgraph/src/simd_distance.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 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 (9 lines × 3) crates/ruvector-postgres/src/index/ivfflat_am.rs:743— crates/ruvector-postgres/src/index/ivfflat_am.rs:743-751 | crates/ruvector-postgres/src/index/ivfflat_am.rs:950-959 | crates/ruvector-postgres/src/index/ivfflat_storage.rs:38-46 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) crates/ruvector-rabitq/src/index.rs:738— crates/ruvector-rabitq/src/index.rs:738-746 | crates/ruvector-rabitq/src/index.rs:784-792 | crates/ruvector-rabitq/src/index.rs:862-870 — 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.
Duplicated block (9 lines × 3) crates/ruvector-rulake/src/backend.rs:269— crates/ruvector-rulake/src/backend.rs:269-277 | crates/ruvector-rulake/src/backend.rs:288-296 | crates/ruvector-rulake/src/backend.rs:313-321 — 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.
Duplicated block (9 lines × 3) crates/ruvector-solver/src/backward_push.rs:280— crates/ruvector-solver/src/backward_push.rs:280-288 | crates/ruvector-solver/src/backward_push.rs:393-401 | crates/ruvector-solver/src/backward_push.rs:479-487 — 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.
Duplicated block (9 lines × 3) crates/ruvector-temporal-tensor/src/persistence.rs:105— crates/ruvector-temporal-tensor/src/persistence.rs:105-113 | crates/ruvector-temporal-tensor/src/persistence.rs:146-154 | crates/ruvector-temporal-tensor/src/persistence.rs:161-169 — 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.
Duplicated block (9 lines × 3) crates/ruvix/crates/cli/src/commands/dtb.rs:618— crates/ruvix/crates/cli/src/commands/dtb.rs:618-626 | crates/ruvix/crates/cli/src/commands/dtb.rs:739-747 | crates/ruvix/crates/cli/src/commands/dtb.rs:824-832 — 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.
Duplicated block (9 lines × 3) crates/ruvllm-cli/src/commands/benchmark.rs:445— crates/ruvllm-cli/src/commands/benchmark.rs:445-453 | crates/ruvllm-cli/src/commands/chat.rs:659-667 | crates/ruvllm-cli/src/commands/serve.rs:1051-1059 — before extracting anything, compare `crates/ruvllm-cli/src/commands/benchmark.rs` and `crates/ruvllm-cli/src/commands/chat.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 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 (9 lines × 3) crates/ruvllm/src/backends/recurrent_backend.rs:234— crates/ruvllm/src/backends/recurrent_backend.rs:234-242 | crates/ruvllm/src/backends/recurrent_backend.rs:268-276 | crates/ruvllm/src/backends/recurrent_backend.rs:317-325 — 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.
Duplicated block (9 lines × 3) crates/ruvllm/src/bitnet/backend.rs:1383— crates/ruvllm/src/bitnet/backend.rs:1383-1392 | crates/ruvllm/src/bitnet/backend.rs:1394-1402 | crates/ruvllm/src/bitnet/backend.rs:1404-1412 — 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.
Duplicated block (9 lines × 3) crates/rvf/rvf-runtime/src/store.rs:291— crates/rvf/rvf-runtime/src/store.rs:291-299 | crates/rvf/rvf-runtime/src/store.rs:379-387 | crates/rvf/rvf-runtime/src/store.rs:465-473 — 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.
Duplicated block (9 lines × 3) crates/sona/src/export/dataset.rs:31— crates/sona/src/export/dataset.rs:31-39 | crates/sona/src/export/dataset.rs:87-95 | crates/sona/src/export/dataset.rs:163-171 — 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.
Duplicated block (9 lines × 3) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1951— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1951-1959 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:2006-2014 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:2061-2069 — 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.
Duplicated block (9 lines × 3) crates/mcp-brain-server/src/bin/local.rs:562— crates/mcp-brain-server/src/bin/local.rs:562-570 | crates/mcp-brain-server/src/main.rs:261-271 | crates/ruvllm-cli/src/commands/serve.rs:1027-1037 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (9 lines × 3) crates/ruvector-core/src/agenticdb.rs:626— crates/ruvector-core/src/agenticdb.rs:626-635 | crates/ruvector-core/src/agenticdb.rs:977-985 | crates/ruvector-core/src/agenticdb.rs:1349-1357 — 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.
Duplicated block (9 lines × 3) crates/mcp-brain-server/src/gist.rs:370— crates/mcp-brain-server/src/gist.rs:370-378 | crates/mcp-brain-server/src/gist.rs:884-892 | crates/mcp-brain-server/src/routes.rs:7937-7945 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) patches/candle-core-0.9.2/src/quantized/k_quants.rs:885— patches/candle-core-0.9.2/src/quantized/k_quants.rs:885-893 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1515-1523 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1792-1800 — 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.
No assertions: should add training data npm/packages/ruvllm/test/advanced-features.test.js:637— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DatabasePersistence - Save and Load npm/packages/ruvector-extensions/tests/persistence.test.ts:60— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DatabasePersistence - Compressed Save npm/packages/ruvector-extensions/tests/persistence.test.ts:94— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DatabasePersistence - Snapshot Management npm/packages/ruvector-extensions/tests/persistence.test.ts:123— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DatabasePersistence - Export and Import npm/packages/ruvector-extensions/tests/persistence.test.ts:166— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DatabasePersistence - Progress Callbacks npm/packages/ruvector-extensions/tests/persistence.test.ts:202— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DatabasePersistence - Checksum Verification npm/packages/ruvector-extensions/tests/persistence.test.ts:227— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Utility Functions npm/packages/ruvector-extensions/tests/persistence.test.ts:276— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DatabasePersistence - Snapshot Cleanup npm/packages/ruvector-extensions/tests/persistence.test.ts:304— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should stop the coordinator npm/packages/ruvbot/tests/integration/core/swarm-coordinator.test.ts:51— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should handle multiple stop calls gracefully npm/packages/ruvbot/tests/integration/core/swarm-coordinator.test.ts:70— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should generate bullish trends npm/packages/agentic-synth-examples/tests/generators/stock-market.test.ts:153— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should respect timeout npm/packages/agentic-synth/tests/unit/api/client.test.js:99— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: returns unsubscribe function examples/edge-net/dashboard/src/tests/debug.test.ts:70— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Vector multiple inserts work crates/rvlite/examples/dashboard/scripts/e2e-wasm-test.mjs:76— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: SPARQL: SELECT with specific predicate crates/rvlite/examples/dashboard/scripts/e2e-wasm-test.mjs:155— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: SPARQL: ASK query (true case) crates/rvlite/examples/dashboard/scripts/e2e-wasm-test.mjs:161— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: SPARQL: ASK query (false case) crates/rvlite/examples/dashboard/scripts/e2e-wasm-test.mjs:167— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: SPARQL: SELECT with LIMIT crates/rvlite/examples/dashboard/scripts/e2e-wasm-test.mjs:173— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: SPARQL: SELECT with literal values crates/rvlite/examples/dashboard/scripts/e2e-wasm-test.mjs:179— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: SPARQL: Empty result for non-existent data crates/rvlite/examples/dashboard/scripts/e2e-wasm-test.mjs:267— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
candle_core::quantized::utils::make_qx_quants (cognitive 70) patches/candle-core-0.9.2/src/quantized/utils.rs:62— candle_core::quantized::utils::make_qx_quants has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (47 pts), loops 12 (20 pts), boolean chains 3 (nesting depth added 31). 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.
candle_core::quantized::utils::make_qx_quants (cognitive 66) patches/candle-core-0.8.4/src/quantized/utils.rs:61— candle_core::quantized::utils::make_qx_quants has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (43 pts), loops 12 (20 pts), boolean chains 3 (nesting depth added 31). 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.
candle_core::cpu_backend::conv2d::conv2d_tiled (cognitive 50) patches/candle-core-0.9.2/src/cpu_backend/conv2d.rs:126— candle_core::cpu_backend::conv2d::conv2d_tiled has cognitive complexity 50 (threshold 15). Drivers by points: loops 14 (37 pts), if/else 4 (11 pts), boolean chains 2 (nesting depth added 30). 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.
candle_core::cpu_backend::conv2d::conv2d_direct (cognitive 44) patches/candle-core-0.9.2/src/cpu_backend/conv2d.rs:280— candle_core::cpu_backend::conv2d::conv2d_direct has cognitive complexity 44 (threshold 15). Drivers by points: loops 9 (29 pts), if/else 4 (13 pts), boolean chains 2 (nesting depth added 29). 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.
candle_core::quantized::utils::make_qkx3_quants (cognitive 36) patches/candle-core-0.9.2/src/quantized/utils.rs:356— candle_core::quantized::utils::make_qkx3_quants has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 5 (8 pts), match/switch 5 (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.
candle_core::cpu_backend::utils::binary_map_vec (cognitive 35) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:164— candle_core::cpu_backend::utils::binary_map_vec has cognitive complexity 35 (threshold 15). Drivers by points: loops 8 (30 pts), match/switch 3 (5 pts) (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
candle_core::cpu_backend::utils::binary_map_vec (cognitive 35) patches/candle-core-0.9.2/src/cpu_backend/utils.rs:213— candle_core::cpu_backend::utils::binary_map_vec has cognitive complexity 35 (threshold 15). Drivers by points: loops 8 (30 pts), match/switch 3 (5 pts) (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
candle_core::quantized::utils::make_q3_quants (cognitive 34) patches/candle-core-0.8.4/src/quantized/utils.rs:261— candle_core::quantized::utils::make_q3_quants has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 6 (11 pts), boolean chains 1 (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.
candle_core::quantized::utils::make_q3_quants (cognitive 34) patches/candle-core-0.9.2/src/quantized/utils.rs:287— candle_core::quantized::utils::make_q3_quants has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 6 (11 pts), boolean chains 1 (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.
candle_core::pickle::read_pth_tensor_info (cognitive 32) patches/candle-core-0.8.4/src/pickle.rs:646— candle_core::pickle::read_pth_tensor_info has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 4 (13 pts), loops 2 (4 pts), boolean chains 2 (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.
candle_core::pickle::read_pth_tensor_info (cognitive 32) patches/candle-core-0.9.2/src/pickle.rs:670— candle_core::pickle::read_pth_tensor_info has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 4 (13 pts), loops 2 (4 pts), boolean chains 2 (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.
candle_core::cpu::erf::erf_impl (cognitive 30) patches/candle-core-0.8.4/src/cpu/erf.rs:599— candle_core::cpu::erf::erf_impl has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 2 (nesting depth added 4). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
candle_core::quantized::utils::make_qp_quants (cognitive 26) patches/candle-core-0.9.2/src/quantized/utils.rs:470— candle_core::quantized::utils::make_qp_quants has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
candle_core::cuda_backend::gemm_config (cognitive 20) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1047— candle_core::cuda_backend::gemm_config has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 6, match/switch 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
candle_core::cuda_backend::gemm_config (cognitive 20) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1343— candle_core::cuda_backend::gemm_config has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 6, match/switch 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
candle_core::quantized::avx::vec_dot_q3k_q8k (cognitive 20) patches/candle-core-0.8.4/src/quantized/avx.rs:307— candle_core::quantized::avx::vec_dot_q3k_q8k has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 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.
candle_core::quantized::avx::vec_dot_q3k_q8k (cognitive 20) patches/candle-core-0.9.2/src/quantized/avx.rs:307— candle_core::quantized::avx::vec_dot_q3k_q8k has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 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.
candle_core::cpu_backend::utils::binary_map (cognitive 17) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:84— candle_core::cpu_backend::utils::binary_map has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 3 (5 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
candle_core::cpu_backend::utils::binary_map (cognitive 17) patches/candle-core-0.9.2/src/cpu_backend/utils.rs:133— candle_core::cpu_backend::utils::binary_map has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 3 (5 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
candle_core::quantized::simd128::vec_dot_q2k_q8k (cognitive 17) patches/candle-core-0.8.4/src/quantized/simd128.rs:95— candle_core::quantized::simd128::vec_dot_q2k_q8k has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 1 (nesting depth added 10). 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.
candle_core::quantized::simd128::vec_dot_q2k_q8k (cognitive 16) patches/candle-core-0.9.2/src/quantized/simd128.rs:94— candle_core::quantized::simd128::vec_dot_q2k_q8k has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (16 pts) (nesting depth added 10). 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.
Duplicated block (8 lines × 4) crates/ruvector-attention/src/attention/scaled_dot_product.rs:87— crates/ruvector-attention/src/attention/scaled_dot_product.rs:87-94 | crates/ruvector-attention/src/attention/scaled_dot_product.rs:130-137 | crates/ruvector-attention/src/moe/expert.rs:74-81 | crates/ruvector-attention/src/moe/expert.rs:134-141 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 4) crates/ruvector-cnn/src/contrastive/infonce.rs:364— crates/ruvector-cnn/src/contrastive/infonce.rs:364-373 | crates/ruvector-postgres/src/distance/scalar.rs:41-49 | crates/ruvector-recall-bounded/src/lib.rs:47-54 | crates/rvf/rvf-index/src/distance.rs:32-39 — before extracting anything, compare `crates/ruvector-postgres/src/distance/scalar.rs` and `crates/rvf/rvf-index/src/distance.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 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 (8 lines × 4) crates/ruvector-cnn/src/quantize/graph_rewrite.rs:143— crates/ruvector-cnn/src/quantize/graph_rewrite.rs:143-150 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:226-233 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:413-420 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:447-454 — 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.
Duplicated block (8 lines × 4) crates/ruvector-cnn/src/simd/avx2.rs:156— crates/ruvector-cnn/src/simd/avx2.rs:156-163 | crates/ruvector-cnn/src/simd/neon.rs:158-165 | crates/ruvector-cnn/src/simd/scalar.rs:79-86 | crates/ruvector-cnn/src/simd/wasm.rs:124-131 — before extracting anything, compare `crates/ruvector-cnn/src/simd/avx2.rs` and `crates/ruvector-cnn/src/simd/neon.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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 × 4) crates/ruvector-cnn/src/simd/neon.rs:46— crates/ruvector-cnn/src/simd/neon.rs:46-53 | crates/ruvector-core/src/simd_intrinsics.rs:758-765 | crates/ruvllm/src/kernels/attention.rs:1787-1794 | crates/ruvllm/src/kernels/matmul.rs:1231-1238 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (8 lines × 4) crates/ruvector-core/src/advanced_features/matryoshka.rs:243— crates/ruvector-core/src/advanced_features/matryoshka.rs:243-250 | crates/ruvector-core/src/advanced_features/matryoshka.rs:310-317 | crates/ruvector-core/src/advanced_features/matryoshka.rs:405-412 | crates/ruvector-core/src/advanced_features/multi_vector.rs:194-202 — before extracting anything, compare `crates/ruvector-core/src/advanced_features/matryoshka.rs` and `crates/ruvector-core/src/advanced_features/multi_vector.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 × 4) crates/ruvector-filter/src/evaluator.rs:163— crates/ruvector-filter/src/evaluator.rs:163-171 | crates/ruvector-filter/src/evaluator.rs:198-205 | crates/ruvector-filter/src/evaluator.rs:227-234 | crates/ruvector-filter/src/evaluator.rs:256-264 — 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.
Duplicated block (8 lines × 4) crates/ruvector-mincut/src/graph/mod.rs:336— crates/ruvector-mincut/src/graph/mod.rs:336-343 | crates/ruvector-mincut/src/instance/bounded.rs:182-189 | crates/ruvector-mincut/src/instance/bounded.rs:367-374 | crates/ruvector-mincut/src/instance/stub.rs:173-180 — before extracting anything, compare `crates/ruvector-mincut/src/instance/bounded.rs` and `crates/ruvector-mincut/src/instance/stub.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 × 4) crates/ruvector-postgres/src/attention/flash.rs:83— crates/ruvector-postgres/src/attention/flash.rs:83-90 | crates/ruvector-postgres/src/attention/mod.rs:156-163 | crates/ruvector-postgres/src/attention/operators.rs:501-508 | crates/ruvector-postgres/src/attention/operators.rs:836-843 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 4) crates/ruvector-postgres/src/distance/simd.rs:990— crates/ruvector-postgres/src/distance/simd.rs:990-997 | crates/ruvector-postgres/src/types/halfvec.rs:365-372 | crates/ruvector-postgres/src/types/halfvec.rs:415-422 | crates/ruvector-postgres/src/types/halfvec.rs:481-488 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 4) crates/ruvector-postgres/src/sparse/distance.rs:22— crates/ruvector-postgres/src/sparse/distance.rs:22-29 | crates/ruvector-postgres/src/sparse/distance.rs:85-92 | crates/ruvector-postgres/src/sparse/distance.rs:128-135 | crates/ruvector-postgres/src/sparse/distance.rs:185-192 — 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.
Duplicated block (8 lines × 4) crates/ruvllm/src/lora/micro_lora.rs:339— crates/ruvllm/src/lora/micro_lora.rs:339-346 | crates/ruvllm/src/lora/micro_lora.rs:435-442 | crates/ruvllm/src/lora/micro_lora.rs:444-451 | crates/ruvllm/src/lora/micro_lora.rs:453-460 — 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.
Duplicated block (8 lines × 4) crates/ruvllm/src/metal/context.rs:543— crates/ruvllm/src/metal/context.rs:543-550 | crates/ruvllm/src/metal/context.rs:725-732 | crates/ruvllm/src/metal/context.rs:884-891 | crates/ruvllm/src/metal/context.rs:957-964 — 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.
Duplicated block (8 lines × 4) patches/candle-core-0.8.4/src/backprop.rs:304— patches/candle-core-0.8.4/src/backprop.rs:304-311 | patches/candle-core-0.8.4/src/backprop.rs:333-340 | patches/candle-core-0.9.2/src/backprop.rs:306-313 | patches/candle-core-0.9.2/src/backprop.rs:335-342 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (8 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:840— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:840-847 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:905-912 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1036-1043 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1101-1108 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (8 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:602— patches/candle-core-0.8.4/src/quantized/k_quants.rs:602-609 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:672-679 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:634-641 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:723-730 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (8 lines × 4) patches/candle-core-0.8.4/src/sort.rs:21— patches/candle-core-0.8.4/src/sort.rs:21-28 | patches/candle-core-0.8.4/src/sort.rs:36-43 | patches/candle-core-0.9.2/src/sort.rs:21-28 | patches/candle-core-0.9.2/src/sort.rs:36-43 — before extracting anything, compare `patches/candle-core-0.8.4/src/sort.rs` and `patches/candle-core-0.9.2/src/sort.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 137 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 (8 lines × 4) patches/candle-core-0.8.4/src/tensor.rs:1649— patches/candle-core-0.8.4/src/tensor.rs:1649-1656 | patches/candle-core-0.8.4/src/tensor.rs:1690-1697 | patches/candle-core-0.9.2/src/tensor.rs:1973-1980 | patches/candle-core-0.9.2/src/tensor.rs:2014-2021 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (8 lines × 4) crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs:209— crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs:209-216 | crates/ruvector-dag/src/qudag/crypto/ml_kem.rs:242-249 | crates/ruvix/crates/boot/src/signature.rs:173-181 | crates/ruvllm/src/quantize/security.rs:157-164 — before extracting anything, compare `crates/ruvector-dag/src/qudag/crypto/ml_dsa.rs` and `crates/ruvector-dag/src/qudag/crypto/ml_kem.rs` 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 (8 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1036— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1036-1043 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1124-1131 | patches/candle-core-0.9.2/src/cpu_backend/conv2d.rs:287-294 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1232-1239 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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.
Hotspot: crates/rvf/rvf-types/src/error.rs crates/rvf/rvf-types/src/error.rs:235— crates/rvf/rvf-types/src/error.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in ErrorCode::try_from at line 235. 2 of those changes were fix/bug commits, and the other 3 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-types/src/error.rs`: 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: crates/rvf/rvf-runtime/src/store.rs crates/rvf/rvf-runtime/src/store.rs:3424— crates/rvf/rvf-runtime/src/store.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in RvfStore::restore_cow_state at line 3424. 4 of those changes were fix/bug commits, and the other 5 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-runtime/src/store.rs`: 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: crates/rvf/rvf-wire/src/stream/verifier.rs crates/rvf/rvf-wire/src/stream/verifier.rs:412— crates/rvf/rvf-wire/src/stream/verifier.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in StreamVerifier::on_chunk at line 412. 2 of those changes were fix/bug commits, and the other 5 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-wire/src/stream/verifier.rs`: 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: crates/ruvector-core/src/vector_db.rs crates/ruvector-core/src/vector_db.rs:106— crates/ruvector-core/src/vector_db.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in VectorDB::new at line 106. 1 of those changes was a fix/bug commit, and the other 8 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-core/src/vector_db.rs`: 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: crates/rvf/rvf-runtime/src/store/security.rs crates/rvf/rvf-runtime/src/store/security.rs:201— crates/rvf/rvf-runtime/src/store/security.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in rvf_runtime::store::security::check_signed_root at line 201. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-runtime/src/store/security.rs`: 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: crates/rvf/rvf-runtime/src/read_path.rs crates/rvf/rvf-runtime/src/read_path.rs:295— crates/rvf/rvf-runtime/src/read_path.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in rvf_runtime::read_path::scan_blocks at line 295. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-runtime/src/read_path.rs`: 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: npm/packages/typesafe/bench/run.mjs npm/packages/typesafe/bench/run.mjs:277— npm/packages/typesafe/bench/run.mjs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in main at line 277. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- npm/packages/typesafe/bench/run.mjs`: 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: crates/rvf/rvf-runtime/src/store/policy_api.rs crates/rvf/rvf-runtime/src/store/policy_api.rs:205— crates/rvf/rvf-runtime/src/store/policy_api.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in RvfStore::apply_open_policy at line 205. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-runtime/src/store/policy_api.rs`: 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: crates/rvf/rvf-server/src/stream.rs crates/rvf/rvf-server/src/stream.rs:438— crates/rvf/rvf-server/src/stream.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in rvf_server::stream::body at line 438. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-server/src/stream.rs`: 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: crates/rvf/rvf-runtime/src/progressive_stream/ingest/query.rs crates/rvf/rvf-runtime/src/progressive_stream/ingest/query.rs:126— crates/rvf/rvf-runtime/src/progressive_stream/ingest/query.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in StreamIngest::query_with at line 126. 1 of those changes was a fix/bug commit, and the other 1 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-runtime/src/progressive_stream/ingest/query.rs`: 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: crates/rvf/rvf-runtime/src/progressive_stream/vectors.rs crates/rvf/rvf-runtime/src/progressive_stream/vectors.rs:219— crates/rvf/rvf-runtime/src/progressive_stream/vectors.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in VecParse::feed at line 219. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-runtime/src/progressive_stream/vectors.rs`: 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: crates/rvf/rvf-server/src/tcp.rs crates/rvf/rvf-server/src/tcp.rs:75— crates/rvf/rvf-server/src/tcp.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in rvf_server::tcp::handle_connection at line 75. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-server/src/tcp.rs`: 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: crates/ruvector-retrieval-receipt/src/bin/benchmark.rs crates/ruvector-retrieval-receipt/src/bin/benchmark.rs:535— crates/ruvector-retrieval-receipt/src/bin/benchmark.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ruvector_retrieval_receipt::bin::benchmark::main at line 535. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-retrieval-receipt/src/bin/benchmark.rs`: 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: crates/ruvector-agent-memory/src/arbitration.rs crates/ruvector-agent-memory/src/arbitration.rs:300— crates/ruvector-agent-memory/src/arbitration.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ruvector_agent_memory::arbitration::arbitrate at line 300. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-agent-memory/src/arbitration.rs`: 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: crates/mcp-brain-server/src/routes.rs crates/mcp-brain-server/src/routes.rs:46— crates/mcp-brain-server/src/routes.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in mcp_brain_server::routes::create_router at line 46. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/mcp-brain-server/src/routes.rs`: 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: npm/packages/typesafe/bench/lib/receipt.mjs npm/packages/typesafe/bench/lib/receipt.mjs:17— npm/packages/typesafe/bench/lib/receipt.mjs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in scoreRecords at line 17. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- npm/packages/typesafe/bench/lib/receipt.mjs`: 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: crates/rvf/rvf-wire/src/stream/descriptor.rs crates/rvf/rvf-wire/src/stream/descriptor.rs:32— crates/rvf/rvf-wire/src/stream/descriptor.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in rvf_wire::stream::descriptor::decode_descriptor at line 32. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/rvf/rvf-wire/src/stream/descriptor.rs`: 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: crates/mcp-brain-server/src/main.rs crates/mcp-brain-server/src/main.rs:5— crates/mcp-brain-server/src/main.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in mcp_brain_server::main at line 5. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/mcp-brain-server/src/main.rs`: 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: crates/ruvector-bench/src/bin/turbo4_ablation.rs crates/ruvector-bench/src/bin/turbo4_ablation.rs:126— crates/ruvector-bench/src/bin/turbo4_ablation.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in ruvector_bench::bin::turbo4_ablation::main at line 126. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-bench/src/bin/turbo4_ablation.rs`: 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.
mcp_brain_server::routes::run_enhanced_training_cycle (cognitive 128) crates/mcp-brain-server/src/routes.rs:544— mcp_brain_server::routes::run_enhanced_training_cycle has cognitive complexity 128 (threshold 15). Drivers by points: if/else 56 (80 pts), loops 14 (29 pts), boolean chains 13, match/switch 2 (6 pts) (nesting depth added 43). 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.
mcp_brain_server::routes::search_memories (cognitive 114) crates/mcp-brain-server/src/routes.rs:1789— mcp_brain_server::routes::search_memories has cognitive complexity 114 (threshold 15). Drivers by points: if/else 47 (81 pts), loops 12 (26 pts), boolean chains 7 (nesting depth added 48). Of this number, 104 points are the body's own statements and 10 belong to one function item inside it that branches. 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.
mcp_brain_server::routes::handle_mcp_tool_call (cognitive 52) crates/mcp-brain-server/src/routes.rs:6080— mcp_brain_server::routes::handle_mcp_tool_call has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (43 pts), match/switch 3 (6 pts), boolean chains 3 (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.
mcp_brain_server::routes::pipeline_optimize (cognitive 47) crates/mcp-brain-server/src/routes.rs:4044— mcp_brain_server::routes::pipeline_optimize has cognitive complexity 47 (threshold 15). Drivers by points: loops 7 (22 pts), if/else 6 (15 pts), match/switch 4 (10 pts) (nesting depth added 30). 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.
mcp_brain_server::routes::share_memory (cognitive 40) crates/mcp-brain-server/src/routes.rs:1469— mcp_brain_server::routes::share_memory has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26 (34 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). 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.
mcp_brain_server::routes::google_chat_handler (cognitive 36) crates/mcp-brain-server/src/routes.rs:7409— mcp_brain_server::routes::google_chat_handler has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 5 (9 pts), loops 3 (7 pts) (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.
mcp_brain_server::main (cognitive 35) crates/mcp-brain-server/src/main.rs:5— mcp_brain_server::main has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 16). 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.
mcp_brain_server::gist::research_and_write_with_gemini (cognitive 34) crates/mcp-brain-server/src/gist.rs:576— mcp_brain_server::gist::research_and_write_with_gemini has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 22). 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.
mcp_brain_server::routes::create_router (cognitive 32) crates/mcp-brain-server/src/routes.rs:46— mcp_brain_server::routes::create_router has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 5 (9 pts), match/switch 1 (2 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.
mcp_brain_server::routes::status (cognitive 32) crates/mcp-brain-server/src/routes.rs:2735— mcp_brain_server::routes::status has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26 (32 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
mcp_brain_server::bin::ruvbrain_sse::sse_handler (cognitive 25) crates/mcp-brain-server/src/bin/ruvbrain_sse.rs:107— mcp_brain_server::bin::ruvbrain_sse::sse_handler has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (6 pts), loops 2 (4 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.
mcp_brain_server::routes::verify_endpoint (cognitive 25) crates/mcp-brain-server/src/routes.rs:2558— mcp_brain_server::routes::verify_endpoint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 5 (11 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.
mcp_brain_server::routes::consciousness_compute (cognitive 25) crates/mcp-brain-server/src/routes.rs:8450— mcp_brain_server::routes::consciousness_compute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 5 (9 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). 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.
mcp_brain_server::bin::ruvbrain_worker::run_action (cognitive 23) crates/mcp-brain-server/src/bin/ruvbrain_worker.rs:91— mcp_brain_server::bin::ruvbrain_worker::run_action has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 4 (9 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
mcp_brain_server::web_ingest::ingest_batch (cognitive 20) crates/mcp-brain-server/src/web_ingest.rs:50— mcp_brain_server::web_ingest::ingest_batch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), boolean chains 2, match/switch 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.
mcp_brain_server::bin::local::brain_search (cognitive 19) crates/mcp-brain-server/src/bin/local.rs:797— mcp_brain_server::bin::local::brain_search has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (2 pts), 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.
mcp_brain_server::routes::vote_memory (cognitive 18) crates/mcp-brain-server/src/routes.rs:2307— mcp_brain_server::routes::vote_memory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 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.
mcp_brain_server::routes::publish_node (cognitive 18) crates/mcp-brain-server/src/routes.rs:5140— mcp_brain_server::routes::publish_node has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4 (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.
mcp_brain_server::bin::local::aidefence_scan (cognitive 16) crates/mcp-brain-server/src/bin/local.rs:97— mcp_brain_server::bin::local::aidefence_scan has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (4 pts), loops 2 (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.
Duplicated block (26 lines × 2) crates/ruvector-cnn/src/quantize/graph_rewrite.rs:326— crates/ruvector-cnn/src/quantize/graph_rewrite.rs:326-351 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:370-395 — 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 (26 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:667— crates/ruvector-graph/src/cypher/parser.rs:667-692 | crates/rvlite/src/cypher/parser.rs:667-692 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (26 lines × 2) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:269— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:269-294 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:309-334 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 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 (26 lines × 2) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:114— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:114-139 | crates/ruvector-mincut/src/canonical/tree_packing/mod.rs:101-126 — `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-mincut/src/canonical/tree_packing/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (26 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:1336— crates/ruvector-postgres/src/graph/sparql/executor.rs:1336-1361 | crates/rvlite/src/sparql/executor.rs:666-691 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (26 lines × 2) crates/ruvix/crates/nucleus/src/kernel.rs:532— crates/ruvix/crates/nucleus/src/kernel.rs:532-557 | crates/ruvix/crates/nucleus/src/kernel.rs:569-594 — 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 (26 lines × 2) crates/rvf/rvf-runtime/src/qr_seed.rs:315— crates/rvf/rvf-runtime/src/qr_seed.rs:315-340 | crates/rvf/rvf-runtime/src/qr_seed.rs:382-407 — 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 (26 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:356— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:356-381 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:374-399 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (26 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:971— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:971-996 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1167-1192 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (26 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:136— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:136-161 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:185-210 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/utils.rs` and `patches/candle-core-0.9.2/src/cpu_backend/utils.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 259 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 (26 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:186— patches/candle-core-0.8.4/src/metal_backend/mod.rs:186-211 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:203-228 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (26 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:237— patches/candle-core-0.8.4/src/metal_backend/mod.rs:237-262 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:256-281 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (26 lines × 2) patches/candle-core-0.8.4/src/pickle.rs:345— patches/candle-core-0.8.4/src/pickle.rs:345-370 | patches/candle-core-0.9.2/src/pickle.rs:356-381 — before extracting anything, compare `patches/candle-core-0.8.4/src/pickle.rs` and `patches/candle-core-0.9.2/src/pickle.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 506 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 (26 lines × 2) patches/candle-core-0.8.4/src/quantized/cuda.rs:393— patches/candle-core-0.8.4/src/quantized/cuda.rs:393-418 | patches/candle-core-0.9.2/src/quantized/cuda.rs:554-579 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/cuda.rs` and `patches/candle-core-0.9.2/src/quantized/cuda.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 241 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 (26 lines × 2) patches/candle-core-0.8.4/src/quantized/cuda.rs:516— patches/candle-core-0.8.4/src/quantized/cuda.rs:516-541 | patches/candle-core-0.9.2/src/quantized/cuda.rs:767-792 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/cuda.rs` and `patches/candle-core-0.9.2/src/quantized/cuda.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 241 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 (26 lines × 2) patches/candle-core-0.8.4/src/storage.rs:135— patches/candle-core-0.8.4/src/storage.rs:135-160 | patches/candle-core-0.9.2/src/storage.rs:144-169 — before extracting anything, compare `patches/candle-core-0.8.4/src/storage.rs` and `patches/candle-core-0.9.2/src/storage.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 490 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 (26 lines × 2) patches/hnsw_rs/src/datamap.rs:244— patches/hnsw_rs/src/datamap.rs:244-269 | scripts/patches/hnsw_rs/src/datamap.rs:244-269 — before extracting anything, compare `patches/hnsw_rs/src/datamap.rs` and `scripts/patches/hnsw_rs/src/datamap.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 231 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 (26 lines × 2) patches/hnsw_rs/src/libext.rs:785— patches/hnsw_rs/src/libext.rs:785-810 | scripts/patches/hnsw_rs/src/libext.rs:785-810 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (6 lines × 4) crates/ruvector-graph-node/src/lib.rs:625— crates/ruvector-graph-node/src/lib.rs:625-630 | crates/ruvector-graph-node/src/lib.rs:980-985 | crates/ruvector-graph-node/src/lib.rs:1024-1029 | crates/ruvector-graph-node/src/lib.rs:1084-1089 — 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.
Duplicated block (6 lines × 4) crates/ruvector-kge-ffi/src/ops.rs:62— crates/ruvector-kge-ffi/src/ops.rs:62-67 | crates/ruvector-kge-wasm/src/ops.rs:62-67 | crates/ruvector-robotics/src/bridge/indexing.rs:105-110 | crates/ruvector-temporal-coherence/src/lib.rs:90-95 — before extracting anything, compare `crates/ruvector-kge-ffi/src/ops.rs` and `crates/ruvector-kge-wasm/src/ops.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 238 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 (6 lines × 4) crates/ruvector-streaming-qng/src/dataset.rs:35— crates/ruvector-streaming-qng/src/dataset.rs:35-41 | crates/ruvector-streaming-qng/src/dataset.rs:53-58 | crates/ruvector-streaming-qng/src/dataset.rs:70-75 | crates/ruvector-streaming-qng/src/dataset.rs:87-92 — 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.
Duplicated block (6 lines × 4) crates/ruvllm/src/backends/gemma2.rs:564— crates/ruvllm/src/backends/gemma2.rs:564-569 | crates/ruvllm/src/backends/phi3.rs:442-447 | crates/ruvllm/src/models/ruvltra.rs:738-743 | crates/ruvllm/src/models/ruvltra_medium.rs:718-723 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (6 lines × 4) crates/ruvllm/src/kv_cache.rs:468— crates/ruvllm/src/kv_cache.rs:468-475 | crates/ruvllm/src/kv_cache.rs:540-545 | crates/ruvllm/src/kv_cache.rs:603-610 | crates/ruvllm/src/kv_cache.rs:709-715 — 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.
Duplicated block (6 lines × 4) crates/ruvllm/src/quality/coherence.rs:743— crates/ruvllm/src/quality/coherence.rs:743-748 | crates/ruvllm/src/quality/scoring_engine.rs:863-868 | crates/ruvllm/src/reasoning_bank/distillation.rs:196-201 | crates/ruvllm/src/reflection/error_recovery.rs:377-382 — before extracting anything, compare `crates/ruvllm/src/quality/coherence.rs` and `crates/ruvllm/src/quality/scoring_engine.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 (6 lines × 4) patches/candle-core-0.8.4/src/cpu/mod.rs:74— patches/candle-core-0.8.4/src/cpu/mod.rs:74-79 | patches/candle-core-0.8.4/src/cpu/mod.rs:116-121 | patches/candle-core-0.9.2/src/cpu/mod.rs:93-98 | patches/candle-core-0.9.2/src/cpu/mod.rs:135-140 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu/mod.rs` and `patches/candle-core-0.9.2/src/cpu/mod.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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 (6 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:648— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:648-653 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:667-673 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:841-846 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:863-869 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (6 lines × 4) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1475— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1475-1480 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:1073-1079 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1967-1972 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1125-1131 — `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.8.4/src/metal_backend/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 37 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (6 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:410— patches/candle-core-0.8.4/src/quantized/k_quants.rs:410-415 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:678-683 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:438-443 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:729-734 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (6 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1318— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1318-1323 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1536-1541 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1584-1589 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1882-1887 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (6 lines × 4) patches/candle-core-0.8.4/src/tensor.rs:1633— patches/candle-core-0.8.4/src/tensor.rs:1633-1638 | patches/candle-core-0.8.4/src/tensor.rs:1664-1669 | patches/candle-core-0.9.2/src/tensor.rs:1957-1962 | patches/candle-core-0.9.2/src/tensor.rs:1988-1993 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (6 lines × 4) patches/hnsw_rs/src/hnsw.rs:590— patches/hnsw_rs/src/hnsw.rs:590-595 | patches/hnsw_rs/src/hnsw.rs:608-613 | scripts/patches/hnsw_rs/src/hnsw.rs:583-588 | scripts/patches/hnsw_rs/src/hnsw.rs:601-606 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (6 lines × 4) patches/hnsw_rs/src/libext.rs:920— patches/hnsw_rs/src/libext.rs:920-925 | patches/hnsw_rs/src/libext.rs:972-977 | scripts/patches/hnsw_rs/src/libext.rs:920-925 | scripts/patches/hnsw_rs/src/libext.rs:972-977 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (6 lines × 4) crates/ruvector-mincut/src/cluster/hierarchy.rs:290— crates/ruvector-mincut/src/cluster/hierarchy.rs:290-295 | crates/ruvector-mincut/src/fragmentation/mod.rs:169-174 | crates/ruvector-mincut/src/localkcut/deterministic.rs:441-446 | crates/ruvector-mincut/src/subpolynomial/mod.rs:994-999 — 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 (6 lines × 4) crates/ruvector-postgres/src/tenancy/isolation.rs:738— crates/ruvector-postgres/src/tenancy/isolation.rs:738-743 | crates/ruvector-postgres/src/tenancy/operations.rs:620-625 | crates/ruvector-postgres/src/tenancy/quotas.rs:585-590 | crates/ruvector-postgres/src/tenancy/registry.rs:597-602 — 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.
Duplicated block (6 lines × 4) patches/candle-core-0.8.4/src/metal_backend/mod.rs:2129— patches/candle-core-0.8.4/src/metal_backend/mod.rs:2129-2134 | patches/candle-core-0.8.4/src/quantized/metal.rs:204-209 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:2132-2137 | patches/candle-core-0.9.2/src/quantized/metal.rs:364-369 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (6 lines × 4) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:472— patches/candle-core-0.9.2/src/cuda_backend/mod.rs:472-477 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:527-532 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:581-586 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:633-638 — 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.
Duplicated block (22 lines × 2) crates/mcp-brain-server/src/gcs.rs:83— crates/mcp-brain-server/src/gcs.rs:83-104 | crates/mcp-brain-server/src/store.rs:180-201 — before extracting anything, compare `crates/mcp-brain-server/src/gcs.rs` and `crates/mcp-brain-server/src/store.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 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 (22 lines × 2) crates/ruvector-hailo-cluster/src/bin/bench.rs:134— crates/ruvector-hailo-cluster/src/bin/bench.rs:134-155 | crates/ruvector-hailo-cluster/src/bin/embed.rs:182-203 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 (22 lines × 2) crates/ruvector-kge-ffi/src/pipeline.rs:259— crates/ruvector-kge-ffi/src/pipeline.rs:259-280 | crates/ruvector-kge-wasm/src/pipeline.rs:259-280 — before extracting anything, compare `crates/ruvector-kge-ffi/src/pipeline.rs` and `crates/ruvector-kge-wasm/src/pipeline.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 216 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 (22 lines × 2) crates/ruvector-namespace-merge/src/router.rs:95— crates/ruvector-namespace-merge/src/router.rs:95-116 | crates/ruvector-namespace-merge/src/router.rs:260-281 — 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 (22 lines × 2) crates/ruvector-nervous-system-wasm/src/wta.rs:117— crates/ruvector-nervous-system-wasm/src/wta.rs:117-138 | crates/ruvector-nervous-system/src/compete/wta.rs:134-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (22 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:155— crates/ruvector-postgres/src/graph/sparql/executor.rs:155-176 | crates/rvlite/src/sparql/executor.rs:130-151 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (22 lines × 2) crates/ruvllm/src/quality/coherence.rs:717— crates/ruvllm/src/quality/coherence.rs:717-738 | crates/ruvllm/src/quality/scoring_engine.rs:827-848 — before extracting anything, compare `crates/ruvllm/src/quality/coherence.rs` and `crates/ruvllm/src/quality/scoring_engine.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 (22 lines × 2) crates/rvAgent/rvagent-cli/src/tui.rs:136— crates/rvAgent/rvagent-cli/src/tui.rs:136-157 | crates/rvAgent/rvagent-cli/src/tui.rs:174-195 — 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 (22 lines × 2) crates/rvf/rvf-runtime/src/witness.rs:346— crates/rvf/rvf-runtime/src/witness.rs:346-367 | crates/rvf/rvf-runtime/src/witness.rs:388-409 — 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 (22 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:384— patches/candle-core-0.8.4/src/backprop.rs:384-405 | patches/candle-core-0.9.2/src/backprop.rs:386-407 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (22 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:252— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:252-273 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:301-322 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/utils.rs` and `patches/candle-core-0.9.2/src/cpu_backend/utils.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 259 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 (22 lines × 2) patches/candle-core-0.8.4/src/npy.rs:40— patches/candle-core-0.8.4/src/npy.rs:40-61 | patches/candle-core-0.9.2/src/npy.rs:40-61 — before extracting anything, compare `patches/candle-core-0.8.4/src/npy.rs` and `patches/candle-core-0.9.2/src/npy.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 283 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 (22 lines × 2) patches/candle-core-0.8.4/src/storage.rs:685— patches/candle-core-0.8.4/src/storage.rs:685-706 | patches/candle-core-0.9.2/src/storage.rs:746-767 — before extracting anything, compare `patches/candle-core-0.8.4/src/storage.rs` and `patches/candle-core-0.9.2/src/storage.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 490 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 (22 lines × 2) patches/candle-core-0.8.4/src/storage.rs:716— patches/candle-core-0.8.4/src/storage.rs:716-737 | patches/candle-core-0.9.2/src/storage.rs:777-798 — before extracting anything, compare `patches/candle-core-0.8.4/src/storage.rs` and `patches/candle-core-0.9.2/src/storage.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 490 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 (22 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:1632— patches/candle-core-0.8.4/src/tensor.rs:1632-1653 | patches/candle-core-0.9.2/src/tensor.rs:1956-1977 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (22 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:2063— patches/candle-core-0.8.4/src/tensor.rs:2063-2084 | patches/candle-core-0.9.2/src/tensor.rs:2386-2407 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (22 lines × 2) patches/hnsw_rs/src/hnswio.rs:1157— patches/hnsw_rs/src/hnswio.rs:1157-1178 | scripts/patches/hnsw_rs/src/hnswio.rs:1157-1178 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (7 lines × 4) crates/prime-radiant/src/simd/energy.rs:168— crates/prime-radiant/src/simd/energy.rs:168-174 | crates/prime-radiant/src/simd/energy.rs:237-243 | crates/prime-radiant/src/simd/vectors.rs:60-67 | crates/prime-radiant/src/simd/vectors.rs:295-301 — before extracting anything, compare `crates/prime-radiant/src/simd/energy.rs` and `crates/prime-radiant/src/simd/vectors.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (7 lines × 4) crates/ruvector-attention/src/curvature/fused_attention.rs:364— crates/ruvector-attention/src/curvature/fused_attention.rs:364-370 | crates/ruvector-attention/src/pde_attention/diffusion.rs:267-273 | crates/ruvector-attention/src/topology/gated_attention.rs:327-333 | crates/ruvector-attention/src/transport/centroid_ot.rs:373-379 — before extracting anything, compare `crates/ruvector-attention/src/curvature/fused_attention.rs` and `crates/ruvector-attention/src/pde_attention/diffusion.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (7 lines × 4) crates/ruvector-bench/src/bin/memory_benchmark.rs:97— crates/ruvector-bench/src/bin/memory_benchmark.rs:97-103 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:135-141 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:219-225 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:299-305 — before extracting anything, compare `crates/ruvector-bench/src/bin/memory_benchmark.rs` and `crates/ruvector-bench/src/bin/profiling_benchmark.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 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 (7 lines × 4) crates/ruvector-graph-transformer-node/src/lib.rs:333— crates/ruvector-graph-transformer-node/src/lib.rs:333-339 | crates/ruvector-graph-transformer-node/src/lib.rs:573-579 | crates/ruvector-graph-transformer-node/src/lib.rs:658-664 | crates/ruvector-graph-transformer-node/src/lib.rs:739-745 — 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.
Duplicated block (7 lines × 4) crates/ruvector-math/src/information_geometry/fisher.rs:204— crates/ruvector-math/src/information_geometry/fisher.rs:204-210 | crates/ruvector-math/src/information_geometry/kfac.rs:162-168 | crates/ruvector-math/src/information_geometry/kfac.rs:172-178 | crates/ruvector-math/src/information_geometry/kfac.rs:241-247 — before extracting anything, compare `crates/ruvector-math/src/information_geometry/fisher.rs` and `crates/ruvector-math/src/information_geometry/kfac.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 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 (7 lines × 4) crates/ruvector-postgres/src/distance/simd.rs:1508— crates/ruvector-postgres/src/distance/simd.rs:1508-1514 | crates/ruvector-postgres/src/distance/simd.rs:1537-1543 | crates/ruvector-postgres/src/distance/simd.rs:1574-1580 | crates/ruvector-postgres/src/distance/simd.rs:1600-1606 — 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.
Duplicated block (7 lines × 4) crates/ruvector-postgres/src/types/binaryvec.rs:352— crates/ruvector-postgres/src/types/binaryvec.rs:352-358 | crates/ruvector-postgres/src/types/productvec.rs:371-377 | crates/ruvector-postgres/src/types/scalarvec.rs:397-403 | crates/ruvector-postgres/src/types/sparsevec.rs:438-444 — before extracting anything, compare `crates/ruvector-postgres/src/types/binaryvec.rs` and `crates/ruvector-postgres/src/types/scalarvec.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 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 (7 lines × 4) crates/ruvector-postgres/src/types/binaryvec.rs:375— crates/ruvector-postgres/src/types/binaryvec.rs:375-381 | crates/ruvector-postgres/src/types/productvec.rs:394-400 | crates/ruvector-postgres/src/types/scalarvec.rs:420-426 | crates/ruvector-postgres/src/types/sparsevec.rs:461-467 — before extracting anything, compare `crates/ruvector-postgres/src/types/binaryvec.rs` and `crates/ruvector-postgres/src/types/scalarvec.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 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 (7 lines × 4) crates/rvf/rvf-adapters/agentic-flow/src/swarm_store.rs:298— crates/rvf/rvf-adapters/agentic-flow/src/swarm_store.rs:298-304 | crates/rvf/rvf-adapters/sona/src/experience.rs:288-294 | crates/rvf/rvf-adapters/sona/src/pattern.rs:279-285 | crates/rvf/rvf-adapters/sona/src/trajectory.rs:279-285 — 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 (7 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:479— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:479-485 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:588-594 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:616-622 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:774-780 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (7 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:189— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:189-195 | patches/candle-core-0.8.4/src/cpu_backend/utils.rs:230-236 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:238-244 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:279-285 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/utils.rs` and `patches/candle-core-0.9.2/src/cpu_backend/utils.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 259 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 (7 lines × 4) patches/candle-core-0.8.4/src/npy.rs:266— patches/candle-core-0.8.4/src/npy.rs:266-272 | patches/candle-core-0.8.4/src/npy.rs:290-296 | patches/candle-core-0.9.2/src/npy.rs:293-299 | patches/candle-core-0.9.2/src/npy.rs:317-323 — before extracting anything, compare `patches/candle-core-0.8.4/src/npy.rs` and `patches/candle-core-0.9.2/src/npy.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 283 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 (7 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:371— patches/candle-core-0.8.4/src/quantized/k_quants.rs:371-377 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:474-480 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:395-401 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:501-507 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (7 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1185— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1185-1191 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1375-1381 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1387-1393 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1641-1647 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (7 lines × 4) crates/ruvector-capgated/src/bin/benchmark.rs:39— crates/ruvector-capgated/src/bin/benchmark.rs:39-45 | crates/ruvector-diverse-beam/src/bin/benchmark.rs:63-69 | crates/ruvector-retrieval-receipt/src/bin/batch_latency.rs:44-50 | crates/ruvector-speculative-ann/src/bin/benchmark.rs:57-63 — 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 (7 lines × 4) patches/hnsw_rs/src/hnswio.rs:442— patches/hnsw_rs/src/hnswio.rs:442-448 | patches/hnsw_rs/src/hnswio.rs:541-548 | scripts/patches/hnsw_rs/src/hnswio.rs:442-448 | scripts/patches/hnsw_rs/src/hnswio.rs:541-548 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (7 lines × 4) crates/rvf/rvf-adapters/agentic-flow/src/swarm_store.rs:300— crates/rvf/rvf-adapters/agentic-flow/src/swarm_store.rs:300-306 | crates/rvf/rvf-adapters/claude-flow/src/memory_store.rs:285-291 | crates/rvf/rvf-adapters/sona/src/experience.rs:290-296 | crates/rvf/rvf-adapters/sona/src/trajectory.rs:281-287 — 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) crates/prime-radiant/src/substrate/edge.rs:218— crates/prime-radiant/src/substrate/edge.rs:218-222 | crates/prime-radiant/src/substrate/edge.rs:339-343 | crates/prime-radiant/src/substrate/node.rs:94-98 | crates/prime-radiant/src/substrate/node.rs:128-132 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 4) crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:168— crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:168-172 | crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:225-229 | crates/ruvector-attention/src/sheaf/sparse.rs:432-436 | crates/ruvector-gnn/src/layer.rs:512-516 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 4) crates/ruvector-core/src/cache_optimized.rs:328— crates/ruvector-core/src/cache_optimized.rs:328-333 | crates/ruvector-core/src/simd_intrinsics.rs:93-101 | crates/ruvector-core/src/simd_intrinsics.rs:1127-1132 | crates/ruvector-postgres/src/distance/simd.rs:1086-1090 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvector-postgres/src/distance/simd.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 (5 lines × 4) crates/ruvector-postgres/src/distance/simd.rs:1020— crates/ruvector-postgres/src/distance/simd.rs:1020-1025 | crates/ruvector-postgres/src/distance/simd.rs:1061-1065 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:356-362 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:439-443 — before extracting anything, compare `crates/ruvector-postgres/src/distance/simd.rs` and `crates/ruvix/crates/vecgraph/src/simd_distance.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 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 (5 lines × 4) crates/ruvector-postgres/src/distance/simd.rs:1540— crates/ruvector-postgres/src/distance/simd.rs:1540-1545 | crates/ruvector-postgres/src/distance/simd.rs:1577-1581 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:206-212 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:295-299 — before extracting anything, compare `crates/ruvector-postgres/src/distance/simd.rs` and `crates/ruvix/crates/vecgraph/src/simd_distance.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 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 (5 lines × 4) crates/ruvector-postgres/src/index/ivfflat_am.rs:639— crates/ruvector-postgres/src/index/ivfflat_am.rs:639-643 | crates/ruvector-postgres/src/index/ivfflat_am.rs:848-852 | crates/ruvector-postgres/src/index/ivfflat_storage.rs:103-107 | crates/ruvector-postgres/src/index/ivfflat_storage.rs:200-204 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 4) crates/ruvector-wasm/kernels/rmsnorm.rs:104— crates/ruvector-wasm/kernels/rmsnorm.rs:104-108 | crates/ruvector-wasm/kernels/rmsnorm.rs:189-200 | crates/ruvector-wasm/kernels/swiglu.rs:120-124 | crates/ruvector-wasm/kernels/swiglu.rs:174-179 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:478— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:478-482 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:533-537 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:615-619 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:675-679 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (5 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:746— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:746-750 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:970-975 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:942-946 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1166-1171 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (5 lines × 4) patches/candle-core-0.8.4/src/metal_backend/mod.rs:325— patches/candle-core-0.8.4/src/metal_backend/mod.rs:325-329 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:380-384 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:344-348 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:400-404 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (5 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1324— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1324-1328 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1542-1546 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1590-1594 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1888-1892 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (5 lines × 4) patches/candle-core-0.8.4/src/tensor.rs:2149— patches/candle-core-0.8.4/src/tensor.rs:2149-2153 | patches/candle-core-0.8.4/src/tensor.rs:2160-2164 | patches/candle-core-0.9.2/src/tensor.rs:2472-2476 | patches/candle-core-0.9.2/src/tensor.rs:2483-2487 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (5 lines × 4) patches/candle-core-0.9.2/src/quantized/k_quants.rs:898— patches/candle-core-0.9.2/src/quantized/k_quants.rs:898-902 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1214-1218 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1529-1533 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1806-1810 — 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.
Duplicated block (5 lines × 4) patches/hnsw_rs/src/hnswio.rs:1073— patches/hnsw_rs/src/hnswio.rs:1073-1077 | patches/hnsw_rs/src/hnswio.rs:1328-1332 | scripts/patches/hnsw_rs/src/hnswio.rs:1073-1077 | scripts/patches/hnsw_rs/src/hnswio.rs:1328-1332 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (5 lines × 4) crates/ruvector-cli/src/cli/hooks.rs:711— crates/ruvector-cli/src/cli/hooks.rs:711-715 | crates/ruvector-mincut/src/snn/optimizer.rs:655-659 | crates/ruvector-robotics/src/cognitive/memory_system.rs:120-124 | crates/ruvllm/src/context/working_memory.rs:368-375 — 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) crates/ruvector-sparse-inference/src/backend/cpu.rs:437— crates/ruvector-sparse-inference/src/backend/cpu.rs:437-441 | crates/ruvector-sparse-inference/src/backend/wasm.rs:199-203 | crates/ruvllm/src/kernels/activations.rs:202-206 | crates/ruvllm/src/kernels/ane_ops.rs:628-632 — 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) REDACTED:813— REDACTED:813-817 | REDACTED:818-822 | REDACTED:823-827 | REDACTED:828-832 — 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.
Duplicated block (25 lines × 2) crates/ruvector-core/src/advanced_features/matryoshka.rs:237— crates/ruvector-core/src/advanced_features/matryoshka.rs:237-261 | crates/ruvector-core/src/advanced_features/matryoshka.rs:399-423 — 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 (25 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:1135— crates/ruvector-graph-transformer-node/src/transformer.rs:1135-1159 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:1218-1242 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (25 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:733— crates/ruvector-graph/src/cypher/parser.rs:733-757 | crates/rvlite/src/cypher/parser.rs:733-757 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (25 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:1194— crates/ruvector-postgres/src/graph/sparql/executor.rs:1194-1218 | crates/rvlite/src/sparql/executor.rs:560-584 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (25 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1825— crates/ruvector-postgres/src/graph/sparql/parser.rs:1825-1849 | crates/rvlite/src/sparql/parser.rs:1832-1856 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (25 lines × 2) crates/ruvector-solver/src/types.rs:103— crates/ruvector-solver/src/types.rs:103-127 | crates/ruvector-solver/src/types.rs:187-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 (25 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:315— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:315-339 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:333-357 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (25 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2593— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2593-2617 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:3214-3238 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (25 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:267— patches/candle-core-0.8.4/src/metal_backend/mod.rs:267-291 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:286-310 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (25 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:917— patches/candle-core-0.8.4/src/metal_backend/mod.rs:917-941 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:963-987 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (25 lines × 2) patches/candle-core-0.8.4/src/pickle.rs:568— patches/candle-core-0.8.4/src/pickle.rs:568-592 | patches/candle-core-0.9.2/src/pickle.rs:579-603 — before extracting anything, compare `patches/candle-core-0.8.4/src/pickle.rs` and `patches/candle-core-0.9.2/src/pickle.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 506 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 (25 lines × 2) patches/candle-core-0.8.4/src/quantized/cuda.rs:564— patches/candle-core-0.8.4/src/quantized/cuda.rs:564-588 | patches/candle-core-0.9.2/src/quantized/cuda.rs:815-839 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/cuda.rs` and `patches/candle-core-0.9.2/src/quantized/cuda.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 241 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 (25 lines × 2) patches/candle-core-0.8.4/src/quantized/gguf_file.rs:289— patches/candle-core-0.8.4/src/quantized/gguf_file.rs:289-313 | patches/candle-core-0.9.2/src/quantized/gguf_file.rs:290-314 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/gguf_file.rs` and `patches/candle-core-0.9.2/src/quantized/gguf_file.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 280 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 (25 lines × 2) patches/candle-core-0.8.4/src/quantized/gguf_file.rs:327— patches/candle-core-0.8.4/src/quantized/gguf_file.rs:327-351 | patches/candle-core-0.9.2/src/quantized/gguf_file.rs:328-352 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/gguf_file.rs` and `patches/candle-core-0.9.2/src/quantized/gguf_file.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 280 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 (25 lines × 2) patches/candle-core-0.8.4/src/quantized/gguf_file.rs:499— patches/candle-core-0.8.4/src/quantized/gguf_file.rs:499-523 | patches/candle-core-0.9.2/src/quantized/gguf_file.rs:500-524 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/gguf_file.rs` and `patches/candle-core-0.9.2/src/quantized/gguf_file.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 280 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 (25 lines × 2) patches/candle-core-0.8.4/src/storage.rs:336— patches/candle-core-0.8.4/src/storage.rs:336-360 | patches/candle-core-0.9.2/src/storage.rs:345-369 — before extracting anything, compare `patches/candle-core-0.8.4/src/storage.rs` and `patches/candle-core-0.9.2/src/storage.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 490 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 (23 lines × 2) crates/mcp-brain-server/src/notify.rs:292— crates/mcp-brain-server/src/notify.rs:292-314 | crates/mcp-brain-server/src/notify.rs:349-371 — 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 × 2) crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:161— crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:161-183 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:264-286 — 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 × 2) crates/ruvector-cnn/src/backbone/mobilenet.rs:204— crates/ruvector-cnn/src/backbone/mobilenet.rs:204-226 | crates/ruvector-cnn/src/backbone/mobilenet.rs:316-338 — 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 × 2) crates/ruvector-graph-node/src/cypher_exec.rs:393— crates/ruvector-graph-node/src/cypher_exec.rs:393-415 | crates/ruvector-py/src/graph/cypher_exec.rs:107-129 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_exec.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 147 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 (23 lines × 2) crates/ruvector-kge-ffi/src/model.rs:171— crates/ruvector-kge-ffi/src/model.rs:171-193 | crates/ruvector-kge-wasm/src/model.rs:171-193 — before extracting anything, compare `crates/ruvector-kge-ffi/src/model.rs` and `crates/ruvector-kge-wasm/src/model.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 189 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 (23 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:575— crates/ruvector-postgres/src/graph/sparql/parser.rs:575-597 | crates/rvlite/src/sparql/parser.rs:581-603 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (23 lines × 2) crates/ruvector-postgres/src/index/ivfflat_am.rs:754— crates/ruvector-postgres/src/index/ivfflat_am.rs:754-776 | crates/ruvector-postgres/src/index/ivfflat_am.rs:804-826 — 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 × 2) crates/ruvix/crates/vecgraph/src/simd_distance.rs:225— crates/ruvix/crates/vecgraph/src/simd_distance.rs:225-247 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:373-395 — 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 × 2) crates/ruvllm/src/quantize/pi_quant_simd.rs:549— crates/ruvllm/src/quantize/pi_quant_simd.rs:549-571 | crates/ruvllm/src/quantize/pi_quant_simd.rs:801-823 — 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 × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1183— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1183-1205 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1291-1313 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (23 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1458— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1458-1480 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1950-1972 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (23 lines × 2) patches/candle-core-0.8.4/src/display.rs:444— patches/candle-core-0.8.4/src/display.rs:444-466 | patches/candle-core-0.9.2/src/display.rs:455-477 — before extracting anything, compare `patches/candle-core-0.8.4/src/display.rs` and `patches/candle-core-0.9.2/src/display.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 304 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 (23 lines × 2) patches/candle-core-0.8.4/src/layout.rs:131— patches/candle-core-0.8.4/src/layout.rs:131-153 | patches/candle-core-0.9.2/src/layout.rs:131-153 — before extracting anything, compare `patches/candle-core-0.8.4/src/layout.rs` and `patches/candle-core-0.9.2/src/layout.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 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 (23 lines × 2) patches/candle-core-0.8.4/src/layout.rs:166— patches/candle-core-0.8.4/src/layout.rs:166-188 | patches/candle-core-0.9.2/src/layout.rs:166-188 — before extracting anything, compare `patches/candle-core-0.8.4/src/layout.rs` and `patches/candle-core-0.9.2/src/layout.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 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 (23 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1187— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1187-1209 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1389-1411 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (23 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:1972— patches/candle-core-0.8.4/src/tensor.rs:1972-1994 | patches/candle-core-0.9.2/src/tensor.rs:2296-2318 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×15
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvector-attention-cli/src/commands/serve.rs:110— crates/ruvector-attention-cli/src/commands/serve.rs:110-132 | crates/ruvector-attention-cli/src/commands/serve.rs:137-161 | crates/ruvector-attention-cli/src/commands/serve.rs:166-190 | crates/ruvector-attention-cli/src/commands/serve.rs:195-218 | crates/ruvector-attention-cli/src/commands/serve.rs:223-246 | crates/ruvector-attention-cli/src/commands/serve.rs:251-276 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvector-cnn/src/layers/conv.rs:394— crates/ruvector-cnn/src/layers/conv.rs:394-439 | crates/ruvector-cnn/src/layers/conv.rs:630-659 | crates/ruvector-cnn/src/layers/quantized_conv2d.rs:231-281 | crates/ruvector-cnn/src/layers/quantized_depthwise.rs:186-232 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:43-94 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:134-201 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvector-fpga-transformer/src/backend/native_sim.rs:463— crates/ruvector-fpga-transformer/src/backend/native_sim.rs:463-475 | crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs:293-308 | crates/ruvector-fpga-transformer/src/quant/lut.rs:147-168 | crates/ruvector-mincut-gated-transformer/src/attention/window.rs:168-190 | crates/ruvector-mincut-gated-transformer/src/attention/window.rs:332-351 | crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs:426-445 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvector-graph-transformer-node/src/transformer.rs:71— crates/ruvector-graph-transformer-node/src/transformer.rs:71-96 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:81-106 | crates/ruvector-verified/src/proof_store.rs:71-98 | crates/ruvix/crates/nucleus/src/witness_log.rs:204-230 | crates/rvf/rvf-crypto/src/attestation.rs:45-90 | crates/rvf/rvf-crypto/src/witness.rs:42-58 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvector-hailo-cluster/src/bin/bench.rs:31— crates/ruvector-hailo-cluster/src/bin/bench.rs:31-671 | crates/ruvector-hailo-cluster/src/bin/embed.rs:30-630 | crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:37-367 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:138-452 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:50-329 | crates/ruvector-hailo-cluster/src/bin/stats.rs:31-488 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:263— crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:263-290 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:293-317 | crates/ruvector-mincut-gated-transformer/src/kv_cache/legacy.rs:84-108 | crates/ruvector-rabitq/src/rotation.rs:220-237 | crates/ruvector-turboquant/src/rotation.rs:186-210 | crates/rvf/rvf-quant/src/rabitq.rs:102-118 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvector-sota-bench/src/runners/hybrid.rs:46— crates/ruvector-sota-bench/src/runners/hybrid.rs:46-94 | crates/ruvector-sota-bench/src/runners/lsm_ann.rs:13-81 | crates/ruvector-sota-bench/src/runners/matryoshka.rs:61-119 | crates/ruvector-sota-bench/src/runners/mteb.rs:154-235 | crates/ruvector-sota-bench/src/runners/rabitq.rs:26-69 | crates/ruvector-sota-bench/src/runners/vdbbench.rs:56-144 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvix/crates/smp/src/barriers.rs:86— crates/ruvix/crates/smp/src/barriers.rs:86-98 | crates/ruvix/crates/smp/src/barriers.rs:110-121 | crates/ruvix/crates/smp/src/barriers.rs:132-143 | crates/ruvix/crates/smp/src/barriers.rs:179-190 | crates/ruvix/crates/smp/src/barriers.rs:200-211 | crates/ruvix/crates/smp/src/barriers.rs:242-254 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvllm/src/kv_cache.rs:457— crates/ruvllm/src/kv_cache.rs:457-502 | crates/ruvllm/src/kv_cache.rs:534-565 | crates/ruvllm/src/kv_cache.rs:593-629 | crates/ruvllm/src/kv_cache.rs:703-728 | crates/ruvllm/src/speculative.rs:989-1138 | crates/ruvllm/src/speculative.rs:1166-1222 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/ruvllm/src/models/openmythos/mod.rs:392— crates/ruvllm/src/models/openmythos/mod.rs:392-415 | crates/ruvllm/src/models/openmythos/mod.rs:427-472 | crates/ruvllm/src/models/openmythos/mod.rs:488-533 | crates/ruvllm/src/models/rdt.rs:794-816 | crates/ruvllm/src/models/rdt.rs:826-859 | crates/ruvllm/src/models/rdt.rs:870-904 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) patches/candle-core-0.8.4/src/conv.rs:154— patches/candle-core-0.8.4/src/conv.rs:154-190 | patches/candle-core-0.8.4/src/conv.rs:224-256 | patches/candle-core-0.8.4/src/conv.rs:281-314 | patches/candle-core-0.9.2/src/conv.rs:168-205 | patches/candle-core-0.9.2/src/conv.rs:239-271 | patches/candle-core-0.9.2/src/conv.rs:308-341 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:304— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:304-339 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:345-381 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:417-448 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:322-357 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:363-399 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:435-466 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1256— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1256-1321 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1330-1412 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1421-1530 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1364-1438 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1447-1529 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1538-1647 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:83— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:83-105 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:115-129 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:240-254 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:109-130 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:140-160 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:271-291 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) patches/candle-core-0.8.4/src/tensor.rs:1352— patches/candle-core-0.8.4/src/tensor.rs:1352-1396 | patches/candle-core-0.8.4/src/tensor.rs:1468-1516 | patches/candle-core-0.8.4/src/tensor.rs:1529-1559 | patches/candle-core-0.9.2/src/tensor.rs:1610-1642 | patches/candle-core-0.9.2/src/tensor.rs:1792-1840 | patches/candle-core-0.9.2/src/tensor.rs:1853-1883 — These 6 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 6 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 6 times.
Duplicated block (9 lines × 4) crates/mcp-brain/src/tools.rs:376— crates/mcp-brain/src/tools.rs:376-384 | crates/mcp-brain/src/tools.rs:705-713 | crates/ruvllm/src/policy_store.rs:397-405 | crates/ruvllm/src/witness_log.rs:638-646 — before extracting anything, compare `crates/ruvllm/src/policy_store.rs` and `crates/ruvllm/src/witness_log.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 (9 lines × 4) crates/ruvector-cnn/src/layers/pooling.rs:102— crates/ruvector-cnn/src/layers/pooling.rs:102-110 | crates/ruvector-cnn/src/layers/pooling.rs:204-212 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:48-56 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:139-147 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 4) crates/ruvector-core/src/simd_intrinsics.rs:131— crates/ruvector-core/src/simd_intrinsics.rs:131-139 | crates/ruvector-postgres/src/distance/simd.rs:1274-1282 | crates/ruvector-postgres/src/distance/simd.rs:1355-1363 | crates/ruvector-postgres/src/distance/simd.rs:1446-1454 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvector-postgres/src/distance/simd.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 (9 lines × 4) crates/ruvector-domain-expansion/src/planning.rs:358— crates/ruvector-domain-expansion/src/planning.rs:358-366 | crates/ruvector-domain-expansion/src/rust_synthesis.rs:325-333 | crates/ruvector-domain-expansion/src/tool_orchestration.rs:384-392 | crates/ruvector-robotics/src/domain_expansion.rs:613-621 — 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 (9 lines × 4) crates/ruvector-gnn/src/compress.rs:321— crates/ruvector-gnn/src/compress.rs:321-329 | crates/ruvector-postgres/src/quantization/binary.rs:27-35 | crates/ruvector-postgres/src/types/binaryvec.rs:50-58 | crates/ruvector-router-core/src/quantization.rs:121-129 — before extracting anything, compare `crates/ruvector-postgres/src/quantization/binary.rs` and `crates/ruvector-postgres/src/types/binaryvec.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 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 (9 lines × 4) crates/ruvector-postgres/src/distance/simd.rs:130— crates/ruvector-postgres/src/distance/simd.rs:130-138 | crates/ruvector-postgres/src/distance/simd.rs:213-221 | crates/ruvector-postgres/src/distance/simd.rs:244-252 | crates/ruvector-postgres/src/distance/simd.rs:277-285 — 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.
Duplicated block (9 lines × 4) crates/ruvix/crates/nucleus/src/kernel.rs:470— crates/ruvix/crates/nucleus/src/kernel.rs:470-478 | crates/ruvix/crates/nucleus/src/kernel.rs:531-539 | crates/ruvix/crates/nucleus/src/kernel.rs:568-576 | crates/ruvix/crates/nucleus/src/kernel.rs:603-611 — 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.
Duplicated block (9 lines × 4) crates/rvf/rvf-cli/src/cmd/verify_attestation.rs:37— crates/rvf/rvf-cli/src/cmd/verify_attestation.rs:37-45 | crates/rvf/rvf-cli/src/cmd/verify_witness.rs:45-53 | crates/rvf/rvf-runtime/src/store.rs:4437-4445 | crates/rvf/rvf-wasm/src/segment.rs:35-43 — before extracting anything, compare `crates/rvf/rvf-cli/src/cmd/verify_attestation.rs` and `crates/rvf/rvf-cli/src/cmd/verify_witness.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 (9 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:201— patches/candle-core-0.8.4/src/quantized/k_quants.rs:201-209 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:403-411 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:218-226 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:431-439 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (9 lines × 4) patches/candle-core-0.8.4/src/tensor.rs:1171— patches/candle-core-0.8.4/src/tensor.rs:1171-1179 | patches/candle-core-0.8.4/src/tensor.rs:1209-1217 | patches/candle-core-0.9.2/src/tensor.rs:1352-1360 | patches/candle-core-0.9.2/src/tensor.rs:1390-1398 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (9 lines × 4) patches/candle-core-0.9.2/src/quantized/cuda.rs:622— patches/candle-core-0.9.2/src/quantized/cuda.rs:622-630 | patches/candle-core-0.9.2/src/quantized/cuda.rs:650-658 | patches/candle-core-0.9.2/src/quantized/cuda.rs:679-687 | patches/candle-core-0.9.2/src/quantized/cuda.rs:703-711 — 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.
Duplicated block (9 lines × 4) patches/hnsw_rs/src/hnsw.rs:1540— patches/hnsw_rs/src/hnsw.rs:1540-1548 | patches/hnsw_rs/src/hnsw.rs:1600-1608 | scripts/patches/hnsw_rs/src/hnsw.rs:1426-1434 | scripts/patches/hnsw_rs/src/hnsw.rs:1486-1494 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (9 lines × 4) patches/hnsw_rs/src/hnswio.rs:483— patches/hnsw_rs/src/hnswio.rs:483-491 | patches/hnsw_rs/src/hnswio.rs:581-589 | scripts/patches/hnsw_rs/src/hnswio.rs:483-491 | scripts/patches/hnsw_rs/src/hnswio.rs:581-589 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (9 lines × 4) crates/ruvector-graph-condense/src/regions.rs:130— crates/ruvector-graph-condense/src/regions.rs:130-138 | crates/ruvector-robotics/src/bridge/indexing.rs:82-90 | crates/ruvector-speculative-ann/src/lib.rs:76-84 | crates/rvf/rvf-quant/src/product.rs:157-165 — 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 (9 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:306— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:306-314 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:347-355 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:324-332 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:365-373 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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.
SparqlParser::parse_literal (cyclomatic 26) crates/ruvector-postgres/src/graph/sparql/parser.rs:2035— SparqlParser::parse_literal 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.
SparqlParser::parse_literal (cyclomatic 26) crates/rvlite/src/sparql/parser.rs:2042— SparqlParser::parse_literal 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.
SparqlParser::parse_primary_expression (cyclomatic 25) crates/ruvector-postgres/src/graph/sparql/parser.rs:791— SparqlParser::parse_primary_expression has cyclomatic complexity 25 (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.
SparqlParser::parse_primary_expression (cyclomatic 25) crates/rvlite/src/sparql/parser.rs:797— SparqlParser::parse_primary_expression has cyclomatic complexity 25 (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.
SparqlParser::parse_graph_pattern_inner (cyclomatic 24) crates/ruvector-postgres/src/graph/sparql/parser.rs:248— SparqlParser::parse_graph_pattern_inner 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.
SparqlParser::parse_graph_pattern_inner (cyclomatic 24) crates/rvlite/src/sparql/parser.rs:247— SparqlParser::parse_graph_pattern_inner 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.
SparqlParser::parse_numeric_literal (cyclomatic 21) crates/ruvector-postgres/src/graph/sparql/parser.rs:2127— SparqlParser::parse_numeric_literal 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.
SparqlParser::parse_numeric_literal (cyclomatic 21) crates/rvlite/src/sparql/parser.rs:2134— SparqlParser::parse_numeric_literal 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.
SparqlParser::parse_solution_modifiers (cyclomatic 17) crates/ruvector-postgres/src/graph/sparql/parser.rs:1257— SparqlParser::parse_solution_modifiers 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.
SparqlParser::parse_solution_modifiers (cyclomatic 17) crates/rvlite/src/sparql/parser.rs:1263— SparqlParser::parse_solution_modifiers 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.
SparqlParser::parse_relational_expression (cyclomatic 16) crates/ruvector-postgres/src/graph/sparql/parser.rs:677— SparqlParser::parse_relational_expression 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.
SparqlParser::try_parse_aggregate (cyclomatic 16) crates/ruvector-postgres/src/graph/sparql/parser.rs:1033— SparqlParser::try_parse_aggregate 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.
SparqlParser::parse_relational_expression (cyclomatic 16) crates/rvlite/src/sparql/parser.rs:683— SparqlParser::parse_relational_expression 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.
SparqlParser::try_parse_aggregate (cyclomatic 16) crates/rvlite/src/sparql/parser.rs:1039— SparqlParser::try_parse_aggregate 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.
ruvix_cli::commands::monitor::run_monitor_loop (cognitive 71) crates/ruvix/crates/cli/src/commands/monitor.rs:348— ruvix_cli::commands::monitor::run_monitor_loop has cognitive complexity 71 (threshold 15). Drivers by points: if/else 20 (59 pts), match/switch 2 (7 pts), loops 2 (5 pts) (nesting depth added 47). 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.
ruvix_cli::commands::dtb::search_compatible_string (cognitive 35) crates/ruvix/crates/cli/src/commands/dtb.rs:671— ruvix_cli::commands::dtb::search_compatible_string has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (28 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 25). 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.
ruvix_cli::commands::keys::execute_list (cognitive 34) crates/ruvix/crates/cli/src/commands/keys.rs:593— ruvix_cli::commands::keys::execute_list has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (7 pts), match/switch 3 (6 pts), boolean chains 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.
ruvix_cli::commands::dtb::search_property_in_root (cognitive 25) crates/ruvix/crates/cli/src/commands/dtb.rs:617— ruvix_cli::commands::dtb::search_property_in_root has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 16). 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.
ruvix_cli::commands::monitor::display_hex (cognitive 24) crates/ruvix/crates/cli/src/commands/monitor.rs:547— ruvix_cli::commands::monitor::display_hex has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvix_cli::commands::dtb::search_and_print_property (cognitive 23) crates/ruvix/crates/cli/src/commands/dtb.rs:911— ruvix_cli::commands::dtb::search_and_print_property has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (4 pts), match/switch 1 (2 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. This shape REPEATS in the file: one other method here (ruvix_cli::commands::dtb::search_and_print_value) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvix_cli::commands::dtb::search_and_print_value (cognitive 23) crates/ruvix/crates/cli/src/commands/dtb.rs:1014— ruvix_cli::commands::dtb::search_and_print_value has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (4 pts), match/switch 1 (2 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. This shape REPEATS in the file: one other method here (ruvix_cli::commands::dtb::search_and_print_property) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvix_cli::commands::monitor::auto_detect_port (cognitive 20) crates/ruvix/crates/cli/src/commands/monitor.rs:261— ruvix_cli::commands::monitor::auto_detect_port has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 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.
ruvix_cli::commands::security::execute_audit (cognitive 20) crates/ruvix/crates/cli/src/commands/security.rs:270— ruvix_cli::commands::security::execute_audit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 3 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ruvix_cli::commands::dtb::print_structure_summary (cognitive 19) crates/ruvix/crates/cli/src/commands/dtb.rs:738— ruvix_cli::commands::dtb::print_structure_summary has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), match/switch 1 (2 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.
ruvix_cli::commands::dtb::search_and_print_nodes (cognitive 19) crates/ruvix/crates/cli/src/commands/dtb.rs:965— ruvix_cli::commands::dtb::search_and_print_nodes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 1 (2 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.
ruvix_cli::commands::dtb::generate_dts (cognitive 18) crates/ruvix/crates/cli/src/commands/dtb.rs:820— ruvix_cli::commands::dtb::generate_dts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 1 (2 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.
ruvix_cli::commands::keys::execute_generate (cognitive 17) crates/ruvix/crates/cli/src/commands/keys.rs:266— ruvix_cli::commands::keys::execute_generate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 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.
ruvix_cli::commands::dtb::execute_validate (cognitive 16) crates/ruvix/crates/cli/src/commands/dtb.rs:210— ruvix_cli::commands::dtb::execute_validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1 (nesting depth added 2). 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.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×14
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/mcp-brain/src/tools.rs:363— crates/mcp-brain/src/tools.rs:363-451 | crates/mcp-brain/src/tools.rs:692-754 | crates/ruvllm/src/policy_store.rs:382-428 | crates/ruvllm/src/quality/validators.rs:179-195 | crates/ruvllm/src/witness_log.rs:592-663 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/ruvector-attention/src/curvature/fused_attention.rs:353— crates/ruvector-attention/src/curvature/fused_attention.rs:353-370 | crates/ruvector-attention/src/pde_attention/diffusion.rs:256-273 | crates/ruvector-attention/src/topology/gated_attention.rs:316-333 | crates/ruvector-attention/src/transport/centroid_ot.rs:362-379 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:357-375 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/ruvector-nervous-system-wasm/src/wta.rs:216— crates/ruvector-nervous-system-wasm/src/wta.rs:216-251 | crates/ruvector-nervous-system-wasm/src/wta.rs:257-287 | crates/ruvector-nervous-system-wasm/src/wta.rs:291-321 | crates/ruvector-nervous-system/src/compete/kwta.rs:78-107 | crates/ruvector-nervous-system/src/compete/kwta.rs:113-140 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/ruvector-postgres/src/attention/flash.rs:65— crates/ruvector-postgres/src/attention/flash.rs:65-90 | crates/ruvector-postgres/src/attention/flash.rs:97-177 | crates/ruvector-postgres/src/attention/mod.rs:142-163 | crates/ruvector-postgres/src/attention/operators.rs:427-508 | crates/ruvector-postgres/src/attention/operators.rs:762-843 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/ruvix/crates/nucleus/src/checkpoint.rs:191— crates/ruvix/crates/nucleus/src/checkpoint.rs:191-229 | crates/ruvix/crates/nucleus/src/checkpoint.rs:237-272 | crates/ruvix/crates/nucleus/src/graph_store.rs:497-562 | crates/ruvix/crates/nucleus/src/vector_store.rs:379-432 | crates/ruvix/crates/nucleus/src/witness_log.rs:552-583 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/ruvllm/src/backends/gemma2.rs:674— crates/ruvllm/src/backends/gemma2.rs:674-701 | crates/ruvllm/src/backends/phi3.rs:552-582 | crates/ruvllm/src/kernels/matmul.rs:986-1161 | crates/ruvllm/src/models/ruvltra.rs:679-709 | crates/ruvllm/src/models/ruvltra.rs:815-862 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/rvAgent/rvagent-mcp/src/client.rs:32— crates/rvAgent/rvagent-mcp/src/client.rs:32-51 | crates/rvAgent/rvagent-mcp/src/client.rs:69-88 | crates/rvAgent/rvagent-mcp/src/client.rs:95-113 | crates/rvAgent/rvagent-mcp/src/client.rs:116-134 | crates/rvAgent/rvagent-mcp/src/client.rs:137-155 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/rvf/rvf-adapters/agentic-flow/src/swarm_store.rs:297— crates/rvf/rvf-adapters/agentic-flow/src/swarm_store.rs:297-306 | crates/rvf/rvf-adapters/claude-flow/src/memory_store.rs:281-291 | crates/rvf/rvf-adapters/sona/src/experience.rs:287-296 | crates/rvf/rvf-adapters/sona/src/pattern.rs:278-288 | crates/rvf/rvf-adapters/sona/src/trajectory.rs:278-287 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/rvf/rvf-runtime/src/store.rs:2250— crates/rvf/rvf-runtime/src/store.rs:2250-2275 | crates/rvf/rvf-runtime/src/store.rs:2371-2396 | crates/rvf/rvf-runtime/src/store.rs:2477-2502 | crates/rvf/rvf-runtime/src/store.rs:2585-2610 | crates/rvf/rvf-runtime/src/store.rs:2617-2646 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1034— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1034-1115 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1122-1205 | patches/candle-core-0.9.2/src/cpu_backend/conv2d.rs:132-277 | patches/candle-core-0.9.2/src/cpu_backend/conv2d.rs:286-379 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1230-1313 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:472— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:472-508 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:520-553 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:525-567 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:579-619 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:631-671 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:780— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:780-816 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:826-849 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:905-940 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:950-980 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:997-1032 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) patches/candle-core-0.8.4/src/quantized/k_quants.rs:631— patches/candle-core-0.8.4/src/quantized/k_quants.rs:631-649 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1768-1786 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:662-680 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:692-710 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2195-2212 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) patches/candle-core-0.8.4/src/tensor.rs:2243— patches/candle-core-0.8.4/src/tensor.rs:2243-2266 | patches/candle-core-0.8.4/src/tensor.rs:2281-2301 | patches/candle-core-0.9.2/src/tensor.rs:2566-2589 | patches/candle-core-0.9.2/src/tensor.rs:2604-2624 | patches/candle-core-0.9.2/src/tensor.rs:2931-2970 — These 5 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 5 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 5 times.
Duplicated block (24 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:864— crates/ruvector-graph-transformer-node/src/transformer.rs:864-887 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:920-943 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (24 lines × 2) crates/ruvllm/src/autodetect.rs:716— crates/ruvllm/src/autodetect.rs:716-739 | crates/ruvllm/src/backends/coreml_backend.rs:140-163 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (24 lines × 2) crates/ruvllm/src/hub/download.rs:58— crates/ruvllm/src/hub/download.rs:58-81 | crates/ruvllm/src/hub/upload.rs:17-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:305— patches/candle-core-0.8.4/src/backprop.rs:305-328 | patches/candle-core-0.9.2/src/backprop.rs:307-330 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (24 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:571— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:571-594 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:757-780 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (24 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1547— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1547-1570 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1664-1687 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (24 lines × 2) patches/candle-core-0.8.4/src/display.rs:361— patches/candle-core-0.8.4/src/display.rs:361-384 | patches/candle-core-0.9.2/src/display.rs:372-395 — before extracting anything, compare `patches/candle-core-0.8.4/src/display.rs` and `patches/candle-core-0.9.2/src/display.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 304 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 (24 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:811— patches/candle-core-0.8.4/src/tensor.rs:811-834 | patches/candle-core-0.9.2/src/tensor.rs:879-902 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (24 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:1823— patches/candle-core-0.8.4/src/tensor.rs:1823-1846 | patches/candle-core-0.9.2/src/tensor.rs:2147-2170 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (24 lines × 2) patches/candle-core-0.9.2/src/quantized/cuda.rs:138— patches/candle-core-0.9.2/src/quantized/cuda.rs:138-161 | patches/candle-core-0.9.2/src/quantized/cuda.rs:198-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.
Duplicated block (24 lines × 2) patches/hnsw_rs/src/hnswio.rs:1266— patches/hnsw_rs/src/hnswio.rs:1266-1289 | scripts/patches/hnsw_rs/src/hnswio.rs:1266-1289 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (24 lines × 2) patches/hnsw_rs/src/hnswio.rs:1317— patches/hnsw_rs/src/hnswio.rs:1317-1340 | scripts/patches/hnsw_rs/src/hnswio.rs:1317-1340 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (24 lines × 2) patches/hnsw_rs/src/libext.rs:736— patches/hnsw_rs/src/libext.rs:736-759 | scripts/patches/hnsw_rs/src/libext.rs:736-759 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (24 lines × 2) crates/ruvector-hailo-cluster/src/bin/bench.rs:370— crates/ruvector-hailo-cluster/src/bin/bench.rs:370-393 | crates/ruvector-hailo-cluster/src/bin/embed.rs:368-396 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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) crates/ruvector-cnn/src/layers/pooling.rs:34— crates/ruvector-cnn/src/layers/pooling.rs:34-44 | crates/ruvector-cnn/src/layers/pooling.rs:119-129 | crates/ruvector-cnn/src/layers/pooling.rs:221-231 — 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.
Duplicated block (11 lines × 3) crates/ruvector-core/src/quantization.rs:436— crates/ruvector-core/src/quantization.rs:436-446 | crates/ruvector-core/src/simd_intrinsics.rs:1265-1275 | crates/ruvector-core/src/simd_intrinsics.rs:1314-1324 — before extracting anything, compare `crates/ruvector-core/src/quantization.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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) crates/ruvector-hailo-cluster/src/bin/bench.rs:323— crates/ruvector-hailo-cluster/src/bin/bench.rs:323-334 | crates/ruvector-hailo-cluster/src/bin/embed.rs:315-325 | crates/ruvector-hailo-cluster/src/bin/stats.rs:256-266 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:189— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:189-199 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:249-259 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:164-175 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 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) crates/ruvector-kge-ffi/src/ops.rs:64— crates/ruvector-kge-ffi/src/ops.rs:64-74 | crates/ruvector-kge-wasm/src/ops.rs:64-74 | crates/ruvector-temporal-tensor/src/agentdb.rs:83-94 — before extracting anything, compare `crates/ruvector-kge-ffi/src/ops.rs` and `crates/ruvector-kge-wasm/src/ops.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 238 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 (11 lines × 3) crates/ruvector-rairs/src/ivf.rs:64— crates/ruvector-rairs/src/ivf.rs:64-74 | crates/ruvector-rairs/src/rairs.rs:109-119 | crates/ruvector-rairs/src/seil.rs:183-193 — before extracting anything, compare `crates/ruvector-rairs/src/rairs.rs` and `crates/ruvector-rairs/src/seil.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 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) crates/ruvector-solver/src/random_walk.rs:359— crates/ruvector-solver/src/random_walk.rs:359-369 | crates/ruvector-solver/src/random_walk.rs:420-430 | crates/ruvector-solver/src/random_walk.rs:657-667 — 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.
Duplicated block (11 lines × 3) crates/ruvix/crates/vecgraph/src/simd_distance.rs:252— crates/ruvix/crates/vecgraph/src/simd_distance.rs:252-262 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:287-297 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:315-325 — 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.
Duplicated block (11 lines × 3) crates/ruvix/crates/vecgraph/src/simd_distance.rs:400— crates/ruvix/crates/vecgraph/src/simd_distance.rs:400-410 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:431-441 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:459-469 — 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.
Duplicated block (11 lines × 3) crates/ruvllm/src/metal/context.rs:186— crates/ruvllm/src/metal/context.rs:186-196 | crates/ruvllm/src/metal/context.rs:242-252 | crates/ruvllm/src/metal/context.rs:447-457 — 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.
Duplicated block (11 lines × 3) crates/rvf/rvf-quant/src/codec.rs:219— crates/rvf/rvf-quant/src/codec.rs:219-229 | crates/rvf/rvf-runtime/src/read_path.rs:645-655 | crates/rvf/rvf-server/src/tcp.rs:275-285 — before extracting anything, compare `crates/rvf/rvf-runtime/src/read_path.rs` and `crates/rvf/rvf-server/src/tcp.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 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 (11 lines × 3) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2222— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2222-2232 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2324-2334 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2746-2756 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (11 lines × 3) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1701— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1701-1711 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2048-2058 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2128-2138 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (11 lines × 3) crates/ruvector-agent-memory/src/ledger.rs:258— crates/ruvector-agent-memory/src/ledger.rs:258-268 | crates/ruvector-agent-memory/src/ledger.rs:338-348 | crates/ruvector-agent-memory/src/ledger.rs:387-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.
Duplicated block (10 lines × 3) crates/micro-hnsw-wasm/src/lib.rs:708— crates/micro-hnsw-wasm/src/lib.rs:708-717 | crates/micro-hnsw-wasm/src/lib.rs:733-742 | crates/micro-hnsw-wasm/src/lib.rs:1144-1153 — 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.
Duplicated block (10 lines × 3) crates/ruvector-consciousness/src/chebyshev_phi.rs:113— crates/ruvector-consciousness/src/chebyshev_phi.rs:113-122 | crates/ruvector-consciousness/src/phi.rs:372-381 | crates/ruvector-consciousness/src/sparse_accel.rs:233-242 — before extracting anything, compare `crates/ruvector-consciousness/src/chebyshev_phi.rs` and `crates/ruvector-consciousness/src/sparse_accel.rs` 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.
Duplicated block (10 lines × 3) crates/ruvector-graph/src/storage.rs:225— crates/ruvector-graph/src/storage.rs:225-234 | crates/ruvector-graph/src/storage.rs:303-312 | crates/ruvector-graph/src/storage.rs:397-406 — 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.
Duplicated block (10 lines × 3) crates/ruvector-math/src/information_geometry/fisher.rs:204— crates/ruvector-math/src/information_geometry/fisher.rs:204-213 | crates/ruvector-math/src/information_geometry/kfac.rs:172-181 | crates/ruvector-math/src/information_geometry/kfac.rs:241-250 — before extracting anything, compare `crates/ruvector-math/src/information_geometry/fisher.rs` and `crates/ruvector-math/src/information_geometry/kfac.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 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 × 3) crates/ruvector-postgres/src/graph/operators.rs:686— crates/ruvector-postgres/src/graph/operators.rs:686-695 | crates/ruvector-postgres/src/graph/sparql/triple_store.rs:583-592 | crates/rvlite/src/sparql/triple_store.rs:504-513 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/triple_store.rs` and `crates/rvlite/src/sparql/triple_store.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 (10 lines × 3) crates/ruvllm/src/quantize/hadamard.rs:393— crates/ruvllm/src/quantize/hadamard.rs:393-402 | crates/ruvllm/src/quantize/hadamard.rs:449-458 | crates/ruvllm/src/quantize/hadamard.rs:506-515 — 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.
Duplicated block (10 lines × 3) crates/ruvllm_sparse_attention/src/attention.rs:1608— crates/ruvllm_sparse_attention/src/attention.rs:1608-1617 | crates/ruvllm_sparse_attention/src/attention.rs:1714-1723 | crates/ruvllm_sparse_attention/src/attention.rs:1737-1746 — 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.
Duplicated block (10 lines × 3) crates/rvf/rvf-runtime/src/store.rs:2331— crates/rvf/rvf-runtime/src/store.rs:2331-2340 | crates/rvf/rvf-runtime/src/store.rs:2434-2443 | crates/rvf/rvf-runtime/src/store.rs:2546-2555 — 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.
Duplicated block (10 lines × 3) patches/candle-core-0.9.2/src/quantized/k_quants.rs:898— patches/candle-core-0.9.2/src/quantized/k_quants.rs:898-907 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1529-1538 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1806-1815 — 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.
Duplicated block (10 lines × 3) crates/ruvector-postgres/src/distance/scalar.rs:24— crates/ruvector-postgres/src/distance/scalar.rs:24-34 | crates/ruvector-spann/src/distance.rs:5-14 | crates/rvf/rvf-index/src/distance.rs:14-23 — before extracting anything, compare `crates/ruvector-postgres/src/distance/scalar.rs` and `crates/rvf/rvf-index/src/distance.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 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 (10 lines × 3) crates/ruvllm/src/backends/gemma2.rs:175— crates/ruvllm/src/backends/gemma2.rs:175-184 | crates/ruvllm/src/models/ruvltra.rs:386-395 | crates/ruvllm/src/models/ruvltra_medium.rs:433-442 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/models/ruvltra.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (10 lines × 3) crates/ruvector-core/src/agenticdb.rs:412— crates/ruvector-core/src/agenticdb.rs:412-422 | crates/ruvector-core/src/agenticdb.rs:502-511 | crates/ruvector-core/src/agenticdb.rs:1347-1356 — 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.
Duplicated block (10 lines × 3) crates/ruvector-mincut/src/optimization/benchmark.rs:323— crates/ruvector-mincut/src/optimization/benchmark.rs:323-332 | crates/ruvector-mincut/src/optimization/benchmark.rs:360-369 | crates/ruvector-mincut/src/optimization/benchmark.rs:481-490 — 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.
Duplicated block (10 lines × 3) crates/rvAgent/rvagent-wasm/src/gallery.rs:286— crates/rvAgent/rvagent-wasm/src/gallery.rs:286-295 | crates/rvAgent/rvagent-wasm/src/gallery.rs:426-435 | crates/rvAgent/rvagent-wasm/src/gallery.rs:487-496 — 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.
Outbound HTTP without resilience crates/mcp-brain-server/src/gist.rs:358— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/mcp-brain-server/src/gist.rs:728— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/mcp-brain-server/src/notify.rs:213— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/mcp-brain/src/client.rs:31— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/mcp-brain/src/client.rs:40— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/ruvector-core/src/embeddings.rs:934— `reqwest::blocking::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/ruvector-py/python/ruvector/integrations/salesforce.py:142— `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/ruvector-py/python/ruvector/integrations/salesforce.py:195— `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/ruvector-sota-bench/src/datasets/ann_benchmarks.rs:71— `reqwest::blocking::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/ruvector-typesafe-train/src/pins.rs:127— `ureq::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:390— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:600— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience npm/packages/typesafe/scripts/fetch-models.mjs:151— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience scripts/seed-brain.rs:46— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Tensor::backward (cognitive 108) patches/candle-core-0.8.4/src/backprop.rs:163— Tensor::backward has cognitive complexity 108 (threshold 15). Drivers by points: if/else 26 (81 pts), loops 5 (17 pts), match/switch 2 (7 pts), boolean chains 3 (nesting depth added 72). 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.
Tensor::backward (cognitive 108) patches/candle-core-0.9.2/src/backprop.rs:165— Tensor::backward has cognitive complexity 108 (threshold 15). Drivers by points: if/else 26 (81 pts), loops 5 (17 pts), match/switch 2 (7 pts), boolean chains 3 (nesting depth added 72). 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.
Tensor::matmul (cognitive 19) crates/ruvector-gnn/src/tensor.rs:129— Tensor::matmul has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Tensor::write_bytes (cognitive 19) patches/candle-core-0.9.2/src/convert.rs:102— Tensor::write_bytes has cognitive complexity 19 (threshold 15). Drivers by points: loops 9 (18 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Tensor::fmt_dt (cognitive 18) patches/candle-core-0.8.4/src/display.rs:9— Tensor::fmt_dt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts), match/switch 2 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Tensor::fmt_dt (cognitive 18) patches/candle-core-0.9.2/src/display.rs:9— Tensor::fmt_dt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts), match/switch 2 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Tensor::cat0 (cognitive 17) patches/candle-core-0.8.4/src/tensor_cat.rs:76— Tensor::cat0 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 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. This shape REPEATS in the file: one other method here (Tensor::cat_contiguous) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Tensor::cat_contiguous (cognitive 17) patches/candle-core-0.8.4/src/tensor_cat.rs:151— Tensor::cat_contiguous has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 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. This shape REPEATS in the file: one other method here (Tensor::cat0) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Tensor::cat0 (cognitive 17) patches/candle-core-0.9.2/src/tensor_cat.rs:76— Tensor::cat0 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 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. This shape REPEATS in the file: one other method here (Tensor::cat_contiguous) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Tensor::cat_contiguous (cognitive 17) patches/candle-core-0.9.2/src/tensor_cat.rs:151— Tensor::cat_contiguous has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 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. This shape REPEATS in the file: one other method here (Tensor::cat0) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Tensor::sorted_nodes::walk (cognitive 16) patches/candle-core-0.8.4/src/backprop.rs:38— Tensor::sorted_nodes::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 1 (2 pts) (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.
Tensor::sorted_nodes::walk (cognitive 16) patches/candle-core-0.9.2/src/backprop.rs:38— Tensor::sorted_nodes::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 1 (2 pts) (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.
Tensor::fmt (cognitive 16) patches/candle-core-0.9.2/src/display.rs:454— Tensor::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (4 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.
Duplicated block (12–13 lines × 2) crates/ruvector-attention/src/hyperbolic/poincare.rs:147— crates/ruvector-attention/src/hyperbolic/poincare.rs:147-158 | crates/ruvector-hyperbolic-hnsw/src/poincare.rs:494-506 — before extracting anything, compare `crates/ruvector-attention/src/hyperbolic/poincare.rs` and `crates/ruvector-hyperbolic-hnsw/src/poincare.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 (12–13 lines × 2) crates/ruvector-bench/src/bin/comparison_benchmark.rs:334— crates/ruvector-bench/src/bin/comparison_benchmark.rs:334-345 | crates/ruvector-bench/src/bin/latency_benchmark.rs:365-377 — before extracting anything, compare `crates/ruvector-bench/src/bin/comparison_benchmark.rs` and `crates/ruvector-bench/src/bin/latency_benchmark.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 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 (12–13 lines × 2) crates/ruvector-cnn/src/contrastive/infonce.rs:369— crates/ruvector-cnn/src/contrastive/infonce.rs:369-381 | crates/ruvector-temporal-coherence/src/lib.rs:91-102 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12–13 lines × 2) crates/ruvector-coherence/src/spectral.rs:108— crates/ruvector-coherence/src/spectral.rs:108-119 | crates/ruvector-solver/src/simd.rs:337-349 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12–13 lines × 2) crates/ruvector-core/src/arena.rs:280— crates/ruvector-core/src/arena.rs:280-291 | crates/ruvector-core/src/arena.rs:484-496 — 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–13 lines × 2) crates/ruvector-mincut/src/optimization/cache.rs:225— crates/ruvector-mincut/src/optimization/cache.rs:225-237 | crates/ruvector-mincut/src/optimization/cache.rs:257-268 — 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–13 lines × 2) crates/ruvector-temporal-tensor/src/bitpack.rs:23— crates/ruvector-temporal-tensor/src/bitpack.rs:23-34 | crates/ruvector-temporal-tensor/src/store.rs:274-286 — 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 (12–13 lines × 2) crates/ruvllm/src/bitnet/backend.rs:3397— crates/ruvllm/src/bitnet/backend.rs:3397-3408 | crates/ruvllm/src/bitnet/backend.rs:3552-3564 — 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–13 lines × 2) crates/ruvllm/src/metal/operations.rs:437— crates/ruvllm/src/metal/operations.rs:437-449 | crates/ruvllm/src/metal/operations.rs:566-577 — 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–13 lines × 2) crates/ruvllm/src/serving/engine.rs:637— crates/ruvllm/src/serving/engine.rs:637-649 | crates/ruvllm/src/serving/engine.rs:673-684 — 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–13 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:680— patches/candle-core-0.8.4/src/metal_backend/mod.rs:680-691 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:715-727 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (12–13 lines × 2) patches/candle-core-0.9.2/src/quantized/cuda.rs:321— patches/candle-core-0.9.2/src/quantized/cuda.rs:321-333 | patches/candle-core-0.9.2/src/quantized/cuda.rs:390-401 — 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–13 lines × 2) scripts/training/build-optimal-dataset-v2.py:119— scripts/training/build-optimal-dataset-v2.py:119-130 | scripts/training/build-optimal-dataset.py:100-112 — 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 `scripts/training/build-optimal-dataset-v2.py:119` 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 (8–9 lines × 2) crates/prime-radiant/src/tiles/fabric.rs:171— crates/prime-radiant/src/tiles/fabric.rs:171-179 | crates/prime-radiant/src/tiles/fabric.rs:190-197 — 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 (8–9 lines × 2) crates/ruvector-attention/src/training/loss.rs:249— crates/ruvector-attention/src/training/loss.rs:249-257 | crates/ruvector-attention/src/training/loss.rs:264-271 — 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 (8–9 lines × 2) crates/ruvector-consciousness/src/rsvd_emergence.rs:189— crates/ruvector-consciousness/src/rsvd_emergence.rs:189-196 | crates/ruvector-consciousness/src/rsvd_emergence.rs:221-229 — 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 (8–9 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:379— crates/ruvector-core/src/simd_intrinsics.rs:379-386 | crates/ruvector-postgres/src/distance/simd.rs:177-185 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvector-postgres/src/distance/simd.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 (8–9 lines × 2) crates/ruvector-graph-condense/src/cutloss.rs:59— crates/ruvector-graph-condense/src/cutloss.rs:59-67 | crates/ruvector-graph-condense/src/gnn_eval.rs:40-47 — 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 (8–9 lines × 2) crates/ruvector-learning-wasm/src/lora.rs:105— crates/ruvector-learning-wasm/src/lora.rs:105-113 | crates/ruvector-learning-wasm/src/lora.rs:130-137 — 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 (8–9 lines × 2) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:444— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:444-452 | crates/ruvector-profiler/src/config_hash.rs:40-47 — before extracting anything, compare `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-profiler/src/config_hash.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 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 (8–9 lines × 2) crates/ruvector-postgres/src/distance/simd.rs:521— crates/ruvector-postgres/src/distance/simd.rs:521-529 | crates/ruvector-postgres/src/distance/simd.rs:580-587 — 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 (8–9 lines × 2) crates/ruvector-postgres/src/index/hnsw.rs:346— crates/ruvector-postgres/src/index/hnsw.rs:346-354 | crates/ruvector-postgres/src/index/hnsw_am.rs:1235-1242 — 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 (8–9 lines × 2) crates/ruvector-sparse-inference/src/backend/cpu.rs:427— crates/ruvector-sparse-inference/src/backend/cpu.rs:427-435 | crates/ruvector-sparse-inference/src/backend/wasm.rs:190-197 — 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 (8–9 lines × 2) crates/ruvllm-wasm/src/sona_instant.rs:646— crates/ruvllm-wasm/src/sona_instant.rs:646-654 | crates/rvf/rvf-wasm/src/store.rs:273-280 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8–9 lines × 2) crates/ruvllm/src/kernels/attention.rs:1211— crates/ruvllm/src/kernels/attention.rs:1211-1219 | crates/ruvllm/src/kernels/attention.rs:1347-1354 — 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 (8–9 lines × 2) crates/ruvllm/src/witness_log.rs:380— crates/ruvllm/src/witness_log.rs:380-388 | crates/ruvllm/src/witness_log.rs:807-814 — 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.
ruvector_decompiler::transformer::mha (cognitive 64) crates/ruvector-decompiler/src/transformer.rs:279— ruvector_decompiler::transformer::mha has cognitive complexity 64 (threshold 15). Drivers by points: loops 16 (40 pts), if/else 8 (24 pts) (nesting depth added 40). 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.
ruvector_decompiler::parser::scan_body_single_pass (cognitive 59) crates/ruvector-decompiler/src/parser.rs:206— ruvector_decompiler::parser::scan_body_single_pass has cognitive complexity 59 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 6 (18 pts), boolean chains 5 (nesting depth added 36). 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.
ruvector_decompiler::tree::agglomerative_cluster (cognitive 56) crates/ruvector-decompiler/src/tree.rs:172— ruvector_decompiler::tree::agglomerative_cluster has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 7 (15 pts) (nesting depth added 30). 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.
ruvector_decompiler::partitioner::louvain_partition (cognitive 51) crates/ruvector-decompiler/src/partitioner.rs:107— ruvector_decompiler::partitioner::louvain_partition has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (35 pts), loops 9 (13 pts), boolean chains 3 (nesting depth added 26). 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.
ruvector_decompiler::parser::find_declaration_end (cognitive 32) crates/ruvector-decompiler/src/parser.rs:320— ruvector_decompiler::parser::find_declaration_end has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 3 (9 pts), boolean chains 4, match/switch 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.
ruvector_decompiler::inferrer::infer_declaration_name (cognitive 26) crates/ruvector-decompiler/src/inferrer.rs:109— ruvector_decompiler::inferrer::infer_declaration_name has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (6 pts), boolean chains 1, match/switch 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.
ruvector_decompiler::tree::build_inter_module_edges (cognitive 25) crates/ruvector-decompiler/src/tree.rs:48— ruvector_decompiler::tree::build_inter_module_edges has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 5 (9 pts) (nesting depth added 16). 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.
ruvector_decompiler::model_decompiler::extract_layers (cognitive 22) crates/ruvector-decompiler/src/model_decompiler.rs:301— ruvector_decompiler::model_decompiler::extract_layers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, loops 2 (3 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.
ruvector_decompiler::parser::extract_declarations (cognitive 20) crates/ruvector-decompiler/src/parser.rs:84— ruvector_decompiler::parser::extract_declarations has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (9 pts), if/else 3 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). 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.
ruvector_decompiler::model_safetensors::parse_safetensors_file (cognitive 18) crates/ruvector-decompiler/src/model_safetensors.rs:19— ruvector_decompiler::model_safetensors::parse_safetensors_file has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts), match/switch 1 (2 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.
ruvector_decompiler::neural::infer_names_neural (cognitive 18) crates/ruvector-decompiler/src/neural.rs:240— ruvector_decompiler::neural::infer_names_neural has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (3 pts) (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.
ruvector_decompiler::beautifier::indent_braces_into (cognitive 17) crates/ruvector-decompiler/src/beautifier.rs:135— ruvector_decompiler::beautifier::indent_braces_into has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 1 (2 pts), 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.
Duplicated block (28 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:435— crates/ruvector-graph-transformer-node/src/transformer.rs:435-462 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:450-477 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (28 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:225— crates/ruvector-postgres/src/graph/sparql/executor.rs:225-252 | crates/rvlite/src/sparql/executor.rs:196-223 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (28 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:828— crates/ruvector-postgres/src/graph/sparql/executor.rs:828-855 | crates/rvlite/src/sparql/executor.rs:451-478 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (28 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1684— crates/ruvector-postgres/src/graph/sparql/parser.rs:1684-1711 | crates/rvlite/src/sparql/parser.rs:1691-1718 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (28 lines × 2) crates/ruvix/crates/dtb/src/parser.rs:157— crates/ruvix/crates/dtb/src/parser.rs:157-184 | crates/ruvix/crates/dtb/src/parser.rs:242-269 — 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 (28 lines × 2) crates/ruvllm/src/backends/phi3.rs:337— crates/ruvllm/src/backends/phi3.rs:337-364 | crates/ruvllm/src/models/ruvltra.rs:589-616 — before extracting anything, compare `crates/ruvllm/src/backends/phi3.rs` and `crates/ruvllm/src/models/ruvltra.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 269 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 (28 lines × 2) crates/ruvllm/src/quantize/hadamard.rs:435— crates/ruvllm/src/quantize/hadamard.rs:435-462 | crates/ruvllm/src/quantize/hadamard.rs:492-519 — 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 (28 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:107— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:107-134 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:156-183 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/utils.rs` and `patches/candle-core-0.9.2/src/cpu_backend/utils.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 259 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 (28 lines × 2) patches/candle-core-0.8.4/src/quantized/metal.rs:139— patches/candle-core-0.8.4/src/quantized/metal.rs:139-166 | patches/candle-core-0.9.2/src/quantized/metal.rs:195-222 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/metal.rs` and `patches/candle-core-0.9.2/src/quantized/metal.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 107 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 (28 lines × 2) patches/candle-core-0.8.4/src/sort.rs:169— patches/candle-core-0.8.4/src/sort.rs:169-196 | patches/candle-core-0.9.2/src/sort.rs:215-242 — before extracting anything, compare `patches/candle-core-0.8.4/src/sort.rs` and `patches/candle-core-0.9.2/src/sort.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 137 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 (28 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:2201— patches/candle-core-0.8.4/src/tensor.rs:2201-2228 | patches/candle-core-0.9.2/src/tensor.rs:2524-2551 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (28 lines × 2) patches/hnsw_rs/src/hnsw.rs:876— patches/hnsw_rs/src/hnsw.rs:876-903 | scripts/patches/hnsw_rs/src/hnsw.rs:869-896 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (13 lines × 3) crates/ruvector-attn-mincut/src/gating.rs:46— crates/ruvector-attn-mincut/src/gating.rs:46-58 | crates/ruvector-graph-condense/src/gnn_eval.rs:123-135 | crates/ruvector-graph-condense/src/gnn_eval.rs:139-151 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 3) crates/ruvector-bench/src/bin/memory_benchmark.rs:227— crates/ruvector-bench/src/bin/memory_benchmark.rs:227-239 | crates/ruvector-bench/src/bin/memory_benchmark.rs:321-333 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:141-154 — before extracting anything, compare `crates/ruvector-bench/src/bin/memory_benchmark.rs` and `crates/ruvector-bench/src/bin/profiling_benchmark.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) crates/ruvector-cnn/src/kernels/int8_avx2.rs:327— crates/ruvector-cnn/src/kernels/int8_avx2.rs:327-339 | crates/ruvector-cnn/src/kernels/int8_neon.rs:312-324 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:285-297 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) crates/ruvector-cnn/src/quantize/graph_rewrite.rs:146— crates/ruvector-cnn/src/quantize/graph_rewrite.rs:146-158 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:416-428 | crates/ruvector-cnn/src/quantize/graph_rewrite.rs:450-462 — 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.
Duplicated block (13 lines × 3) crates/ruvector-hailo-cluster/src/bin/bench.rs:443— crates/ruvector-hailo-cluster/src/bin/bench.rs:443-455 | crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:314-326 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:355-367 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) crates/ruvector-mincut-gated-transformer-wasm/src/lib.rs:72— crates/ruvector-mincut-gated-transformer-wasm/src/lib.rs:72-84 | crates/ruvector-mincut-gated-transformer-wasm/src/lib.rs:97-109 | crates/ruvector-mincut-gated-transformer-wasm/src/lib.rs:132-144 — 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.
Duplicated block (13 lines × 3) crates/ruvector-mincut/src/cluster/hierarchy.rs:517— crates/ruvector-mincut/src/cluster/hierarchy.rs:517-530 | crates/ruvector-mincut/src/cluster/hierarchy.rs:598-610 | crates/ruvector-mincut/src/subpolynomial/mod.rs:1025-1038 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 3) crates/ruvix/crates/cli/src/commands/dtb.rs:930— crates/ruvix/crates/cli/src/commands/dtb.rs:930-942 | crates/ruvix/crates/cli/src/commands/dtb.rs:990-1002 | crates/ruvix/crates/cli/src/commands/dtb.rs:1033-1045 — 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.
Duplicated block (13 lines × 3) crates/ruvllm/src/kernels/attention.rs:937— crates/ruvllm/src/kernels/attention.rs:937-949 | crates/ruvllm/src/kernels/attention.rs:1022-1034 | crates/ruvllm/src/kernels/attention.rs:1180-1197 — 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.
Duplicated block (13 lines × 3) crates/ruvllm/src/reflection/perspectives.rs:400— crates/ruvllm/src/reflection/perspectives.rs:400-412 | crates/ruvllm/src/reflection/perspectives.rs:610-622 | crates/ruvllm/src/reflection/perspectives.rs:817-829 — 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.
Duplicated block (13 lines × 3) crates/sona/src/export/dataset.rs:61— crates/sona/src/export/dataset.rs:61-73 | crates/sona/src/export/dataset.rs:137-149 | crates/sona/src/export/dataset.rs:192-204 — 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.
Duplicated block (13 lines × 3) patches/candle-core-0.8.4/src/cpu/avx.rs:132— patches/candle-core-0.8.4/src/cpu/avx.rs:132-144 | patches/candle-core-0.9.2/src/cpu/avx.rs:132-144 | patches/candle-core-0.9.2/src/cpu/avx.rs:211-223 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu/avx.rs` and `patches/candle-core-0.9.2/src/cpu/avx.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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 (10–11 lines × 2) crates/prime-radiant/src/simd/matrix.rs:179— crates/prime-radiant/src/simd/matrix.rs:179-189 | crates/prime-radiant/src/simd/matrix.rs:249-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ruvector-consciousness-wasm/src/lib.rs:138— crates/ruvector-consciousness-wasm/src/lib.rs:138-148 | crates/ruvector-consciousness-wasm/src/lib.rs:309-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ruvector-graph-node/src/lib.rs:982— crates/ruvector-graph-node/src/lib.rs:982-991 | crates/ruvector-graph-node/src/lib.rs:1026-1036 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ruvector-graph/src/storage.rs:97— crates/ruvector-graph/src/storage.rs:97-106 | crates/ruvector-router-core/src/storage.rs:43-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–11 lines × 2) crates/ruvector-hailo-cluster/src/bin/embed.rs:544— crates/ruvector-hailo-cluster/src/bin/embed.rs:544-553 | crates/ruvector-hailo-cluster/src/bin/embed.rs:557-567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ruvector-math/src/tensor_networks/cp_decomposition.rs:113— crates/ruvector-math/src/tensor_networks/cp_decomposition.rs:113-122 | crates/ruvector-math/src/tensor_networks/cp_decomposition.rs:141-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ruvector-postgres/src/graph/cypher/parser.rs:133— crates/ruvector-postgres/src/graph/cypher/parser.rs:133-143 | crates/ruvector-postgres/src/graph/cypher/parser.rs:211-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ruvector-rairs/src/rairs.rs:90— crates/ruvector-rairs/src/rairs.rs:90-100 | crates/ruvector-rairs/src/seil.rs:97-106 — before extracting anything, compare `crates/ruvector-rairs/src/rairs.rs` and `crates/ruvector-rairs/src/seil.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 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–11 lines × 2) crates/ruvector-sparse-inference/src/backend/cpu.rs:202— crates/ruvector-sparse-inference/src/backend/cpu.rs:202-212 | crates/ruvector-sparse-inference/src/backend/cpu.rs:378-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ruvector-timesfm/src/forecaster.rs:191— crates/ruvector-timesfm/src/forecaster.rs:191-201 | crates/ruvector-timesfm/src/forecaster.rs:248-257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ruvix/crates/bcm2711/src/mmio.rs:122— crates/ruvix/crates/bcm2711/src/mmio.rs:122-132 | crates/ruvix/crates/rpi-boot/src/lib.rs:247-256 — before extracting anything, compare `crates/ruvix/crates/bcm2711/src/mmio.rs` and `crates/ruvix/crates/rpi-boot/src/lib.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 (10–11 lines × 2) crates/ruvllm/src/evaluation/harness.rs:183— crates/ruvllm/src/evaluation/harness.rs:183-193 | crates/ruvllm/src/evaluation/real_harness.rs:339-348 — before extracting anything, compare `crates/ruvllm/src/evaluation/harness.rs` and `crates/ruvllm/src/evaluation/real_harness.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 79 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 (9–10 lines × 2) crates/mcp-brain/src/tools.rs:423— crates/mcp-brain/src/tools.rs:423-432 | crates/mcp-brain/src/tools.rs:724-732 — 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–10 lines × 2) crates/mcp-gate/src/schema_cache.rs:150— crates/mcp-gate/src/schema_cache.rs:150-159 | crates/mcp-gate/src/schema_cache.rs:182-190 — 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–10 lines × 2) crates/ruvector-consciousness/src/iit4.rs:41— crates/ruvector-consciousness/src/iit4.rs:41-50 | crates/ruvector-consciousness/src/simd.rs:92-100 — 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 (9–10 lines × 2) crates/ruvector-gnn/src/compress.rs:319— crates/ruvector-gnn/src/compress.rs:319-327 | crates/ruvector-router-core/src/quantization.rs:118-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9–10 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:850— crates/ruvector-graph/src/cypher/parser.rs:850-858 | crates/rvlite/src/cypher/parser.rs:838-847 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (9–10 lines × 2) crates/ruvector-math/src/tropical/neural_analysis.rs:153— crates/ruvector-math/src/tropical/neural_analysis.rs:153-161 | crates/ruvector-math/src/tropical/neural_analysis.rs:273-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 (9–10 lines × 2) crates/ruvector-postgres/src/distance/simd.rs:1020— crates/ruvector-postgres/src/distance/simd.rs:1020-1028 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:356-365 — before extracting anything, compare `crates/ruvector-postgres/src/distance/simd.rs` and `crates/ruvix/crates/vecgraph/src/simd_distance.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 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 (9–10 lines × 2) crates/ruvllm-wasm/src/workers/pool.rs:687— crates/ruvllm-wasm/src/workers/pool.rs:687-696 | crates/ruvllm-wasm/src/workers/pool.rs:1087-1095 — 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–10 lines × 2) crates/ruvllm/src/backends/gemma2.rs:381— crates/ruvllm/src/backends/gemma2.rs:381-389 | crates/ruvllm/src/models/ruvltra.rs:552-561 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/models/ruvltra.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (9–10 lines × 2) crates/ruvllm/src/bitnet/expert_cache.rs:563— crates/ruvllm/src/bitnet/expert_cache.rs:563-572 | crates/ruvllm/src/bitnet/expert_cache.rs:586-594 — 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–10 lines × 2) crates/ruvllm/src/kernels/quantized.rs:443— crates/ruvllm/src/kernels/quantized.rs:443-452 | crates/ruvllm/src/kernels/quantized.rs:510-518 — 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–10 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1652— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1652-1660 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1998-2007 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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.
mcp_brain_server::routes::handle_mcp_tool_call (cyclomatic 71) crates/mcp-brain-server/src/routes.rs:6080— mcp_brain_server::routes::handle_mcp_tool_call has cyclomatic complexity 71 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mcp_brain_server::routes::run_enhanced_training_cycle (cyclomatic 70) crates/mcp-brain-server/src/routes.rs:544— mcp_brain_server::routes::run_enhanced_training_cycle has cyclomatic complexity 70 (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.
mcp_brain_server::routes::search_memories (cyclomatic 57) crates/mcp-brain-server/src/routes.rs:1789— mcp_brain_server::routes::search_memories has cyclomatic complexity 57 (threshold 15). Of this number, 53 points are the body's own statements and 4 belong to one function item inside it that branches. 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.
mcp_brain_server::routes::google_chat_handler (cyclomatic 28) crates/mcp-brain-server/src/routes.rs:7409— mcp_brain_server::routes::google_chat_handler has cyclomatic complexity 28 (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.
mcp_brain_server::routes::pipeline_optimize (cyclomatic 26) crates/mcp-brain-server/src/routes.rs:4044— mcp_brain_server::routes::pipeline_optimize has cyclomatic complexity 26 (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.
mcp_brain_server::routes::share_memory (cyclomatic 24) crates/mcp-brain-server/src/routes.rs:1469— mcp_brain_server::routes::share_memory has cyclomatic complexity 24 (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.
mcp_brain_server::main (cyclomatic 20) crates/mcp-brain-server/src/main.rs:5— mcp_brain_server::main 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.
mcp_brain_server::routes::status (cyclomatic 19) crates/mcp-brain-server/src/routes.rs:2735— mcp_brain_server::routes::status has cyclomatic complexity 19 (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.
mcp_brain_server::routes::consciousness_compute (cyclomatic 19) crates/mcp-brain-server/src/routes.rs:8450— mcp_brain_server::routes::consciousness_compute has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mcp_brain_server::routes::create_router (cyclomatic 17) crates/mcp-brain-server/src/routes.rs:46— mcp_brain_server::routes::create_router 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.
mcp_brain_server::routes::pipeline_crawl_discover (cyclomatic 16) crates/mcp-brain-server/src/routes.rs:4397— mcp_brain_server::routes::pipeline_crawl_discover has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_postgres::graph::sparql::executor::compute_aggregate (cyclomatic 39) crates/ruvector-postgres/src/graph/sparql/executor.rs:996— ruvector_postgres::graph::sparql::executor::compute_aggregate has cyclomatic complexity 39 (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.
ruvector_postgres::graph::cypher::executor::match_pattern (cyclomatic 36) crates/ruvector-postgres/src/graph/cypher/executor.rs:94— ruvector_postgres::graph::cypher::executor::match_pattern has cyclomatic complexity 36 (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.
ruvector_postgres::graph::sparql::executor::evaluate_expression (cyclomatic 32) crates/ruvector-postgres/src/graph/sparql/executor.rs:1232— ruvector_postgres::graph::sparql::executor::evaluate_expression has cyclomatic complexity 32 (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.
ruvector_postgres::graph::sparql::executor::evaluate_graph_pattern (cyclomatic 27) crates/ruvector-postgres/src/graph/sparql/executor.rs:221— ruvector_postgres::graph::sparql::executor::evaluate_graph_pattern has cyclomatic complexity 27 (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.
ruvector_postgres::graph::sparql::executor::evaluate_binary_op (cyclomatic 23) crates/ruvector-postgres/src/graph/sparql/executor.rs:1427— ruvector_postgres::graph::sparql::executor::evaluate_binary_op has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_postgres::graph::sparql::executor::execute_update (cyclomatic 23) crates/ruvector-postgres/src/graph/sparql/executor.rs:1625— ruvector_postgres::graph::sparql::executor::execute_update has cyclomatic complexity 23 (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.
ruvector_postgres::index::hnsw_am::hnsw_rescan (cyclomatic 21) crates/ruvector-postgres/src/index/hnsw_am.rs:1663— ruvector_postgres::index::hnsw_am::hnsw_rescan 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.
ruvector_postgres::index::ivfflat_am::ivfflat_amrescan (cyclomatic 20) crates/ruvector-postgres/src/index/ivfflat_am.rs:1534— ruvector_postgres::index::ivfflat_am::ivfflat_amrescan 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.
ruvector_postgres::index::hnsw_am::hnsw_search (cyclomatic 19) crates/ruvector-postgres/src/index/hnsw_am.rs:679— ruvector_postgres::index::hnsw_am::hnsw_search 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.
ruvector_postgres::graph::sparql::executor::evaluate_property_path (cyclomatic 18) crates/ruvector-postgres/src/graph/sparql/executor.rs:547— ruvector_postgres::graph::sparql::executor::evaluate_property_path 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.
ruvector_postgres::graph::cypher::parser::parse_relationship_pattern (cyclomatic 17) crates/ruvector-postgres/src/graph/cypher/parser.rs:167— ruvector_postgres::graph::cypher::parser::parse_relationship_pattern 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.
ruvector_edge_gateway::ingest::run (cyclomatic 34) edge/gateway/src/ingest.rs:259— ruvector_edge_gateway::ingest::run has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ruvector_edge_gateway::graph_store::handle_call (cyclomatic 25) edge/gateway/src/graph_store.rs:131— ruvector_edge_gateway::graph_store::handle_call has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_edge_gateway::m3_ledger::handle (cyclomatic 25) edge/gateway/src/m3_ledger.rs:113— ruvector_edge_gateway::m3_ledger::handle has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_edge_gateway::graph_cypher_dx::render (cyclomatic 24) edge/gateway/src/graph_cypher_dx.rs:268— ruvector_edge_gateway::graph_cypher_dx::render 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.
ruvector_edge_gateway::rvf_finalize::finalize (cyclomatic 24) edge/gateway/src/rvf_finalize.rs:113— ruvector_edge_gateway::rvf_finalize::finalize has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_edge_gateway::rvf_finalize_step::step (cyclomatic 24) edge/gateway/src/rvf_finalize_step.rs:266— ruvector_edge_gateway::rvf_finalize_step::step has cyclomatic complexity 24 (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.
ruvector_edge_gateway::mcp::tools_call (cyclomatic 18) edge/gateway/src/mcp.rs:374— ruvector_edge_gateway::mcp::tools_call has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_edge_gateway::tenant_admin::deny_entry (cyclomatic 18) edge/gateway/src/tenant_admin.rs:184— ruvector_edge_gateway::tenant_admin::deny_entry has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_edge_gateway::rest::exec_route (cyclomatic 17) edge/gateway/src/rest.rs:227— ruvector_edge_gateway::rest::exec_route has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ruvector_edge_gateway::rest::parse (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
ruvector_edge_gateway::graph_cypher::precheck (cyclomatic 16) edge/gateway/src/graph_cypher.rs:55— ruvector_edge_gateway::graph_cypher::precheck 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.
ruvector_edge_gateway::registry_routes::route_inner (cyclomatic 16) edge/gateway/src/registry_routes.rs:249— ruvector_edge_gateway::registry_routes::route_inner has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ruvector_edge_gateway::registry_routes::parse (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
ruvector_cnn::simd::avx2::depthwise_conv_3x3_avx2 (cyclomatic 27) crates/ruvector-cnn/src/simd/avx2.rs:508— ruvector_cnn::simd::avx2::depthwise_conv_3x3_avx2 has cyclomatic complexity 27 (threshold 15). 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.
ruvector_cnn::kernels::int8_avx2::conv2d_int8_avx2 (cyclomatic 25) crates/ruvector-cnn/src/kernels/int8_avx2.rs:84— ruvector_cnn::kernels::int8_avx2::conv2d_int8_avx2 has cyclomatic complexity 25 (threshold 15). 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.
ruvector_cnn::kernels::int8_neon::conv2d_int8_neon (cyclomatic 25) crates/ruvector-cnn/src/kernels/int8_neon.rs:73— ruvector_cnn::kernels::int8_neon::conv2d_int8_neon has cyclomatic complexity 25 (threshold 15). 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.
ruvector_cnn::kernels::int8_wasm::conv2d_int8_wasm (cyclomatic 25) crates/ruvector-cnn/src/kernels/int8_wasm.rs:80— ruvector_cnn::kernels::int8_wasm::conv2d_int8_wasm has cyclomatic complexity 25 (threshold 15). 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.
ruvector_cnn::kernels::int8_avx2::depthwise_conv2d_int8_avx2 (cyclomatic 20) crates/ruvector-cnn/src/kernels/int8_avx2.rs:240— ruvector_cnn::kernels::int8_avx2::depthwise_conv2d_int8_avx2 has cyclomatic complexity 20 (threshold 15). 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.
ruvector_cnn::kernels::int8_neon::depthwise_conv2d_int8_neon (cyclomatic 18) crates/ruvector-cnn/src/kernels/int8_neon.rs:235— ruvector_cnn::kernels::int8_neon::depthwise_conv2d_int8_neon has cyclomatic complexity 18 (threshold 15). 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.
ruvector_cnn::simd::avx2::conv_3x3_avx2_fma (cyclomatic 18) crates/ruvector-cnn/src/simd/avx2.rs:201— ruvector_cnn::simd::avx2::conv_3x3_avx2_fma has cyclomatic complexity 18 (threshold 15). 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. This shape REPEATS in the file: one other method here (ruvector_cnn::simd::avx2::conv_3x3_avx2) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_cnn::simd::avx2::conv_3x3_avx2 (cyclomatic 18) crates/ruvector-cnn/src/simd/avx2.rs:360— ruvector_cnn::simd::avx2::conv_3x3_avx2 has cyclomatic complexity 18 (threshold 15). 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. This shape REPEATS in the file: one other method here (ruvector_cnn::simd::avx2::conv_3x3_avx2_fma) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_cnn::simd::wasm::conv_3x3_wasm (cyclomatic 17) crates/ruvector-cnn/src/simd/wasm.rs:179— ruvector_cnn::simd::wasm::conv_3x3_wasm has cyclomatic complexity 17 (threshold 15). 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.
ruvector_cnn::simd::winograd::conv_3x3_winograd (cyclomatic 17) crates/ruvector-cnn/src/simd/winograd.rs:292— ruvector_cnn::simd::winograd::conv_3x3_winograd has cyclomatic complexity 17 (threshold 15). 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.
ruvector_cnn::simd::neon::conv_3x3_neon (cyclomatic 16) crates/ruvector-cnn/src/simd/neon.rs:209— ruvector_cnn::simd::neon::conv_3x3_neon has cyclomatic complexity 16 (threshold 15). 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.
ruvllm::backends::lattice_backend::adapter::validate_tensors (cognitive 64) crates/ruvllm/src/backends/lattice_backend/adapter.rs:362— ruvllm::backends::lattice_backend::adapter::validate_tensors has cognitive complexity 64 (threshold 15). Drivers by points: if/else 28 (50 pts), boolean chains 5, loops 4 (5 pts), match/switch 2 (4 pts) (nesting depth added 25). 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.
ruvllm::backends::lattice_backend::spawn_worker (cognitive 59) crates/ruvllm/src/backends/lattice_backend.rs:374— ruvllm::backends::lattice_backend::spawn_worker has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (40 pts), match/switch 6 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 37). 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.
ruvllm::kernels::matmul::gemm_tile_12x4 (cognitive 44) crates/ruvllm/src/kernels/matmul.rs:522— ruvllm::kernels::matmul::gemm_tile_12x4 has cognitive complexity 44 (threshold 15). Drivers by points: loops 18 (44 pts) (nesting depth added 26). 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.
ruvllm::backends::lattice_backend::adapter::configuration (cognitive 42) crates/ruvllm/src/backends/lattice_backend/adapter.rs:160— ruvllm::backends::lattice_backend::adapter::configuration has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 6, loops 5 (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.
ruvllm::kv_migration::mapper::solve_linear_system (cognitive 34) crates/ruvllm/src/kv_migration/mapper.rs:301— ruvllm::kv_migration::mapper::solve_linear_system has cognitive complexity 34 (threshold 15). Drivers by points: loops 10 (23 pts), if/else 4 (10 pts), boolean chains 1 (nesting depth added 19). 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.
ruvllm::kernels::matmul::gemm_nt_neon_impl (cognitive 31) crates/ruvllm/src/kernels/matmul.rs:986— ruvllm::kernels::matmul::gemm_nt_neon_impl has cognitive complexity 31 (threshold 15). Drivers by points: loops 12 (31 pts) (nesting depth added 19). 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.
ruvllm::quantize::ruvltra_quant::quantize_q4_k_block (cognitive 25) crates/ruvllm/src/quantize/ruvltra_quant.rs:658— ruvllm::quantize::ruvltra_quant::quantize_q4_k_block has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 4 (6 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.
ruvllm::gguf::quantization::dequantize_q6_k (cognitive 23) crates/ruvllm/src/gguf/quantization.rs:890— ruvllm::gguf::quantization::dequantize_q6_k has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (3 pts) (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.
ruvllm::kernels::attention::batched_attention_scores_neon (cognitive 18) crates/ruvllm/src/kernels/attention.rs:1746— ruvllm::kernels::attention::batched_attention_scores_neon has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (18 pts) (nesting depth added 12). 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.
ruvllm::claude_flow::model_router::contains_ci (cognitive 17) crates/ruvllm/src/claude_flow/model_router.rs:43— ruvllm::claude_flow::model_router::contains_ci has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2 (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.
ruvllm::kernels::quantized::quantize_to_q4k (cognitive 16) crates/ruvllm/src/kernels/quantized.rs:270— ruvllm::kernels::quantized::quantize_to_q4k has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 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.
Hnsw::search_layer (cognitive 55) scripts/patches/hnsw_rs/src/hnsw.rs:913— Hnsw::search_layer has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (51 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 38). 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.
Hnsw::search_layer (cognitive 54) patches/hnsw_rs/src/hnsw.rs:920— Hnsw::search_layer has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (50 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 38). 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.
Hnsw::select_neighbours (cognitive 44) patches/hnsw_rs/src/hnsw.rs:1401— Hnsw::select_neighbours has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 8 (17 pts), boolean chains 3 (nesting depth added 21). 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.
Hnsw::select_neighbours (cognitive 44) scripts/patches/hnsw_rs/src/hnsw.rs:1287— Hnsw::select_neighbours has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 8 (17 pts), boolean chains 3 (nesting depth added 21). 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.
Hnsw::insert_slice (cognitive 26) patches/hnsw_rs/src/hnsw.rs:1082— Hnsw::insert_slice has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 2 (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.
Hnsw::insert_slice (cognitive 26) scripts/patches/hnsw_rs/src/hnsw.rs:1068— Hnsw::insert_slice has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 2 (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.
Hnsw::reverse_update_neighborhood_simple (cognitive 19) patches/hnsw_rs/src/hnsw.rs:1243— Hnsw::reverse_update_neighborhood_simple has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (3 pts) (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.
Hnsw::reverse_update_neighborhood_simple (cognitive 19) scripts/patches/hnsw_rs/src/hnsw.rs:1229— Hnsw::reverse_update_neighborhood_simple has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (3 pts) (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.
Hnsw::search_filter (cognitive 18) patches/hnsw_rs/src/hnsw.rs:1589— Hnsw::search_filter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (4 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.
Hnsw::search_filter (cognitive 18) scripts/patches/hnsw_rs/src/hnsw.rs:1475— Hnsw::search_filter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (4 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.
Hnsw::edges_above_endpoint_level (cognitive 16) patches/hnsw_rs/src/hnsw.rs:1321— Hnsw::edges_above_endpoint_level has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (5 pts), boolean chains 1 (nesting depth added 10). 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.
RvfStore::query_via_index_cow (cognitive 49) crates/rvf/rvf-runtime/src/store.rs:930— RvfStore::query_via_index_cow has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 3 (7 pts) (nesting depth added 28). 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.
RvfStore::restore_metadata (cognitive 43) crates/rvf/rvf-runtime/src/store.rs:4041— RvfStore::restore_metadata has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 6 (8 pts), match/switch 2 (6 pts), boolean chains 4 (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.
RvfStore::encode_metadata_generation (cognitive 39) crates/rvf/rvf-runtime/src/store.rs:3822— RvfStore::encode_metadata_generation has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 6 (11 pts), boolean chains 2, match/switch 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.
RvfStore::compact (cognitive 37) crates/rvf/rvf-runtime/src/store.rs:1664— RvfStore::compact has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (25 pts), match/switch 4 (6 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). 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.
RvfStore::restore_cow_state (cognitive 33) crates/rvf/rvf-runtime/src/store.rs:3424— RvfStore::restore_cow_state has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 8, match/switch 3, 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.
RvfStore::apply_open_policy (cognitive 32) crates/rvf/rvf-runtime/src/store/policy_api.rs:205— RvfStore::apply_open_policy has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 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.
RvfStore::build_ingest_metadata (cognitive 31) crates/rvf/rvf-runtime/src/store.rs:2805— RvfStore::build_ingest_metadata has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RvfStore::cow_exact_parent_scan (cognitive 29) crates/rvf/rvf-runtime/src/store.rs:1250— RvfStore::cow_exact_parent_scan has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 2, match/switch 2, 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.
RvfStore::ingest_batch_internal (cognitive 26) crates/rvf/rvf-runtime/src/store.rs:510— RvfStore::ingest_batch_internal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (24 pts), loops 2 (nesting depth added 5). 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.
RvfStore::boot_with_ancestry (cognitive 23) crates/rvf/rvf-runtime/src/store.rs:3295— RvfStore::boot_with_ancestry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (5 pts), match/switch 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.
RvfStore::query_exact (cognitive 20) crates/rvf/rvf-runtime/src/store.rs:1144— RvfStore::query_exact has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2, match/switch 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.
rvf_runtime::qr_encode::evaluate_penalty (cognitive 47) crates/rvf/rvf-runtime/src/qr_encode.rs:632— rvf_runtime::qr_encode::evaluate_penalty has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 10 (15 pts), boolean chains 3 (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.
rvf_runtime::read_path::scan_blocks (cognitive 41) crates/rvf/rvf-runtime/src/read_path.rs:295— rvf_runtime::read_path::scan_blocks has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 3, 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.
rvf_runtime::safety_net::selective_safety_net_scan (cognitive 37) crates/rvf/rvf-runtime/src/safety_net.rs:134— rvf_runtime::safety_net::selective_safety_net_scan has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 3 (5 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.
rvf_runtime::compress::compress (cognitive 27) crates/rvf/rvf-runtime/src/compress.rs:60— rvf_runtime::compress::compress has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (8 pts), boolean chains 2 (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.
rvf_runtime::qr_encode::place_data_bits (cognitive 25) crates/rvf/rvf-runtime/src/qr_encode.rs:538— rvf_runtime::qr_encode::place_data_bits has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (6 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.
rvf_runtime::read_path::parse_manifest_payload (cognitive 25) crates/rvf/rvf-runtime/src/read_path.rs:432— rvf_runtime::read_path::parse_manifest_payload has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 3 (6 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.
rvf_runtime::store::scan_preservable_segments (cognitive 24) crates/rvf/rvf-runtime/src/store.rs:4425— rvf_runtime::store::scan_preservable_segments has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (7 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rvf_runtime::index_path::decode_graph (cognitive 20) crates/rvf/rvf-runtime/src/index_path.rs:313— rvf_runtime::index_path::decode_graph has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
rvf_runtime::compress::decompress (cognitive 19) crates/rvf/rvf-runtime/src/compress.rs:134— rvf_runtime::compress::decompress has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 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.
rvf_runtime::qr_encode::generate_codewords (cognitive 16) crates/rvf/rvf-runtime/src/qr_encode.rs:346— rvf_runtime::qr_encode::generate_codewords has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (7 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.
rvf_runtime::qr_encode::place_finder_pattern (cognitive 16) crates/rvf/rvf-runtime/src/qr_encode.rs:443— rvf_runtime::qr_encode::place_finder_pattern has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2 (3 pts) (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.
ruvector_edge_gateway::ingest::run (cognitive 44) edge/gateway/src/ingest.rs:259— ruvector_edge_gateway::ingest::run has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 9 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 16). 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.
ruvector_edge_gateway::queue_consumer::queue (cognitive 28) edge/gateway/src/queue_consumer.rs:36— ruvector_edge_gateway::queue_consumer::queue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 4 (11 pts), loops 2 (4 pts) (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_edge_gateway::m3_ledger::handle (cognitive 26) edge/gateway/src/m3_ledger.rs:113— ruvector_edge_gateway::m3_ledger::handle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (7 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_edge_gateway::rvf_finalize::finalize (cognitive 26) edge/gateway/src/rvf_finalize.rs:113— ruvector_edge_gateway::rvf_finalize::finalize has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 6 (10 pts), boolean chains 5, 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.
ruvector_edge_gateway::rvf_finalize_step::step (cognitive 26) edge/gateway/src/rvf_finalize_step.rs:266— ruvector_edge_gateway::rvf_finalize_step::step has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (7 pts), boolean chains 6, 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.
ruvector_edge_gateway::graph_cypher::precheck (cognitive 23) edge/gateway/src/graph_cypher.rs:55— ruvector_edge_gateway::graph_cypher::precheck has cognitive complexity 23 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (8 pts), boolean chains 3, match/switch 1 (2 pts) (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.
ruvector_edge_gateway::graph_cypher_dx::render (cognitive 23) edge/gateway/src/graph_cypher_dx.rs:268— ruvector_edge_gateway::graph_cypher_dx::render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (3 pts), loops 1 (2 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.
ruvector_edge_gateway::api::serve (cognitive 22) edge/gateway/src/api.rs:178— ruvector_edge_gateway::api::serve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (22 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.
ruvector_edge_gateway::graph_cypher::estimate (cognitive 19) edge/gateway/src/graph_cypher.rs:141— ruvector_edge_gateway::graph_cypher::estimate has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 2 (7 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_edge_gateway::registry_sweep::sweep_scope (cognitive 19) edge/gateway/src/registry_sweep.rs:51— ruvector_edge_gateway::registry_sweep::sweep_scope has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (3 pts), boolean chains 1, match/switch 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.
ruvector_edge_gateway::m3_shard::handle (cognitive 17) edge/gateway/src/m3_shard.rs:112— ruvector_edge_gateway::m3_shard::handle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (4 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HnswIndex::insert (cognitive 37) crates/rvAgent/rvagent-middleware/src/hnsw.rs:203— HnswIndex::insert has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 4 (5 pts) (nesting depth added 21). 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.
HnswIndex::search_knn_internal (cognitive 34) crates/ruvector-router-core/src/index.rs:286— HnswIndex::search_knn_internal has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 21). 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.
HnswIndex::search_layer (cognitive 32) crates/ruvector-edge-index/src/hnsw/search.rs:44— HnswIndex::search_layer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HnswIndex::search_layer (cognitive 29) crates/rvAgent/rvagent-middleware/src/hnsw.rs:357— HnswIndex::search_layer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HnswIndex::compact (cognitive 24) crates/ruvector-edge-index/src/hnsw/compact.rs:76— HnswIndex::compact has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 6 (7 pts), boolean chains 4 (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.
HnswIndex::search_layer (cognitive 24) crates/ruvector-postgres/src/index/hnsw.rs:324— HnswIndex::search_layer has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 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.
HnswIndex::insert (cognitive 21) crates/ruvector-postgres/src/index/hnsw.rs:167— HnswIndex::insert has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 6 (8 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.
HnswIndex::connect (cognitive 19) crates/ruvector-postgres/src/index/hnsw.rs:418— HnswIndex::connect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (19 pts) (nesting depth added 11). 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.
HnswIndex::repair_links (cognitive 18) crates/ruvector-edge-index/src/hnsw/compact.rs:22— HnswIndex::repair_links has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 3 (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.
HnswIndex::parse (cognitive 16) crates/ruvector-edge-index/src/hnsw/codec.rs:166— HnswIndex::parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
HnswIndex::insert (cognitive 16) crates/ruvector-router-core/src/index.rs:132— HnswIndex::insert has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), 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.
Duplicated block (8–10 lines × 2) crates/ruvector-cnn/src/kernels/int8_avx2.rs:285— crates/ruvector-cnn/src/kernels/int8_avx2.rs:285-292 | crates/ruvector-cnn/src/simd/wasm.rs:300-309 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8–10 lines × 2) crates/ruvector-consciousness/src/phi.rs:411— crates/ruvector-consciousness/src/phi.rs:411-420 | crates/ruvector-consciousness/src/rsvd_emergence.rs:204-211 — 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 (8–10 lines × 2) crates/ruvector-core/src/pdx.rs:133— crates/ruvector-core/src/pdx.rs:133-142 | crates/ruvector-core/src/pdx.rs:153-160 — 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 (8–10 lines × 2) crates/ruvector-core/src/quantization.rs:48— crates/ruvector-core/src/quantization.rs:48-57 | crates/ruvector-core/src/quantization.rs:211-218 — 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 (8–10 lines × 2) crates/ruvector-kalshi/src/brain.rs:122— crates/ruvector-kalshi/src/brain.rs:122-131 | crates/ruvector-kalshi/src/rest.rs:106-113 — 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 (8–10 lines × 2) crates/ruvector-postgres/src/hybrid/mod.rs:131— crates/ruvector-postgres/src/hybrid/mod.rs:131-138 | crates/ruvector-postgres/src/hybrid/mod.rs:272-281 — 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 (8–10 lines × 2) crates/ruvector-postgres/src/index/hnsw_am.rs:1736— crates/ruvector-postgres/src/index/hnsw_am.rs:1736-1745 | crates/ruvector-postgres/src/index/ivfflat_am.rs:1597-1604 — before extracting anything, compare `crates/ruvector-postgres/src/index/hnsw_am.rs` and `crates/ruvector-postgres/src/index/ivfflat_am.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 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–10 lines × 2) crates/ruvector-postgres/src/tenancy/mod.rs:464— crates/ruvector-postgres/src/tenancy/mod.rs:464-471 | crates/ruvector-postgres/src/tenancy/registry.rs:142-151 — 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 (8–10 lines × 2) crates/ruvix/crates/net/src/udp.rs:128— crates/ruvix/crates/net/src/udp.rs:128-137 | crates/ruvix/crates/net/src/udp.rs:185-192 — 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 (8–10 lines × 2) crates/ruvllm/src/metal/context.rs:525— crates/ruvllm/src/metal/context.rs:525-532 | crates/ruvllm/src/metal/context.rs:856-865 — 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 (8–10 lines × 2) crates/rvf/rvf-runtime/src/store.rs:1183— crates/rvf/rvf-runtime/src/store.rs:1183-1190 | crates/rvf/rvf-runtime/src/store.rs:1304-1313 — 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.
ruvector_hailo_cluster::bin::embed::main (cognitive 137) crates/ruvector-hailo-cluster/src/bin/embed.rs:30— ruvector_hailo_cluster::bin::embed::main has cognitive complexity 137 (threshold 15). Drivers by points: if/else 44 (88 pts), loops 10 (29 pts), match/switch 9 (17 pts), boolean chains 3 (nesting depth added 71). 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.
ruvector_hailo_cluster::bin::bench::main (cognitive 98) crates/ruvector-hailo-cluster/src/bin/bench.rs:31— ruvector_hailo_cluster::bin::bench::main has cognitive complexity 98 (threshold 15). Drivers by points: if/else 36 (60 pts), match/switch 10 (23 pts), loops 6 (13 pts), boolean chains 2 (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.
ruvector_hailo_cluster::bin::stats::main (cognitive 73) crates/ruvector-hailo-cluster/src/bin/stats.rs:31— ruvector_hailo_cluster::bin::stats::main has cognitive complexity 73 (threshold 15). Drivers by points: if/else 24 (38 pts), loops 7 (13 pts), match/switch 8 (13 pts), boolean chains 9 (nesting depth added 25). 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.
ruvector_hailo_cluster::bin::ruview-csi-bridge::main (cognitive 68) crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:138— ruvector_hailo_cluster::bin::ruview-csi-bridge::main has cognitive complexity 68 (threshold 15). Drivers by points: if/else 21 (46 pts), match/switch 5 (14 pts), boolean chains 6, loops 2 (nesting depth added 34). 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.
ruvector_hailo_cluster::bin::mmwave-bridge::main (cognitive 47) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:37— ruvector_hailo_cluster::bin::mmwave-bridge::main has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (36 pts), match/switch 3 (7 pts), boolean chains 3, loops 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.
ruvector_hailo_cluster::bin::ruvllm-bridge::main (cognitive 30) crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:50— ruvector_hailo_cluster::bin::ruvllm-bridge::main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 5 (9 pts), boolean chains 3, loops 2 (nesting depth added 7). 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.
ruvector_hailo_cluster::bin::mmwave-bridge::scan_for_radar (cognitive 29) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:564— ruvector_hailo_cluster::bin::mmwave-bridge::scan_for_radar has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (6 pts), match/switch 2 (5 pts), boolean chains 1 (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.
ruvector_hailo_cluster::bin::worker::main (cognitive 22) crates/ruvector-hailo-cluster/src/bin/worker.rs:483— ruvector_hailo_cluster::bin::worker::main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 3 (5 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ruvector_hailo_cluster::bin::mmwave-bridge::run_serial (cognitive 17) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:450— ruvector_hailo_cluster::bin::mmwave-bridge::run_serial has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 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.
ruvector_hailo_cluster::health::probe_one (cognitive 16) crates/ruvector-hailo-cluster/src/health.rs:125— ruvector_hailo_cluster::health::probe_one has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_consciousness::rsvd_emergence::randomized_svd (cognitive 41) crates/ruvector-consciousness/src/rsvd_emergence.rs:44— ruvector_consciousness::rsvd_emergence::randomized_svd has cognitive complexity 41 (threshold 15). Drivers by points: loops 19 (39 pts), if/else 1 (2 pts) (nesting depth added 21). 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.
ruvector_consciousness::phi::fiedler_vector (cognitive 23) crates/ruvector-consciousness/src/phi.rs:394— ruvector_consciousness::phi::fiedler_vector has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 3 (5 pts) (nesting depth added 11). 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.
ruvector_consciousness::phi::compute_product_distribution_fast (cognitive 22) crates/ruvector-consciousness/src/phi.rs:167— ruvector_consciousness::phi::compute_product_distribution_fast has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 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.
ruvector_consciousness::pid::specific_information_cached (cognitive 18) crates/ruvector-consciousness/src/pid.rs:139— ruvector_consciousness::pid::specific_information_cached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ruvector_consciousness::pid::specific_information) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_consciousness::pid::specific_information (cognitive 18) crates/ruvector-consciousness/src/pid.rs:192— ruvector_consciousness::pid::specific_information has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ruvector_consciousness::pid::specific_information_cached) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_consciousness::emergence::greedy_merge (cognitive 17) crates/ruvector-consciousness/src/emergence.rs:217— ruvector_consciousness::emergence::greedy_merge has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 2 (7 pts) (nesting depth added 10). 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.
ruvector_consciousness::emergence::state_distribution_distance (cognitive 17) crates/ruvector-consciousness/src/emergence.rs:269— ruvector_consciousness::emergence::state_distribution_distance has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 4 (5 pts) (nesting depth added 7). 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.
ruvector_consciousness::geomip::compute_product_local (cognitive 17) crates/ruvector-consciousness/src/geomip.rs:386— ruvector_consciousness::geomip::compute_product_local has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 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.
ruvector_consciousness::ces::compute_relations (cognitive 16) crates/ruvector-consciousness/src/ces.rs:147— ruvector_consciousness::ces::compute_relations 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.
ruvector_consciousness::iit4::product_distribution (cognitive 16) crates/ruvector-consciousness/src/iit4.rs:363— ruvector_consciousness::iit4::product_distribution has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (6 pts) (nesting depth added 8). 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.
Duplicated block (31 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:292— crates/ruvector-graph-node/src/cypher_exec.rs:292-322 | crates/ruvector-py/src/graph/cypher_eval.rs:279-309 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_eval.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 197 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 (31 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1001— crates/ruvector-postgres/src/graph/sparql/parser.rs:1001-1031 | crates/rvlite/src/sparql/parser.rs:1007-1037 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (31 lines × 2) crates/ruvllm_sparse_attention/src/attention.rs:263— crates/ruvllm_sparse_attention/src/attention.rs:263-293 | crates/ruvllm_sparse_attention/src/attention.rs:1435-1465 — 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 (31 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1291— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1291-1321 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1408-1438 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (31 lines × 2) patches/candle-core-0.8.4/src/display.rs:21— patches/candle-core-0.8.4/src/display.rs:21-51 | patches/candle-core-0.9.2/src/display.rs:21-51 — before extracting anything, compare `patches/candle-core-0.8.4/src/display.rs` and `patches/candle-core-0.9.2/src/display.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 304 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 (31 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1391— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1391-1421 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1559-1589 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (31 lines × 2) patches/candle-core-0.8.4/src/npy.rs:131— patches/candle-core-0.8.4/src/npy.rs:131-161 | patches/candle-core-0.9.2/src/npy.rs:138-168 — before extracting anything, compare `patches/candle-core-0.8.4/src/npy.rs` and `patches/candle-core-0.9.2/src/npy.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 283 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 (31 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1793— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1793-1823 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2220-2250 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (31 lines × 2) patches/hnsw_rs/src/hnsw.rs:655— patches/hnsw_rs/src/hnsw.rs:655-685 | scripts/patches/hnsw_rs/src/hnsw.rs:648-678 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (31 lines × 2) patches/hnsw_rs/src/hnswio.rs:1357— patches/hnsw_rs/src/hnswio.rs:1357-1387 | scripts/patches/hnsw_rs/src/hnswio.rs:1357-1387 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (29 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:63— crates/ruvector-postgres/src/graph/sparql/executor.rs:63-91 | crates/rvlite/src/sparql/executor.rs:50-78 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (29 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:950— crates/ruvector-postgres/src/graph/sparql/parser.rs:950-978 | crates/rvlite/src/sparql/parser.rs:956-984 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (29 lines × 2) crates/ruvector-solver-node/src/lib.rs:337— crates/ruvector-solver-node/src/lib.rs:337-365 | crates/ruvector-solver-node/src/lib.rs:396-424 — 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 (29 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:280— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:280-308 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:329-357 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/utils.rs` and `patches/candle-core-0.9.2/src/cpu_backend/utils.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 259 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 (29 lines × 2) patches/candle-core-0.8.4/src/npy.rs:167— patches/candle-core-0.8.4/src/npy.rs:167-195 | patches/candle-core-0.9.2/src/npy.rs:174-202 — before extracting anything, compare `patches/candle-core-0.8.4/src/npy.rs` and `patches/candle-core-0.9.2/src/npy.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 283 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 (29 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:784— patches/candle-core-0.8.4/src/quantized/k_quants.rs:784-812 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:835-863 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (29 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:978— patches/candle-core-0.8.4/src/quantized/k_quants.rs:978-1006 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1086-1114 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (29 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1611— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1611-1639 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1957-1985 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (29 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:2527— patches/candle-core-0.8.4/src/tensor.rs:2527-2555 | patches/candle-core-0.9.2/src/tensor.rs:2850-2878 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (29 lines × 2) patches/hnsw_rs/src/libext.rs:692— patches/hnsw_rs/src/libext.rs:692-720 | scripts/patches/hnsw_rs/src/libext.rs:692-720 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (27 lines × 2) crates/ruvector-bench/src/bin/memory_benchmark.rs:168— crates/ruvector-bench/src/bin/memory_benchmark.rs:168-194 | crates/ruvector-bench/src/bin/memory_benchmark.rs:372-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.
Duplicated block (27 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:473— crates/ruvector-graph/src/cypher/parser.rs:473-499 | crates/rvlite/src/cypher/parser.rs:473-499 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (27 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:760— crates/ruvector-graph/src/cypher/parser.rs:760-786 | crates/rvlite/src/cypher/parser.rs:760-786 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (27 lines × 2) crates/ruvector-math/src/information_geometry/fisher.rs:180— crates/ruvector-math/src/information_geometry/fisher.rs:180-206 | crates/ruvector-math/src/information_geometry/kfac.rs:217-243 — before extracting anything, compare `crates/ruvector-math/src/information_geometry/fisher.rs` and `crates/ruvector-math/src/information_geometry/kfac.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 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 (27 lines × 2) crates/ruvllm/src/models/openmythos/config.rs:64— crates/ruvllm/src/models/openmythos/config.rs:64-90 | crates/ruvllm/src/models/openmythos/config.rs:96-122 — 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 (27 lines × 2) crates/ruvllm/src/models/sampling.rs:131— crates/ruvllm/src/models/sampling.rs:131-157 | crates/ruvllm/src/models/sampling.rs:217-243 — 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 (27 lines × 2) crates/ruvllm/src/training/contrastive.rs:437— crates/ruvllm/src/training/contrastive.rs:437-463 | crates/ruvllm/src/training/contrastive.rs:499-525 — 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 (27 lines × 2) patches/candle-core-0.8.4/src/layout.rs:81— patches/candle-core-0.8.4/src/layout.rs:81-107 | patches/candle-core-0.9.2/src/layout.rs:81-107 — before extracting anything, compare `patches/candle-core-0.8.4/src/layout.rs` and `patches/candle-core-0.9.2/src/layout.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 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 (27 lines × 2) patches/candle-core-0.8.4/src/layout.rs:195— patches/candle-core-0.8.4/src/layout.rs:195-221 | patches/candle-core-0.9.2/src/layout.rs:195-221 — before extracting anything, compare `patches/candle-core-0.8.4/src/layout.rs` and `patches/candle-core-0.9.2/src/layout.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 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 (27 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:1530— patches/candle-core-0.8.4/src/tensor.rs:1530-1556 | patches/candle-core-0.9.2/src/tensor.rs:1854-1880 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (12 lines × 3) crates/ruvector-bench/src/bin/ann_benchmark.rs:158— crates/ruvector-bench/src/bin/ann_benchmark.rs:158-169 | crates/ruvector-bench/src/bin/ann_benchmark.rs:173-184 | crates/ruvector-bench/src/bin/ann_benchmark.rs:188-199 — 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.
Duplicated block (12 lines × 3) crates/ruvector-bench/src/bin/comparison_benchmark.rs:329— crates/ruvector-bench/src/bin/comparison_benchmark.rs:329-340 | crates/ruvector-bench/src/bin/latency_benchmark.rs:360-371 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:157-168 — before extracting anything, compare `crates/ruvector-bench/src/bin/comparison_benchmark.rs` and `crates/ruvector-bench/src/bin/latency_benchmark.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 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 (12 lines × 3) crates/ruvector-hybrid/src/bm25.rs:115— crates/ruvector-hybrid/src/bm25.rs:115-126 | crates/ruvector-hybrid/src/fusion.rs:163-174 | crates/ruvector-hybrid/src/fusion.rs:232-243 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12 lines × 3) crates/ruvector-mincut-gated-transformer/src/arena.rs:122— crates/ruvector-mincut-gated-transformer/src/arena.rs:122-133 | crates/ruvector-mincut-gated-transformer/src/arena.rs:150-161 | crates/ruvector-mincut-gated-transformer/src/arena.rs:178-189 — 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.
Duplicated block (12 lines × 3) crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:268— crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:268-279 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:297-308 | crates/ruvector-rabitq/src/rotation.rs:223-234 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12 lines × 3) crates/ruvector-postgres/src/types/binaryvec.rs:351— crates/ruvector-postgres/src/types/binaryvec.rs:351-362 | crates/ruvector-postgres/src/types/productvec.rs:370-381 | crates/ruvector-postgres/src/types/scalarvec.rs:396-407 — before extracting anything, compare `crates/ruvector-postgres/src/types/binaryvec.rs` and `crates/ruvector-postgres/src/types/scalarvec.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 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 (12 lines × 3) crates/ruvector-solver/src/types.rs:112— crates/ruvector-solver/src/types.rs:112-123 | crates/ruvector-solver/src/types.rs:146-157 | crates/ruvector-solver/src/types.rs:196-207 — 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.
Duplicated block (12 lines × 3) crates/ruvector-temporal-tensor/src/store.rs:591— crates/ruvector-temporal-tensor/src/store.rs:591-602 | crates/ruvector-temporal-tensor/src/store.rs:1094-1105 | crates/ruvector-temporal-tensor/src/store.rs:1180-1191 — 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.
Duplicated block (12 lines × 3) crates/ruvllm/src/backends/gemma2.rs:755— crates/ruvllm/src/backends/gemma2.rs:755-766 | crates/ruvllm/src/backends/phi3.rs:634-645 | crates/ruvllm/src/models/ruvltra.rs:914-925 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (12 lines × 3) crates/ruvector-domain-expansion/src/planning.rs:529— crates/ruvector-domain-expansion/src/planning.rs:529-540 | crates/ruvector-domain-expansion/src/tool_orchestration.rs:600-611 | crates/ruvector-robotics/src/domain_expansion.rs:656-667 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (9–12 lines × 2) crates/ruvector-acorn/src/search.rs:68— crates/ruvector-acorn/src/search.rs:68-79 | crates/ruvector-adaptive-ann/src/search.rs:81-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9–12 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:86— crates/ruvector-core/src/simd_intrinsics.rs:86-97 | crates/ruvector-core/src/simd_intrinsics.rs:973-981 — 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–12 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:485— crates/ruvector-core/src/simd_intrinsics.rs:485-496 | crates/ruvector-core/src/simd_intrinsics.rs:666-674 — 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–12 lines × 2) crates/ruvector-postgres/src/distance/simd.rs:1540— crates/ruvector-postgres/src/distance/simd.rs:1540-1548 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:206-217 — before extracting anything, compare `crates/ruvector-postgres/src/distance/simd.rs` and `crates/ruvix/crates/vecgraph/src/simd_distance.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 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 (9–12 lines × 2) crates/ruvector-postgres/src/gated_transformer/mod.rs:157— crates/ruvector-postgres/src/gated_transformer/mod.rs:157-168 | crates/ruvector-postgres/src/gated_transformer/mod.rs:454-462 — 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–12 lines × 2) crates/ruvllm/src/models/openmythos/mod.rs:331— crates/ruvllm/src/models/openmythos/mod.rs:331-342 | crates/ruvllm/src/models/rdt.rs:768-776 — before extracting anything, compare `crates/ruvllm/src/models/openmythos/mod.rs` and `crates/ruvllm/src/models/rdt.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 54 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 (9–12 lines × 2) crates/rvf/rvf-index/src/codec.rs:247— crates/rvf/rvf-index/src/codec.rs:247-258 | crates/rvf/rvf-index/src/codec.rs:261-269 — 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–12 lines × 2) crates/rvf/rvf-runtime/src/cow.rs:252— crates/rvf/rvf-runtime/src/cow.rs:252-263 | crates/rvf/rvf-runtime/src/cow.rs:278-286 — 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–12 lines × 2) patches/candle-core-0.8.4/src/display.rs:13— patches/candle-core-0.8.4/src/display.rs:13-21 | patches/candle-core-0.8.4/src/display.rs:503-514 — 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–12 lines × 2) patches/candle-core-0.9.2/src/display.rs:13— patches/candle-core-0.9.2/src/display.rs:13-21 | patches/candle-core-0.9.2/src/display.rs:540-551 — 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 × 4) crates/ruvector-cnn/src/simd/neon.rs:49— crates/ruvector-cnn/src/simd/neon.rs:49-58 | crates/ruvector-core/src/simd_intrinsics.rs:761-770 | crates/ruvllm/src/kernels/matmul.rs:1234-1243 | crates/ruvllm/src/kernels/norm.rs:90-99 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (10 lines × 4) crates/ruvector-hailo-cluster/src/bin/embed.rs:113— crates/ruvector-hailo-cluster/src/bin/embed.rs:113-122 | crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:122-131 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:179-188 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:94-103 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/embed.rs` and `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 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 × 4) crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:272— crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:272-281 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:301-310 | crates/ruvector-mincut-gated-transformer/src/kv_cache/legacy.rs:92-101 | crates/ruvector-rabitq/src/rotation.rs:227-236 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 4) crates/ruvector-robotics/src/rvf.rs:144— crates/ruvector-robotics/src/rvf.rs:144-153 | crates/ruvector-robotics/src/rvf.rs:182-191 | crates/ruvector-robotics/src/rvf.rs:211-220 | crates/ruvector-robotics/src/rvf.rs:287-296 — 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.
Duplicated block (10 lines × 4) crates/ruvllm/src/backends/coreml_backend.rs:1285— crates/ruvllm/src/backends/coreml_backend.rs:1285-1294 | crates/ruvllm/src/backends/coreml_backend.rs:1361-1370 | crates/ruvllm/src/backends/coreml_backend.rs:1420-1429 | crates/ruvllm/src/backends/coreml_backend.rs:1520-1529 — 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.
Duplicated block (10 lines × 4) crates/ruvllm/src/backends/gemma2.rs:777— crates/ruvllm/src/backends/gemma2.rs:777-786 | crates/ruvllm/src/backends/phi3.rs:648-657 | crates/ruvllm/src/models/ruvltra.rs:928-937 | crates/ruvllm/src/models/ruvltra_medium.rs:831-840 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1367— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1367-1376 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1485-1494 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1484-1493 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1602-1611 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (10 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:301— patches/candle-core-0.8.4/src/quantized/k_quants.rs:301-310 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:502-511 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:324-333 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:534-543 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (10 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1291— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1291-1300 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1493-1502 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1558-1567 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1835-1844 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (10 lines × 4) patches/candle-core-0.8.4/src/tensor.rs:595— patches/candle-core-0.8.4/src/tensor.rs:595-604 | patches/candle-core-0.8.4/src/tensor.rs:1607-1616 | patches/candle-core-0.9.2/src/tensor.rs:663-672 | patches/candle-core-0.9.2/src/tensor.rs:1931-1940 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (5 lines × 6) crates/ruvector-cnn/src/layers/conv.rs:412— crates/ruvector-cnn/src/layers/conv.rs:412-416 | crates/ruvector-cnn/src/layers/conv.rs:641-645 | crates/ruvector-cnn/src/layers/quantized_conv2d.rs:259-263 | crates/ruvector-cnn/src/layers/quantized_depthwise.rs:213-217 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:70-74 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:165-169 — before extracting anything, compare `crates/ruvector-cnn/src/layers/quantized_conv2d.rs` and `crates/ruvector-cnn/src/layers/quantized_depthwise.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 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 × 6) crates/ruvix/crates/cli/src/commands/dtb.rs:641— crates/ruvix/crates/cli/src/commands/dtb.rs:641-645 | crates/ruvix/crates/cli/src/commands/dtb.rs:687-691 | crates/ruvix/crates/cli/src/commands/dtb.rs:762-766 | crates/ruvix/crates/cli/src/commands/dtb.rs:849-853 | crates/ruvix/crates/cli/src/commands/dtb.rs:938-942 | crates/ruvix/crates/cli/src/commands/dtb.rs:1041-1045 — all 6 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.
Duplicated block (5 lines × 6) crates/ruvllm/src/kv_cache.rs:469— crates/ruvllm/src/kv_cache.rs:469-475 | crates/ruvllm/src/kv_cache.rs:541-545 | crates/ruvllm/src/kv_cache.rs:604-610 | crates/ruvllm/src/kv_cache.rs:710-715 | crates/ruvllm/src/speculative.rs:1003-1007 | crates/ruvllm/src/speculative.rs:1180-1184 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 6) crates/ruvllm/src/models/openmythos/mod.rs:406— crates/ruvllm/src/models/openmythos/mod.rs:406-410 | crates/ruvllm/src/models/openmythos/mod.rs:458-462 | crates/ruvllm/src/models/openmythos/mod.rs:519-523 | crates/ruvllm/src/models/rdt.rs:807-811 | crates/ruvllm/src/models/rdt.rs:849-853 | crates/ruvllm/src/models/rdt.rs:894-898 — before extracting anything, compare `crates/ruvllm/src/models/openmythos/mod.rs` and `crates/ruvllm/src/models/rdt.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 54 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 (5 lines × 6) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:317— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:317-321 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:356-360 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:433-437 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:335-339 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:374-378 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:451-455 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (5 lines × 6) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1295— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1295-1299 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1492-1496 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1497-1501 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1562-1566 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1758-1762 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1839-1843 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (5 lines × 6) patches/candle-core-0.8.4/src/tensor.rs:1356— patches/candle-core-0.8.4/src/tensor.rs:1356-1360 | patches/candle-core-0.8.4/src/tensor.rs:1472-1476 | patches/candle-core-0.8.4/src/tensor.rs:1534-1538 | patches/candle-core-0.9.2/src/tensor.rs:1613-1617 | patches/candle-core-0.9.2/src/tensor.rs:1796-1800 | patches/candle-core-0.9.2/src/tensor.rs:1858-1862 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (5 lines × 6) crates/prime-radiant/src/attention/adapter.rs:168— crates/prime-radiant/src/attention/adapter.rs:168-173 | crates/prime-radiant/src/attention/diffusion.rs:252-257 | crates/prime-radiant/src/attention/topology.rs:231-236 | crates/ruvector-attention/src/topology/coherence.rs:268-273 | crates/ruvector-query-cache/src/lib.rs:111-115 | crates/ruvllm-wasm/src/hnsw_router.rs:302-306 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times.
Duplicated block (5 lines × 6) crates/ruvector-edge-index/src/persist/mod.rs:121— crates/ruvector-edge-index/src/persist/mod.rs:121-125 | crates/ruvector-edge-registry/src/validate/layout.rs:50-54 | crates/rvf/rvf-manifest/src/directory.rs:58-62 | crates/rvf/rvf-manifest/src/level0.rs:21-25 | crates/rvf/rvf-types/src/stream.rs:109-113 | crates/rvf/rvf-wire/src/stream/verifier.rs:158-162 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times.
Duplicated block (5 lines × 6) crates/ruvix/crates/smp/src/barriers.rs:90— crates/ruvix/crates/smp/src/barriers.rs:90-94 | crates/ruvix/crates/smp/src/barriers.rs:114-118 | crates/ruvix/crates/smp/src/barriers.rs:136-140 | crates/ruvix/crates/smp/src/barriers.rs:183-187 | crates/ruvix/crates/smp/src/barriers.rs:204-208 | crates/ruvix/crates/smp/src/barriers.rs:246-250 — all 6 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.
candle_core::quantized::utils::make_qx_quants (cyclomatic 36) patches/candle-core-0.9.2/src/quantized/utils.rs:62— candle_core::quantized::utils::make_qx_quants has cyclomatic complexity 36 (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.
candle_core::quantized::utils::make_qx_quants (cyclomatic 32) patches/candle-core-0.8.4/src/quantized/utils.rs:61— candle_core::quantized::utils::make_qx_quants has cyclomatic complexity 32 (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.
candle_core::cuda_backend::gemm_config (cyclomatic 27) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1047— candle_core::cuda_backend::gemm_config has cyclomatic complexity 27 (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.
candle_core::cuda_backend::gemm_config (cyclomatic 27) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1343— candle_core::cuda_backend::gemm_config has cyclomatic complexity 27 (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.
candle_core::cpu::erf::erf_impl (cyclomatic 23) patches/candle-core-0.8.4/src/cpu/erf.rs:599— candle_core::cpu::erf::erf_impl has cyclomatic complexity 23 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
candle_core::quantized::utils::make_qkx3_quants (cyclomatic 21) patches/candle-core-0.9.2/src/quantized/utils.rs:356— candle_core::quantized::utils::make_qkx3_quants 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.
candle_core::cpu_backend::conv2d::conv2d_tiled (cyclomatic 20) patches/candle-core-0.9.2/src/cpu_backend/conv2d.rs:126— candle_core::cpu_backend::conv2d::conv2d_tiled has cyclomatic complexity 20 (threshold 15). 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.
candle_core::cpu_backend::utils::binary_map_vec (cyclomatic 16) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:164— candle_core::cpu_backend::utils::binary_map_vec has cyclomatic complexity 16 (threshold 15). 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.
candle_core::cpu_backend::utils::binary_map_vec (cyclomatic 16) patches/candle-core-0.9.2/src/cpu_backend/utils.rs:213— candle_core::cpu_backend::utils::binary_map_vec has cyclomatic complexity 16 (threshold 15). 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.
Repeated repair: crates/ruvllm-cli/src/commands/serve.rs crates/ruvllm-cli/src/commands/serve.rs:60— crates/ruvllm-cli/src/commands/serve.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is ruvllm_cli::commands::serve::run at line 60), 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(python): resume missing immutable portfolio artifacts safely (#1205)”; “fix(ruvllm): real Qwen2/Qwen3 GGUF inference, honest strict serve, no fake npm output (#1125)”; “fix(ruvllm-cli): make serve's mock mode visible, and add --strict to fail instead”; “fix(ruvllm-cli): resolve GGUF globs via HF file listing + alias routing (PIR WP0b, #846)”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvllm-cli/src/commands/serve.rs`: 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: crates/ruvector-context/src/index.rs crates/ruvector-context/src/index.rs:87— crates/ruvector-context/src/index.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is ScopedContextIndex::open at line 87), 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(context): make the index root private and enforce it”; “fix(context): build shards in private staging; trust inodes, not paths”; “fix(context): close symlink-redirected shard creation and quarantine denial”; “fix(context,core): close three HIGH findings in the scope-sharded index”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-context/src/index.rs`: 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: npm/packages/ruvector/src/index.ts npm/packages/ruvector/src/index.ts:152— npm/packages/ruvector/src/index.ts 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 10 (its worst body is normalizeMetric at line 152), 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(router,ruvector): ship #430 + HNSW neighbour-selection heuristic; honour documented DbOptions; router 0.1.31, ruvector 0.3.2 (#1005)”; “fix(ruvector): rvf can never back VectorDb, and the stub must not eat writes (#992)”; “fix: integrate latest PRs and issue regressions”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- npm/packages/ruvector/src/index.ts`: 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: crates/ruvector-tiny-dancer-core/src/router.rs crates/ruvector-tiny-dancer-core/src/router.rs:65— crates/ruvector-tiny-dancer-core/src/router.rs 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 14 (its worst body is Router::route at line 65), 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: “Cleanup/hardening: fix five open correctness/security defects, adopt ADR-341 invariants (#933)”; “fix(tiny-dancer): record circuit-breaker failure when the VoI gate rejects non-finite model output (PIR WP28, ADR-331)”; “fix(tiny-dancer): make the VoI gate escalate-only instead of fail-open (PIR WP28, ADR-331)”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-tiny-dancer-core/src/router.rs`: 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: crates/ruvector-gnn/src/layer.rs crates/ruvector-gnn/src/layer.rs:380— crates/ruvector-gnn/src/layer.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is RuvectorLayer::validate_dimensions at line 380), 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(msrv): validate workspace on Rust 1.88 and retain SIMD fallbacks”; “fix(gnn): reject malformed layer state before native execution”; “fix(gnn): reject invalid Node vector dimensions and zero heads”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-gnn/src/layer.rs`: 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: crates/ruvllm-cli/src/commands/download.rs crates/ruvllm-cli/src/commands/download.rs:18— crates/ruvllm-cli/src/commands/download.rs 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 ruvllm_cli::commands::download::run at line 18), 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(ruvllm): real Qwen2/Qwen3 GGUF inference, honest strict serve, no fake npm output (#1125)”; “fix(ruvllm-cli): keep HF_TOKEN off curl argv + guard remote paths (PR #860 security review)”; “fix(ruvllm-cli): resolve GGUF globs via HF file listing + alias routing (PIR WP0b, #846)”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvllm-cli/src/commands/download.rs`: 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: crates/ruvllm-cli/src/main.rs crates/ruvllm-cli/src/main.rs:258— crates/ruvllm-cli/src/main.rs 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 10 (its worst body is ruvllm_cli::main at line 258), 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(ruvllm): real Qwen2/Qwen3 GGUF inference, honest strict serve, no fake npm output (#1125)”; “fix(ruvllm-cli): make serve's mock mode visible, and add --strict to fail instead”; “fix: #995 #984 #968 #988 + publish hardening; ruvector 0.3.3, graph-node 2.1.1 (#1014)”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvllm-cli/src/main.rs`: 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: crates/ruvector-graph-node/src/lib.rs crates/ruvector-graph-node/src/lib.rs:870— crates/ruvector-graph-node/src/lib.rs 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 GraphDatabase::delete_node at line 870), 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: #995 #984 #968 #988 + publish hardening; ruvector 0.3.3, graph-node 2.1.1 (#1014)”; “fix(graph-node): execute Cypher MATCH properly and defer hydration (#879, #826)”; “fix: integrate latest PRs and issue regressions”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-graph-node/src/lib.rs`: 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: crates/ruvector-context/src/shard.rs crates/ruvector-context/src/shard.rs:120— crates/ruvector-context/src/shard.rs 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 5 (its worst body is ruvector_context::shard::create_shard 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(context): make the index root private and enforce it”; “fix(context): build shards in private staging; trust inodes, not paths”; “fix(context): close symlink-redirected shard creation and quarantine denial”. 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-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 21:20:51 +00:00' --until='2026-10-27 21:20:51 +00:00' --full-history --no-merges -- crates/ruvector-context/src/shard.rs`: 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.
Parser::parse_relationship_pattern (cognitive 45) crates/ruvector-graph/src/cypher/parser.rs:184— Parser::parse_relationship_pattern has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (41 pts), boolean chains 2, loops 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.
Parser::parse_relationship_pattern (cognitive 45) crates/rvlite/src/cypher/parser.rs:184— Parser::parse_relationship_pattern has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (41 pts), boolean chains 2, loops 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.
Parser::parse_chained_pattern (cognitive 41) crates/ruvector-graph/src/cypher/parser.rs:322— Parser::parse_chained_pattern has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 2 (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.
Parser::parse_chained_pattern (cognitive 41) crates/rvlite/src/cypher/parser.rs:322— Parser::parse_chained_pattern has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 2 (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.
Parser::parse_primary (cognitive 36) crates/ruvector-graph/src/cypher/parser.rs:1026— Parser::parse_primary has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (8 pts), match/switch 2 (5 pts) (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Parser::parse_remove (cognitive 29) crates/ruvector-graph/src/cypher/parser.rs:606— Parser::parse_remove has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 2 (5 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.
Parser::parse_remove (cognitive 29) crates/rvlite/src/cypher/parser.rs:606— Parser::parse_remove has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 2 (5 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.
Parser::parse_primary (cognitive 26) crates/rvlite/src/cypher/parser.rs:967— Parser::parse_primary has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (6 pts), match/switch 2 (5 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Parser::parse_function_call (cognitive 16) crates/ruvector-graph/src/cypher/parser.rs:1176— Parser::parse_function_call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (2 pts), match/switch 1 (2 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.
HnswGraph::search_layer (cognitive 37) crates/rvf/rvf-index/src/hnsw.rs:311— HnswGraph::search_layer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 4 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 21). 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.
HnswGraph::search_layer (cognitive 33) crates/ruvllm-wasm/src/hnsw_router.rs:427— HnswGraph::search_layer has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 21). 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.
HnswGraph::search_layer_ef (cognitive 29) crates/ruvector-hnsw-repair/src/graph.rs:215— HnswGraph::search_layer_ef has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3, loops 2 (3 pts) (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.
HnswGraph::insert (cognitive 27) crates/ruvector-hnsw-repair/src/graph.rs:70— HnswGraph::insert has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 8 (13 pts) (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.
HnswGraph::connect_node (cognitive 23) crates/ruvllm-wasm/src/hnsw_router.rs:353— HnswGraph::connect_node has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (6 pts) (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.
HnswGraph::insert (cognitive 21) crates/ruvector-matryoshka/src/hnsw.rs:131— HnswGraph::insert has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 6 (8 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.
HnswGraph::insert (cognitive 20) crates/rvf/rvf-index/src/hnsw.rs:183— HnswGraph::insert has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 5 (7 pts), match/switch 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.
HnswGraph::greedy_search_one (cognitive 16) crates/ruvector-hnsw-repair/src/graph.rs:181— HnswGraph::greedy_search_one has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 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.
HnswGraph::search_layer_impl (cognitive 16) crates/ruvector-matryoshka/src/hnsw.rs:279— HnswGraph::search_layer_impl 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.
Duplicated block (40 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:145— crates/ruvector-graph-node/src/cypher_exec.rs:145-184 | crates/ruvector-py/src/graph/cypher_eval.rs:132-171 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_eval.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 197 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 (40 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:1449— crates/ruvector-postgres/src/graph/sparql/executor.rs:1449-1488 | crates/rvlite/src/sparql/executor.rs:739-778 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (40 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:600— crates/ruvector-postgres/src/graph/sparql/parser.rs:600-639 | crates/rvlite/src/sparql/parser.rs:606-645 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (40 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1128— crates/ruvector-postgres/src/graph/sparql/parser.rs:1128-1167 | crates/rvlite/src/sparql/parser.rs:1134-1173 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (40 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1427— crates/ruvector-postgres/src/graph/sparql/parser.rs:1427-1466 | crates/rvlite/src/sparql/parser.rs:1433-1472 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (40 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:724— patches/candle-core-0.8.4/src/quantized/k_quants.rs:724-763 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:775-814 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (40 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1014— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1014-1053 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1122-1161 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (40 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:1477— patches/candle-core-0.8.4/src/tensor.rs:1477-1516 | patches/candle-core-0.9.2/src/tensor.rs:1801-1840 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (40 lines × 2) patches/candle-core-0.8.4/src/quantized/dummy_metal.rs:11— patches/candle-core-0.8.4/src/quantized/dummy_metal.rs:11-50 | patches/candle-core-0.9.2/src/quantized/dummy_metal.rs:11-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (32 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:349— crates/ruvector-graph-transformer-node/src/transformer.rs:349-380 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:364-395 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (32 lines × 2) crates/ruvector-postgres/src/graph/sparql/executor.rs:1588— crates/ruvector-postgres/src/graph/sparql/executor.rs:1588-1619 | crates/rvlite/src/sparql/executor.rs:865-896 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (32 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1500— crates/ruvector-postgres/src/graph/sparql/parser.rs:1500-1531 | crates/rvlite/src/sparql/parser.rs:1507-1538 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (32 lines × 2) crates/ruvllm/src/backends/phi3.rs:640— crates/ruvllm/src/backends/phi3.rs:640-671 | crates/ruvllm/src/models/ruvltra.rs:920-951 — before extracting anything, compare `crates/ruvllm/src/backends/phi3.rs` and `crates/ruvllm/src/models/ruvltra.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 269 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 (32 lines × 2) patches/candle-core-0.8.4/src/conv.rs:225— patches/candle-core-0.8.4/src/conv.rs:225-256 | patches/candle-core-0.9.2/src/conv.rs:240-271 — before extracting anything, compare `patches/candle-core-0.8.4/src/conv.rs` and `patches/candle-core-0.9.2/src/conv.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 191 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 (32 lines × 2) patches/candle-core-0.8.4/src/npy.rs:205— patches/candle-core-0.8.4/src/npy.rs:205-236 | patches/candle-core-0.9.2/src/npy.rs:212-243 — before extracting anything, compare `patches/candle-core-0.8.4/src/npy.rs` and `patches/candle-core-0.9.2/src/npy.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 283 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 (32 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:1663— patches/candle-core-0.8.4/src/tensor.rs:1663-1694 | patches/candle-core-0.9.2/src/tensor.rs:1987-2018 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (32 lines × 2) patches/hnsw_rs/src/hnsw.rs:1269— patches/hnsw_rs/src/hnsw.rs:1269-1300 | scripts/patches/hnsw_rs/src/hnsw.rs:1246-1277 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (32 lines × 2) patches/hnsw_rs/src/libext.rs:1064— patches/hnsw_rs/src/libext.rs:1064-1095 | scripts/patches/hnsw_rs/src/libext.rs:1064-1095 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (7–8 lines × 2) crates/mcp-brain-server/src/bin/local.rs:737— crates/mcp-brain-server/src/bin/local.rs:737-743 | crates/mcp-brain-server/src/bin/local.rs:1530-1537 — 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 (7–8 lines × 2) crates/ruvector-attention-unified-wasm/src/dag.rs:155— crates/ruvector-attention-unified-wasm/src/dag.rs:155-161 | crates/ruvector-dag/src/attention/topological.rs:43-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7–8 lines × 2) crates/ruvector-mincut-gated-transformer/src/early_exit.rs:310— crates/ruvector-mincut-gated-transformer/src/early_exit.rs:310-317 | crates/ruvector-mincut-gated-transformer/src/early_exit.rs:346-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.
Duplicated block (7–8 lines × 2) crates/ruvector-postgres/src/types/vector.rs:439— crates/ruvector-postgres/src/types/vector.rs:439-445 | crates/ruvector-postgres/src/types/vector.rs:518-525 — 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 (7–8 lines × 2) crates/ruvector-streaming-qng/src/static_pq.rs:85— crates/ruvector-streaming-qng/src/static_pq.rs:85-92 | crates/ruvector-streaming-qng/src/stream_pq.rs:156-162 — 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 (7–8 lines × 2) crates/ruvllm-cli/src/commands/download.rs:204— crates/ruvllm-cli/src/commands/download.rs:204-211 | crates/ruvllm-cli/src/commands/download.rs:239-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–8 lines × 2) crates/ruvllm/src/bitnet/backend.rs:1763— crates/ruvllm/src/bitnet/backend.rs:1763-1770 | crates/ruvllm/src/bitnet/backend.rs:1778-1784 — 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 (7–8 lines × 2) crates/rvAgent/rvagent-backends/src/state.rs:71— crates/rvAgent/rvagent-backends/src/state.rs:71-77 | crates/rvAgent/rvagent-backends/src/state.rs:93-100 — 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 (7–8 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:945— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:945-952 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1137-1143 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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.
Focus outline removed inline ui/ruvocal/src/lib/components/DeleteConversationModal.svelte:38— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ui/ruvocal/src/lib/components/DeleteConversationModal.svelte:57— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ui/ruvocal/src/lib/components/ExpandNavigation.svelte:11— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ui/ruvocal/src/lib/components/NavConversationItem.svelte:70— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ui/ruvocal/src/lib/components/ShareConversationModal.svelte:127— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ui/ruvocal/src/lib/components/chat/ChatInput.svelte:236— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ui/ruvocal/src/lib/components/chat/ChatInput.svelte:430— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ui/ruvocal/src/lib/components/chat/ChatMessage.svelte:488— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
RvfStore::restore_cow_state (cyclomatic 32) crates/rvf/rvf-runtime/src/store.rs:3424— RvfStore::restore_cow_state has cyclomatic complexity 32 (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.
RvfStore::compact (cyclomatic 26) crates/rvf/rvf-runtime/src/store.rs:1664— RvfStore::compact 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.
RvfStore::restore_metadata (cyclomatic 26) crates/rvf/rvf-runtime/src/store.rs:4041— RvfStore::restore_metadata 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.
RvfStore::ingest_batch_internal (cyclomatic 21) crates/rvf/rvf-runtime/src/store.rs:510— RvfStore::ingest_batch_internal 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.
RvfStore::encode_metadata_generation (cyclomatic 21) crates/rvf/rvf-runtime/src/store.rs:3822— RvfStore::encode_metadata_generation 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.
RvfStore::query_via_index_cow (cyclomatic 20) crates/rvf/rvf-runtime/src/store.rs:930— RvfStore::query_via_index_cow 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.
RvfStore::apply_open_policy (cyclomatic 18) crates/rvf/rvf-runtime/src/store/policy_api.rs:205— RvfStore::apply_open_policy 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.
RvfStore::cow_exact_parent_scan (cyclomatic 17) crates/rvf/rvf-runtime/src/store.rs:1250— RvfStore::cow_exact_parent_scan 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.
ruvector_graph_wasm::cypher_exec::project (cognitive 52) crates/ruvector-graph-wasm/src/cypher_exec.rs:1186— ruvector_graph_wasm::cypher_exec::project has cognitive complexity 52 (threshold 15). Drivers by points: loops 9 (20 pts), match/switch 6 (17 pts), if/else 8 (15 pts) (nesting depth added 29). 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.
ruvector_graph_wasm::cypher_exec::aggregate (cognitive 40) crates/ruvector-graph-wasm/src/cypher_exec.rs:1065— ruvector_graph_wasm::cypher_exec::aggregate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 5 (12 pts), match/switch 2 (4 pts) (nesting depth added 21). 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.
ruvector_graph_wasm::cypher_exec::match_clause (cognitive 30) crates/ruvector-graph-wasm/src/cypher_exec.rs:830— ruvector_graph_wasm::cypher_exec::match_clause has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (16 pts), if/else 5 (13 pts), boolean chains 1 (nesting depth added 16). 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.
ruvector_graph_wasm::cypher_exec::create_clause (cognitive 30) crates/ruvector-graph-wasm/src/cypher_exec.rs:905— ruvector_graph_wasm::cypher_exec::create_clause has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (18 pts), match/switch 2 (6 pts), loops 3 (5 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.
ruvector_graph_wasm::cypher_exec::extend (cognitive 24) crates/ruvector-graph-wasm/src/cypher_exec.rs:780— ruvector_graph_wasm::cypher_exec::extend has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector_graph_wasm::cypher_exec::binary (cognitive 18) crates/ruvector-graph-wasm/src/cypher_exec.rs:497— ruvector_graph_wasm::cypher_exec::binary has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 9 (16 pts), boolean chains 1, if/else 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_graph_wasm::cypher_exec::eval (cognitive 17) crates/ruvector-graph-wasm/src/cypher_exec.rs:339— ruvector_graph_wasm::cypher_exec::eval has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (10 pts), loops 2 (4 pts), if/else 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_graph_wasm::cypher_exec::incident (cognitive 17) crates/ruvector-graph-wasm/src/cypher_exec.rs:735— ruvector_graph_wasm::cypher_exec::incident has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 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.
KgeModel::eval_json (cognitive 29) crates/ruvector-kge-ffi/src/pipeline.rs:150— KgeModel::eval_json has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 12 (24 pts), if/else 4 (5 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
KgeModel::eval_json (cognitive 29) crates/ruvector-kge-wasm/src/pipeline.rs:150— KgeModel::eval_json has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 12 (24 pts), if/else 4 (5 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
KgeModel::add_triples_json (cognitive 21) crates/ruvector-kge-ffi/src/ops.rs:128— KgeModel::add_triples_json has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (6 pts), loops 3 (4 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.
KgeModel::add_triples_json (cognitive 21) crates/ruvector-kge-wasm/src/ops.rs:128— KgeModel::add_triples_json has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (6 pts), loops 3 (4 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.
KgeModel::train_json (cognitive 17) crates/ruvector-kge-ffi/src/pipeline.rs:50— KgeModel::train_json has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (9 pts), if/else 6, loops 1 (2 pts) (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
KgeModel::train_json (cognitive 17) crates/ruvector-kge-wasm/src/pipeline.rs:50— KgeModel::train_json has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (9 pts), if/else 6, loops 1 (2 pts) (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
KgeModel::predict_json (cognitive 16) crates/ruvector-kge-ffi/src/ops.rs:185— KgeModel::predict_json has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 10 (11 pts), if/else 5 (nesting depth added 1). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
KgeModel::predict_json (cognitive 16) crates/ruvector-kge-wasm/src/ops.rs:185— KgeModel::predict_json has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 10 (11 pts), if/else 5 (nesting depth added 1). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CoreGraphTransformer::spiking_step (cognitive 26) crates/ruvector-graph-transformer-node/src/transformer.rs:583— CoreGraphTransformer::spiking_step has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 5 (10 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.
CoreGraphTransformer::spiking_step (cognitive 26) crates/ruvector-graph-transformer-wasm/src/transformer.rs:623— CoreGraphTransformer::spiking_step has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 5 (10 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.
CoreGraphTransformer::granger_extract (cognitive 24) crates/ruvector-graph-transformer-node/src/transformer.rs:948— CoreGraphTransformer::granger_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CoreGraphTransformer::granger_extract (cognitive 24) crates/ruvector-graph-transformer-wasm/src/transformer.rs:1011— CoreGraphTransformer::granger_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CoreGraphTransformer::compute_ppr (cognitive 23) crates/ruvector-graph-transformer-node/src/transformer.rs:434— CoreGraphTransformer::compute_ppr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (9 pts) (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.
CoreGraphTransformer::compute_ppr (cognitive 23) crates/ruvector-graph-transformer-wasm/src/transformer.rs:449— CoreGraphTransformer::compute_ppr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (9 pts) (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.
CoreGraphTransformer::causal_attention_graph (cognitive 18) crates/ruvector-graph-transformer-node/src/transformer.rs:899— CoreGraphTransformer::causal_attention_graph has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (3 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.
CoreGraphTransformer::causal_attention_graph (cognitive 18) crates/ruvector-graph-transformer-wasm/src/transformer.rs:957— CoreGraphTransformer::causal_attention_graph has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (3 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.
Duplicated block (15–16 lines × 2) crates/ruvector-attention/src/pde_attention/diffusion.rs:79— crates/ruvector-attention/src/pde_attention/diffusion.rs:79-94 | crates/ruvector-attention/src/pde_attention/diffusion.rs:138-152 — 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–16 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:1360— crates/ruvector-core/src/simd_intrinsics.rs:1360-1375 | crates/ruvector-core/src/simd_intrinsics.rs:1401-1415 — 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–16 lines × 2) crates/ruvector-postgres/src/hybrid/fusion.rs:156— crates/ruvector-postgres/src/hybrid/fusion.rs:156-171 | crates/ruvector-postgres/src/hybrid/fusion.rs:181-195 — 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–16 lines × 2) crates/ruvector-postgres/src/types/halfvec.rs:443— crates/ruvector-postgres/src/types/halfvec.rs:443-457 | crates/ruvector-postgres/src/types/halfvec.rs:539-554 — 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–16 lines × 2) crates/ruvector-pq-search/src/codebook.rs:170— crates/ruvector-pq-search/src/codebook.rs:170-185 | crates/ruvector-pq-search/src/ivf_pq.rs:147-161 — before extracting anything, compare `crates/ruvector-pq-search/src/codebook.rs` and `crates/ruvector-pq-search/src/ivf_pq.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 2) crates/ruvix/crates/vecgraph/src/graph_store.rs:204— crates/ruvix/crates/vecgraph/src/graph_store.rs:204-218 | crates/ruvix/crates/vecgraph/src/vector_store.rs:178-193 — 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 (15–16 lines × 2) crates/ruvllm/src/kernels/attention.rs:1275— crates/ruvllm/src/kernels/attention.rs:1275-1290 | crates/ruvllm/src/kernels/matmul.rs:1251-1265 — before extracting anything, compare `crates/ruvllm/src/kernels/attention.rs` and `crates/ruvllm/src/kernels/matmul.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 2) crates/ruvllm/src/metal/context.rs:737— crates/ruvllm/src/metal/context.rs:737-751 | crates/ruvllm/src/metal/context.rs:806-821 — 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 × 3) crates/ruvector-attention/src/sparse/flash.rs:67— crates/ruvector-attention/src/sparse/flash.rs:67-81 | crates/ruvector-attention/src/sparse/linear.rs:120-134 | crates/ruvector-attention/src/sparse/local_global.rs:80-94 — 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 3 call sites, so a change lands once.
Duplicated block (15 lines × 3) crates/ruvector-namespace-merge/src/router.rs:44— crates/ruvector-namespace-merge/src/router.rs:44-58 | crates/ruvector-namespace-merge/src/router.rs:98-112 | crates/ruvector-namespace-merge/src/router.rs:263-277 — 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.
Duplicated block (15 lines × 3) crates/ruvector-rairs/src/ivf.rs:45— crates/ruvector-rairs/src/ivf.rs:45-59 | crates/ruvector-rairs/src/rairs.rs:55-69 | crates/ruvector-rairs/src/seil.rs:67-81 — before extracting anything, compare `crates/ruvector-rairs/src/rairs.rs` and `crates/ruvector-rairs/src/seil.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 3) crates/ruvector-spann/src/index.rs:155— crates/ruvector-spann/src/index.rs:155-169 | crates/ruvector-spann/src/index.rs:256-270 | crates/ruvector-spann/src/index.rs:386-400 — 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.
Duplicated block (15 lines × 3) crates/ruvector-wasm/kernels/rmsnorm.rs:267— crates/ruvector-wasm/kernels/rmsnorm.rs:267-281 | crates/ruvector-wasm/kernels/rope.rs:240-254 | crates/ruvector-wasm/kernels/swiglu.rs:212-226 — 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 3 call sites, so a change lands once.
Duplicated block (15 lines × 3) crates/ruvllm/src/backends/coreml_backend.rs:1355— crates/ruvllm/src/backends/coreml_backend.rs:1355-1369 | crates/ruvllm/src/backends/coreml_backend.rs:1414-1428 | crates/ruvllm/src/backends/coreml_backend.rs:1514-1528 — 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.
Duplicated block (15 lines × 3) crates/rvf/rvf-runtime/src/store.rs:273— crates/rvf/rvf-runtime/src/store.rs:273-287 | crates/rvf/rvf-runtime/src/store.rs:361-375 | crates/rvf/rvf-runtime/src/store.rs:447-461 — 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.
Duplicated block (15 lines × 3) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1295— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1295-1309 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1497-1511 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1562-1576 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (14 lines × 3) crates/prime-radiant/src/substrate/edge.rs:212— crates/prime-radiant/src/substrate/edge.rs:212-225 | crates/prime-radiant/src/substrate/edge.rs:333-346 | crates/prime-radiant/src/substrate/node.rs:88-101 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (14 lines × 3) crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:167— crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:167-180 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:270-283 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:374-387 — 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.
Duplicated block (14 lines × 3) crates/ruvector-core/src/advanced_features/matryoshka.rs:233— crates/ruvector-core/src/advanced_features/matryoshka.rs:233-246 | crates/ruvector-core/src/advanced_features/matryoshka.rs:363-376 | crates/ruvector-core/src/advanced_features/matryoshka.rs:395-408 — 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.
Duplicated block (14 lines × 3) crates/ruvector-lsm-ann/src/bin/benchmark.rs:123— crates/ruvector-lsm-ann/src/bin/benchmark.rs:123-136 | crates/ruvector-lsm-ann/src/bin/benchmark.rs:174-187 | crates/ruvector-lsm-ann/src/bin/benchmark.rs:224-237 — 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.
Duplicated block (14 lines × 3) crates/ruvector-postgres/src/distance/simd.rs:1301— crates/ruvector-postgres/src/distance/simd.rs:1301-1314 | crates/ruvector-postgres/src/distance/simd.rs:1384-1397 | crates/ruvector-postgres/src/distance/simd.rs:1465-1478 — 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.
Duplicated block (14 lines × 3) crates/ruvllm-wasm/src/workers/pool.rs:729— crates/ruvllm-wasm/src/workers/pool.rs:729-742 | crates/ruvllm-wasm/src/workers/pool.rs:896-909 | crates/ruvllm-wasm/src/workers/pool.rs:1007-1020 — 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.
Duplicated block (14 lines × 3) crates/ruvllm/src/backends/gemma2.rs:501— crates/ruvllm/src/backends/gemma2.rs:501-514 | crates/ruvllm/src/models/ruvltra.rs:621-634 | crates/ruvllm/src/models/ruvltra_medium.rs:627-640 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/models/ruvltra.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (14 lines × 3) patches/candle-core-0.8.4/src/quantized/simd128.rs:308— patches/candle-core-0.8.4/src/quantized/simd128.rs:308-321 | patches/candle-core-0.8.4/src/quantized/simd128.rs:326-339 | patches/candle-core-0.8.4/src/quantized/simd128.rs:345-358 — 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.
Duplicated block (13–14 lines × 2) crates/prime-radiant/src/coherence/history.rs:263— crates/prime-radiant/src/coherence/history.rs:263-276 | crates/prime-radiant/src/coherence/history.rs:284-296 — 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 (13–14 lines × 2) crates/ruvector-postgres/src/attention/operators.rs:115— crates/ruvector-postgres/src/attention/operators.rs:115-128 | crates/ruvector-postgres/src/attention/operators.rs:210-222 — 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 (13–14 lines × 2) crates/ruvector-postgres/src/sparse/distance.rs:23— crates/ruvector-postgres/src/sparse/distance.rs:23-36 | crates/ruvector-postgres/src/sparse/distance.rs:186-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.
Duplicated block (13–14 lines × 2) crates/ruvix/crates/rpi-boot/src/early_uart.rs:212— crates/ruvix/crates/rpi-boot/src/early_uart.rs:212-225 | crates/ruvix/crates/rpi-boot/src/early_uart.rs:229-241 — 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 (13–14 lines × 2) crates/ruvllm/src/quantize/hadamard.rs:638— crates/ruvllm/src/quantize/hadamard.rs:638-651 | crates/ruvllm/src/quantize/hadamard.rs:664-676 — 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 (13–14 lines × 2) crates/ruvllm/src/quantize/ruvltra_quant.rs:662— crates/ruvllm/src/quantize/ruvltra_quant.rs:662-675 | crates/ruvllm/src/quantize/ruvltra_quant.rs:743-755 — 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 (13–14 lines × 2) crates/rvf/rvf-ebpf/src/lib.rs:442— crates/rvf/rvf-ebpf/src/lib.rs:442-455 | crates/rvf/rvf-ebpf/src/lib.rs:512-524 — 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 (13–14 lines × 2) patches/candle-core-0.9.2/src/quantized/mod.rs:509— patches/candle-core-0.9.2/src/quantized/mod.rs:509-522 | patches/candle-core-0.9.2/src/quantized/mod.rs:552-564 — 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 × 4) crates/ruvector-bench/src/bin/comparison_benchmark.rs:101— crates/ruvector-bench/src/bin/comparison_benchmark.rs:101-112 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:148-159 | crates/ruvector-bench/src/bin/latency_benchmark.rs:116-127 | crates/ruvector-bench/src/bin/latency_benchmark.rs:290-301 — before extracting anything, compare `crates/ruvector-bench/src/bin/comparison_benchmark.rs` and `crates/ruvector-bench/src/bin/latency_benchmark.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 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 (12 lines × 4) crates/ruvector-py/src/cluster.rs:72— crates/ruvector-py/src/cluster.rs:72-83 | crates/ruvector-py/src/hnsw.rs:253-264 | crates/ruvector-py/src/rabitq.rs:151-162 | crates/ruvector-py/src/rabitq.rs:409-420 — before extracting anything, compare `crates/ruvector-py/src/hnsw.rs` and `crates/ruvector-py/src/rabitq.rs` 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.
Duplicated block (12 lines × 4) crates/ruvllm/src/metal/context.rs:332— crates/ruvllm/src/metal/context.rs:332-343 | crates/ruvllm/src/metal/context.rs:404-415 | crates/ruvllm/src/metal/context.rs:629-640 | crates/ruvllm/src/metal/context.rs:693-704 — 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.
Duplicated block (12 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:842— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:842-853 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:915-926 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1038-1049 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1111-1122 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (12 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1050— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1050-1061 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1142-1153 | patches/candle-core-0.9.2/src/cpu_backend/conv2d.rs:305-316 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1250-1261 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (12 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1401— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1401-1412 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1519-1530 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1518-1529 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1636-1647 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (12 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:198— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:198-209 | patches/candle-core-0.8.4/src/cpu_backend/utils.rs:239-250 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:247-258 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:288-299 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/utils.rs` and `patches/candle-core-0.9.2/src/cpu_backend/utils.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 259 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 (12 lines × 4) patches/candle-core-0.8.4/src/safetensors.rs:107— patches/candle-core-0.8.4/src/safetensors.rs:107-118 | patches/candle-core-0.8.4/src/safetensors.rs:138-149 | patches/candle-core-0.9.2/src/safetensors.rs:124-135 | patches/candle-core-0.9.2/src/safetensors.rs:155-166 — before extracting anything, compare `patches/candle-core-0.8.4/src/safetensors.rs` and `patches/candle-core-0.9.2/src/safetensors.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 172 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 (10–11 lines × 3) crates/ruvector-dag/src/healing/strategies.rs:39— crates/ruvector-dag/src/healing/strategies.rs:39-49 | crates/ruvector-dag/src/healing/strategies.rs:80-89 | crates/ruvector-dag/src/healing/strategies.rs:112-121 — 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.
Duplicated block (10–11 lines × 3) crates/ruvector-mincut-gated-transformer/src/kernel/qgemm.rs:98— crates/ruvector-mincut-gated-transformer/src/kernel/qgemm.rs:98-108 | crates/ruvector-mincut-gated-transformer/src/kernel/qgemm.rs:187-196 | crates/ruvector-mincut-gated-transformer/src/kernel/qgemm.rs:320-329 — 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.
Duplicated block (10–11 lines × 3) crates/ruvector-mincut/src/fragment/mod.rs:269— crates/ruvector-mincut/src/fragment/mod.rs:269-278 | crates/ruvector-mincut/src/instance/bounded.rs:362-371 | crates/ruvector-mincut/src/instance/stub.rs:167-177 — before extracting anything, compare `crates/ruvector-mincut/src/instance/bounded.rs` and `crates/ruvector-mincut/src/instance/stub.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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–11 lines × 3) crates/ruvector-nervous-system-wasm/src/wta.rs:217— crates/ruvector-nervous-system-wasm/src/wta.rs:217-227 | crates/ruvector-nervous-system-wasm/src/wta.rs:258-267 | crates/ruvector-nervous-system-wasm/src/wta.rs:292-301 — 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.
Duplicated block (10–11 lines × 3) crates/ruvector-postgres/src/index/hnsw_am.rs:588— crates/ruvector-postgres/src/index/hnsw_am.rs:588-598 | crates/ruvector-postgres/src/index/hnsw_am.rs:1304-1313 | crates/ruvector-postgres/src/index/hnsw_am.rs:1392-1401 — 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.
Duplicated block (10–11 lines × 3) crates/ruvix/crates/bcm2711/src/mmio.rs:97— crates/ruvix/crates/bcm2711/src/mmio.rs:97-107 | crates/ruvix/crates/rpi-boot/src/early_uart.rs:118-127 | crates/ruvix/crates/rpi-boot/src/lib.rs:233-242 — before extracting anything, compare `crates/ruvix/crates/bcm2711/src/mmio.rs` and `crates/ruvix/crates/rpi-boot/src/lib.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 (10–11 lines × 3) crates/ruvllm/src/metal/context.rs:398— crates/ruvllm/src/metal/context.rs:398-408 | crates/ruvllm/src/metal/context.rs:895-904 | crates/ruvllm/src/metal/context.rs:968-977 — 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.
Duplicated block (10–11 lines × 3) crates/rvf/rvf-runtime/src/read_path.rs:630— crates/rvf/rvf-runtime/src/read_path.rs:630-640 | crates/rvf/rvf-server/src/tcp.rs:261-270 | crates/rvf/rvf-server/src/tcp.rs:331-340 — before extracting anything, compare `crates/rvf/rvf-runtime/src/read_path.rs` and `crates/rvf/rvf-server/src/tcp.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 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 (6 lines × 6) crates/ruvector-coherence-hnsw/src/coherence.rs:23— crates/ruvector-coherence-hnsw/src/coherence.rs:23-28 | crates/ruvector-core/src/distance.rs:67-72 | crates/ruvector-core/src/integration.rs:299-304 | crates/ruvector-maxsim/src/score.rs:22-27 | crates/ruvector-maxsim/src/score.rs:95-100 | crates/ruvector-temporal-tensor/src/agentdb.rs:82-88 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 6) crates/ruvector-core/src/simd_intrinsics.rs:1363— crates/ruvector-core/src/simd_intrinsics.rs:1363-1369 | crates/ruvector-core/src/simd_intrinsics.rs:1404-1409 | crates/ruvector-postgres/src/quantization/binary.rs:95-101 | crates/ruvector-postgres/src/quantization/scalar.rs:120-126 | crates/ruvector-postgres/src/types/scalarvec.rs:248-255 | crates/ruvector-turboquant/src/simd.rs:250-255 — before extracting anything, compare `crates/ruvector-postgres/src/quantization/scalar.rs` and `crates/ruvector-postgres/src/types/scalarvec.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 94 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 (6 lines × 6) crates/ruvector-postgres/src/distance/simd.rs:481— crates/ruvector-postgres/src/distance/simd.rs:481-487 | crates/ruvector-postgres/src/distance/simd.rs:997-1002 | crates/ruvector-postgres/src/types/halfvec.rs:372-377 | crates/ruvector-postgres/src/types/halfvec.rs:436-441 | crates/ruvector-postgres/src/types/halfvec.rs:488-493 | crates/ruvector-postgres/src/types/productvec.rs:230-236 — there are 6 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 6) patches/candle-core-0.8.4/src/conv.rs:180— patches/candle-core-0.8.4/src/conv.rs:180-185 | patches/candle-core-0.8.4/src/conv.rs:246-251 | patches/candle-core-0.8.4/src/conv.rs:304-309 | patches/candle-core-0.9.2/src/conv.rs:195-200 | patches/candle-core-0.9.2/src/conv.rs:261-266 | patches/candle-core-0.9.2/src/conv.rs:331-336 — before extracting anything, compare `patches/candle-core-0.8.4/src/conv.rs` and `patches/candle-core-0.9.2/src/conv.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 191 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 (6 lines × 6) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1264— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1264-1269 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1331-1336 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1422-1427 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1372-1377 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1448-1453 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1539-1544 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (6 lines × 6) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:84— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:84-89 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:116-121 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:241-246 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:110-115 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:141-146 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:272-277 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (6 lines × 6) patches/candle-core-0.8.4/src/cuda_backend/device.rs:16— patches/candle-core-0.8.4/src/cuda_backend/device.rs:16-21 | patches/candle-core-0.8.4/src/metal_backend/device.rs:15-20 | patches/candle-core-0.8.4/src/tensor.rs:15-20 | patches/candle-core-0.9.2/src/cuda_backend/device.rs:18-23 | patches/candle-core-0.9.2/src/metal_backend/device.rs:25-30 | patches/candle-core-0.9.2/src/tensor.rs:15-20 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/device.rs` and `patches/candle-core-0.9.2/src/cuda_backend/device.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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 (6 lines × 6) crates/prime-radiant/src/substrate/graph.rs:420— crates/prime-radiant/src/substrate/graph.rs:420-425 | crates/ruvector-graph/src/index.rs:48-53 | crates/ruvector-graph/src/index.rs:209-214 | crates/ruvector-graph/src/index.rs:280-285 | crates/ruvector-graph/src/index.rs:288-293 | crates/ruvector-graph/src/index.rs:383-388 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
BitNetBackend::forward_mla_cached (cognitive 53) crates/ruvllm/src/bitnet/backend.rs:1725— BitNetBackend::forward_mla_cached has cognitive complexity 53 (threshold 15). Drivers by points: loops 14 (40 pts), if/else 6 (13 pts) (nesting depth added 33). 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.
BitNetBackend::forward_ffn (cognitive 43) crates/ruvllm/src/bitnet/backend.rs:1946— BitNetBackend::forward_ffn has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 4 (13 pts), match/switch 1 (nesting depth added 29). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BitNetBackend::tl1_gemv_dispatch (cognitive 33) crates/ruvllm/src/bitnet/backend.rs:2375— BitNetBackend::tl1_gemv_dispatch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 5 (13 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BitNetBackend::validate_model (cognitive 25) crates/ruvllm/src/bitnet/backend.rs:2570— BitNetBackend::validate_model has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 3 (4 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.
BitNetBackend::load_stacked_experts (cognitive 19) crates/ruvllm/src/bitnet/backend.rs:1323— BitNetBackend::load_stacked_experts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), 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.
BitNetBackend::discover_tensors (cognitive 19) crates/ruvllm/src/bitnet/backend.rs:2468— BitNetBackend::discover_tensors has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
BitNetBackend::forward_gqa_cached (cognitive 17) crates/ruvllm/src/bitnet/backend.rs:1607— BitNetBackend::forward_gqa_cached has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 1 (3 pts) (nesting depth added 10). 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.
rvlite::sparql::executor::match_triple_pattern (cognitive 52) crates/rvlite/src/sparql/executor.rs:283— rvlite::sparql::executor::match_triple_pattern has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (50 pts), loops 1 (2 pts) (nesting depth added 35). 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.
rvlite::sparql::executor::project_solutions (cognitive 30) crates/rvlite/src/sparql/executor.rs:126— rvlite::sparql::executor::project_solutions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (10 pts), match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
rvlite::sparql::executor::match_simple_triple (cognitive 28) crates/rvlite/src/sparql/executor.rs:373— rvlite::sparql::executor::match_simple_triple has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 1 (nesting depth added 17). 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.
rvlite::sparql::executor::execute_describe (cognitive 22) crates/rvlite/src/sparql/executor.rs:864— rvlite::sparql::executor::execute_describe has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 3 (6 pts), match/switch 1 (2 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.
rvlite::sparql::executor::apply_modifiers (cognitive 18) crates/rvlite/src/sparql/executor.rs:544— rvlite::sparql::executor::apply_modifiers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (3 pts), loops 1 (2 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.
rvlite::sparql::executor::left_join_solutions (cognitive 17) crates/rvlite/src/sparql/executor.rs:446— rvlite::sparql::executor::left_join_solutions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 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.
rvlite::sparql::executor::evaluate_binary_op (cognitive 16) crates/rvlite/src/sparql/executor.rs:717— rvlite::sparql::executor::evaluate_binary_op has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 1 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ThreeLevelHierarchy::certify_mirror_cuts (cognitive 48) crates/ruvector-mincut/src/cluster/hierarchy.rs:1125— ThreeLevelHierarchy::certify_mirror_cuts has cognitive complexity 48 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 7 (18 pts), match/switch 2 (6 pts), boolean chains 5 (nesting depth added 28). 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.
ThreeLevelHierarchy::propagate_updates (cognitive 39) crates/ruvector-mincut/src/cluster/hierarchy.rs:1045— ThreeLevelHierarchy::propagate_updates has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 7 (11 pts) (nesting depth added 21). 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.
ThreeLevelHierarchy::compute_mirror_cuts (cognitive 22) crates/ruvector-mincut/src/cluster/hierarchy.rs:626— ThreeLevelHierarchy::compute_mirror_cuts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 4 (5 pts) (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.
ThreeLevelHierarchy::build_preclusters (cognitive 20) crates/ruvector-mincut/src/cluster/hierarchy.rs:460— ThreeLevelHierarchy::build_preclusters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts) (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.
ThreeLevelHierarchy::grow_expander (cognitive 17) crates/ruvector-mincut/src/cluster/hierarchy.rs:364— ThreeLevelHierarchy::grow_expander has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 2 (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.
ThreeLevelHierarchy::build_clusters (cognitive 17) crates/ruvector-mincut/src/cluster/hierarchy.rs:546— ThreeLevelHierarchy::build_clusters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 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.
ThreeLevelHierarchy::update_expander_edges (cognitive 16) crates/ruvector-mincut/src/cluster/hierarchy.rs:822— ThreeLevelHierarchy::update_expander_edges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), match/switch 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.
BlockQ3K::from_float (cognitive 45) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1011— BlockQ3K::from_float has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 9 (21 pts) (nesting depth added 26). 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.
BlockQ3K::from_float (cognitive 45) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1119— BlockQ3K::from_float has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 9 (21 pts) (nesting depth added 26). 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.
BlockQ3K::vec_dot_unopt (cognitive 43) patches/candle-core-0.8.4/src/quantized/k_quants.rs:890— BlockQ3K::vec_dot_unopt has cognitive complexity 43 (threshold 15). Drivers by points: loops 9 (26 pts), if/else 9 (17 pts) (nesting depth added 25). 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.
BlockQ3K::vec_dot_unopt (cognitive 42) patches/candle-core-0.9.2/src/quantized/k_quants.rs:997— BlockQ3K::vec_dot_unopt has cognitive complexity 42 (threshold 15). Drivers by points: loops 9 (26 pts), if/else 8 (16 pts) (nesting depth added 25). 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.
BlockQ3K::from_float_imatrix (cognitive 38) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1200— BlockQ3K::from_float_imatrix has cognitive complexity 38 (threshold 15). Drivers by points: loops 9 (21 pts), if/else 7 (17 pts) (nesting depth added 22). 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.
BlockQ3K::to_float (cognitive 22) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1095— BlockQ3K::to_float has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (7 pts) (nesting depth added 15). 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.
BlockQ3K::to_float (cognitive 22) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1298— BlockQ3K::to_float has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (7 pts) (nesting depth added 15). 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.
BlockQ5K::vec_dot_unopt (cognitive 37) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1361— BlockQ5K::vec_dot_unopt has cognitive complexity 37 (threshold 15). Drivers by points: loops 10 (26 pts), if/else 5 (11 pts) (nesting depth added 22). 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.
BlockQ5K::from_float (cognitive 36) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1450— BlockQ5K::from_float has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 7 (15 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.
BlockQ5K::vec_dot_unopt (cognitive 36) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1626— BlockQ5K::vec_dot_unopt has cognitive complexity 36 (threshold 15). Drivers by points: loops 10 (26 pts), if/else 4 (10 pts) (nesting depth added 22). 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.
BlockQ5K::from_float (cognitive 36) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1716— BlockQ5K::from_float has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 7 (15 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.
BlockQ5K::from_float_imatrix (cognitive 34) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1791— BlockQ5K::from_float_imatrix has cognitive complexity 34 (threshold 15). Drivers by points: loops 8 (19 pts), if/else 5 (15 pts) (nesting depth added 21). 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.
BlockQ5K::to_float (cognitive 19) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1528— BlockQ5K::to_float has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (9 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.
BlockQ5K::to_float (cognitive 19) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1874— BlockQ5K::to_float has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (9 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.
TooManyFunctions: sonic_ct_wasm crates/sonic-ct-wasm/src/lib.rs:52— TooManyFunctions — 47 free functions. The bar is 30 free functions; this is 17 over it, 1.57× 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.
TooManyFunctions: ruvector_postgres::graph::sparql::functions crates/ruvector-postgres/src/graph/sparql/functions.rs:12— TooManyFunctions — 44 free functions. The bar is 30 free functions; this is 14 over it, 1.47× 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.
TooManyFunctions: ruvector_postgres::operators crates/ruvector-postgres/src/operators.rs:19— TooManyFunctions — 40 free functions. The bar is 30 free functions; this is 10 over it, 1.33× 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.
TooManyFunctions: candle_core::mkl patches/candle-core-0.8.4/src/mkl.rs:83— TooManyFunctions — 37 free functions. The bar is 30 free functions; this is 7 over it, 1.23× 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.
TooManyFunctions: candle_core::accelerate patches/candle-core-0.8.4/src/accelerate.rs:169— TooManyFunctions — 36 free functions. The bar is 30 free functions; this is 6 over it, 1.20× 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.
TooManyFunctions: rvf_wasm crates/rvf/rvf-wasm/src/lib.rs:29— TooManyFunctions — 33 free functions. The bar is 30 free functions; this is 3 over it, 1.10× 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.
TooManyFunctions: rvforge_reader::commands crates/rvforge-reader/src/commands.rs:29— TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (7 members, 50+ identical tokens) crates/mcp-brain-server/src/routes.rs:6708— crates/mcp-brain-server/src/routes.rs:6708-6738 | crates/mcp-brain-server/src/routes.rs:6744-6792 | crates/mcp-brain-server/src/routes.rs:6799-6848 | crates/mcp-brain-server/src/routes.rs:6855-6895 | crates/mcp-brain-server/src/routes.rs:6902-6932 | crates/mcp-brain-server/src/routes.rs:7007-7144 | crates/mcp-brain-server/src/routes.rs:7190-7234 — These 7 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 7 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 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) crates/prime-radiant/src/coherence/energy.rs:581— crates/prime-radiant/src/coherence/energy.rs:581-629 | crates/ruvector-acorn/src/dist.rs:9-36 | crates/ruvector-attention/src/transport/centroid_ot.rs:147-176 | crates/ruvector-diskann/src/distance.rs:218-246 | crates/ruvector-math/src/optimal_transport/sinkhorn.rs:87-116 | crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:171-223 | crates/ruvector-math/src/product_manifold/manifold.rs:161-192 — These 7 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 7 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 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) crates/ruvector-bench/src/bin/comparison_benchmark.rs:94— crates/ruvector-bench/src/bin/comparison_benchmark.rs:94-139 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:141-186 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:188-242 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:244-301 | crates/ruvector-bench/src/bin/latency_benchmark.rs:109-152 | crates/ruvector-bench/src/bin/latency_benchmark.rs:220-272 | crates/ruvector-bench/src/bin/latency_benchmark.rs:274-331 — These 7 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 7 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 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) crates/ruvector-cli/src/cli/hooks.rs:657— crates/ruvector-cli/src/cli/hooks.rs:657-669 | crates/ruvector-core/src/advanced/neural_hash.rs:347-357 | crates/ruvector-dag/src/sona/reasoning_bank.rs:189-198 | crates/ruvector-embed-core/src/pooling.rs:67-76 | crates/ruvllm/src/context/working_memory.rs:559-573 | crates/ruvllm/src/reasoning_bank/pattern_store.rs:381-395 | crates/sona/src/types.rs:352-366 — These 7 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 7 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 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) crates/ruvector-fpga-transformer/src/backend/native_sim.rs:281— crates/ruvector-fpga-transformer/src/backend/native_sim.rs:281-288 | crates/ruvector-fpga-transformer/src/backend/native_sim.rs:449-457 | crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs:283-290 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:454-487 | crates/ruvector-sparse-inference/src/ops.rs:203-213 | crates/ruvllm/src/training/grpo.rs:288-303 | crates/ruvllm/src/training/grpo.rs:460-471 — These 7 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 7 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 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) crates/ruvector-graph-transformer-node/src/lib.rs:107— crates/ruvector-graph-transformer-node/src/lib.rs:107-118 | crates/ruvector-graph-transformer-node/src/lib.rs:158-182 | crates/ruvector-graph-transformer-node/src/lib.rs:230-242 | crates/ruvector-graph-transformer-node/src/lib.rs:296-308 | crates/ruvector-graph-transformer-node/src/lib.rs:332-352 | crates/ruvector-graph-transformer-node/src/lib.rs:469-481 | crates/ruvector-graph-transformer-node/src/lib.rs:506-518 — These 7 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 7 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 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) crates/ruvector-temporal-tensor/src/f16.rs:62— crates/ruvector-temporal-tensor/src/f16.rs:62-93 | crates/ruvllm/src/bitnet/backend.rs:3497-3521 | crates/ruvllm/src/bitnet/gguf_export.rs:66-90 | crates/ruvllm/src/gguf/quantization.rs:1034-1060 | crates/ruvllm/src/kernels/quantized.rs:918-944 | crates/ruvllm/src/quantize/quip.rs:722-745 | crates/ruvllm/src/quantize/ruvltra_quant.rs:892-917 — These 7 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 7 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 7 times.
Duplicated block (34 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:774— crates/ruvector-graph-transformer-node/src/transformer.rs:774-807 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:823-856 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (34 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:102— crates/ruvector-postgres/src/graph/sparql/parser.rs:102-135 | crates/rvlite/src/sparql/parser.rs:101-134 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (34 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:2132— crates/ruvector-postgres/src/graph/sparql/parser.rs:2132-2165 | crates/rvlite/src/sparql/parser.rs:2139-2172 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (34 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:540— patches/candle-core-0.8.4/src/backprop.rs:540-573 | patches/candle-core-0.9.2/src/backprop.rs:555-588 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (34 lines × 2) patches/candle-core-0.8.4/src/indexer.rs:28— patches/candle-core-0.8.4/src/indexer.rs:28-61 | patches/candle-core-0.9.2/src/indexer.rs:28-61 — before extracting anything, compare `patches/candle-core-0.8.4/src/indexer.rs` and `patches/candle-core-0.9.2/src/indexer.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 102 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 (34 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:836— patches/candle-core-0.8.4/src/quantized/k_quants.rs:836-869 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:944-977 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (34 lines × 2) patches/hnsw_rs/src/hnsw.rs:410— patches/hnsw_rs/src/hnsw.rs:410-443 | scripts/patches/hnsw_rs/src/hnsw.rs:410-443 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (30 lines × 2) crates/mcp-brain-server/src/routes.rs:1557— crates/mcp-brain-server/src/routes.rs:1557-1586 | crates/mcp-brain-server/src/routes.rs:3662-3691 — 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 (30 lines × 2) crates/ruvector-solver-node/src/lib.rs:688— crates/ruvector-solver-node/src/lib.rs:688-717 | crates/ruvector-solver-node/src/lib.rs:1028-1057 — 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 (30 lines × 2) crates/ruvllm/src/kv_cache.rs:803— crates/ruvllm/src/kv_cache.rs:803-832 | crates/ruvllm/src/kv_cache.rs:1448-1477 — 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 (30 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1456— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1456-1485 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1624-1653 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (30 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1377— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1377-1406 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1643-1672 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (30 lines × 2) patches/hnsw_rs/src/hnsw.rs:780— patches/hnsw_rs/src/hnsw.rs:780-809 | scripts/patches/hnsw_rs/src/hnsw.rs:773-802 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (30 lines × 2) patches/hnsw_rs/src/hnsw.rs:1550— patches/hnsw_rs/src/hnsw.rs:1550-1579 | scripts/patches/hnsw_rs/src/hnsw.rs:1436-1465 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (13–15 lines × 2) crates/prime-radiant/src/gpu/dispatch.rs:150— crates/prime-radiant/src/gpu/dispatch.rs:150-164 | crates/prime-radiant/src/gpu/dispatch.rs:208-220 — 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 (13–15 lines × 2) crates/ruvector-cnn/src/simd/avx2.rs:316— crates/ruvector-cnn/src/simd/avx2.rs:316-330 | crates/ruvector-cnn/src/simd/avx2.rs:469-481 — 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 (13–15 lines × 2) crates/ruvector-math/src/product_manifold/manifold.rs:211— crates/ruvector-math/src/product_manifold/manifold.rs:211-225 | crates/ruvllm/src/bitnet/rlm_embedder.rs:927-939 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13–15 lines × 2) crates/ruvector-mincut/src/canonical/mod.rs:498— crates/ruvector-mincut/src/canonical/mod.rs:498-512 | crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:181-193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13–15 lines × 2) crates/ruvector-rairs/src/kmeans.rs:33— crates/ruvector-rairs/src/kmeans.rs:33-45 | crates/ruvllm/src/claude_flow/reasoning_bank.rs:831-845 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13–15 lines × 2) crates/ruvllm/src/context/semantic_cache.rs:254— crates/ruvllm/src/context/semantic_cache.rs:254-268 | crates/ruvllm/src/context/semantic_cache.rs:303-315 — 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 (13–15 lines × 2) crates/ruvllm/src/kernels/activations.rs:552— crates/ruvllm/src/kernels/activations.rs:552-566 | crates/ruvllm/src/kernels/attention.rs:1840-1852 — before extracting anything, compare `crates/ruvllm/src/kernels/activations.rs` and `crates/ruvllm/src/kernels/attention.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 (14–15 lines × 2) crates/prime-radiant/src/simd/energy.rs:63— crates/prime-radiant/src/simd/energy.rs:63-77 | crates/prime-radiant/src/simd/matrix.rs:207-220 — 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 (14–15 lines × 2) crates/ruvector-mincut/src/algorithm/replacement.rs:192— crates/ruvector-mincut/src/algorithm/replacement.rs:192-206 | crates/ruvector-mincut/src/algorithm/replacement.rs:210-223 — 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–15 lines × 2) crates/ruvllm/src/kernels/attention.rs:1675— crates/ruvllm/src/kernels/attention.rs:1675-1689 | crates/ruvllm/src/kernels/attention.rs:1726-1739 — 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–15 lines × 2) crates/rvf/rvf-runtime/src/store.rs:340— crates/rvf/rvf-runtime/src/store.rs:340-354 | crates/rvf/rvf-runtime/src/store.rs:427-440 — 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–15 lines × 2) crates/rvm/crates/rvm-hal/src/aarch64/uart.rs:202— crates/rvm/crates/rvm-hal/src/aarch64/uart.rs:202-216 | crates/rvm/crates/rvm-hal/src/aarch64/uart.rs:226-239 — 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–15 lines × 2) patches/candle-core-0.8.4/src/quantized/neon.rs:51— patches/candle-core-0.8.4/src/quantized/neon.rs:51-64 | patches/candle-core-0.8.4/src/quantized/neon.rs:83-97 — 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–15 lines × 2) patches/candle-core-0.9.2/src/quantized/k_quants.rs:314— patches/candle-core-0.9.2/src/quantized/k_quants.rs:314-328 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:525-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 (10–12 lines × 2) crates/ruvector-acorn/src/dist.rs:12— crates/ruvector-acorn/src/dist.rs:12-21 | crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:180-191 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–12 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:239— crates/ruvector-core/src/simd_intrinsics.rs:239-250 | crates/ruvector-core/src/simd_intrinsics.rs:304-313 — 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–12 lines × 2) crates/ruvector-mincut/src/linkcut/mod.rs:347— crates/ruvector-mincut/src/linkcut/mod.rs:347-358 | crates/ruvector-mincut/src/linkcut/mod.rs:383-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–12 lines × 2) crates/ruvector-sparse-inference/src/model/gguf.rs:410— crates/ruvector-sparse-inference/src/model/gguf.rs:410-421 | crates/ruvector-sparse-inference/src/model/gguf.rs:531-540 — 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–12 lines × 2) crates/ruvllm/src/kernels/quantized.rs:629— crates/ruvllm/src/kernels/quantized.rs:629-640 | crates/ruvllm/src/kernels/quantized.rs:714-723 — 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–12 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1543— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1543-1552 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1692-1703 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (10–12 lines × 2) scripts/seed-brain-all.py:29— scripts/seed-brain-all.py:29-38 | scripts/seed-specialized.py:36-47 — 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 (11 lines × 4) crates/ruvector-cnn/src/layers/quantized_conv2d.rs:141— crates/ruvector-cnn/src/layers/quantized_conv2d.rs:141-151 | crates/ruvector-cnn/src/layers/quantized_depthwise.rs:127-137 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:44-54 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:135-145 — before extracting anything, compare `crates/ruvector-cnn/src/layers/quantized_conv2d.rs` and `crates/ruvector-cnn/src/layers/quantized_depthwise.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 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 × 4) crates/ruvector-graph/src/cypher/parser.rs:487— crates/ruvector-graph/src/cypher/parser.rs:487-497 | crates/ruvector-graph/src/cypher/parser.rs:1151-1161 | crates/rvlite/src/cypher/parser.rs:487-497 | crates/rvlite/src/cypher/parser.rs:1060-1070 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (11 lines × 4) crates/ruvector-postgres/src/graph/sparql/parser.rs:1682— crates/ruvector-postgres/src/graph/sparql/parser.rs:1682-1692 | crates/ruvector-postgres/src/graph/sparql/parser.rs:1730-1740 | crates/rvlite/src/sparql/parser.rs:1689-1699 | crates/rvlite/src/sparql/parser.rs:1737-1747 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (11 lines × 4) crates/ruvector-postgres/src/hyperbolic/operators.rs:32— crates/ruvector-postgres/src/hyperbolic/operators.rs:32-42 | crates/ruvector-postgres/src/hyperbolic/operators.rs:108-118 | crates/ruvector-postgres/src/hyperbolic/operators.rs:147-157 | crates/ruvector-postgres/src/hyperbolic/operators.rs:186-196 — 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.
Duplicated block (11 lines × 4) crates/ruvllm/src/backends/phi3.rs:319— crates/ruvllm/src/backends/phi3.rs:319-329 | crates/ruvllm/src/kernels/attention.rs:1606-1616 | crates/ruvllm/src/models/ruvltra.rs:572-582 | crates/ruvllm/src/models/ruvltra_medium.rs:587-597 — before extracting anything, compare `crates/ruvllm/src/backends/phi3.rs` and `crates/ruvllm/src/models/ruvltra.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 269 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 (11 lines × 4) patches/candle-core-0.8.4/src/safetensors.rs:282— patches/candle-core-0.8.4/src/safetensors.rs:282-292 | patches/candle-core-0.8.4/src/safetensors.rs:312-322 | patches/candle-core-0.9.2/src/safetensors.rs:437-447 | patches/candle-core-0.9.2/src/safetensors.rs:467-477 — before extracting anything, compare `patches/candle-core-0.8.4/src/safetensors.rs` and `patches/candle-core-0.9.2/src/safetensors.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 172 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 (11 lines × 4) patches/hnsw_rs/src/hnswio.rs:504— patches/hnsw_rs/src/hnswio.rs:504-514 | patches/hnsw_rs/src/hnswio.rs:593-603 | scripts/patches/hnsw_rs/src/hnswio.rs:504-514 | scripts/patches/hnsw_rs/src/hnswio.rs:593-603 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (6–7 lines × 2) crates/mcp-brain-server/src/types.rs:699— crates/mcp-brain-server/src/types.rs:699-704 | crates/mcp-brain/src/embed.rs:63-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6–7 lines × 2) crates/ruvector-mincut/src/canonical/mod.rs:547— crates/ruvector-mincut/src/canonical/mod.rs:547-552 | crates/ruvector-mincut/src/canonical/mod.rs:555-561 — 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–7 lines × 2) crates/ruvector-postgres/src/distance/simd.rs:524— crates/ruvector-postgres/src/distance/simd.rs:524-530 | crates/rvf/rvf-index/src/distance.rs:117-122 — before extracting anything, compare `crates/ruvector-postgres/src/distance/simd.rs` and `crates/rvf/rvf-index/src/distance.rs` as WHOLE FILES: this scan already matched 5 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. 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 (6–7 lines × 2) crates/ruvector-speculative-ann/src/bin/benchmark.rs:166— crates/ruvector-speculative-ann/src/bin/benchmark.rs:166-171 | crates/ruvector-speculative-ann/src/bin/benchmark.rs:264-270 — 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–7 lines × 2) crates/ruvllm/src/backends/candle_backend.rs:1672— crates/ruvllm/src/backends/candle_backend.rs:1672-1678 | crates/ruvllm/src/backends/lattice_backend.rs:858-863 — 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 (6–7 lines × 2) crates/ruvllm/src/context/episodic_memory.rs:524— crates/ruvllm/src/context/episodic_memory.rs:524-529 | crates/ruvllm/src/context/episodic_memory.rs: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 (6–7 lines × 2) patches/candle-core-0.8.4/src/quantized/avx.rs:231— patches/candle-core-0.8.4/src/quantized/avx.rs:231-237 | patches/candle-core-0.8.4/src/quantized/avx.rs:319-324 — 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 × 5) crates/ruvector-attention/src/curvature/fused_attention.rs:319— crates/ruvector-attention/src/curvature/fused_attention.rs:319-324 | crates/ruvector-attention/src/pde_attention/diffusion.rs:223-228 | crates/ruvector-attention/src/topology/gated_attention.rs:281-286 | crates/ruvector-attention/src/transport/centroid_ot.rs:328-333 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:317-322 — before extracting anything, compare `crates/ruvector-attention/src/curvature/fused_attention.rs` and `crates/ruvector-attention/src/pde_attention/diffusion.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (6 lines × 5) crates/ruvllm/src/metal/context.rs:131— crates/ruvllm/src/metal/context.rs:131-136 | crates/ruvllm/src/metal/context.rs:260-265 | crates/ruvllm/src/metal/context.rs:542-547 | crates/ruvllm/src/metal/context.rs:883-888 | crates/ruvllm/src/metal/context.rs:956-961 — all 5 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.
Duplicated block (6 lines × 5) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2222— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2222-2227 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2324-2329 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1370-1375 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1484-1489 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2746-2751 — `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 74 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (6 lines × 5) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:486— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:486-491 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:534-539 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:539-544 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:593-598 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:645-650 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (6 lines × 5) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:782— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:782-787 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:828-833 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:907-912 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:952-957 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:998-1003 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (6 lines × 5) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1214— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1214-1219 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1411-1416 | patches/candle-core-0.8.4/src/quantized/simd128.rs:225-230 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1416-1421 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1677-1682 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.8.4/src/quantized/simd128.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 (6 lines × 5) crates/ruvector-cluster-rag/src/bin/benchmark.rs:21— crates/ruvector-cluster-rag/src/bin/benchmark.rs:21-26 | crates/ruvector-cluster-rag/src/bin/benchmark.rs:28-33 | crates/ruvector-memory-admission/src/bin/benchmark.rs:39-44 | crates/ruvector-memory-admission/src/bin/benchmark.rs:45-50 | crates/ruvector-streaming-qng/src/bin/benchmark.rs:30-35 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
ruvector_hailo_cluster::bin::embed::main (cyclomatic 90) crates/ruvector-hailo-cluster/src/bin/embed.rs:30— ruvector_hailo_cluster::bin::embed::main has cyclomatic complexity 90 (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.
ruvector_hailo_cluster::bin::bench::main (cyclomatic 80) crates/ruvector-hailo-cluster/src/bin/bench.rs:31— ruvector_hailo_cluster::bin::bench::main has cyclomatic complexity 80 (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.
ruvector_hailo_cluster::bin::stats::main (cyclomatic 70) crates/ruvector-hailo-cluster/src/bin/stats.rs:31— ruvector_hailo_cluster::bin::stats::main has cyclomatic complexity 70 (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.
ruvector_hailo_cluster::bin::ruview-csi-bridge::main (cyclomatic 47) crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:138— ruvector_hailo_cluster::bin::ruview-csi-bridge::main has cyclomatic complexity 47 (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.
ruvector_hailo_cluster::bin::mmwave-bridge::main (cyclomatic 44) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:37— ruvector_hailo_cluster::bin::mmwave-bridge::main has cyclomatic complexity 44 (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.
ruvector_hailo_cluster::bin::ruvllm-bridge::main (cyclomatic 36) crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:50— ruvector_hailo_cluster::bin::ruvllm-bridge::main has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_decompiler::partitioner::louvain_partition (cyclomatic 25) crates/ruvector-decompiler/src/partitioner.rs:107— ruvector_decompiler::partitioner::louvain_partition has cyclomatic complexity 25 (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.
ruvector_decompiler::transformer::mha (cyclomatic 24) crates/ruvector-decompiler/src/transformer.rs:279— ruvector_decompiler::transformer::mha has cyclomatic complexity 24 (threshold 15). 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.
ruvector_decompiler::parser::scan_body_single_pass (cyclomatic 23) crates/ruvector-decompiler/src/parser.rs:206— ruvector_decompiler::parser::scan_body_single_pass 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.
ruvector_decompiler::tree::agglomerative_cluster (cyclomatic 23) crates/ruvector-decompiler/src/tree.rs:172— ruvector_decompiler::tree::agglomerative_cluster 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.
ruvector_decompiler::parser::find_declaration_end (cyclomatic 18) crates/ruvector-decompiler/src/parser.rs:320— ruvector_decompiler::parser::find_declaration_end 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.
ruvector_decompiler::inferrer::infer_declaration_name (cyclomatic 17) crates/ruvector-decompiler/src/inferrer.rs:109— ruvector_decompiler::inferrer::infer_declaration_name 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.
CactusGraph::detect_cycles (cognitive 56) crates/ruvector-mincut/src/canonical/mod.rs:749— CactusGraph::detect_cycles has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (40 pts), loops 5 (15 pts), boolean chains 1 (nesting depth added 38). 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.
CactusGraph::build_cactus_from_cuts (cognitive 54) crates/ruvector-mincut/src/canonical/mod.rs:593— CactusGraph::build_cactus_from_cuts has cognitive complexity 54 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 12 (24 pts) (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.
CactusGraph::stoer_wagner_all_cuts (cognitive 42) crates/ruvector-mincut/src/canonical/mod.rs:439— CactusGraph::stoer_wagner_all_cuts has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 10 (19 pts), boolean chains 1 (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.
CactusGraph::root_at_lex_smallest (cognitive 24) crates/ruvector-mincut/src/canonical/mod.rs:234— CactusGraph::root_at_lex_smallest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (8 pts) (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.
CactusGraph::enumerate_min_cuts (cognitive 21) crates/ruvector-mincut/src/canonical/mod.rs:344— CactusGraph::enumerate_min_cuts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (4 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.
CactusGraph::split_at_edge (cognitive 17) crates/ruvector-mincut/src/canonical/mod.rs:839— CactusGraph::split_at_edge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (4 pts), boolean chains 3 (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.
ruvector_mincut::canonical::source_anchored::canonical_mincut (cognitive 35) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:530— ruvector_mincut::canonical::source_anchored::canonical_mincut has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 4 (8 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 16). 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.
ruvector_mincut::algorithm::exact::minimum_cut (cognitive 33) crates/ruvector-mincut/src/algorithm/exact.rs:157— ruvector_mincut::algorithm::exact::minimum_cut has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 5 (11 pts) (nesting depth added 21). 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.
ruvector_mincut::algorithm::exact::certified_cut (cognitive 30) crates/ruvector-mincut/src/algorithm/exact.rs:83— ruvector_mincut::algorithm::exact::certified_cut has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 2, boolean chains 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.
ruvector_mincut::canonical::source_anchored::dinic_maxflow (cognitive 22) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:306— ruvector_mincut::canonical::source_anchored::dinic_maxflow has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 12). 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.
ruvector_mincut::canonical::tree_packing::dinic_maxflow (cognitive 22) crates/ruvector-mincut/src/canonical/tree_packing/mod.rs:147— ruvector_mincut::canonical::tree_packing::dinic_maxflow has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 12). 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.
ruvector_mincut::expander::bfs_local_search (cognitive 18) crates/ruvector-mincut/src/expander/mod.rs:588— ruvector_mincut::expander::bfs_local_search has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 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. This shape REPEATS in the file: one other method here (ExpanderDecomposition::local_cut_search) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Duplicated block (36 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:569— crates/ruvector-graph/src/cypher/parser.rs:569-604 | crates/rvlite/src/cypher/parser.rs:569-604 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (36 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:695— crates/ruvector-graph/src/cypher/parser.rs:695-730 | crates/rvlite/src/cypher/parser.rs:695-730 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (36 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1923— crates/ruvector-postgres/src/graph/sparql/parser.rs:1923-1958 | crates/rvlite/src/sparql/parser.rs:1930-1965 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (36 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:700— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:700-735 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:896-931 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (36 lines × 2) patches/candle-core-0.8.4/src/shape.rs:192— patches/candle-core-0.8.4/src/shape.rs:192-227 | patches/candle-core-0.9.2/src/shape.rs:192-227 — before extracting anything, compare `patches/candle-core-0.8.4/src/shape.rs` and `patches/candle-core-0.9.2/src/shape.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 153 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 (36 lines × 2) patches/hnsw_rs/src/hnswio.rs:1223— patches/hnsw_rs/src/hnswio.rs:1223-1258 | scripts/patches/hnsw_rs/src/hnswio.rs:1223-1258 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (11–13 lines × 2) crates/ruvector-cli/src/cli/hooks.rs:644— crates/ruvector-cli/src/cli/hooks.rs:644-654 | crates/ruvector-crv/src/stage_ii.rs:82-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11–13 lines × 2) crates/ruvector-consciousness/src/pid.rs:148— crates/ruvector-consciousness/src/pid.rs:148-158 | crates/ruvector-consciousness/src/pid.rs:201-213 — 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–13 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:1378— crates/ruvector-core/src/simd_intrinsics.rs:1378-1390 | crates/ruvector-core/src/simd_intrinsics.rs:1421-1431 — 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–13 lines × 2) crates/ruvllm/src/bitnet/backend.rs:2578— crates/ruvllm/src/bitnet/backend.rs:2578-2588 | crates/ruvllm/src/bitnet/backend.rs:2592-2604 — 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–13 lines × 2) crates/ruvllm/src/models/openmythos/mod.rs:575— crates/ruvllm/src/models/openmythos/mod.rs:575-587 | crates/ruvllm/src/models/rdt.rs:1083-1093 — before extracting anything, compare `crates/ruvllm/src/models/openmythos/mod.rs` and `crates/ruvllm/src/models/rdt.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 54 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 (11–13 lines × 2) patches/candle-core-0.8.4/src/custom_op.rs:401— patches/candle-core-0.8.4/src/custom_op.rs:401-411 | patches/candle-core-0.9.2/src/custom_op.rs:404-416 — before extracting anything, compare `patches/candle-core-0.8.4/src/custom_op.rs` and `patches/candle-core-0.9.2/src/custom_op.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 (9–11 lines × 2) crates/mcp-brain-server/src/routes.rs:1794— crates/mcp-brain-server/src/routes.rs:1794-1804 | crates/mcp-brain-server/src/routes.rs:2251-2259 — 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–11 lines × 2) crates/ruvector-consciousness/src/rsvd_emergence.rs:168— crates/ruvector-consciousness/src/rsvd_emergence.rs:168-178 | crates/ruvector-consciousness/src/rsvd_emergence.rs:211-219 — 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–11 lines × 2) crates/ruvector-hailo-cluster/src/rate_limit.rs:139— crates/ruvector-hailo-cluster/src/rate_limit.rs:139-149 | crates/ruvector-hailo-cluster/src/rate_limit.rs:176-184 — 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–11 lines × 2) crates/ruvector-router-core/src/index.rs:303— crates/ruvector-router-core/src/index.rs:303-311 | crates/ruvector-router-core/src/index.rs:334-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–11 lines × 2) crates/ruvix/crates/vecgraph/src/simd_distance.rs:442— crates/ruvix/crates/vecgraph/src/simd_distance.rs:442-452 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:469-477 — 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–11 lines × 2) patches/candle-core-0.8.4/src/quantized/avx.rs:490— patches/candle-core-0.8.4/src/quantized/avx.rs:490-498 | patches/candle-core-0.8.4/src/quantized/avx.rs:580-590 — 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–10 lines × 4) crates/prime-radiant/src/coherence/energy.rs:602— crates/prime-radiant/src/coherence/energy.rs:602-610 | crates/ruvector-attention/src/transport/centroid_ot.rs:152-160 | crates/ruvector-math/src/optimal_transport/sinkhorn.rs:92-100 | crates/ruvector-math/src/product_manifold/manifold.rs:166-175 — before extracting anything, compare `crates/ruvector-attention/src/transport/centroid_ot.rs` and `crates/ruvector-math/src/optimal_transport/sinkhorn.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 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 (9–10 lines × 4) crates/prime-radiant/src/simd/energy.rs:173— crates/prime-radiant/src/simd/energy.rs:173-182 | crates/prime-radiant/src/simd/energy.rs:242-251 | crates/prime-radiant/src/simd/vectors.rs:68-77 | crates/prime-radiant/src/simd/vectors.rs:302-310 — before extracting anything, compare `crates/prime-radiant/src/simd/energy.rs` and `crates/prime-radiant/src/simd/vectors.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (9–10 lines × 4) crates/ruvector-cnn/src/simd/avx2.rs:518— crates/ruvector-cnn/src/simd/avx2.rs:518-526 | crates/ruvector-cnn/src/simd/neon.rs:220-229 | crates/ruvector-cnn/src/simd/neon.rs:309-318 | crates/ruvector-cnn/src/simd/wasm.rs:284-292 — before extracting anything, compare `crates/ruvector-cnn/src/simd/avx2.rs` and `crates/ruvector-cnn/src/simd/neon.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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 (9–10 lines × 4) crates/ruvector-postgres/src/distance/simd.rs:455— crates/ruvector-postgres/src/distance/simd.rs:455-463 | crates/ruvector-postgres/src/distance/simd.rs:508-517 | crates/ruvector-postgres/src/distance/simd.rs:571-579 | crates/ruvector-postgres/src/distance/simd.rs:613-621 — 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.
Duplicated block (9–10 lines × 4) crates/ruvector-sparse-inference/src/model/gguf.rs:406— crates/ruvector-sparse-inference/src/model/gguf.rs:406-415 | crates/ruvector-sparse-inference/src/model/gguf.rs:442-450 | crates/ruvector-sparse-inference/src/model/gguf.rs:478-486 | crates/ruvector-sparse-inference/src/model/gguf.rs:527-535 — 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.
Duplicated block (9–10 lines × 4) patches/candle-core-0.9.2/src/quantized/mod.rs:483— patches/candle-core-0.9.2/src/quantized/mod.rs:483-492 | patches/candle-core-0.9.2/src/quantized/mod.rs:518-526 | patches/candle-core-0.9.2/src/quantized/mod.rs:560-569 | patches/candle-core-0.9.2/src/quantized/mod.rs:588-597 — 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.
Duplicated block (8 lines × 5) crates/ruvector-cnn/src/kernels/int8_avx2.rs:124— crates/ruvector-cnn/src/kernels/int8_avx2.rs:124-133 | crates/ruvector-cnn/src/kernels/int8_avx2.rs:269-277 | crates/ruvector-cnn/src/kernels/int8_neon.rs:112-120 | crates/ruvector-cnn/src/kernels/int8_neon.rs:264-271 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:119-126 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 × 5) crates/ruvector-hailo-cluster/src/bin/bench.rs:218— crates/ruvector-hailo-cluster/src/bin/bench.rs:218-225 | crates/ruvector-hailo-cluster/src/bin/embed.rs:219-226 | crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:196-203 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:256-263 | crates/ruvector-hailo-cluster/src/bin/stats.rs:169-176 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 × 5) patches/candle-core-0.8.4/src/quantized/k_quants.rs:638— patches/candle-core-0.8.4/src/quantized/k_quants.rs:638-645 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1775-1782 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:669-676 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:699-706 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2201-2208 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (8 lines × 5) crates/emergent-time/src/witness.rs:23— crates/emergent-time/src/witness.rs:23-30 | crates/ruvector-agent-memory/src/ops.rs:244-251 | crates/ruvector-mincut-gated-transformer/src/spike.rs:215-223 | crates/ruvector-mincut-gated-transformer/src/spike.rs:226-233 | crates/ruvllm/src/bitnet/rlm_embedder.rs:533-540 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 5) crates/mcp-brain/src/tools.rs:377— crates/mcp-brain/src/tools.rs:377-384 | crates/mcp-brain/src/tools.rs:706-713 | crates/ruvllm/src/policy_store.rs:398-405 | crates/ruvllm/src/quality/validators.rs:181-188 | crates/ruvllm/src/witness_log.rs:639-646 — before extracting anything, compare `crates/ruvllm/src/policy_store.rs` and `crates/ruvllm/src/witness_log.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 × 5) crates/ruvector-bench/src/bin/comparison_benchmark.rs:118— crates/ruvector-bench/src/bin/comparison_benchmark.rs:118-125 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:165-172 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:218-225 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:276-283 | crates/ruvector-bench/src/bin/latency_benchmark.rs:133-140 — before extracting anything, compare `crates/ruvector-bench/src/bin/comparison_benchmark.rs` and `crates/ruvector-bench/src/bin/latency_benchmark.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 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.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×6
Untrusted text written into markup unescaped npm/packages/ruvector-extensions/src/ui/app.js:257— `node.id` is text this program did not author, and it is written into the text of an element through `innerHTML` 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.
Untrusted text written into markup unescaped REDACTED:238— `escapeHTML(source.link)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped REDACTED:355— `escapeHTML(safeHref)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped REDACTED:367— `safeTitle` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
Untrusted text written into markup unescaped REDACTED:370— `safeTitle` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
Untrusted text written into markup unescaped REDACTED:372— `safeSrc` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
SubquadraticSparseAttention::forward_flash_inner (cyclomatic 42) crates/ruvllm_sparse_attention/src/attention.rs:1536— SubquadraticSparseAttention::forward_flash_inner has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SubquadraticSparseAttention::forward (cyclomatic 35) crates/ruvllm_sparse_attention/src/attention.rs:137— SubquadraticSparseAttention::forward has cyclomatic complexity 35 (threshold 15). 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. This shape REPEATS in the file: one other method here (SubquadraticSparseAttention::forward_gqa) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SubquadraticSparseAttention::forward_gqa (cyclomatic 35) crates/ruvllm_sparse_attention/src/attention.rs:1301— SubquadraticSparseAttention::forward_gqa has cyclomatic complexity 35 (threshold 15). 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. This shape REPEATS in the file: one other method here (SubquadraticSparseAttention::forward) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SubquadraticSparseAttention::forward_gated (cyclomatic 23) crates/ruvllm_sparse_attention/src/attention.rs:367— SubquadraticSparseAttention::forward_gated has cyclomatic complexity 23 (threshold 15). 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.
SubquadraticSparseAttention::decode_step (cyclomatic 19) crates/ruvllm_sparse_attention/src/attention.rs:1073— SubquadraticSparseAttention::decode_step has cyclomatic complexity 19 (threshold 15). 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.
ruvllm::backends::lattice_backend::adapter::validate_tensors (cyclomatic 38) crates/ruvllm/src/backends/lattice_backend/adapter.rs:362— ruvllm::backends::lattice_backend::adapter::validate_tensors has cyclomatic complexity 38 (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.
ruvllm::backends::lattice_backend::adapter::configuration (cyclomatic 29) crates/ruvllm/src/backends/lattice_backend/adapter.rs:160— ruvllm::backends::lattice_backend::adapter::configuration has cyclomatic complexity 29 (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.
ruvllm::backends::lattice_backend::spawn_worker (cyclomatic 25) crates/ruvllm/src/backends/lattice_backend.rs:374— ruvllm::backends::lattice_backend::spawn_worker has cyclomatic complexity 25 (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.
ruvllm::kernels::matmul::gemm_tile_12x4 (cyclomatic 19) crates/ruvllm/src/kernels/matmul.rs:522— ruvllm::kernels::matmul::gemm_tile_12x4 has cyclomatic complexity 19 (threshold 15). 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.
ruvllm::kv_migration::mapper::solve_linear_system (cyclomatic 16) crates/ruvllm/src/kv_migration/mapper.rs:301— ruvllm::kv_migration::mapper::solve_linear_system has cyclomatic complexity 16 (threshold 15). 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.
ruvector_graph_wasm::cypher_exec::binary (cyclomatic 31) crates/ruvector-graph-wasm/src/cypher_exec.rs:497— ruvector_graph_wasm::cypher_exec::binary has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_graph_wasm::cypher_exec::project (cyclomatic 24) crates/ruvector-graph-wasm/src/cypher_exec.rs:1186— ruvector_graph_wasm::cypher_exec::project has cyclomatic complexity 24 (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.
ruvector_graph_wasm::cypher_exec::eval (cyclomatic 22) crates/ruvector-graph-wasm/src/cypher_exec.rs:339— ruvector_graph_wasm::cypher_exec::eval has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_graph_wasm::cypher_exec::aggregate (cyclomatic 20) crates/ruvector-graph-wasm/src/cypher_exec.rs:1065— ruvector_graph_wasm::cypher_exec::aggregate 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. This is NOT this file's highest cyclomatic complexity: ruvector_graph_wasm::cypher_exec::binary_symbol (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
ruvector_graph_wasm::cypher_exec::call_function (cyclomatic 17) crates/ruvector-graph-wasm/src/cypher_exec.rs:567— ruvector_graph_wasm::cypher_exec::call_function has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ruvector_graph_wasm::cypher_exec::binary_symbol (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
SubquadraticSparseAttention::forward_flash_inner (cognitive 146) crates/ruvllm_sparse_attention/src/attention.rs:1536— SubquadraticSparseAttention::forward_flash_inner has cognitive complexity 146 (threshold 15). Drivers by points: if/else 26 (72 pts), loops 20 (67 pts), match/switch 1 (5 pts), boolean chains 2 (nesting depth added 97). 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.
SubquadraticSparseAttention::forward (cognitive 102) crates/ruvllm_sparse_attention/src/attention.rs:137— SubquadraticSparseAttention::forward has cognitive complexity 102 (threshold 15). Drivers by points: loops 19 (60 pts), if/else 18 (42 pts) (nesting depth added 65). 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. This shape REPEATS in the file: one other method here (SubquadraticSparseAttention::forward_gqa) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SubquadraticSparseAttention::forward_gqa (cognitive 102) crates/ruvllm_sparse_attention/src/attention.rs:1301— SubquadraticSparseAttention::forward_gqa has cognitive complexity 102 (threshold 15). Drivers by points: loops 19 (60 pts), if/else 18 (42 pts) (nesting depth added 65). 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. This shape REPEATS in the file: one other method here (SubquadraticSparseAttention::forward) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SubquadraticSparseAttention::forward_gated (cognitive 64) crates/ruvllm_sparse_attention/src/attention.rs:367— SubquadraticSparseAttention::forward_gated has cognitive complexity 64 (threshold 15). Drivers by points: loops 9 (33 pts), if/else 14 (29 pts), boolean chains 2 (nesting depth added 39). 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.
SubquadraticSparseAttention::decode_step (cognitive 37) crates/ruvllm_sparse_attention/src/attention.rs:1073— SubquadraticSparseAttention::decode_step has cognitive complexity 37 (threshold 15). Drivers by points: loops 8 (21 pts), if/else 10 (15 pts), boolean chains 1 (nesting depth added 18). 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.
micro_hnsw_wasm::search (cognitive 66) crates/micro-hnsw-wasm/src/lib.rs:313— micro_hnsw_wasm::search has cognitive complexity 66 (threshold 15). Drivers by points: if/else 10 (44 pts), loops 6 (17 pts), boolean chains 5 (nesting depth added 45). 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.
micro_hnsw_wasm::insert (cognitive 31) crates/micro-hnsw-wasm/src/lib.rs:250— micro_hnsw_wasm::insert has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
micro_hnsw_wasm::neuromorphic_search (cognitive 25) crates/micro-hnsw-wasm/src/lib.rs:1258— micro_hnsw_wasm::neuromorphic_search has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 6 (9 pts), boolean chains 2 (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.
micro_hnsw_wasm::merge (cognitive 23) crates/micro-hnsw-wasm/src/lib.rs:399— micro_hnsw_wasm::merge has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (5 pts), boolean chains 3 (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.
micro_hnsw_wasm::spike_search (cognitive 21) crates/micro-hnsw-wasm/src/lib.rs:838— micro_hnsw_wasm::spike_search has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sonic_ct::organ::detect_organs (cognitive 56) crates/sonic-ct/src/organ.rs:119— sonic_ct::organ::detect_organs has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (44 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 29). 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.
sonic_ct::fwi::gradient (cognitive 25) crates/sonic-ct/src/fwi.rs:174— sonic_ct::fwi::gradient has cognitive complexity 25 (threshold 15). Drivers by points: loops 9 (25 pts) (nesting depth added 16). 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.
sonic_ct::reconstruction::landweber (cognitive 21) crates/sonic-ct/src/reconstruction.rs:107— sonic_ct::reconstruction::landweber has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 3 (7 pts) (nesting depth added 11). 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.
sonic_ct::model::train (cognitive 20) crates/sonic-ct/src/model.rs:39— sonic_ct::model::train has cognitive complexity 20 (threshold 15). Drivers by points: if/else 2 (10 pts), loops 4 (10 pts) (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.
sonic_ct::reconstruction::sart (cognitive 20) crates/sonic-ct/src/reconstruction.rs:62— sonic_ct::reconstruction::sart has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (9 pts) (nesting depth added 12). 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.
rvf_server::stream::body (cognitive 43) crates/rvf/rvf-server/src/stream.rs:438— rvf_server::stream::body has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (38 pts), match/switch 3 (4 pts), loops 1 (nesting depth added 24). 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.
rvf_server::stream_client::read_head (cognitive 24) crates/rvf/rvf-server/src/stream_client.rs:47— rvf_server::stream_client::read_head has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2, match/switch 1 (2 pts) (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.
rvf_server::http::serve_static_file (cognitive 21) crates/rvf/rvf-server/src/http.rs:363— rvf_server::http::serve_static_file has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (21 pts) (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.
rvf_server::tcp::handle_connection (cognitive 19) crates/rvf/rvf-server/src/tcp.rs:75— rvf_server::tcp::handle_connection has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
rvf_server::ws::handle_socket (cognitive 17) crates/rvf/rvf-server/src/ws.rs:38— rvf_server::ws::handle_socket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), match/switch 3 (8 pts), loops 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.
ruvector_solver::bmssp::build_aggregates (cognitive 41) crates/ruvector-solver/src/bmssp.rs:244— ruvector_solver::bmssp::build_aggregates has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 5 (7 pts), boolean chains 3 (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.
ruvector_solver::bmssp::dense_direct_solve (cognitive 28) crates/ruvector-solver/src/bmssp.rs:507— ruvector_solver::bmssp::dense_direct_solve has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 8 (14 pts) (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.
ruvector_solver::validation::validate_csr_matrix (cognitive 26) crates/ruvector-solver/src/validation.rs:75— ruvector_solver::validation::validate_csr_matrix has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (4 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.
ruvector_solver::forward_push::forward_push_with_residuals (cognitive 19) crates/ruvector-solver/src/forward_push.rs:250— ruvector_solver::forward_push::forward_push_with_residuals has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 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.
ruvector_solver::backward_push::backward_push_with_transpose (cognitive 17) crates/ruvector-solver/src/backward_push.rs:407— ruvector_solver::backward_push::backward_push_with_transpose has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector_mincut_gated_transformer::spectral::lanczos_sparse (cognitive 39) crates/ruvector-mincut-gated-transformer/src/spectral.rs:557— ruvector_mincut_gated_transformer::spectral::lanczos_sparse has cognitive complexity 39 (threshold 15). Drivers by points: loops 10 (22 pts), if/else 9 (15 pts), boolean chains 2 (nesting depth added 18). 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.
ruvector_mincut_gated_transformer::attention::window::sparse_attention_with_mincut_mask (cognitive 20) crates/ruvector-mincut-gated-transformer/src/attention/window.rs:270— ruvector_mincut_gated_transformer::attention::window::sparse_attention_with_mincut_mask has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 10). 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.
ruvector_mincut_gated_transformer::flash_attention::flash_attention_forward_i8 (cognitive 18) crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:409— ruvector_mincut_gated_transformer::flash_attention::flash_attention_forward_i8 has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 10). 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.
ruvector_mincut_gated_transformer::kernel::qgemm::qgemm_i8 (cognitive 18) crates/ruvector-mincut-gated-transformer/src/kernel/qgemm.rs:86— ruvector_mincut_gated_transformer::kernel::qgemm::qgemm_i8 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 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.
ruvector_mincut_gated_transformer::kernel::qgemm::qgemm_i8_avx2 (cognitive 18) crates/ruvector-mincut-gated-transformer/src/kernel/qgemm.rs:175— ruvector_mincut_gated_transformer::kernel::qgemm::qgemm_i8_avx2 has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 9). 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.
BlockQ2K::from_float (cognitive 31) patches/candle-core-0.8.4/src/quantized/k_quants.rs:769— BlockQ2K::from_float has cognitive complexity 31 (threshold 15). Drivers by points: loops 9 (22 pts), if/else 5 (9 pts) (nesting depth added 17). 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.
BlockQ2K::from_float (cognitive 31) patches/candle-core-0.9.2/src/quantized/k_quants.rs:820— BlockQ2K::from_float has cognitive complexity 31 (threshold 15). Drivers by points: loops 9 (22 pts), if/else 5 (9 pts) (nesting depth added 17). 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.
BlockQ2K::from_float_imatrix (cognitive 21) patches/candle-core-0.9.2/src/quantized/k_quants.rs:884— BlockQ2K::from_float_imatrix has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 1 (3 pts) (nesting depth added 12). 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.
BlockQ2K::vec_dot_unopt (cognitive 17) patches/candle-core-0.8.4/src/quantized/k_quants.rs:717— BlockQ2K::vec_dot_unopt has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 1 (nesting depth added 10). 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.
BlockQ2K::vec_dot_unopt (cognitive 16) patches/candle-core-0.9.2/src/quantized/k_quants.rs:767— BlockQ2K::vec_dot_unopt has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (16 pts) (nesting depth added 10). 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.
BlockQ4K::from_float (cognitive 29) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1252— BlockQ4K::from_float has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 7 (13 pts) (nesting depth added 15). 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.
BlockQ4K::from_float (cognitive 29) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1454— BlockQ4K::from_float has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 7 (13 pts) (nesting depth added 15). 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.
BlockQ4K::vec_dot_unopt (cognitive 27) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1171— BlockQ4K::vec_dot_unopt has cognitive complexity 27 (threshold 15). Drivers by points: loops 10 (26 pts), if/else 1 (nesting depth added 16). 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.
BlockQ4K::vec_dot_unopt (cognitive 26) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1372— BlockQ4K::vec_dot_unopt has cognitive complexity 26 (threshold 15). Drivers by points: loops 10 (26 pts) (nesting depth added 16). 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.
BlockQ4K::from_float_imatrix (cognitive 26) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1514— BlockQ4K::from_float_imatrix has cognitive complexity 26 (threshold 15). Drivers by points: loops 8 (19 pts), if/else 3 (7 pts) (nesting depth added 15). 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.
BlockQ6K::vec_dot_unopt (cognitive 23) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1585— BlockQ6K::vec_dot_unopt has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (22 pts), if/else 1 (nesting depth added 13). 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.
BlockQ6K::from_float (cognitive 22) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1643— BlockQ6K::from_float has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 3 (7 pts) (nesting depth added 12). 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.
BlockQ6K::vec_dot_unopt (cognitive 22) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1930— BlockQ6K::vec_dot_unopt has cognitive complexity 22 (threshold 15). Drivers by points: loops 9 (22 pts) (nesting depth added 13). 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.
BlockQ6K::from_float (cognitive 21) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1989— BlockQ6K::from_float has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 2 (6 pts) (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (BlockQ6K::from_float_imatrix) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
BlockQ6K::from_float_imatrix (cognitive 21) patches/candle-core-0.9.2/src/quantized/k_quants.rs:2061— BlockQ6K::from_float_imatrix has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 2 (6 pts) (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (BlockQ6K::from_float) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×5
Edited copy of a member (24 corresponding lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1716— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1716-1746 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2142-2173 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:368— patches/candle-core-0.8.4/src/storage.rs:368-391 | patches/candle-core-0.9.2/src/storage.rs:377-400 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:399— patches/candle-core-0.8.4/src/storage.rs:399-422 | patches/candle-core-0.9.2/src/storage.rs:408-431 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:430— patches/candle-core-0.8.4/src/storage.rs:430-453 | patches/candle-core-0.9.2/src/storage.rs:439-462 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:461— patches/candle-core-0.8.4/src/storage.rs:461-484 | patches/candle-core-0.9.2/src/storage.rs:470-493 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17–19 lines × 2) crates/mcp-brain-server/src/aggregate.rs:27— crates/mcp-brain-server/src/aggregate.rs:27-45 | crates/mcp-brain-server/src/aggregate.rs:149-165 — 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 (17–19 lines × 2) crates/ruvector-entropy-ann/src/search.rs:87— crates/ruvector-entropy-ann/src/search.rs:87-105 | crates/ruvector-entropy-ann/src/search.rs:221-237 — 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 (17–19 lines × 2) crates/ruvector-mincut-gated-transformer/src/speculative.rs:294— crates/ruvector-mincut-gated-transformer/src/speculative.rs:294-312 | crates/ruvector-mincut-gated-transformer/src/speculative.rs:328-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17–19 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:547— crates/ruvector-postgres/src/graph/sparql/parser.rs:547-563 | crates/rvlite/src/sparql/parser.rs:546-564 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (17–19 lines × 2) crates/ruvector-postgres/src/index/hnsw_am.rs:949— crates/ruvector-postgres/src/index/hnsw_am.rs:949-967 | crates/ruvector-postgres/src/index/ivfflat_am.rs:1155-1171 — before extracting anything, compare `crates/ruvector-postgres/src/index/hnsw_am.rs` and `crates/ruvector-postgres/src/index/ivfflat_am.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 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 (18–19 lines × 2) crates/mcp-brain-server/src/bin/ruvbrain_worker.rs:127— crates/mcp-brain-server/src/bin/ruvbrain_worker.rs:127-145 | crates/mcp-brain-server/src/routes.rs:4129-4146 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18–19 lines × 2) crates/prime-radiant/src/mincut/config.rs:58— crates/prime-radiant/src/mincut/config.rs:58-75 | crates/ruvector-mincut/src/subpolynomial/mod.rs:99-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18–19 lines × 2) crates/ruvector-math/src/tropical/polynomial.rs:139— crates/ruvector-math/src/tropical/polynomial.rs:139-156 | crates/ruvector-math/src/tropical/polynomial.rs:164-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 (18–19 lines × 2) crates/ruvector-sparsifier/src/audit.rs:72— crates/ruvector-sparsifier/src/audit.rs:72-90 | crates/ruvector-sparsifier/src/audit.rs:131-148 — 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 (18–19 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1120— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1120-1138 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1416-1433 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (12–14 lines × 2) crates/ruvector-graph-wasm/src/lib.rs:329— crates/ruvector-graph-wasm/src/lib.rs:329-340 | crates/ruvector-graph-wasm/src/lib.rs:347-360 — 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–14 lines × 2) crates/ruvector-math/src/information_geometry/fisher.rs:165— crates/ruvector-math/src/information_geometry/fisher.rs:165-178 | crates/ruvector-math/src/information_geometry/kfac.rs:204-215 — before extracting anything, compare `crates/ruvector-math/src/information_geometry/fisher.rs` and `crates/ruvector-math/src/information_geometry/kfac.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 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 (12–14 lines × 2) crates/ruvllm/src/gguf/quantization.rs:565— crates/ruvllm/src/gguf/quantization.rs:565-578 | crates/ruvllm/src/gguf/quantization.rs:615-626 — 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–14 lines × 2) crates/ruvllm/src/kernels/norm.rs:104— crates/ruvllm/src/kernels/norm.rs:104-117 | crates/ruvllm/src/kernels/norm.rs:441-452 — 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–14 lines × 2) scripts/training/train-deobfuscator-v2.py:222— scripts/training/train-deobfuscator-v2.py:222-233 | scripts/training/train-deobfuscator.py:239-252 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `scripts/training/train-deobfuscator.py:255` calls `step` and `scripts/training/train-deobfuscator-v2.py:236` 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 (12–13 lines × 3) crates/ruvector-cnn/src/kernels/int8_avx2.rs:257— crates/ruvector-cnn/src/kernels/int8_avx2.rs:257-269 | crates/ruvector-cnn/src/kernels/int8_neon.rs:252-264 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:264-275 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (12–13 lines × 3) crates/ruvector-cnn/src/simd/avx2.rs:683— crates/ruvector-cnn/src/simd/avx2.rs:683-694 | crates/ruvector-cnn/src/simd/neon.rs:445-457 | crates/ruvector-cnn/src/simd/wasm.rs:424-436 — before extracting anything, compare `crates/ruvector-cnn/src/simd/avx2.rs` and `crates/ruvector-cnn/src/simd/neon.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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 (12–13 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:476— crates/ruvector-core/src/simd_intrinsics.rs:476-488 | crates/ruvector-core/src/simd_intrinsics.rs:520-531 | crates/ruvector-core/src/simd_intrinsics.rs:608-619 — 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.
Duplicated block (12–13 lines × 3) crates/ruvector-postgres/src/distance/simd.rs:1275— crates/ruvector-postgres/src/distance/simd.rs:1275-1287 | crates/ruvector-postgres/src/distance/simd.rs:1356-1367 | crates/ruvector-postgres/src/distance/simd.rs:1447-1458 — 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.
Duplicated block (12–13 lines × 3) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2535— patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2535-2547 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2595-2606 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2654-2665 — 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.
Duplicated block (9 lines × 6) crates/ruvector-attention-cli/src/commands/serve.rs:119— crates/ruvector-attention-cli/src/commands/serve.rs:119-127 | crates/ruvector-attention-cli/src/commands/serve.rs:148-156 | crates/ruvector-attention-cli/src/commands/serve.rs:177-185 | crates/ruvector-attention-cli/src/commands/serve.rs:205-213 | crates/ruvector-attention-cli/src/commands/serve.rs:233-241 | crates/ruvector-attention-cli/src/commands/serve.rs:263-271 — all 6 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.
Duplicated block (9 lines × 6) crates/ruvector-postgres/src/graph/sparql/executor.rs:449— crates/ruvector-postgres/src/graph/sparql/executor.rs:449-457 | crates/ruvector-postgres/src/graph/sparql/executor.rs:461-469 | crates/ruvector-postgres/src/graph/sparql/executor.rs:501-509 | crates/ruvector-postgres/src/graph/sparql/executor.rs:528-536 | crates/rvlite/src/sparql/executor.rs:393-401 | crates/rvlite/src/sparql/executor.rs:405-413 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (9 lines × 6) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2269— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2269-2281 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1420-1432 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:946-954 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2793-2805 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1912-1924 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:994-1002 — `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 74 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (9 lines × 6) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1275— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1275-1283 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1472-1480 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1477-1485 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1543-1551 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1738-1746 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1820-1828 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (9 lines × 6) crates/ruvix/crates/bcm2711/src/mmio.rs:74— crates/ruvix/crates/bcm2711/src/mmio.rs:74-83 | crates/ruvix/crates/bcm2711/src/mmio.rs:98-107 | crates/ruvix/crates/bcm2711/src/mmio.rs:123-132 | crates/ruvix/crates/rpi-boot/src/early_uart.rs:119-127 | crates/ruvix/crates/rpi-boot/src/lib.rs:234-242 | crates/ruvix/crates/rpi-boot/src/lib.rs:248-256 — before extracting anything, compare `crates/ruvix/crates/bcm2711/src/mmio.rs` and `crates/ruvix/crates/rpi-boot/src/lib.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 (7–9 lines × 2) crates/ruvector-mincut-wasm/src/lib.rs:119— crates/ruvector-mincut-wasm/src/lib.rs:119-127 | crates/ruvector-mincut-wasm/src/lib.rs:317-323 — 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 (7–9 lines × 2) crates/ruvllm/src/backends/gemma2.rs:401— crates/ruvllm/src/backends/gemma2.rs:401-409 | crates/ruvllm/src/models/ruvltra_medium.rs:581-587 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/models/ruvltra_medium.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 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 (7–9 lines × 2) crates/ruvllm/src/models/openmythos/act_kernel.rs:388— crates/ruvllm/src/models/openmythos/act_kernel.rs:388-396 | crates/ruvllm/src/models/openmythos/act_kernel.rs:416-422 — 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 (7–9 lines × 2) crates/rvAgent/rvagent-cli/src/app.rs:272— crates/rvAgent/rvagent-cli/src/app.rs:272-280 | crates/rvAgent/rvagent-cli/src/app.rs:314-320 — 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 (7–9 lines × 2) crates/rvf/rvf-runtime/src/store.rs:1191— crates/rvf/rvf-runtime/src/store.rs:1191-1199 | crates/rvf/rvf-runtime/src/store.rs:1314-1320 — 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–7 lines × 3) crates/ruvector-cnn/src/int8/kernels/simd.rs:74— crates/ruvector-cnn/src/int8/kernels/simd.rs:74-80 | crates/ruvector-core/src/simd_intrinsics.rs:1369-1374 | crates/ruvector-core/src/simd_intrinsics.rs:1409-1414 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6–7 lines × 3) crates/ruvector-core/src/storage.rs:102— crates/ruvector-core/src/storage.rs:102-108 | crates/ruvector-graph/src/storage.rs:102-107 | crates/ruvector-router-core/src/storage.rs:49-54 — before extracting anything, compare `crates/ruvector-core/src/storage.rs` and `crates/ruvector-graph/src/storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (6–7 lines × 3) crates/ruvector-nervous-system/src/separate/sparsification.rs:145— crates/ruvector-nervous-system/src/separate/sparsification.rs:145-151 | crates/ruvector-nervous-system/src/separate/sparsification.rs:178-183 | crates/ruvector-nervous-system/src/separate/sparsification.rs:272-277 — 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.
Duplicated block (6–7 lines × 3) crates/ruvector-postgres/src/index/hnsw_am.rs:954— crates/ruvector-postgres/src/index/hnsw_am.rs:954-960 | crates/ruvector-postgres/src/index/hnsw_am.rs:1080-1086 | crates/ruvector-postgres/src/index/ivfflat_am.rs:1159-1164 — before extracting anything, compare `crates/ruvector-postgres/src/index/hnsw_am.rs` and `crates/ruvector-postgres/src/index/ivfflat_am.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 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 (6–7 lines × 3) crates/rvm/crates/rvm-types/src/witness.rs:152— crates/rvm/crates/rvm-types/src/witness.rs:152-157 | crates/rvm/crates/rvm-types/src/witness.rs:369-374 | crates/rvm/crates/rvm-witness/src/hash.rs:70-76 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×5
Recursive walk over a caller-supplied document has no depth cap ui/ruvocal/src/lib/utils/deepestChild.ts:3— `deepestChild` is exported and takes `el: HTMLElement` from its caller, and it calls itself at line 3 (`deepestChild`) with a piece of `el` — and nowhere in `deepestChild` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deepestChild` 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 REDACTED:114— `attachFileRefsToArgs` is exported, takes a document from its caller (line 104) and hands it to `visit`, which calls itself at line 114 (`visit`) with a piece of `node` (and at line 121) — and nowhere in `visit` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `visit` 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 packages/metabiohacker/src/ledger/stableHash.ts:11— `stableHash` is exported, takes a document from its caller (line 6) and hands it to `sortObject`, which calls itself at line 11 (`sortObject`) with a piece of `value` (and at line 17) — and nowhere in `sortObject` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sortObject` 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 npm/packages/rvforge/src/hash.ts:38— `canonicalJson` is exported, takes a document from its caller (line 26) and hands it to `encode`, which calls itself at line 38 (`encode`) with a piece of `value` (and at line 45) — and nowhere in `encode` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `encode` 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 npm/packages/agentic-synth/src/generators/structured.ts:194— `generateFromJSONSchema` is exported, takes a document from its caller (line 169) and hands it to `convertJSONSchema`, which calls itself at line 194 (`this.convertJSONSchema`) with a piece of `jsonSchema` — and nowhere in `convertJSONSchema` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `convertJSONSchema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
AC1 · Text alternatives· <canvas> without a text alternative · ×4
<canvas> without a text alternative crates/mcp-brain-server/static/index.html:418— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative crates/mcp-brain-server/static/origin.html:111— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative ui/ruvocal/src/lib/components/FoundationBackground.svelte:226— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative ui/ruvocal/src/lib/components/RuFloUniverse.svelte:171— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
Tensor::backward (cyclomatic 88) patches/candle-core-0.9.2/src/backprop.rs:165— Tensor::backward has cyclomatic complexity 88 (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.
Tensor::backward (cyclomatic 86) patches/candle-core-0.8.4/src/backprop.rs:163— Tensor::backward has cyclomatic complexity 86 (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.
Tensor::write_bytes (cyclomatic 20) patches/candle-core-0.9.2/src/convert.rs:102— Tensor::write_bytes has cyclomatic complexity 20 (threshold 15). 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.
Tensor::fmt (cyclomatic 20) patches/candle-core-0.9.2/src/display.rs:454— Tensor::fmt has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvix_cli::commands::monitor::run_monitor_loop (cyclomatic 27) crates/ruvix/crates/cli/src/commands/monitor.rs:348— ruvix_cli::commands::monitor::run_monitor_loop has cyclomatic complexity 27 (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.
ruvix_cli::commands::security::execute_audit (cyclomatic 19) crates/ruvix/crates/cli/src/commands/security.rs:270— ruvix_cli::commands::security::execute_audit has cyclomatic complexity 19 (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.
ruvix_cli::commands::security::execute_scan (cyclomatic 18) crates/ruvix/crates/cli/src/commands/security.rs:426— ruvix_cli::commands::security::execute_scan 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.
ruvix_cli::commands::keys::execute_list (cyclomatic 17) crates/ruvix/crates/cli/src/commands/keys.rs:593— ruvix_cli::commands::keys::execute_list 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.
Parser::parse_primary (cyclomatic 25) crates/ruvector-graph/src/cypher/parser.rs:1026— Parser::parse_primary has cyclomatic complexity 25 (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.
Parser::parse_primary (cyclomatic 20) crates/rvlite/src/cypher/parser.rs:967— Parser::parse_primary has cyclomatic complexity 20 (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.
Parser::parse_relationship_pattern (cyclomatic 17) crates/ruvector-graph/src/cypher/parser.rs:184— Parser::parse_relationship_pattern 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.
Parser::parse_relationship_pattern (cyclomatic 17) crates/rvlite/src/cypher/parser.rs:184— Parser::parse_relationship_pattern 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.
rvf_runtime::qr_encode::evaluate_penalty (cyclomatic 23) crates/rvf/rvf-runtime/src/qr_encode.rs:632— rvf_runtime::qr_encode::evaluate_penalty 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.
rvf_runtime::safety_net::selective_safety_net_scan (cyclomatic 23) crates/rvf/rvf-runtime/src/safety_net.rs:134— rvf_runtime::safety_net::selective_safety_net_scan 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.
rvf_runtime::index_path::decode_graph (cyclomatic 17) crates/rvf/rvf-runtime/src/index_path.rs:313— rvf_runtime::index_path::decode_graph has cyclomatic complexity 17 (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.
rvf_runtime::read_path::scan_blocks (cyclomatic 17) crates/rvf/rvf-runtime/src/read_path.rs:295— rvf_runtime::read_path::scan_blocks 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.
Hnsw::select_neighbours (cyclomatic 22) patches/hnsw_rs/src/hnsw.rs:1401— Hnsw::select_neighbours 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.
Hnsw::select_neighbours (cyclomatic 22) scripts/patches/hnsw_rs/src/hnsw.rs:1287— Hnsw::select_neighbours 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.
Hnsw::search_layer (cyclomatic 17) scripts/patches/hnsw_rs/src/hnsw.rs:913— Hnsw::search_layer 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.
Hnsw::search_layer (cyclomatic 16) patches/hnsw_rs/src/hnsw.rs:920— Hnsw::search_layer 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.
KgeModel::eval_json (cyclomatic 19) crates/ruvector-kge-ffi/src/pipeline.rs:150— KgeModel::eval_json has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
KgeModel::eval_json (cyclomatic 19) crates/ruvector-kge-wasm/src/pipeline.rs:150— KgeModel::eval_json has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
KgeModel::predict_json (cyclomatic 16) crates/ruvector-kge-ffi/src/ops.rs:185— KgeModel::predict_json has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
KgeModel::predict_json (cyclomatic 16) crates/ruvector-kge-wasm/src/ops.rs:185— KgeModel::predict_json has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MatMul::f (cyclomatic 19) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1415— MatMul::f has cyclomatic complexity 19 (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. This is NOT this file's highest cyclomatic complexity: CpuStorage::to_dtype (cyclomatic 49) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
MatMul::f (cyclomatic 19) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1532— MatMul::f has cyclomatic complexity 19 (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. This is NOT this file's highest cyclomatic complexity: CpuStorage::to_dtype (cyclomatic 102) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
MatMul::f (cyclomatic 18) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1324— MatMul::f has cyclomatic complexity 18 (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. This is NOT this file's highest cyclomatic complexity: CpuStorage::to_dtype (cyclomatic 49) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
MatMul::f (cyclomatic 18) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1441— MatMul::f has cyclomatic complexity 18 (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. This is NOT this file's highest cyclomatic complexity: CpuStorage::to_dtype (cyclomatic 102) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
XxxComment patches/candle-core-0.9.2/src/safetensors.rs:125— // XXX: We need to specify `T` here, otherwise the compiler will infer u8 because of the following cast — 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.
XxxComment patches/candle-core-0.9.2/src/safetensors.rs:156— // XXX: We need to specify `T` here, otherwise the compiler will infer u8 because of the following cast — 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.
XxxComment patches/candle-core-0.8.4/src/safetensors.rs:108— // XXX: We need to specify `T` here, otherwise the compiler will infer u8 because of the following cast — 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.
XxxComment patches/candle-core-0.8.4/src/safetensors.rs:139— // XXX: We need to specify `T` here, otherwise the compiler will infer u8 because of the following cast — 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.
Executor::match_relationship_pattern (cognitive 51) crates/rvlite/src/cypher/executor.rs:372— Executor::match_relationship_pattern has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (42 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 34). 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.
Executor::execute_delete (cognitive 35) crates/rvlite/src/cypher/executor.rs:523— Executor::execute_delete has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (27 pts), match/switch 1 (5 pts), loops 2 (3 pts) (nesting depth added 26). 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.
Executor::match_node_pattern (cognitive 19) crates/rvlite/src/cypher/executor.rs:328— Executor::match_node_pattern has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 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.
Executor::create_relationship (cognitive 17) crates/rvlite/src/cypher/executor.rs:200— Executor::create_relationship has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts), match/switch 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.
rvf_cli::cmd::verify_attestation::run (cognitive 50) crates/rvf/rvf-cli/src/cmd/verify_attestation.rs:85— rvf_cli::cmd::verify_attestation::run has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (36 pts), loops 2 (7 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 27). 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.
rvf_cli::cmd::verify_witness::run (cognitive 26) crates/rvf/rvf-cli/src/cmd/verify_witness.rs:134— rvf_cli::cmd::verify_witness::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 4 (10 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.
rvf_cli::cmd::rebuild_refcounts::run (cognitive 24) crates/rvf/rvf-cli/src/cmd/rebuild_refcounts.rs:28— rvf_cli::cmd::rebuild_refcounts::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, 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.
rvf_cli::cmd::verify_attestation::find_attestation_witness_payloads (cognitive 18) crates/rvf/rvf-cli/src/cmd/verify_attestation.rs:30— rvf_cli::cmd::verify_attestation::find_attestation_witness_payloads has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, 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.
DeterministicLocalKCut::color_coded_dfs (cognitive 46) crates/ruvector-mincut/src/localkcut/deterministic.rs:358— DeterministicLocalKCut::color_coded_dfs has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (42 pts), loops 2 (4 pts) (nesting depth added 32). 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.
DeterministicLocalKCut::deterministic_bfs (cognitive 38) crates/ruvector-mincut/src/localkcut/paper_impl.rs:259— DeterministicLocalKCut::deterministic_bfs has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 4 (7 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 21). 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.
DeterministicLocalKCut::insert_edge (cognitive 17) crates/ruvector-mincut/src/localkcut/deterministic.rs:271— DeterministicLocalKCut::insert_edge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 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.
DeterministicLocalKCut::query (cognitive 16) crates/ruvector-mincut/src/localkcut/deterministic.rs:326— DeterministicLocalKCut::query has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (9 pts), loops 3 (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.
ruvector_math::tensor_networks::contraction::contract_tensors (cognitive 41) crates/ruvector-math/src/tensor_networks/contraction.rs:194— ruvector_math::tensor_networks::contraction::contract_tensors has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 7 (14 pts) (nesting depth added 24). 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.
ruvector_math::tensor_networks::tucker::compute_left_singular_vectors (cognitive 30) crates/ruvector-math/src/tensor_networks/tucker.rs:161— ruvector_math::tensor_networks::tucker::compute_left_singular_vectors has cognitive complexity 30 (threshold 15). Drivers by points: loops 10 (30 pts) (nesting depth added 20). 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.
ruvector_math::tensor_networks::cp_decomposition::pseudo_inverse_symmetric (cognitive 27) crates/ruvector-math/src/tensor_networks/cp_decomposition.rs:293— ruvector_math::tensor_networks::cp_decomposition::pseudo_inverse_symmetric has cognitive complexity 27 (threshold 15). Drivers by points: loops 11 (19 pts), if/else 3 (8 pts) (nesting depth added 13). 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.
ruvector_math::tensor_networks::cp_decomposition::update_factor_als (cognitive 20) crates/ruvector-math/src/tensor_networks/cp_decomposition.rs:203— ruvector_math::tensor_networks::cp_decomposition::update_factor_als has cognitive complexity 20 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 1 (2 pts) (nesting depth added 11). 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.
TurboQuantCompressor::compress_batch (cognitive 39) crates/ruvllm/src/quantize/turbo_quant.rs:209— TurboQuantCompressor::compress_batch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 4 (9 pts), boolean chains 1 (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.
TurboQuantCompressor::decompress (cognitive 23) crates/ruvllm/src/quantize/turbo_quant.rs:360— TurboQuantCompressor::decompress has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (8 pts), boolean chains 1 (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.
TurboQuantCompressor::decompress_single (cognitive 18) crates/ruvllm/src/quantize/turbo_quant.rs:426— TurboQuantCompressor::decompress_single has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 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.
TurboQuantCompressor::dot_in_rotated_space (cognitive 17) crates/ruvllm/src/quantize/turbo_quant.rs:600— TurboQuantCompressor::dot_in_rotated_space has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 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.
AdapterMerger::merge_dare (cognitive 36) crates/ruvllm/src/lora/adapters/merge.rs:402— AdapterMerger::merge_dare has cognitive complexity 36 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 3 (15 pts) (nesting depth added 27). 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.
AdapterMerger::merge_ties (cognitive 34) crates/ruvllm/src/lora/adapters/merge.rs:302— AdapterMerger::merge_ties has cognitive complexity 34 (threshold 15). Drivers by points: loops 10 (31 pts), if/else 1 (3 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.
AdapterMerger::merge_weighted (cognitive 28) crates/ruvllm/src/lora/adapters/merge.rs:180— AdapterMerger::merge_weighted has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 3 (7 pts) (nesting depth added 19). 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.
AdapterMerger::merge_average (cognitive 24) crates/ruvllm/src/lora/adapters/merge.rs:132— AdapterMerger::merge_average has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 1 (3 pts) (nesting depth added 17). 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.
ruvector_typesafe_train::train::run (cognitive 35) crates/ruvector-typesafe-train/src/train/mod.rs:127— ruvector_typesafe_train::train::run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 7 (10 pts), boolean chains 1 (nesting depth added 16). 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.
ruvector_typesafe_train::export::transplant::map_initializers (cognitive 31) crates/ruvector-typesafe-train/src/export/transplant.rs:134— ruvector_typesafe_train::export::transplant::map_initializers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 6 (8 pts), match/switch 1 (3 pts), boolean chains 2 (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.
ruvector_typesafe_train::train::eval::evaluate (cognitive 23) crates/ruvector-typesafe-train/src/train/eval.rs:123— ruvector_typesafe_train::train::eval::evaluate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts) (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.
ruvector_typesafe_train::leakage::assert_no_leakage (cognitive 18) crates/ruvector-typesafe-train/src/leakage.rs:100— ruvector_typesafe_train::leakage::assert_no_leakage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (5 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.
ruvector_core::advanced_features::product_quantization::kmeans_clustering (cognitive 34) crates/ruvector-core/src/advanced_features/product_quantization.rs:341— ruvector_core::advanced_features::product_quantization::kmeans_clustering has cognitive complexity 34 (threshold 15). Drivers by points: loops 8 (21 pts), if/else 7 (12 pts), boolean chains 1 (nesting depth added 18). 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.
ruvector_core::quantization::kmeans_clustering (cognitive 21) crates/ruvector-core/src/quantization.rs:550— ruvector_core::quantization::kmeans_clustering has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 1 (3 pts) (nesting depth added 14). 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.
ruvector_core::encoding::codecs::f32_to_f16_bits (cognitive 18) crates/ruvector-core/src/encoding/codecs.rs:121— ruvector_core::encoding::codecs::f32_to_f16_bits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4 (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.
ruvector_core::advanced_features::opq::kmeans (cognitive 17) crates/ruvector-core/src/advanced_features/opq.rs:482— ruvector_core::advanced_features::opq::kmeans has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 9). 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.
ReasoningBankIntegration::distill_patterns (cognitive 33) crates/ruvllm/src/claude_flow/reasoning_bank.rs:675— ReasoningBankIntegration::distill_patterns has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 7 (16 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.
ReasoningBankIntegration::cluster_trajectories (cognitive 28) crates/ruvllm/src/claude_flow/reasoning_bank.rs:799— ReasoningBankIntegration::cluster_trajectories has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 5 (13 pts) (nesting depth added 16). 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.
ReasoningBankIntegration::get_recommendation (cognitive 16) crates/ruvllm/src/claude_flow/reasoning_bank.rs:932— ReasoningBankIntegration::get_recommendation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 5 (7 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ReasoningBankIntegration::consolidate (cognitive 16) crates/ruvllm/src/claude_flow/reasoning_bank.rs:1041— ReasoningBankIntegration::consolidate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CandleBackend::load_model (cognitive 31) crates/ruvllm/src/backends/candle_backend.rs:1368— CandleBackend::load_model has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 1 (4 pts), match/switch 1 (3 pts) (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.
CandleBackend::sample_token (cognitive 27) crates/ruvllm/src/backends/candle_backend.rs:1259— CandleBackend::sample_token has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 3 (6 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.
CandleBackend::get_safetensors_files (cognitive 21) crates/ruvllm/src/backends/candle_backend.rs:501— CandleBackend::get_safetensors_files has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (6 pts) (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.
CandleBackend::generate_detailed (cognitive 21) crates/ruvllm/src/backends/candle_backend.rs:1478— CandleBackend::generate_detailed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 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.
VectorShard::replay (cognitive 29) crates/ruvector-edge-store/src/shard/replay.rs:38— VectorShard::replay has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (8 pts), match/switch 2 (7 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.
VectorShard::ensure_index_with (cognitive 21) crates/ruvector-edge-store/src/shard/persist.rs:155— VectorShard::ensure_index_with has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (2 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.
VectorShard::plan_upsert (cognitive 21) crates/ruvector-edge-store/src/shard/write.rs:129— VectorShard::plan_upsert has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, match/switch 2 (3 pts), loops 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
VectorShard::delete (cognitive 16) crates/ruvector-edge-store/src/shard/delete.rs:33— VectorShard::delete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4, boolean chains 2, match/switch 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.
ruvector_edge_store::mem_store::parse::tokenize (cognitive 25) crates/ruvector-edge-store/src/mem_store/parse.rs:26— ruvector_edge_store::mem_store::parse::tokenize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (7 pts), match/switch 2 (6 pts), boolean chains 4 (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.
ruvector_edge_store::mem_store::parse::parse (cognitive 25) crates/ruvector-edge-store/src/mem_store/parse.rs:272— ruvector_edge_store::mem_store::parse::parse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_edge_store::shard::rerank::exact_top_k (cognitive 17) crates/ruvector-edge-store/src/shard/rerank.rs:48— ruvector_edge_store::shard::rerank::exact_top_k has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 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.
ruvector_edge_store::ops::vector::vector_delete (cognitive 16) crates/ruvector-edge-store/src/ops/vector.rs:280— ruvector_edge_store::ops::vector::vector_delete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 2 (4 pts), loops 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ruvector_robotics::cognitive::behavior_tree::eval (cognitive 23) crates/ruvector-robotics/src/cognitive/behavior_tree.rs:136— ruvector_robotics::cognitive::behavior_tree::eval has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 5 (7 pts), loops 3 (6 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_robotics::perception::clustering::cluster_point_cloud (cognitive 21) crates/ruvector-robotics/src/perception/clustering.rs:20— ruvector_robotics::perception::clustering::cluster_point_cloud has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 11). 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.
ruvector_robotics::planning::neighbors_into (cognitive 20) crates/ruvector-robotics/src/planning.rs:145— ruvector_robotics::planning::neighbors_into has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, 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.
ruvector_robotics::planning::astar (cognitive 16) crates/ruvector-robotics/src/planning.rs:69— ruvector_robotics::planning::astar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), 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.
MatMul::f (cognitive 21) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1415— MatMul::f has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 6, loops 3 (6 pts), match/switch 1 (nesting depth added 3). 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.
MatMul::f (cognitive 21) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1532— MatMul::f has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 6, loops 3 (6 pts), match/switch 1 (nesting depth added 3). 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.
MatMul::f (cognitive 19) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1324— MatMul::f has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 6, loops 2 (4 pts), match/switch 1 (nesting depth added 2). 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.
MatMul::f (cognitive 19) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1441— MatMul::f has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 6, loops 2 (4 pts), match/switch 1 (nesting depth added 2). 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.
KnowledgeGraph::remove_node (cognitive 18) crates/mcp-brain-server/src/graph.rs:215— KnowledgeGraph::remove_node has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 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.
KnowledgeGraph::get_neighbors (cognitive 18) crates/ruvector-core/src/advanced_features/graph_rag.rs:177— KnowledgeGraph::get_neighbors has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (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.
KnowledgeGraph::add_node (cognitive 17) crates/mcp-brain-server/src/graph.rs:148— KnowledgeGraph::add_node has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 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.
KnowledgeGraph::compute_edge_strengths (cognitive 16) crates/mcp-brain-server/src/graph.rs:593— KnowledgeGraph::compute_edge_strengths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 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.
Duplicated block (45 lines × 2) crates/ruvllm/src/kernels/attention.rs:906— crates/ruvllm/src/kernels/attention.rs:906-950 | crates/ruvllm/src/kernels/attention.rs:991-1035 — 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 (45 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1990— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1990-2034 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2450-2494 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (45 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:316— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:316-360 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:365-409 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/utils.rs` and `patches/candle-core-0.9.2/src/cpu_backend/utils.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 259 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 (45 lines × 2) patches/candle-core-0.8.4/src/layout.rs:225— patches/candle-core-0.8.4/src/layout.rs:225-269 | patches/candle-core-0.9.2/src/layout.rs:225-269 — before extracting anything, compare `patches/candle-core-0.8.4/src/layout.rs` and `patches/candle-core-0.9.2/src/layout.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 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 (39 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:1027— crates/ruvector-graph/src/cypher/parser.rs:1027-1065 | crates/rvlite/src/cypher/parser.rs:968-1006 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (39 lines × 2) crates/ruvector-kge-ffi/src/ops.rs:310— crates/ruvector-kge-ffi/src/ops.rs:310-348 | crates/ruvector-kge-wasm/src/ops.rs:310-348 — before extracting anything, compare `crates/ruvector-kge-ffi/src/ops.rs` and `crates/ruvector-kge-wasm/src/ops.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 238 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 (39 lines × 2) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1108— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1108-1146 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1311-1349 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (39 lines × 2) patches/hnsw_rs/src/libext.rs:920— patches/hnsw_rs/src/libext.rs:920-958 | scripts/patches/hnsw_rs/src/libext.rs:920-958 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (38 lines × 2) crates/ruvector-math/src/tensor_networks/tucker.rs:257— crates/ruvector-math/src/tensor_networks/tucker.rs:257-294 | crates/ruvector-math/src/tensor_networks/tucker.rs:305-342 — 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 (38 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:697— crates/ruvector-postgres/src/graph/sparql/parser.rs:697-734 | crates/rvlite/src/sparql/parser.rs:703-740 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (38 lines × 2) crates/ruvector-streaming-qng/src/bin/benchmark.rs:372— crates/ruvector-streaming-qng/src/bin/benchmark.rs:372-409 | crates/ruvector-streaming-qng/src/bin/benchmark.rs:421-458 — 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 (38 lines × 2) patches/candle-core-0.8.4/src/display.rs:463— patches/candle-core-0.8.4/src/display.rs:463-500 | patches/candle-core-0.9.2/src/display.rs:486-523 — before extracting anything, compare `patches/candle-core-0.8.4/src/display.rs` and `patches/candle-core-0.9.2/src/display.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 304 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 (33 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:823— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:823-855 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1019-1051 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (33 lines × 2) patches/candle-core-0.8.4/src/pickle.rs:54— patches/candle-core-0.8.4/src/pickle.rs:54-86 | patches/candle-core-0.9.2/src/pickle.rs:55-87 — before extracting anything, compare `patches/candle-core-0.8.4/src/pickle.rs` and `patches/candle-core-0.9.2/src/pickle.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 506 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 (33 lines × 2) patches/candle-core-0.8.4/src/quantized/ggml_file.rs:156— patches/candle-core-0.8.4/src/quantized/ggml_file.rs:156-188 | patches/candle-core-0.9.2/src/quantized/ggml_file.rs:157-189 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/ggml_file.rs` and `patches/candle-core-0.9.2/src/quantized/ggml_file.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 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 (33 lines × 2) patches/hnsw_rs/src/libext.rs:849— patches/hnsw_rs/src/libext.rs:849-881 | scripts/patches/hnsw_rs/src/libext.rs:849-881 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (24–25 lines × 2) crates/ruvector-bench/src/bin/comparison_benchmark.rs:310— crates/ruvector-bench/src/bin/comparison_benchmark.rs:310-333 | crates/ruvector-bench/src/bin/latency_benchmark.rs:340-364 — before extracting anything, compare `crates/ruvector-bench/src/bin/comparison_benchmark.rs` and `crates/ruvector-bench/src/bin/latency_benchmark.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 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 (24–25 lines × 2) crates/ruvector-cnn/src/kernels/int8_avx2.rs:408— crates/ruvector-cnn/src/kernels/int8_avx2.rs:408-432 | crates/ruvector-cnn/src/kernels/int8_neon.rs:389-412 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (24–25 lines × 2) crates/ruvector-memory-admission/src/policy.rs:226— crates/ruvector-memory-admission/src/policy.rs:226-250 | crates/ruvector-memory-admission/src/policy.rs:377-400 — 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 (24–25 lines × 2) crates/ruvector-nervous-system-wasm/src/workspace.rs:175— crates/ruvector-nervous-system-wasm/src/workspace.rs:175-198 | crates/ruvector-nervous-system/src/routing/workspace.rs:309-333 — before extracting anything, compare `crates/ruvector-nervous-system-wasm/src/workspace.rs` and `crates/ruvector-nervous-system/src/routing/workspace.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 (19 lines × 4) crates/ruvllm/src/backends/phi3.rs:81— crates/ruvllm/src/backends/phi3.rs:81-99 | crates/ruvllm/src/backends/phi3.rs:103-121 | crates/ruvllm/src/backends/phi3.rs:125-143 | crates/ruvllm/src/backends/phi3.rs:147-165 — 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.
Duplicated block (19 lines × 4) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1189— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1189-1207 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:1231-1249 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1243-1261 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1286-1304 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (19 lines × 4) patches/candle-core-0.8.4/src/metal_backend/mod.rs:2053— patches/candle-core-0.8.4/src/metal_backend/mod.rs:2053-2071 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:2089-2107 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:2053-2071 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:2090-2108 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (19 lines × 4) patches/hnsw_rs/src/hnswio.rs:451— patches/hnsw_rs/src/hnswio.rs:451-469 | patches/hnsw_rs/src/hnswio.rs:550-568 | scripts/patches/hnsw_rs/src/hnswio.rs:451-469 | scripts/patches/hnsw_rs/src/hnswio.rs:550-568 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (16–17 lines × 2) crates/ruvector-mincut/src/snn/synapse.rs:445— crates/ruvector-mincut/src/snn/synapse.rs:445-461 | crates/ruvector-mincut/src/snn/synapse.rs:468-483 — 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–17 lines × 2) crates/ruvector-temporal-tensor/src/quantizer.rs:113— crates/ruvector-temporal-tensor/src/quantizer.rs:113-128 | crates/ruvector-temporal-tensor/src/quantizer.rs:237-253 — 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–17 lines × 2) crates/ruvllm/src/metal/context.rs:602— crates/ruvllm/src/metal/context.rs:602-618 | crates/ruvllm/src/metal/context.rs:668-683 — 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–17 lines × 2) crates/rvm/crates/rvm-cap/src/derivation.rs:254— crates/rvm/crates/rvm-cap/src/derivation.rs:254-269 | crates/rvm/crates/rvm-cap/src/derivation.rs:351-367 — 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–15 lines × 2) crates/ruvector-mincut/src/instance/bounded.rs:321— crates/ruvector-mincut/src/instance/bounded.rs:321-331 | crates/ruvector-mincut/src/instance/stub.rs:116-130 — before extracting anything, compare `crates/ruvector-mincut/src/instance/bounded.rs` and `crates/ruvector-mincut/src/instance/stub.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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–15 lines × 2) crates/ruvllm/src/backends/phi3.rs:283— crates/ruvllm/src/backends/phi3.rs:283-293 | crates/ruvllm/src/models/ruvltra.rs:523-537 — before extracting anything, compare `crates/ruvllm/src/backends/phi3.rs` and `crates/ruvllm/src/models/ruvltra.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 269 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 (11–15 lines × 2) crates/ruvllm/src/bitnet/backend.rs:1575— crates/ruvllm/src/bitnet/backend.rs:1575-1589 | crates/ruvllm/src/bitnet/backend.rs:2082-2092 — 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–15 lines × 2) crates/rvm/crates/rvm-witness/src/replay.rs:72— crates/rvm/crates/rvm-witness/src/replay.rs:72-86 | crates/rvm/crates/rvm-witness/src/versioned.rs:338-348 — 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 (14 lines × 4) crates/ruvector-postgres/src/distance/simd.rs:189— crates/ruvector-postgres/src/distance/simd.rs:189-202 | crates/ruvector-postgres/src/distance/simd.rs:545-558 | crates/ruvector-postgres/src/distance/simd.rs:682-695 | crates/ruvector-postgres/src/distance/simd.rs:1423-1436 — 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.
Duplicated block (14 lines × 4) crates/ruvector-postgres/src/graph/sparql/executor.rs:462— crates/ruvector-postgres/src/graph/sparql/executor.rs:462-475 | crates/ruvector-postgres/src/graph/sparql/executor.rs:529-542 | crates/rvlite/src/sparql/executor.rs:341-354 | crates/rvlite/src/sparql/executor.rs:406-419 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (14 lines × 4) patches/candle-core-0.8.4/src/metal_backend/mod.rs:200— patches/candle-core-0.8.4/src/metal_backend/mod.rs:200-213 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:251-264 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:217-230 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:270-283 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (14 lines × 4) patches/hnsw_rs/src/libext.rs:512— patches/hnsw_rs/src/libext.rs:512-525 | patches/hnsw_rs/src/libext.rs:606-620 | scripts/patches/hnsw_rs/src/libext.rs:512-525 | scripts/patches/hnsw_rs/src/libext.rs:606-620 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (13 lines × 4) crates/ruvector-graph/src/cypher/parser.rs:671— crates/ruvector-graph/src/cypher/parser.rs:671-683 | crates/ruvector-graph/src/cypher/parser.rs:708-720 | crates/rvlite/src/cypher/parser.rs:671-683 | crates/rvlite/src/cypher/parser.rs:708-720 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (13 lines × 4) crates/ruvix/crates/net/src/icmp.rs:252— crates/ruvix/crates/net/src/icmp.rs:252-264 | crates/ruvix/crates/net/src/ipv4.rs:400-412 | crates/ruvix/crates/net/src/udp.rs:141-153 | crates/ruvix/crates/net/src/udp.rs:196-208 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1331— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1331-1343 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1422-1434 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1448-1460 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1539-1551 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (13 lines × 4) patches/hnsw_rs/src/hnsw.rs:1572— patches/hnsw_rs/src/hnsw.rs:1572-1584 | patches/hnsw_rs/src/hnsw.rs:1671-1683 | scripts/patches/hnsw_rs/src/hnsw.rs:1458-1470 | scripts/patches/hnsw_rs/src/hnsw.rs:1557-1569 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (8–9 lines × 4) crates/ruvector-postgres/src/graph/sparql/parser.rs:2281— crates/ruvector-postgres/src/graph/sparql/parser.rs:2281-2289 | crates/ruvector-postgres/src/graph/sparql/parser.rs:2304-2311 | crates/rvlite/src/sparql/parser.rs:2288-2296 | crates/rvlite/src/sparql/parser.rs:2311-2318 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (8–9 lines × 4) patches/candle-core-0.8.4/src/backprop.rs:294— patches/candle-core-0.8.4/src/backprop.rs:294-302 | patches/candle-core-0.8.4/src/backprop.rs:324-331 | patches/candle-core-0.9.2/src/backprop.rs:296-304 | patches/candle-core-0.9.2/src/backprop.rs:326-333 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (8–9 lines × 4) patches/hnsw_rs/src/libext.rs:158— patches/hnsw_rs/src/libext.rs:158-165 | patches/hnsw_rs/src/libext.rs:714-722 | scripts/patches/hnsw_rs/src/libext.rs:158-165 | scripts/patches/hnsw_rs/src/libext.rs:714-722 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (8–9 lines × 4) patches/hnsw_rs/src/libext.rs:179— patches/hnsw_rs/src/libext.rs:179-186 | patches/hnsw_rs/src/libext.rs:741-749 | scripts/patches/hnsw_rs/src/libext.rs:179-186 | scripts/patches/hnsw_rs/src/libext.rs:741-749 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (7 lines × 7) crates/prime-radiant/src/coherence/energy.rs:611— crates/prime-radiant/src/coherence/energy.rs:611-618 | crates/ruvector-acorn/src/dist.rs:22-28 | crates/ruvector-attention/src/transport/centroid_ot.rs:161-167 | crates/ruvector-diskann/src/distance.rs:231-237 | crates/ruvector-math/src/optimal_transport/sinkhorn.rs:101-107 | crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:192-198 | crates/ruvector-math/src/product_manifold/manifold.rs:176-182 — before extracting anything, compare `crates/ruvector-attention/src/transport/centroid_ot.rs` and `crates/ruvector-math/src/optimal_transport/sinkhorn.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 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 (7 lines × 7) crates/ruvector-attention/src/graph/dual_space.rs:278— crates/ruvector-attention/src/graph/dual_space.rs:278-284 | crates/ruvector-attention/src/graph/edge_featured.rs:298-304 | crates/ruvector-attention/src/graph/rope.rs:226-232 | crates/ruvector-attention/src/moe/moe_attention.rs:185-191 | crates/ruvector-attention/src/sparse/flash.rs:151-157 | crates/ruvector-attention/src/sparse/linear.rs:182-188 | crates/ruvector-attention/src/sparse/local_global.rs:140-146 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times.
Duplicated block (7 lines × 7) crates/ruvector-cli/src/cli/hooks.rs:663— crates/ruvector-cli/src/cli/hooks.rs:663-669 | crates/ruvector-core/src/advanced/neural_hash.rs:350-357 | crates/ruvector-dag/src/sona/reasoning_bank.rs:192-198 | crates/ruvector-embed-core/src/pooling.rs:70-76 | crates/ruvllm/src/context/working_memory.rs:566-573 | crates/ruvllm/src/reasoning_bank/pattern_store.rs:388-395 | crates/sona/src/types.rs:359-366 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times.
Duplicated block (7 lines × 7) crates/ruvector-attention/src/training/loss.rs:155— crates/ruvector-attention/src/training/loss.rs:155-161 | crates/ruvector-attention/src/training/mining.rs:56-62 | crates/ruvector-core/src/advanced/tda.rs:406-412 | crates/ruvector-core/src/agenticdb.rs:859-865 | crates/ruvector-dag/src/sona/reasoning_bank.rs:200-206 | crates/ruvector-gnn-rerank/src/reranker.rs:99-105 | crates/ruvector-nervous-system/src/integration/ruvector.rs:404-410 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times.
Duplicated block (3–6 lines × 3) crates/ruvector-bet4-ivf-bench/src/kernel.rs:244— crates/ruvector-bet4-ivf-bench/src/kernel.rs:244-249 | crates/ruvector-bet4-ivf-bench/src/kernel.rs:294-299 | crates/ruvector-bet4-ivf-bench/src/pq.rs:229-231 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (3–6 lines × 3) crates/ruvector-sparse-inference/src/precision/quantizers.rs:87— crates/ruvector-sparse-inference/src/precision/quantizers.rs:87-89 | crates/ruvector-sparse-inference/src/precision/quantizers.rs:211-216 | crates/ruvector-sparse-inference/src/precision/quantizers.rs:293-298 — 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.
Duplicated block (3–6 lines × 3) crates/ruvector-temporal-coherence/src/benchmark.rs:235— crates/ruvector-temporal-coherence/src/benchmark.rs:235-237 | crates/ruvector-temporal-coherence/src/benchmark.rs:240-245 | crates/ruvector-temporal-coherence/src/benchmark.rs:249-254 — 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.
Duplicated block (3–6 lines × 3) patches/candle-core-0.8.4/src/quantized/metal.rs:122— patches/candle-core-0.8.4/src/quantized/metal.rs:122-127 | patches/candle-core-0.9.2/src/quantized/metal.rs:124-129 | patches/candle-core-0.9.2/src/quantized/metal.rs:139-141 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/metal.rs` and `patches/candle-core-0.9.2/src/quantized/metal.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 107 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 (5 lines × 5) crates/prime-radiant/src/coherence/energy.rs:605— crates/prime-radiant/src/coherence/energy.rs:605-610 | crates/ruvector-attention/src/transport/centroid_ot.rs:155-160 | crates/ruvector-core/src/distance.rs:39-43 | crates/ruvector-math/src/optimal_transport/sinkhorn.rs:95-100 | crates/ruvector-math/src/product_manifold/manifold.rs:169-175 — before extracting anything, compare `crates/ruvector-attention/src/transport/centroid_ot.rs` and `crates/ruvector-math/src/optimal_transport/sinkhorn.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 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 (5 lines × 5) crates/ruvector-nervous-system-wasm/src/wta.rs:227— crates/ruvector-nervous-system-wasm/src/wta.rs:227-232 | crates/ruvector-nervous-system-wasm/src/wta.rs:267-271 | crates/ruvector-nervous-system-wasm/src/wta.rs:301-305 | crates/ruvector-nervous-system/src/compete/kwta.rs:83-88 | crates/ruvector-nervous-system/src/compete/kwta.rs:117-122 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 5) crates/ruvix/crates/smp/src/barriers.rs:93— crates/ruvix/crates/smp/src/barriers.rs:93-98 | crates/ruvix/crates/smp/src/barriers.rs:117-121 | crates/ruvix/crates/smp/src/barriers.rs:186-190 | crates/ruvix/crates/smp/src/barriers.rs:207-211 | crates/ruvix/crates/smp/src/barriers.rs:249-254 — all 5 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.
Duplicated block (5 lines × 5) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2230— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2230-2234 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2332-2336 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1378-1382 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1492-1496 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2754-2758 — `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 74 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
End-of-life runtime: Node.js 10 crates/ruvector-graph-transformer-node/package.json:50— crates/ruvector-graph-transformer-node/package.json declares Node.js 10 as this project's engines.node, and Node.js 10, support ended 2021-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2021-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
End-of-life runtime: Node.js 14 crates/agentic-robotics-node/package.json:37— crates/agentic-robotics-node/package.json declares Node.js 14 as this project's engines.node, and Node.js 14, support ended 2023-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2023-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
End-of-life runtime: Node.js 16 npm/packages/sona/package.json:62— npm/packages/sona/package.json declares Node.js 16 as this project's engines.node, and Node.js 16, support ended 2023-09-11. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2023-09-11 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
End-of-life runtime: Node.js 18 npm/core/package.json:16— npm/core/package.json declares Node.js 18 as this project's engines.node, and Node.js 18, support ended 2025-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2025-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
Weak hash algorithm crates/ruvllm/src/context/semantic_cache.rs:184— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for REDACTED storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm crates/ruvllm/src/context/semantic_cache.rs:285— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for REDACTED storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm crates/ruvllm/src/context/working_memory.rs:394— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for REDACTED storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm crates/ruvllm/src/context/working_memory.rs:423— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for REDACTED storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
AC3 · Page structure· Page without a main landmark · ×3
Page without a main landmark crates/mcp-brain-server/static/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark crates/mcp-brain-server/static/origin.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark crates/sona/wasm-example/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×3
Focus outline removed in CSS without a :focus replacement npm/packages/ruvbot/src/api/public/index.html:356— `.input-wrapper textarea:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement ui/ruvocal/src/styles/main.css:160— `.btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement ui/ruvocal/src/styles/main.css:173— `.base-tool` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Low contrast Tailwind colour pair (4.4:1) ui/ruvocal/src/lib/components/chat/ChatMessage.svelte:488— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
Low contrast Tailwind colour pair (4.4:1) ui/ruvocal/src/lib/components/chat/ChatWindow.svelte:693— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
Low contrast Tailwind colour pair (4.4:1) ui/ruvocal/src/lib/components/chat/ToolUpdate.svelte:144— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
ruvector_graph_node::cypher_exec::exec_pattern (cyclomatic 32) crates/ruvector-graph-node/src/cypher_exec.rs:427— ruvector_graph_node::cypher_exec::exec_pattern has cyclomatic complexity 32 (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.
ruvector_graph_node::cypher_exec::eval_binary (cyclomatic 26) crates/ruvector-graph-node/src/cypher_exec.rs:186— ruvector_graph_node::cypher_exec::eval_binary has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_graph_node::cypher_exec::eval (cyclomatic 20) crates/ruvector-graph-node/src/cypher_exec.rs:140— ruvector_graph_node::cypher_exec::eval has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_py::graph::cypher_exec::exec_pattern (cyclomatic 32) crates/ruvector-py/src/graph/cypher_exec.rs:141— ruvector_py::graph::cypher_exec::exec_pattern has cyclomatic complexity 32 (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.
ruvector_py::graph::cypher_eval::eval_binary (cyclomatic 26) crates/ruvector-py/src/graph/cypher_eval.rs:173— ruvector_py::graph::cypher_eval::eval_binary has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_py::graph::cypher_eval::eval (cyclomatic 20) crates/ruvector-py/src/graph/cypher_eval.rs:127— ruvector_py::graph::cypher_eval::eval has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Header::parse (cyclomatic 31) patches/candle-core-0.9.2/src/npy.rs:109— Header::parse has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Header::parse (cyclomatic 29) patches/candle-core-0.8.4/src/npy.rs:102— Header::parse has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Header::decode (cyclomatic 20) crates/ruvector-edge-quant/src/persist/format.rs:133— Header::decode 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.
CpuStorage::concat (cyclomatic 28) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1663— CpuStorage::concat has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: CpuStorage::to_dtype (cyclomatic 102) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
CpuStorage::unary_impl (cyclomatic 18) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2449— CpuStorage::unary_impl has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: CpuStorage::to_dtype (cyclomatic 102) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
CpuStorage::binary_impl (cyclomatic 18) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2518— CpuStorage::binary_impl 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. This is NOT this file's highest cyclomatic complexity: CpuStorage::to_dtype (cyclomatic 102) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
CactusGraph::stoer_wagner_all_cuts (cyclomatic 21) crates/ruvector-mincut/src/canonical/mod.rs:439— CactusGraph::stoer_wagner_all_cuts 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.
CactusGraph::build_cactus_from_cuts (cyclomatic 21) crates/ruvector-mincut/src/canonical/mod.rs:593— CactusGraph::build_cactus_from_cuts 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.
CactusGraph::detect_cycles (cyclomatic 18) crates/ruvector-mincut/src/canonical/mod.rs:749— CactusGraph::detect_cycles 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.
D10 · Test Quality· Fixed-sleep synchronisation · ×3
Fixed-sleep synchronisation: should re-queue running task when agent goes offline npm/packages/ruvbot/tests/integration/core/swarm-coordinator.test.ts:420— This test starts work it did not wait for (`fastCoordinator`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 50))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: should only assign tasks to matching agent types npm/packages/ruvbot/tests/integration/core/swarm-coordinator.test.ts:503— This test starts work it did not wait for (`specializedCoordinator`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 50))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: should assign tasks to any available agent npm/packages/ruvbot/tests/integration/core/swarm-coordinator.test.ts:526— This test starts work it did not wait for (`balancedCoordinator`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 50))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
HackComment ui/ruvocal/src/lib/server/textGeneration/title.ts:14— // HACK: detect if the conversation is new — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment patches/candle-core-0.9.2/src/npy.rs:107— // Hacky parser for the npy header, a typical example would be: — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment patches/candle-core-0.8.4/src/npy.rs:100— // Hacky parser for the npy header, a typical example would be: — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
ruvector_temporal_tensor::quantizer::dequantize_f32 (cognitive 147) crates/ruvector-temporal-tensor/src/quantizer.rs:281— ruvector_temporal_tensor::quantizer::dequantize_f32 has cognitive complexity 147 (threshold 15). Drivers by points: loops 22 (76 pts), if/else 22 (63 pts), boolean chains 8 (nesting depth added 95). 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.
ruvector_temporal_tensor::quantizer::quantize_and_pack_f32 (cognitive 84) crates/ruvector-temporal-tensor/src/quantizer.rs:98— ruvector_temporal_tensor::quantizer::quantize_and_pack_f32 has cognitive complexity 84 (threshold 15). Drivers by points: if/else 29 (60 pts), loops 9 (23 pts), boolean chains 1 (nesting depth added 45). Of this number, 80 points are the body's own statements and 4 belong to one function item inside it that branches. 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.
ruvector_temporal_tensor::store_ffi::tts_tick (cognitive 17) crates/ruvector-temporal-tensor/src/store_ffi.rs:423— ruvector_temporal_tensor::store_ffi::tts_tick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 1 (3 pts), boolean chains 2, 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.
FirestoreClient::firestore_list_checked (cognitive 67) crates/mcp-brain-server/src/store.rs:374— FirestoreClient::firestore_list_checked has cognitive complexity 67 (threshold 15). Drivers by points: if/else 19 (52 pts), match/switch 4 (10 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 41). 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.
FirestoreClient::load_from_firestore (cognitive 18) crates/mcp-brain-server/src/store.rs:582— FirestoreClient::load_from_firestore has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (6 pts), loops 4 (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.
FirestoreClient::keyword_search (cognitive 17) crates/mcp-brain-server/src/store.rs:818— FirestoreClient::keyword_search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (5 pts), boolean chains 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.
GraphCoarsener::aggregate_features (cognitive 55) crates/ruvector-graph-transformer/src/self_organizing.rs:612— GraphCoarsener::aggregate_features has cognitive complexity 55 (threshold 15). Drivers by points: loops 9 (31 pts), if/else 8 (22 pts), match/switch 1 (2 pts) (nesting depth added 37). 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.
GraphCoarsener::greedy_cluster (cognitive 18) crates/ruvector-graph-transformer/src/self_organizing.rs:560— GraphCoarsener::greedy_cluster has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphCoarsener::coarsen (cognitive 16) crates/ruvector-graph-transformer/src/self_organizing.rs:452— GraphCoarsener::coarsen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2, boolean chains 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.
ruvector_sota_bench::bin::sota_all::main (cognitive 48) crates/ruvector-sota-bench/src/bin/sota_all.rs:104— ruvector_sota_bench::bin::sota_all::main has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 6 (14 pts), match/switch 3 (10 pts) (nesting depth added 24). 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.
ruvector_sota_bench::bin::sota_streaming::main (cognitive 19) crates/ruvector-sota-bench/src/bin/sota_streaming.rs:26— ruvector_sota_bench::bin::sota_streaming::main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), match/switch 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.
ruvector_sota_bench::bin::sota_vdbbench::main (cognitive 19) crates/ruvector-sota-bench/src/bin/sota_vdbbench.rs:45— ruvector_sota_bench::bin::sota_vdbbench::main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), match/switch 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.
StreamIngest::query_with (cognitive 47) crates/rvf/rvf-runtime/src/progressive_stream/ingest/query.rs:126— StreamIngest::query_with has cognitive complexity 47 (threshold 15). Drivers by points: if/else 31 (36 pts), boolean chains 9, match/switch 2 (nesting depth added 5). 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.
StreamIngest::feed (cognitive 20) crates/rvf/rvf-runtime/src/progressive_stream/ingest.rs:268— StreamIngest::feed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (6 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.
StreamIngest::publish_index (cognitive 17) crates/rvf/rvf-runtime/src/progressive_stream/ingest.rs:478— StreamIngest::publish_index has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 5). 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.
SpectralClustering::kmeans (cognitive 43) crates/ruvector-math/src/spectral/clustering.rs:210— SpectralClustering::kmeans has cognitive complexity 43 (threshold 15). Drivers by points: loops 11 (26 pts), if/else 7 (16 pts), boolean chains 1 (nesting depth added 24). 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.
SpectralClustering::compute_embedding (cognitive 25) crates/ruvector-math/src/spectral/clustering.rs:133— SpectralClustering::compute_embedding has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (20 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 15). 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.
SpectralClustering::normalized_cut (cognitive 20) crates/ruvector-math/src/spectral/clustering.rs:314— SpectralClustering::normalized_cut has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, 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.
ApproxMinCut::stoer_wagner (cognitive 43) crates/ruvector-mincut/src/algorithm/approximate.rs:450— ApproxMinCut::stoer_wagner has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 7 (15 pts), boolean chains 3, match/switch 1 (2 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.
ApproxMinCut::compute_partition (cognitive 23) crates/ruvector-mincut/src/algorithm/approximate.rs:559— ApproxMinCut::compute_partition has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (5 pts) (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.
ApproxMinCut::ensure_sparsifier_connectivity (cognitive 16) crates/ruvector-mincut/src/algorithm/approximate.rs:408— ApproxMinCut::ensure_sparsifier_connectivity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 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.
SubpolynomialMinCut::build_level (cognitive 37) crates/ruvector-mincut/src/subpolynomial/mod.rs:476— SubpolynomialMinCut::build_level has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 9 (14 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.
SubpolynomialMinCut::certify_cuts (cognitive 21) crates/ruvector-mincut/src/subpolynomial/mod.rs:1108— SubpolynomialMinCut::certify_cuts has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 3 (8 pts) (nesting depth added 12). 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.
SubpolynomialMinCut::grow_expander (cognitive 17) crates/ruvector-mincut/src/subpolynomial/mod.rs:594— SubpolynomialMinCut::grow_expander has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 2 (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.
ServingEngine::run_iteration (cognitive 37) crates/ruvllm/src/serving/engine.rs:320— ServingEngine::run_iteration has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 1 (nesting depth added 23). 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.
ServingEngine::generate_with_callback (cognitive 28) crates/ruvllm/src/serving/engine.rs:705— ServingEngine::generate_with_callback has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 2 (6 pts) (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.
ServingEngine::handle_completions (cognitive 17) crates/ruvllm/src/serving/engine.rs:414— ServingEngine::handle_completions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 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.
rvf_index::progressive::beam_search_layer (cognitive 35) crates/rvf/rvf-index/src/progressive.rs:319— rvf_index::progressive::beam_search_layer has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 21). 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.
rvf_index::codec::decode_index_seg (cognitive 25) crates/rvf/rvf-index/src/codec.rs:178— rvf_index::codec::decode_index_seg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 5 (12 pts) (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.
rvf_index::codec::encode_index_seg (cognitive 18) crates/rvf/rvf-index/src/codec.rs:114— rvf_index::codec::encode_index_seg has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 3 (6 pts) (nesting depth added 10). 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.
ruvector_solver_wasm::analyze_sparsity (cognitive 34) crates/ruvector-solver-wasm/src/lib.rs:349— ruvector_solver_wasm::analyze_sparsity has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 4 (6 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.
ruvector_solver_wasm::neumann_solve (cognitive 20) crates/ruvector-solver-wasm/src/lib.rs:477— ruvector_solver_wasm::neumann_solve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (8 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.
ruvector_solver_wasm::power_iteration_ppr (cognitive 17) crates/ruvector-solver-wasm/src/lib.rs:662— ruvector_solver_wasm::power_iteration_ppr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (7 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.
ruvllm_sparse_attention::attention::build_landmark_candidates (cognitive 34) crates/ruvllm_sparse_attention/src/attention.rs:656— ruvllm_sparse_attention::attention::build_landmark_candidates has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 pts) (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.
ruvllm_sparse_attention::attention::dense_attention (cognitive 29) crates/ruvllm_sparse_attention/src/attention.rs:520— ruvllm_sparse_attention::attention::dense_attention has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 6 (13 pts) (nesting depth added 17). 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.
ruvllm_sparse_attention::attention::build_token_candidates (cognitive 25) crates/ruvllm_sparse_attention/src/attention.rs:605— ruvllm_sparse_attention::attention::build_token_candidates has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AttractorDynamics::karger_contract_fast (cognitive 31) crates/ruvector-mincut/src/snn/attractor.rs:416— AttractorDynamics::karger_contract_fast has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 7 (9 pts), boolean chains 1 (nesting depth added 12). Of this number, 25 points are the body's own statements and 6 belong to 2 function items inside it that branch. 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.
AttractorDynamics::exact_mincut_small (cognitive 29) crates/ruvector-mincut/src/snn/attractor.rs:352— AttractorDynamics::exact_mincut_small has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (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.
AttractorDynamics::karger_stein_with_skip (cognitive 17) crates/ruvector-mincut/src/snn/attractor.rs:286— AttractorDynamics::karger_stein_with_skip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2, boolean chains 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.
SolverOrchestrator::analyze_sparsity (cognitive 31) crates/ruvector-solver/src/router.rs:480— SolverOrchestrator::analyze_sparsity has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (26 pts), loops 2 (3 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.
SolverOrchestrator::solve_jacobi_fallback (cognitive 26) crates/ruvector-solver/src/router.rs:954— SolverOrchestrator::solve_jacobi_fallback has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 6 (10 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SolverOrchestrator::solve_dense (cognitive 25) crates/ruvector-solver/src/router.rs:838— SolverOrchestrator::solve_dense has cognitive complexity 25 (threshold 15). Drivers by points: loops 9 (17 pts), if/else 4 (8 pts) (nesting depth added 12). 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.
Sampler::sample (cognitive 31) crates/ruvllm/src/models/sampling.rs:169— Sampler::sample has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 6 (9 pts), boolean chains 4 (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.
Sampler::sample_topk (cognitive 25) crates/ruvllm/src/models/sampling.rs:71— Sampler::sample_topk has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 5 (7 pts), boolean chains 4 (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.
Sampler::next_batch (cognitive 16) crates/ruvector-typesafe-train/src/sampler.rs:75— Sampler::next_batch has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 6). 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.
Header::parse (cognitive 31) patches/candle-core-0.8.4/src/npy.rs:102— Header::parse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 7 (12 pts), boolean chains 5, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Header::parse (cognitive 31) patches/candle-core-0.9.2/src/npy.rs:109— Header::parse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 7 (12 pts), boolean chains 5, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Header::decode (cognitive 18) crates/ruvector-edge-quant/src/persist/format.rs:133— Header::decode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ruvector_fpga_transformer::ffi::c_abi::fpga_infer (cognitive 30) crates/ruvector-fpga-transformer/src/ffi/c_abi.rs:112— ruvector_fpga_transformer::ffi::c_abi::fpga_infer has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 4 (9 pts), loops 1 (5 pts), boolean chains 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.
ruvector_fpga_transformer::backend::compute_topk (cognitive 26) crates/ruvector-fpga-transformer/src/backend/mod.rs:257— ruvector_fpga_transformer::backend::compute_topk has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (6 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.
ruvector_fpga_transformer::artifact::pack::unpack_artifact (cognitive 22) crates/ruvector-fpga-transformer/src/artifact/pack.rs:88— ruvector_fpga_transformer::artifact::pack::unpack_artifact has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ruvector_typesafe_core::limits::validate (cognitive 29) crates/ruvector-typesafe-core/src/limits.rs:12— ruvector_typesafe_core::limits::validate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (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.
ruvector_typesafe_core::engine::fit::crossfit_class_logits (cognitive 21) crates/ruvector-typesafe-core/src/engine/fit.rs:197— ruvector_typesafe_core::engine::fit::crossfit_class_logits has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), match/switch 1 (3 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.
ruvector_typesafe_core::engine::fit::fit_class_artifact (cognitive 19) crates/ruvector-typesafe-core/src/engine/fit.rs:83— ruvector_typesafe_core::engine::fit::fit_class_artifact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
CpuStorage::concat (cognitive 29) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1663— CpuStorage::concat has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 15 (29 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CpuStorage::binary_impl (cognitive 22) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2042— CpuStorage::binary_impl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CpuStorage::binary_impl (cognitive 22) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2518— CpuStorage::binary_impl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
VamanaGraph::build (cognitive 28) crates/ruvector-core/src/advanced_features/diskann.rs:88— VamanaGraph::build has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 6 (9 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.
VamanaGraph::greedy_search_fast (cognitive 23) crates/ruvector-diskann/src/graph.rs:151— VamanaGraph::greedy_search_fast has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (3 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.
VamanaGraph::build_with_rng (cognitive 22) crates/ruvector-diskann/src/graph.rs:94— VamanaGraph::build_with_rng has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (6 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.
ReasoningBank::consolidate (cognitive 28) crates/ruvector-postgres/src/learning/reasoning_bank.rs:91— ReasoningBank::consolidate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReasoningBank::run_kmeans (cognitive 24) crates/sona/src/reasoning_bank.rs:277— ReasoningBank::run_kmeans has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4 (10 pts) (nesting depth added 14). 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.
ReasoningBank::compute_embedding (cognitive 18) crates/sona/src/reasoning_bank.rs:109— ReasoningBank::compute_embedding has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (8 pts) (nesting depth added 10). 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.
rvf_wire::stream::descriptor::decode_descriptor (cognitive 28) crates/rvf/rvf-wire/src/stream/descriptor.rs:32— rvf_wire::stream::descriptor::decode_descriptor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 1, loops 1, match/switch 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.
rvf_wire::stream::descriptor::parse_table (cognitive 27) crates/rvf/rvf-wire/src/stream/descriptor.rs:108— rvf_wire::stream::descriptor::parse_table has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5, 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.
rvf_wire::vec_seg_codec::read_vec_block (cognitive 23) crates/rvf/rvf-wire/src/vec_seg_codec.rs:148— rvf_wire::vec_seg_codec::read_vec_block has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 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.
SOSChecker::find_gram_direct (cognitive 27) crates/ruvector-math/src/optimization/sos.rs:191— SOSChecker::find_gram_direct has cognitive complexity 27 (threshold 15). Drivers by points: loops 10 (21 pts), if/else 2 (6 pts) (nesting depth added 15). 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.
SOSChecker::is_psd (cognitive 19) crates/ruvector-math/src/optimization/sos.rs:279— SOSChecker::is_psd has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 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.
SOSChecker::extract_squares (cognitive 18) crates/ruvector-math/src/optimization/sos.rs:310— SOSChecker::extract_squares has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (7 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.
ruvector_pq_search::codebook::train_kmeans (cognitive 26) crates/ruvector-pq-search/src/codebook.rs:143— ruvector_pq_search::codebook::train_kmeans has cognitive complexity 26 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 2 (7 pts) (nesting depth added 15). 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.
ruvector_pq_search::ivf_pq::train_coarse (cognitive 26) crates/ruvector-pq-search/src/ivf_pq.rs:121— ruvector_pq_search::ivf_pq::train_coarse has cognitive complexity 26 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 2 (7 pts) (nesting depth added 15). 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.
ruvector_pq_search::main (cognitive 20) crates/ruvector-pq-search/src/main.rs:40— ruvector_pq_search::main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 5, boolean chains 1 (nesting depth added 2). 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.
CoherenceValidator::detect_contradictions (cognitive 26) crates/ruvllm/src/quality/coherence.rs:328— CoherenceValidator::detect_contradictions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 6 (11 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.
CoherenceValidator::validate_semantic_consistency (cognitive 20) crates/ruvllm/src/quality/coherence.rs:258— CoherenceValidator::validate_semantic_consistency has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 1, match/switch 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.
CoherenceValidator::compute_simple_embedding (cognitive 17) crates/ruvllm/src/quality/coherence.rs:498— CoherenceValidator::compute_simple_embedding has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 5 (7 pts) (nesting depth added 7). 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.
MemoryCoherenceLayer::create_edges_for_memory (cognitive 25) crates/prime-radiant/src/ruvllm_integration/memory_layer.rs:667— MemoryCoherenceLayer::create_edges_for_memory has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 2, match/switch 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.
MemoryCoherenceLayer::find_conflicting_memories (cognitive 21) crates/prime-radiant/src/ruvllm_integration/memory_layer.rs:842— MemoryCoherenceLayer::find_conflicting_memories has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 1 (nesting depth added 14). 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.
MemoryCoherenceLayer::create_semantic_edges (cognitive 18) crates/prime-radiant/src/ruvllm_integration/memory_layer.rs:713— MemoryCoherenceLayer::create_semantic_edges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (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.
ruvector_retrieval_receipt::bin::benchmark::main (cognitive 24) crates/ruvector-retrieval-receipt/src/bin/benchmark.rs:535— ruvector_retrieval_receipt::bin::benchmark::main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, loops 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ruvector_retrieval_receipt::bin::benchmark::run_state_anchor_interval (cognitive 20) crates/ruvector-retrieval-receipt/src/bin/benchmark.rs:406— ruvector_retrieval_receipt::bin::benchmark::run_state_anchor_interval has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (7 pts), match/switch 1 (4 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.
ruvector_retrieval_receipt::bin::benchmark::run_signing_batch (cognitive 16) crates/ruvector-retrieval-receipt/src/bin/benchmark.rs:234— ruvector_retrieval_receipt::bin::benchmark::run_signing_batch has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 6). 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.
rvforge_registry::bin::rvforge-registry-check::check_packages (cognitive 20) crates/rvforge-registry/src/bin/rvforge-registry-check.rs:541— rvforge_registry::bin::rvforge-registry-check::check_packages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), match/switch 1 (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.
rvforge_registry::bin::rvforge-registry-check::check_witness (cognitive 18) crates/rvforge-registry/src/bin/rvforge-registry-check.rs:632— rvforge_registry::bin::rvforge-registry-check::check_witness has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 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.
rvforge_registry::bin::rvforge-registry-check::check_publisher_signature (cognitive 16) crates/rvforge-registry/src/bin/rvforge-registry-check.rs:424— rvforge_registry::bin::rvforge-registry-check::check_publisher_signature has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 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.
Engine::export_embedded (cognitive 17) crates/ruvector-typesafe-core/src/engine/embedded.rs:34— Engine::export_embedded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 pts), boolean chains 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.
Engine::decide (cognitive 16) crates/ruvector-typesafe-core/src/engine.rs:123— Engine::decide has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 pts), loops 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.
Engine::admit_rows (cognitive 16) crates/ruvector-typesafe-core/src/engine.rs:265— Engine::admit_rows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (4 pts), loops 2, boolean chains 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.
TooManyFields: AppState crates/mcp-brain-server/src/types.rs:1393— TooManyFields — 42 stored fields. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: StatusResponse crates/mcp-brain-server/src/types.rs:470— TooManyFields — 35 stored fields. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RvfStore crates/rvf/rvf-runtime/src/store.rs:145— TooManyFields — 34 stored fields beside 108 methods. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×3
Near-duplicate member pair (50 shared lines) patches/candle-core-0.8.4/src/metal_backend/mod.rs:845— patches/candle-core-0.8.4/src/metal_backend/mod.rs:845-908 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:885-954 — These two members are variants of one another: 50 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.
Near-duplicate member pair (50 shared lines) crates/ruvector-graph-node/src/cypher_exec.rs:191— crates/ruvector-graph-node/src/cypher_exec.rs:191-248 | crates/ruvector-py/src/graph/cypher_eval.rs:178-235 — These two members are variants of one another: 50 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.
Near-duplicate member pair (50 shared lines) crates/ruvector-postgres/src/graph/sparql/executor.rs:224— crates/ruvector-postgres/src/graph/sparql/executor.rs:224-347 | crates/rvlite/src/sparql/executor.rs:195-260 — These two members are variants of one another: 50 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.
Near-duplicate member pair (21 shared lines) patches/candle-core-0.8.4/src/tensor.rs:2333— patches/candle-core-0.8.4/src/tensor.rs:2333-2357 | patches/candle-core-0.9.2/src/tensor.rs:2656-2680 — These two members are variants of one another: 21 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.
Near-duplicate member pair (21 shared lines) crates/emergent-time/src/agentic_time.rs:564— crates/emergent-time/src/agentic_time.rs:564-639 | crates/emergent-time/src/weight_learning.rs:126-200 — These two members are variants of one another: 21 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.
Near-duplicate member pair (21 shared lines) crates/mcp-brain-server/src/types.rs:687— crates/mcp-brain-server/src/types.rs:687-721 | crates/mcp-brain/src/embed.rs:50-88 — These two members are variants of one another: 21 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×3
Edited copy of a member (22 corresponding lines) patches/candle-core-0.8.4/src/shape.rs:229— patches/candle-core-0.8.4/src/shape.rs:229-250 | patches/candle-core-0.9.2/src/shape.rs:229-250 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) crates/ruvector-memory-admission/src/policy.rs:196— crates/ruvector-memory-admission/src/policy.rs:196-217 | crates/ruvector-memory-admission/src/policy.rs:343-368 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) patches/candle-core-0.8.4/src/quantized/mod.rs:528— patches/candle-core-0.8.4/src/quantized/mod.rs:528-549 | patches/candle-core-0.9.2/src/quantized/mod.rs:859-880 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×3
Edited copy of a member (19 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:246— patches/candle-core-0.8.4/src/storage.rs:246-264 | patches/candle-core-0.9.2/src/storage.rs:255-273 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:658— patches/candle-core-0.8.4/src/storage.rs:658-676 | patches/candle-core-0.9.2/src/storage.rs:719-737 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) crates/photonlayer-bench/src/decoder.rs:11— crates/photonlayer-bench/src/decoder.rs:11-32 | crates/photonlayer-bench/src/privacy.rs:163-183 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:195— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:195-210 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:213-228 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) patches/candle-core-0.8.4/src/tensor.rs:1287— patches/candle-core-0.8.4/src/tensor.rs:1287-1302 | patches/candle-core-0.9.2/src/tensor.rs:1545-1560 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/ruvllm/src/quantize/pi_quant.rs:839— crates/ruvllm/src/quantize/pi_quant.rs:839-869 | crates/ruvllm/src/quantize/pi_quant.rs:964-1061 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) patches/candle-core-0.8.4/src/cpu/avx.rs:54— patches/candle-core-0.8.4/src/cpu/avx.rs:54-68 | patches/candle-core-0.9.2/src/cpu/avx.rs:54-68 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) patches/candle-core-0.8.4/src/cpu/simd128.rs:49— patches/candle-core-0.8.4/src/cpu/simd128.rs:49-63 | patches/candle-core-0.9.2/src/cpu/simd128.rs:49-63 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/mcp-brain-server/src/cognitive.rs:94— crates/mcp-brain-server/src/cognitive.rs:94-155 | crates/ruvllm/src/quantize/quip.rs:645-683 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (12 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (12 members, 50+ identical tokens) crates/mcp-brain/src/embed.rs:402— crates/mcp-brain/src/embed.rs:402-413 | crates/prime-radiant/src/attention/adapter.rs:163-173 | crates/prime-radiant/src/attention/diffusion.rs:247-257 | crates/prime-radiant/src/attention/topology.rs:226-236 | crates/ruvector-attention/src/topology/coherence.rs:263-273 | crates/ruvector-cnn-wasm/src/lib.rs:163-177 | crates/ruvector-crv/src/stage_ii.rs:166-177 | crates/ruvector-diverse-beam/src/lib.rs:60-70 | crates/ruvector-query-cache/src/lib.rs:107-115 | crates/ruvector-spann/src/distance.rs:19-28 | crates/ruvllm-wasm/src/hnsw_router.rs:295-309 | crates/ruvllm/src/qat/reasoning_loss.rs:389-403 — These 12 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 12 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 12 times.
Members sharing a duplicated core (12 members, 50+ identical tokens) crates/ruvllm/src/metal/context.rs:116— crates/ruvllm/src/metal/context.rs:116-162 | crates/ruvllm/src/metal/context.rs:241-288 | crates/ruvllm/src/metal/context.rs:301-343 | crates/ruvllm/src/metal/context.rs:361-415 | crates/ruvllm/src/metal/context.rs:440-495 | crates/ruvllm/src/metal/context.rs:510-573 | crates/ruvllm/src/metal/context.rs:585-640 | crates/ruvllm/src/metal/context.rs:651-704 | crates/ruvllm/src/metal/context.rs:709-751 | crates/ruvllm/src/metal/context.rs:766-821 | crates/ruvllm/src/metal/context.rs:838-907 | crates/ruvllm/src/metal/context.rs:926-980 — These 12 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 12 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 12 times.
Members sharing a duplicated core (12 members, 50+ identical tokens) patches/hnsw_rs/src/libext.rs:289— patches/hnsw_rs/src/libext.rs:289-314 | patches/hnsw_rs/src/libext.rs:289-320 | patches/hnsw_rs/src/libext.rs:289-326 | patches/hnsw_rs/src/libext.rs:289-332 | patches/hnsw_rs/src/libext.rs:289-338 | patches/hnsw_rs/src/libext.rs:289-344 | scripts/patches/hnsw_rs/src/libext.rs:289-314 | scripts/patches/hnsw_rs/src/libext.rs:289-320 | scripts/patches/hnsw_rs/src/libext.rs:289-326 | scripts/patches/hnsw_rs/src/libext.rs:289-332 | scripts/patches/hnsw_rs/src/libext.rs:289-338 | scripts/patches/hnsw_rs/src/libext.rs:289-344 — These 12 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 12 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 12 times.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (8 members, 50+ identical tokens) crates/ruvix/crates/cli/src/commands/dtb.rs:570— crates/ruvix/crates/cli/src/commands/dtb.rs:570-615 | crates/ruvix/crates/cli/src/commands/dtb.rs:617-669 | crates/ruvix/crates/cli/src/commands/dtb.rs:671-719 | crates/ruvix/crates/cli/src/commands/dtb.rs:738-791 | crates/ruvix/crates/cli/src/commands/dtb.rs:820-877 | crates/ruvix/crates/cli/src/commands/dtb.rs:911-963 | crates/ruvix/crates/cli/src/commands/dtb.rs:965-1012 | crates/ruvix/crates/cli/src/commands/dtb.rs:1014-1067 — These 8 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 8 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 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:565— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:565-594 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:606-634 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:671-708 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:720-758 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:683-715 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:727-758 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:798-834 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:846-883 — These 8 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 8 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 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) patches/candle-core-0.8.4/src/quantized/avx.rs:442— patches/candle-core-0.8.4/src/quantized/avx.rs:442-523 | patches/candle-core-0.8.4/src/quantized/avx.rs:526-635 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1171-1250 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1361-1447 | patches/candle-core-0.8.4/src/quantized/neon.rs:234-315 | patches/candle-core-0.8.4/src/quantized/simd128.rs:179-266 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1372-1452 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1626-1713 — These 8 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 8 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 8 times.
Duplicated block (56 lines × 2) patches/candle-core-0.8.4/src/pickle.rs:742— patches/candle-core-0.8.4/src/pickle.rs:742-797 | patches/candle-core-0.9.2/src/pickle.rs:766-821 — before extracting anything, compare `patches/candle-core-0.8.4/src/pickle.rs` and `patches/candle-core-0.9.2/src/pickle.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 506 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 (56 lines × 2) patches/hnsw_rs/src/libext.rs:972— patches/hnsw_rs/src/libext.rs:972-1027 | scripts/patches/hnsw_rs/src/libext.rs:972-1027 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (56 lines × 2) patches/hnsw_rs/src/libext.rs:1177— patches/hnsw_rs/src/libext.rs:1177-1232 | scripts/patches/hnsw_rs/src/libext.rs:1177-1232 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (55 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1571— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1571-1625 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1710-1764 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (55 lines × 2) patches/hnsw_rs/src/hnswio.rs:369— patches/hnsw_rs/src/hnswio.rs:369-423 | scripts/patches/hnsw_rs/src/hnswio.rs:369-423 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (55 lines × 2) patches/hnsw_rs/src/hnswio.rs:559— patches/hnsw_rs/src/hnswio.rs:559-613 | scripts/patches/hnsw_rs/src/hnswio.rs:559-613 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (50 lines × 2) crates/ruvector-kge-ffi/src/ops.rs:130— crates/ruvector-kge-ffi/src/ops.rs:130-179 | crates/ruvector-kge-wasm/src/ops.rs:130-179 — before extracting anything, compare `crates/ruvector-kge-ffi/src/ops.rs` and `crates/ruvector-kge-wasm/src/ops.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 238 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 (50 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1715— crates/ruvector-postgres/src/graph/sparql/parser.rs:1715-1764 | crates/rvlite/src/sparql/parser.rs:1722-1771 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (50 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1169— crates/ruvector-postgres/src/graph/sparql/parser.rs:1169-1218 | crates/rvlite/src/sparql/parser.rs:1175-1224 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (44 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:1187— crates/ruvector-graph/src/cypher/parser.rs:1187-1230 | crates/rvlite/src/cypher/parser.rs:1086-1129 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (44 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:887— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:887-930 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1083-1126 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (44 lines × 2) patches/candle-core-0.8.4/src/quantized/dummy_cuda.rs:11— patches/candle-core-0.8.4/src/quantized/dummy_cuda.rs:11-54 | patches/candle-core-0.9.2/src/quantized/dummy_cuda.rs:11-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.
Duplicated block (43 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:428— crates/ruvector-graph/src/cypher/parser.rs:428-470 | crates/rvlite/src/cypher/parser.rs:428-470 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (43 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1448— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1448-1490 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1565-1607 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (43 lines × 2) patches/candle-core-0.8.4/src/pickle.rs:202— patches/candle-core-0.8.4/src/pickle.rs:202-244 | patches/candle-core-0.9.2/src/pickle.rs:213-255 — before extracting anything, compare `patches/candle-core-0.8.4/src/pickle.rs` and `patches/candle-core-0.9.2/src/pickle.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 506 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 (42 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:120— patches/candle-core-0.8.4/src/backprop.rs:120-161 | patches/candle-core-0.9.2/src/backprop.rs:122-163 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (42 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:164— patches/candle-core-0.8.4/src/backprop.rs:164-205 | patches/candle-core-0.9.2/src/backprop.rs:166-207 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (42 lines × 2) patches/hnsw_rs/src/hnsw.rs:1798— patches/hnsw_rs/src/hnsw.rs:1798-1839 | scripts/patches/hnsw_rs/src/hnsw.rs:1684-1725 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (35 lines × 2) crates/ruvector-kge-ffi/src/ops.rs:270— crates/ruvector-kge-ffi/src/ops.rs:270-304 | crates/ruvector-kge-wasm/src/ops.rs:270-304 — before extracting anything, compare `crates/ruvector-kge-ffi/src/ops.rs` and `crates/ruvector-kge-wasm/src/ops.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 238 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 (35 lines × 2) patches/candle-core-0.8.4/src/conv.rs:325— patches/candle-core-0.8.4/src/conv.rs:325-359 | patches/candle-core-0.9.2/src/conv.rs:352-386 — before extracting anything, compare `patches/candle-core-0.8.4/src/conv.rs` and `patches/candle-core-0.9.2/src/conv.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 191 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 (35 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1257— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1257-1291 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1365-1399 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (22–24 lines × 2) crates/ruvector-core/src/storage_memory.rs:41— crates/ruvector-core/src/storage_memory.rs:41-64 | crates/ruvector-core/src/storage_memory.rs:74-95 — 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 (22–24 lines × 2) crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:154— crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:154-177 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:225-246 — 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 (22–24 lines × 2) crates/ruvllm/src/backends/coreml_backend.rs:411— crates/ruvllm/src/backends/coreml_backend.rs:411-434 | crates/ruvllm/src/backends/coreml_backend.rs:492-513 — 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 (22–23 lines × 2) crates/ruvector-graph-transformer/src/temporal.rs:862— crates/ruvector-graph-transformer/src/temporal.rs:862-884 | crates/ruvector-graph-transformer/src/temporal.rs:901-922 — 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 (22–23 lines × 2) crates/ruvllm_sparse_attention/src/attention.rs:234— crates/ruvllm_sparse_attention/src/attention.rs:234-256 | crates/ruvllm_sparse_attention/src/attention.rs:1406-1427 — 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 (22–23 lines × 2) crates/rvm/crates/rvm-witness/src/log.rs:219— crates/rvm/crates/rvm-witness/src/log.rs:219-241 | crates/rvm/crates/rvm-witness/src/v2.rs:529-550 — 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 (20–22 lines × 2) crates/ruvector-cnn/src/kernels/int8_avx2.rs:358— crates/ruvector-cnn/src/kernels/int8_avx2.rs:358-379 | crates/ruvector-cnn/src/kernels/int8_neon.rs:341-360 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (20–22 lines × 2) crates/ruvector-core/src/storage.rs:428— crates/ruvector-core/src/storage.rs:428-447 | crates/ruvector-graph/src/storage.rs:499-520 — before extracting anything, compare `crates/ruvector-core/src/storage.rs` and `crates/ruvector-graph/src/storage.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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–22 lines × 2) crates/ruvector-mincut/src/wrapper/mod.rs:426— crates/ruvector-mincut/src/wrapper/mod.rs:426-447 | crates/ruvector-mincut/src/wrapper/mod.rs:710-729 — 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 (17–18 lines × 3) crates/ruvix/crates/dma/src/controller.rs:225— crates/ruvix/crates/dma/src/controller.rs:225-242 | crates/ruvix/crates/dma/src/controller.rs:264-280 | crates/ruvix/crates/dma/src/controller.rs:301-317 — 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.
Duplicated block (17–18 lines × 3) crates/ruvllm-wasm/src/workers/pool.rs:754— crates/ruvllm-wasm/src/workers/pool.rs:754-771 | crates/ruvllm-wasm/src/workers/pool.rs:923-940 | crates/ruvllm-wasm/src/workers/pool.rs:1037-1053 — 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.
Duplicated block (17–18 lines × 3) crates/ruvllm/src/metal/context.rs:323— crates/ruvllm/src/metal/context.rs:323-340 | crates/ruvllm/src/metal/context.rs:621-637 | crates/ruvllm/src/metal/context.rs:685-701 — 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.
Duplicated block (16–18 lines × 2) crates/ruvector-hnsw-repair/src/graph.rs:75— crates/ruvector-hnsw-repair/src/graph.rs:75-92 | crates/ruvector-matryoshka/src/hnsw.rs:135-150 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (16–18 lines × 2) crates/ruvector-mincut/src/linkcut/mod.rs:360— crates/ruvector-mincut/src/linkcut/mod.rs:360-377 | crates/ruvector-mincut/src/linkcut/mod.rs:397-412 — 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–18 lines × 2) crates/ruvector-sparsifier/src/audit.rs:120— crates/ruvector-sparsifier/src/audit.rs:120-137 | crates/ruvector-sparsifier/src/audit.rs:184-199 — 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 (17 lines × 3) crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:133— crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:133-153 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:236-256 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:344-360 — 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.
Duplicated block (17 lines × 3) crates/ruvector-cnn/src/kernels/int8_avx2.rs:214— crates/ruvector-cnn/src/kernels/int8_avx2.rs:214-230 | crates/ruvector-cnn/src/kernels/int8_neon.rs:210-226 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:225-241 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (17 lines × 3) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1047— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1047-1063 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1139-1155 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1247-1263 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (15–17 lines × 2) crates/ruvector-delta-wasm/src/simd.rs:130— crates/ruvector-delta-wasm/src/simd.rs:130-146 | crates/ruvector-delta-wasm/src/simd.rs:164-178 — 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–17 lines × 2) crates/ruvector-math/src/spectral/graph_filter.rs:180— crates/ruvector-math/src/spectral/graph_filter.rs:180-196 | crates/ruvector-math/src/spectral/wavelets.rs:244-258 — 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 (15–17 lines × 2) crates/ruvector-temporal-tensor/src/quantizer.rs:422— crates/ruvector-temporal-tensor/src/quantizer.rs:422-438 | crates/ruvector-temporal-tensor/src/quantizer.rs:514-528 — 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–17 lines × 2) crates/ruvix/crates/nucleus/src/vector_store.rs:264— crates/ruvix/crates/nucleus/src/vector_store.rs:264-280 | crates/ruvix/crates/nucleus/src/vector_store.rs:310-323 — 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–17 lines × 2) crates/ruvllm/src/backends/hybrid_pipeline.rs:737— crates/ruvllm/src/backends/hybrid_pipeline.rs:737-753 | crates/ruvllm/src/backends/hybrid_pipeline.rs:795-808 — 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–17 lines × 2) crates/rvf/rvf-index/src/distance.rs:79— crates/rvf/rvf-index/src/distance.rs:79-95 | crates/rvf/rvf-index/src/distance.rs:175-188 — 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 (13–16 lines × 2) crates/ruvector-rabitq/src/index.rs:751— crates/ruvector-rabitq/src/index.rs:751-763 | crates/ruvector-rabitq/src/index.rs:797-812 — 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 (13–16 lines × 2) crates/rvf/rvf-cli/src/cmd/filter.rs:105— crates/rvf/rvf-cli/src/cmd/filter.rs:105-117 | crates/rvf/rvf-cli/src/cmd/freeze.rs:48-63 — 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 (13–16 lines × 2) patches/candle-core-0.8.4/src/pickle.rs:614— patches/candle-core-0.8.4/src/pickle.rs:614-626 | patches/candle-core-0.9.2/src/pickle.rs:634-649 — before extracting anything, compare `patches/candle-core-0.8.4/src/pickle.rs` and `patches/candle-core-0.9.2/src/pickle.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 506 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 (12–14 lines × 3) crates/ruvector-cnn/src/kernels/int8_wasm.rs:38— crates/ruvector-cnn/src/kernels/int8_wasm.rs:38-51 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:166-178 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:336-347 — 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.
Duplicated block (12–14 lines × 3) crates/ruvector-graph-transformer-node/src/transformer.rs:987— crates/ruvector-graph-transformer-node/src/transformer.rs:987-998 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:1054-1065 | crates/ruvector-graph-transformer/src/temporal.rs:430-443 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (12–14 lines × 3) crates/ruvllm/src/metal/operations.rs:466— crates/ruvllm/src/metal/operations.rs:466-479 | crates/ruvllm/src/metal/operations.rs:587-598 | crates/ruvllm/src/metal/operations.rs:699-710 — 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.
Duplicated block (10–14 lines × 2) crates/ruvector-consciousness/src/arena.rs:40— crates/ruvector-consciousness/src/arena.rs:40-53 | crates/ruvector-solver/src/arena.rs:79-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–14 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:484— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:484-493 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:537-550 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (10–14 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:532— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:532-541 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:643-656 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (11–12 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:1469— crates/ruvector-core/src/simd_intrinsics.rs:1469-1480 | crates/ruvector-core/src/simd_intrinsics.rs:1491-1501 | crates/ruvector-core/src/simd_intrinsics.rs:1510-1520 — 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.
Duplicated block (11–12 lines × 3) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:479— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:479-490 | crates/ruvector-profiler/src/config_hash.rs:73-83 | crates/rvf/rvf-types/src/sha256.rs:165-176 — before extracting anything, compare `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-profiler/src/config_hash.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 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 (11–12 lines × 3) crates/ruvllm/src/kv_cache.rs:465— crates/ruvllm/src/kv_cache.rs:465-476 | crates/ruvllm/src/kv_cache.rs:600-611 | crates/ruvllm/src/kv_cache.rs:706-716 — 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.
Duplicated block (8–11 lines × 2) crates/ruvllm_sparse_attention/src/attention.rs:142— crates/ruvllm_sparse_attention/src/attention.rs:142-152 | crates/ruvllm_sparse_attention/src/attention.rs:388-395 — 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 (8–11 lines × 2) crates/ruvllm_sparse_attention/src/attention.rs:259— crates/ruvllm_sparse_attention/src/attention.rs:259-269 | crates/ruvllm_sparse_attention/src/attention.rs:420-427 — 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 (8–11 lines × 2) crates/rvf/rvf-runtime/src/write_path.rs:551— crates/rvf/rvf-runtime/src/write_path.rs:551-561 | crates/rvf/rvf-runtime/src/write_path.rs:589-596 — 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 × 5) crates/ruvector-graph-condense/src/gnn_eval.rs:157— crates/ruvector-graph-condense/src/gnn_eval.rs:157-166 | crates/ruvllm-wasm/src/workers/mod.rs:341-351 | crates/ruvllm/src/backends/gemma2.rs:528-538 | crates/ruvllm/src/backends/phi3.rs:404-414 | crates/ruvllm/src/models/ruvltra_medium.rs:748-758 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 × 5) crates/ruvix/crates/cli/src/commands/dtb.rs:742— crates/ruvix/crates/cli/src/commands/dtb.rs:742-751 | crates/ruvix/crates/cli/src/commands/dtb.rs:827-836 | crates/ruvix/crates/cli/src/commands/dtb.rs:916-925 | crates/ruvix/crates/cli/src/commands/dtb.rs:970-979 | crates/ruvix/crates/cli/src/commands/dtb.rs:1019-1028 — all 5 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.
Duplicated block (10 lines × 5) crates/ruvix/crates/nucleus/src/checkpoint.rs:220— crates/ruvix/crates/nucleus/src/checkpoint.rs:220-229 | crates/ruvix/crates/nucleus/src/checkpoint.rs:263-272 | crates/ruvix/crates/nucleus/src/graph_store.rs:553-562 | crates/ruvix/crates/nucleus/src/vector_store.rs:423-432 | crates/ruvix/crates/nucleus/src/witness_log.rs:574-583 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8–9 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:243— crates/ruvector-core/src/simd_intrinsics.rs:243-251 | crates/ruvector-core/src/simd_intrinsics.rs:307-314 | crates/ruvector-core/src/simd_intrinsics.rs:439-446 — 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.
Duplicated block (8–9 lines × 3) crates/ruvector-hailo-cluster/src/bin/bench.rs:32— crates/ruvector-hailo-cluster/src/bin/bench.rs:32-39 | crates/ruvector-hailo-cluster/src/bin/embed.rs:31-39 | crates/ruvector-hailo-cluster/src/bin/stats.rs:32-39 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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–9 lines × 3) crates/ruvector-mincut/src/subpolynomial/mod.rs:622— crates/ruvector-mincut/src/subpolynomial/mod.rs:622-629 | crates/ruvector-mincut/src/subpolynomial/mod.rs:768-776 | crates/ruvector-mincut/src/subpolynomial/mod.rs:799-806 — 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.
Duplicated block (8 lines × 6) crates/ruvector-bench/src/bin/comparison_benchmark.rs:332— crates/ruvector-bench/src/bin/comparison_benchmark.rs:332-339 | crates/ruvector-bench/src/bin/latency_benchmark.rs:363-370 | crates/ruvector-bench/src/bin/memory_benchmark.rs:244-251 | crates/ruvector-bench/src/bin/memory_benchmark.rs:338-345 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:160-167 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:321-328 — before extracting anything, compare `crates/ruvector-bench/src/bin/comparison_benchmark.rs` and `crates/ruvector-bench/src/bin/latency_benchmark.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 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 × 6) patches/candle-core-0.8.4/src/quantized/k_quants.rs:998— patches/candle-core-0.8.4/src/quantized/k_quants.rs:998-1005 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1238-1245 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1435-1442 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1106-1113 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1440-1447 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1701-1708 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (8 lines × 6) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1800— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1800-1807 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1812-1819 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1824-1831 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1836-1843 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1848-1855 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1860-1867 — all 6 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.
Duplicated block (7–8 lines × 4) crates/ruvector-core/src/simd_intrinsics.rs:245— crates/ruvector-core/src/simd_intrinsics.rs:245-252 | crates/ruvector-core/src/simd_intrinsics.rs:309-315 | crates/ruvector-core/src/simd_intrinsics.rs:370-377 | crates/ruvector-core/src/simd_intrinsics.rs:441-447 — 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.
Duplicated block (7–8 lines × 4) crates/ruvector-solver-wasm/src/lib.rs:486— crates/ruvector-solver-wasm/src/lib.rs:486-492 | crates/ruvector-solver/src/cg.rs:326-333 | crates/ruvector-solver/src/neumann.rs:457-463 | crates/ruvector-solver/src/true_solver.rs:314-320 — 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 (7–8 lines × 4) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1373— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1373-1379 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1487-1493 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1795-1802 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1978-1985 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (4–8 lines × 4) crates/ruvector-delta-core/src/encoding.rs:118— crates/ruvector-delta-core/src/encoding.rs:118-125 | crates/ruvector-delta-core/src/encoding.rs:219-226 | crates/ruvector-delta-core/src/encoding.rs:362-369 | crates/rvf/rvf-server/src/tcp.rs:194-197 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (4–8 lines × 4) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:556— patches/candle-core-0.9.2/src/cuda_backend/mod.rs:556-559 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:560-567 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:612-619 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:664-671 — 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.
Duplicated block (4–8 lines × 4) crates/ruvector-decompiler/src/model_decompiler.rs:323— crates/ruvector-decompiler/src/model_decompiler.rs:323-326 | crates/ruvector-decompiler/src/model_decompiler.rs:360-367 | crates/ruvector-decompiler/src/model_decompiler.rs:385-392 | crates/ruvector-decompiler/src/model_decompiler.rs:427-430 — 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.
Duplicated block (7 lines × 8) patches/candle-core-0.8.4/src/tensor.rs:606— patches/candle-core-0.8.4/src/tensor.rs:606-612 | patches/candle-core-0.8.4/src/tensor.rs:1622-1628 | patches/candle-core-0.8.4/src/tensor.rs:1653-1659 | patches/candle-core-0.8.4/src/tensor.rs:1694-1700 | patches/candle-core-0.9.2/src/tensor.rs:674-680 | patches/candle-core-0.9.2/src/tensor.rs:1946-1952 | patches/candle-core-0.9.2/src/tensor.rs:1977-1983 | patches/candle-core-0.9.2/src/tensor.rs:2018-2024 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (7 lines × 8) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1547— patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1547-1553 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1558-1564 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1569-1575 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1580-1586 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1591-1597 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1602-1608 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1613-1619 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1624-1630 — all 8 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.
Duplicated block (7 lines × 8) crates/ruvector-bench/src/bin/comparison_benchmark.rs:307— crates/ruvector-bench/src/bin/comparison_benchmark.rs:307-313 | crates/ruvector-bench/src/bin/latency_benchmark.rs:337-343 | crates/ruvector-bench/src/bin/memory_benchmark.rs:94-100 | crates/ruvector-bench/src/bin/memory_benchmark.rs:218-224 | crates/ruvector-bench/src/bin/memory_benchmark.rs:307-313 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:132-138 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:216-222 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:296-302 — before extracting anything, compare `crates/ruvector-bench/src/bin/comparison_benchmark.rs` and `crates/ruvector-bench/src/bin/latency_benchmark.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 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 (7 lines × 6) crates/ruvector-mincut/src/algorithm/approximate.rs:280— crates/ruvector-mincut/src/algorithm/approximate.rs:280-286 | crates/ruvector-mincut/src/algorithm/approximate.rs:415-421 | crates/ruvector-mincut/src/fragment/mod.rs:274-280 | crates/ruvector-mincut/src/instance/bounded.rs:182-188 | crates/ruvector-mincut/src/instance/bounded.rs:367-373 | crates/ruvector-mincut/src/instance/stub.rs:173-179 — before extracting anything, compare `crates/ruvector-mincut/src/instance/bounded.rs` and `crates/ruvector-mincut/src/instance/stub.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 (7 lines × 6) crates/ruvllm/src/backends/gemma2.rs:685— crates/ruvllm/src/backends/gemma2.rs:685-691 | crates/ruvllm/src/backends/phi3.rs:564-571 | crates/ruvllm/src/kernels/matmul.rs:1123-1129 | crates/ruvllm/src/kernels/matmul.rs:1148-1154 | crates/ruvllm/src/models/ruvltra.rs:691-698 | crates/ruvllm/src/models/ruvltra.rs:831-837 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (7 lines × 6) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:841— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:841-847 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:906-912 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:914-920 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1037-1043 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1102-1108 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1110-1116 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (6–7 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:319— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:319-324 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:358-364 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:337-342 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:376-382 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (6–7 lines × 4) patches/candle-core-0.8.4/src/npy.rs:381— patches/candle-core-0.8.4/src/npy.rs:381-386 | patches/candle-core-0.8.4/src/npy.rs:394-400 | patches/candle-core-0.9.2/src/npy.rs:408-413 | patches/candle-core-0.9.2/src/npy.rs:421-427 — before extracting anything, compare `patches/candle-core-0.8.4/src/npy.rs` and `patches/candle-core-0.9.2/src/npy.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 283 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 (6–7 lines × 4) patches/candle-core-0.8.4/src/sort.rs:29— patches/candle-core-0.8.4/src/sort.rs:29-34 | patches/candle-core-0.8.4/src/sort.rs:44-50 | patches/candle-core-0.9.2/src/sort.rs:29-34 | patches/candle-core-0.9.2/src/sort.rs:44-50 — before extracting anything, compare `patches/candle-core-0.8.4/src/sort.rs` and `patches/candle-core-0.9.2/src/sort.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 137 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 (5 lines × 8) crates/ruvector-postgres/src/distance/simd.rs:478— crates/ruvector-postgres/src/distance/simd.rs:478-482 | crates/ruvector-postgres/src/distance/simd.rs:994-998 | crates/ruvector-postgres/src/distance/simd.rs:1108-1112 | crates/ruvector-postgres/src/types/halfvec.rs:369-373 | crates/ruvector-postgres/src/types/halfvec.rs:419-423 | crates/ruvector-postgres/src/types/halfvec.rs:426-430 | crates/ruvector-postgres/src/types/halfvec.rs:433-437 | crates/ruvector-postgres/src/types/halfvec.rs:485-489 — there are 8 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 8) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2404— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2404-2408 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2411-2415 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2418-2422 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2908-2912 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2915-2919 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2922-2926 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2929-2933 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2936-2940 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (5 lines × 8) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:569— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:569-573 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:612-616 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:677-681 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:726-730 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:687-691 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:733-737 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:804-808 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:852-856 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (5 lines × 7) crates/ruvector-attention/src/graph/dual_space.rs:287— crates/ruvector-attention/src/graph/dual_space.rs:287-291 | crates/ruvector-attention/src/graph/edge_featured.rs:307-311 | crates/ruvector-attention/src/graph/rope.rs:235-239 | crates/ruvector-attention/src/moe/moe_attention.rs:194-198 | crates/ruvector-attention/src/sparse/flash.rs:160-164 | crates/ruvector-attention/src/sparse/linear.rs:191-195 | crates/ruvector-attention/src/sparse/local_global.rs:149-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times.
Duplicated block (5 lines × 7) crates/ruvector-cnn/src/layers/conv.rs:235— crates/ruvector-cnn/src/layers/conv.rs:235-239 | crates/ruvector-cnn/src/layers/conv.rs:304-308 | crates/ruvector-cnn/src/layers/conv.rs:550-554 | crates/ruvector-cnn/src/layers/pooling.rs:106-110 | crates/ruvector-cnn/src/layers/pooling.rs:208-212 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:52-56 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:143-147 — before extracting anything, compare `crates/ruvector-cnn/src/layers/conv.rs` and `crates/ruvector-cnn/src/layers/pooling.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 × 7) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1797— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1797-1801 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1809-1813 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1821-1825 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1833-1837 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1845-1849 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1857-1861 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1869-1873 — all 7 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.
R10 · Code Duplication· Duplicated block with local edits (41 matched lines × 2 locations) · ×3
Duplicated block with local edits (41 matched lines × 2 locations) npm/packages/ruvbot/src/cli/commands/channels.ts:171— npm/packages/ruvbot/src/cli/commands/channels.ts:171 · npm/packages/ruvbot/src/cli/commands/channels.ts:259 — the two spans are one implementation copied and then locally edited — 363 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (41 matched lines × 2 locations) npm/packages/ruvector/src/core/parallel-intelligence.ts:62— npm/packages/ruvector/src/core/parallel-intelligence.ts:62 · npm/packages/ruvector/src/core/parallel-workers.ts:148 — the two spans are one implementation copied and then locally edited — 329 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (41 matched lines × 2 locations) REDACTED:94— REDACTED:94 · REDACTED:68 — the two spans are one implementation copied and then locally edited — 342 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
AC3 · Page structure· Heading level jumps from h2 to h4 · ×2
Heading level jumps from h2 to h4 crates/mcp-brain-server/static/index.html:604— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h2 to h4 crates/mcp-brain-server/static/index.html:654— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
MetalStorage::reduce_op (cyclomatic 72) patches/candle-core-0.8.4/src/metal_backend/mod.rs:266— MetalStorage::reduce_op has cyclomatic complexity 72 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MetalStorage::unary_impl (cyclomatic 170) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
MetalStorage::reduce_op (cyclomatic 72) patches/candle-core-0.9.2/src/metal_backend/mod.rs:285— MetalStorage::reduce_op has cyclomatic complexity 72 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MetalStorage::unary_impl (cyclomatic 111) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
ruvector_temporal_tensor::quantizer::dequantize_f32 (cyclomatic 48) crates/ruvector-temporal-tensor/src/quantizer.rs:281— ruvector_temporal_tensor::quantizer::dequantize_f32 has cyclomatic complexity 48 (threshold 15). 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.
ruvector_temporal_tensor::quantizer::quantize_and_pack_f32 (cyclomatic 30) crates/ruvector-temporal-tensor/src/quantizer.rs:98— ruvector_temporal_tensor::quantizer::quantize_and_pack_f32 has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
Stack::read (cyclomatic 44) patches/candle-core-0.9.2/src/pickle.rs:437— Stack::read has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Stack::read (cyclomatic 42) patches/candle-core-0.8.4/src/pickle.rs:426— Stack::read has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DagSonaEngine::compute_dag_embedding (cyclomatic 28) crates/ruvector-dag/src/sona/engine.rs:96— DagSonaEngine::compute_dag_embedding has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DagSonaEngine::hash_dag (cyclomatic 25) crates/ruvector-dag/src/sona/engine.rs:201— DagSonaEngine::hash_dag has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TensorFormatter::fmt_tensor (cyclomatic 24) patches/candle-core-0.8.4/src/display.rs:192— TensorFormatter::fmt_tensor 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.
TensorFormatter::fmt_tensor (cyclomatic 24) patches/candle-core-0.9.2/src/display.rs:203— TensorFormatter::fmt_tensor 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.
NeuralSymbolicBridge::run_inference (cyclomatic 23) crates/mcp-brain-server/src/symbolic.rs:747— NeuralSymbolicBridge::run_inference 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.
NeuralSymbolicBridge::extract_from_clusters (cyclomatic 21) crates/mcp-brain-server/src/symbolic.rs:406— NeuralSymbolicBridge::extract_from_clusters 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.
ruvector_edge_store::mem_store::parse::tokenize (cyclomatic 23) crates/ruvector-edge-store/src/mem_store/parse.rs:26— ruvector_edge_store::mem_store::parse::tokenize has cyclomatic complexity 23 (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.
ruvector_edge_store::shard::read::validate_query (cyclomatic 16) crates/ruvector-edge-store/src/shard/read.rs:137— ruvector_edge_store::shard::read::validate_query 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.
ruvix_qemu_swarm::monitor::run_simple (cyclomatic 23) crates/ruvix/qemu-swarm/src/monitor.rs:91— ruvix_qemu_swarm::monitor::run_simple 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.
ruvix_qemu_swarm::monitor::tui_loop (cyclomatic 18) crates/ruvix/qemu-swarm/src/monitor.rs:241— ruvix_qemu_swarm::monitor::tui_loop 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.
CudaStorage::copy_strided_src (cyclomatic 22) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2292— CudaStorage::copy_strided_src 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.
CudaStorage::copy_strided_src (cyclomatic 16) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1785— CudaStorage::copy_strided_src 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.
ContinuousTimeODE::integrate (cyclomatic 21) crates/ruvector-graph-transformer/src/temporal.rs:709— ContinuousTimeODE::integrate 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.
ContinuousTimeODE::dormand_prince_step (cyclomatic 19) crates/ruvector-graph-transformer/src/temporal.rs:851— ContinuousTimeODE::dormand_prince_step has cyclomatic complexity 19 (threshold 15). 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.
rvf_wire::stream::descriptor::decode_descriptor (cyclomatic 21) crates/rvf/rvf-wire/src/stream/descriptor.rs:32— rvf_wire::stream::descriptor::decode_descriptor 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.
rvf_wire::stream::descriptor::parse_table (cyclomatic 21) crates/rvf/rvf-wire/src/stream/descriptor.rs:108— rvf_wire::stream::descriptor::parse_table 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.
ruvector_gpu_runner::runner::launch (cyclomatic 20) crates/ruvector-gpu-runner/src/runner.rs:114— ruvector_gpu_runner::runner::launch 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.
ruvector_gpu_runner::runner::supervise (cyclomatic 18) crates/ruvector-gpu-runner/src/runner.rs:313— ruvector_gpu_runner::runner::supervise 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.
ThreeLevelHierarchy::certify_mirror_cuts (cyclomatic 20) crates/ruvector-mincut/src/cluster/hierarchy.rs:1125— ThreeLevelHierarchy::certify_mirror_cuts has cyclomatic complexity 20 (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.
ThreeLevelHierarchy::propagate_updates (cyclomatic 19) crates/ruvector-mincut/src/cluster/hierarchy.rs:1045— ThreeLevelHierarchy::propagate_updates 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.
ruvector_solver::bmssp::build_aggregates (cyclomatic 20) crates/ruvector-solver/src/bmssp.rs:244— ruvector_solver::bmssp::build_aggregates 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.
ruvector_solver::validation::validate_csr_matrix (cyclomatic 16) crates/ruvector-solver/src/validation.rs:75— ruvector_solver::validation::validate_csr_matrix 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.
BitNetBackend::forward_mla_cached (cyclomatic 20) crates/ruvllm/src/bitnet/backend.rs:1725— BitNetBackend::forward_mla_cached has cyclomatic complexity 20 (threshold 15). 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.
BitNetBackend::discover_tensors (cyclomatic 18) crates/ruvllm/src/bitnet/backend.rs:2468— BitNetBackend::discover_tensors 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.
Sampler::sample (cyclomatic 20) crates/ruvllm/src/models/sampling.rs:169— Sampler::sample 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.
Sampler::sample_topk (cyclomatic 18) crates/ruvllm/src/models/sampling.rs:71— Sampler::sample_topk 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.
rvlite::sparql::executor::evaluate_binary_op (cyclomatic 20) crates/rvlite/src/sparql/executor.rs:717— rvlite::sparql::executor::evaluate_binary_op has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
rvlite::sparql::executor::evaluate_expression (cyclomatic 19) crates/rvlite/src/sparql/executor.rs:607— rvlite::sparql::executor::evaluate_expression has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruvector_typesafe_train::export::transplant::map_initializers (cyclomatic 19) crates/ruvector-typesafe-train/src/export/transplant.rs:134— ruvector_typesafe_train::export::transplant::map_initializers 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.
ruvector_typesafe_train::train::run (cyclomatic 18) crates/ruvector-typesafe-train/src/train/mod.rs:127— ruvector_typesafe_train::train::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.
ruvector_agent_memory::arbitration::arbitrate (cyclomatic 18) crates/ruvector-agent-memory/src/arbitration.rs:300— ruvector_agent_memory::arbitration::arbitrate 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.
ruvector_agent_memory::witness_signing::verify_signed_chain (cyclomatic 18) crates/ruvector-agent-memory/src/witness_signing.rs:404— ruvector_agent_memory::witness_signing::verify_signed_chain 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.
BlockQ3K::from_float (cyclomatic 17) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1011— BlockQ3K::from_float 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.
BlockQ3K::from_float (cyclomatic 17) patches/candle-core-0.9.2/src/quantized/k_quants.rs:1119— BlockQ3K::from_float 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.
HnswIo::load_point_indexation (cyclomatic 17) patches/hnsw_rs/src/hnswio.rs:615— HnswIo::load_point_indexation 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.
HnswIo::load_point_indexation (cyclomatic 17) scripts/patches/hnsw_rs/src/hnswio.rs:615— HnswIo::load_point_indexation 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.
Value::write (cyclomatic 16) patches/candle-core-0.8.4/src/quantized/gguf_file.rs:315— Value::write has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Value::read (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Value::write (cyclomatic 16) patches/candle-core-0.9.2/src/quantized/gguf_file.rs:316— Value::write has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Value::read (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
BrainTrainer::discover_space (cognitive 74) crates/mcp-brain-server/src/trainer.rs:242— BrainTrainer::discover_space has cognitive complexity 74 (threshold 15). Drivers by points: if/else 14 (50 pts), loops 5 (18 pts), match/switch 4, boolean chains 2 (nesting depth added 49). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BrainTrainer::discover_earth (cognitive 22) crates/mcp-brain-server/src/trainer.rs:574— BrainTrainer::discover_earth has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (3 pts), match/switch 3 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NeuralSymbolicBridge::run_inference (cognitive 72) crates/mcp-brain-server/src/symbolic.rs:747— NeuralSymbolicBridge::run_inference has cognitive complexity 72 (threshold 15). Drivers by points: if/else 11 (40 pts), match/switch 6 (22 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 48). 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.
NeuralSymbolicBridge::extract_from_clusters (cognitive 41) crates/mcp-brain-server/src/symbolic.rs:406— NeuralSymbolicBridge::extract_from_clusters has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 21). 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.
ProductQuantizer::train (cognitive 58) crates/ruvector-diskann/src/pq.rs:46— ProductQuantizer::train has cognitive complexity 58 (threshold 15). Drivers by points: loops 12 (36 pts), if/else 7 (21 pts), boolean chains 1 (nesting depth added 38). 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.
ProductQuantizer::kmeans (cognitive 20) crates/ruvector-postgres/src/quantization/product.rs:89— ProductQuantizer::kmeans has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 11). 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.
RoadRouter::route (cognitive 56) crates/ruvector-mincut/src/routing/mod.rs:384— RoadRouter::route has cognitive complexity 56 (threshold 15). Drivers by points: if/else 22 (46 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 27). 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.
RoadRouter::distances (cognitive 17) crates/ruvector-mincut/src/routing/mod.rs:333— RoadRouter::distances has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 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.
TensorFormatter::fmt_tensor (cognitive 56) patches/candle-core-0.8.4/src/display.rs:192— TensorFormatter::fmt_tensor has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 6 (18 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 33). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TensorFormatter::fmt_tensor (cognitive 56) patches/candle-core-0.9.2/src/display.rs:203— TensorFormatter::fmt_tensor has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 6 (18 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 33). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PayloadIndex::remove (cognitive 51) crates/ruvector-filter/src/index.rs:117— PayloadIndex::remove has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (47 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 34). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PayloadIndex::add (cognitive 19) crates/ruvector-filter/src/index.rs:56— PayloadIndex::add has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AdaptiveRadixTree::insert_recursive (cognitive 49) crates/ruvector-graph/src/optimization/adaptive_radix.rs:39— AdaptiveRadixTree::insert_recursive has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (38 pts), loops 3 (9 pts), boolean chains 1, match/switch 1 (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AdaptiveRadixTree::get (cognitive 23) crates/ruvector-graph/src/optimization/adaptive_radix.rs:234— AdaptiveRadixTree::get has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (4 pts), match/switch 1 (2 pts) (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.
ruvix_qemu_swarm::monitor::run_simple (cognitive 49) crates/ruvix/qemu-swarm/src/monitor.rs:91— ruvix_qemu_swarm::monitor::run_simple has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 4 (7 pts), match/switch 1 (5 pts), boolean chains 3 (nesting depth added 29). 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.
ruvix_qemu_swarm::monitor::tui_loop (cognitive 43) crates/ruvix/qemu-swarm/src/monitor.rs:241— ruvix_qemu_swarm::monitor::tui_loop has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 5 (12 pts), match/switch 1 (4 pts) (nesting depth added 29). 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.
TensorTrain::add (cognitive 48) crates/ruvector-math/src/tensor_networks/tensor_train.rs:255— TensorTrain::add has cognitive complexity 48 (threshold 15). Drivers by points: loops 10 (37 pts), if/else 7 (11 pts) (nesting depth added 31). 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.
TensorTrain::dot (cognitive 21) crates/ruvector-math/src/tensor_networks/tensor_train.rs:207— TensorTrain::dot has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). 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.
ContinuousTimeODE::integrate (cognitive 43) crates/ruvector-graph-transformer/src/temporal.rs:709— ContinuousTimeODE::integrate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 3 (8 pts), boolean chains 5, match/switch 1 (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.
ContinuousTimeODE::dormand_prince_step (cognitive 37) crates/ruvector-graph-transformer/src/temporal.rs:851— ContinuousTimeODE::dormand_prince_step has cognitive complexity 37 (threshold 15). Drivers by points: loops 12 (24 pts), if/else 7 (13 pts) (nesting depth added 18). 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.
ruvllm_cli::commands::chat::handle_command (cognitive 42) crates/ruvllm-cli/src/commands/chat.rs:461— ruvllm_cli::commands::chat::handle_command has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (31 pts), match/switch 4 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvllm_cli::commands::chat::run (cognitive 22) crates/ruvllm-cli/src/commands/chat.rs:47— ruvllm_cli::commands::chat::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 4 (10 pts), loops 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.
BoundedInstance::search_for_cuts (cognitive 41) crates/ruvector-mincut/src/instance/bounded.rs:202— BoundedInstance::search_for_cuts has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 6 (14 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 25). 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.
BoundedInstance::query (cognitive 19) crates/ruvector-mincut/src/instance/bounded.rs:451— BoundedInstance::query has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 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.
DiskAnnIndex::load_impl (cognitive 40) crates/ruvector-diskann/src/index.rs:473— DiskAnnIndex::load_impl has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (28 pts), loops 6 (10 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.
DiskAnnIndex::save (cognitive 32) crates/ruvector-diskann/src/index.rs:318— DiskAnnIndex::save has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 5 (14 pts), boolean chains 1 (nesting depth added 16). 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.
QuantizedConv2d::conv_3x3_int8_scalar (cognitive 39) crates/ruvector-cnn/src/layers/quantized_conv2d.rs:222— QuantizedConv2d::conv_3x3_int8_scalar has cognitive complexity 39 (threshold 15). Drivers by points: loops 10 (32 pts), if/else 1 (6 pts), boolean chains 1 (nesting depth added 27). 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.
QuantizedConv2d::from_fp32 (cognitive 27) crates/ruvector-cnn/src/layers/quantized_conv2d.rs:51— QuantizedConv2d::from_fp32 has cognitive complexity 27 (threshold 15). Drivers by points: loops 9 (21 pts), if/else 4 (6 pts) (nesting depth added 14). 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.
ConvTranspose2D::f (cognitive 39) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1122— ConvTranspose2D::f has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (25 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 26). 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.
ConvTranspose2D::f (cognitive 39) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1230— ConvTranspose2D::f has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (25 pts), if/else 2 (12 pts), boolean chains 2 (nesting depth added 26). 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.
photonlayer_bench::privacy::ridge_least_squares (cognitive 38) crates/photonlayer-bench/src/privacy.rs:54— photonlayer_bench::privacy::ridge_least_squares has cognitive complexity 38 (threshold 15). Drivers by points: loops 16 (30 pts), if/else 3 (8 pts) (nesting depth added 19). 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.
photonlayer_bench::mnist::digit_to_image (cognitive 17) crates/photonlayer-bench/src/mnist.rs:160— photonlayer_bench::mnist::digit_to_image has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 2 (4 pts) (nesting depth added 9). 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.
Im2Col::f (cognitive 38) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:875— Im2Col::f has cognitive complexity 38 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 2 (13 pts), boolean chains 4 (nesting depth added 26). 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.
Im2Col::f (cognitive 38) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1071— Im2Col::f has cognitive complexity 38 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 2 (13 pts), boolean chains 4 (nesting depth added 26). 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.
ProgressiveIndex::search_a_plus_b (cognitive 37) crates/rvf/rvf-index/src/progressive.rs:135— ProgressiveIndex::search_a_plus_b has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 21). 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.
ProgressiveIndex::search_layer_a_only (cognitive 20) crates/rvf/rvf-index/src/progressive.rs:70— ProgressiveIndex::search_layer_a_only has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (8 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.
AdaptiveSolver::search_with_mode (cognitive 37) crates/rvf/rvf-solver-wasm/src/engine.rs:372— AdaptiveSolver::search_with_mode has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (33 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 25). 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.
AdaptiveSolver::compute_range (cognitive 21) crates/rvf/rvf-solver-wasm/src/engine.rs:426— AdaptiveSolver::compute_range has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReduceIndex::fold_impl (cognitive 37) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:113— ReduceIndex::fold_impl has cognitive complexity 37 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 5 (17 pts), match/switch 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ReduceIndex::fold_impl (cognitive 37) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:131— ReduceIndex::fold_impl has cognitive complexity 37 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 5 (17 pts), match/switch 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ReplacementEdgeIndex::find_components_after_cut (cognitive 36) crates/ruvector-mincut/src/algorithm/replacement.rs:184— ReplacementEdgeIndex::find_components_after_cut has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (8 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplacementEdgeIndex::promote_edges (cognitive 24) crates/ruvector-mincut/src/algorithm/replacement.rs:234— ReplacementEdgeIndex::promote_edges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (8 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.
ReflectiveAgent::execute_with_reflection (cognitive 36) crates/ruvllm/src/reflection/reflective_agent.rs:473— ReflectiveAgent::execute_with_reflection has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReflectiveAgent::generate_reflection (cognitive 26) crates/ruvllm/src/reflection/reflective_agent.rs:681— ReflectiveAgent::generate_reflection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ParsedSeed::parse_manifest (cognitive 36) crates/rvf/rvf-runtime/src/qr_seed.rs:519— ParsedSeed::parse_manifest has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 2 (5 pts), match/switch 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.
ParsedSeed::parse (cognitive 17) crates/rvf/rvf-runtime/src/qr_seed.rs:449— ParsedSeed::parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 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, 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.
StreamVerifier::on_chunk (cognitive 36) crates/rvf/rvf-wire/src/stream/verifier.rs:412— StreamVerifier::on_chunk has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 6, match/switch 2 (3 pts), loops 1 (nesting depth added 7). 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.
StreamVerifier::finish_identity (cognitive 32) crates/rvf/rvf-wire/src/stream/verifier.rs:646— StreamVerifier::finish_identity has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (6 pts), boolean chains 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.
HnswIo::load_point_indexation (cognitive 36) patches/hnsw_rs/src/hnswio.rs:615— HnswIo::load_point_indexation has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 5 (9 pts), match/switch 1 (3 pts), boolean chains 2 (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.
HnswIo::load_point_indexation (cognitive 36) scripts/patches/hnsw_rs/src/hnswio.rs:615— HnswIo::load_point_indexation has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 5 (9 pts), match/switch 1 (3 pts), boolean chains 2 (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.
SpikingNetwork::step (cognitive 34) crates/ruvector-mincut/src/snn/network.rs:243— SpikingNetwork::step has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 6 (16 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.
SpikingNetwork::new (cognitive 26) crates/ruvector-mincut/src/snn/network.rs:106— SpikingNetwork::new has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 4 (10 pts), boolean chains 1 (nesting depth added 16). 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.
ruvector_edge_analytics::cost::certificate (cognitive 33) crates/ruvector-edge-analytics/src/cost.rs:113— ruvector_edge_analytics::cost::certificate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 4, boolean chains 2 (nesting depth added 14). 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.
ruvector_edge_analytics::format::decode_payload (cognitive 17) crates/ruvector-edge-analytics/src/format.rs:290— ruvector_edge_analytics::format::decode_payload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 1 (2 pts), 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.
SqlEngine::select (cognitive 33) crates/rvlite/src/sql/executor.rs:252— SqlEngine::select has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 2 (6 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.
SqlEngine::insert (cognitive 19) crates/rvlite/src/sql/executor.rs:155— SqlEngine::insert has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), 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.
ruvector_cli::cli::hooks::post_command_hook (cognitive 32) crates/ruvector-cli/src/cli/hooks.rs:1705— ruvector_cli::cli::hooks::post_command_hook has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 1 (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.
ruvector_cli::cli::graph::run_shell (cognitive 20) crates/ruvector-cli/src/cli/graph.rs:224— ruvector_cli::cli::graph::run_shell has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (5 pts), boolean chains 3, 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.
ParallelBranchAttention::detect_branches (cognitive 32) crates/ruvector-dag/src/attention/parallel_branch.rs:43— ParallelBranchAttention::detect_branches has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 21). 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.
ParallelBranchAttention::compute_branch_attention (cognitive 23) crates/ruvector-dag/src/attention/parallel_branch.rs:157— ParallelBranchAttention::compute_branch_attention has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 6 (9 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.
ExpanderDecomposition::insert_edge (cognitive 32) crates/ruvector-mincut/src/expander/mod.rs:181— ExpanderDecomposition::insert_edge has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 22). 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.
ExpanderDecomposition::local_cut_search (cognitive 18) crates/ruvector-mincut/src/expander/mod.rs:374— ExpanderDecomposition::local_cut_search has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 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. This shape REPEATS in the file: one other method here (ruvector_mincut::expander::bfs_local_search) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CudaStorage::copy_strided_src (cognitive 32) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2292— CudaStorage::copy_strided_src has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (31 pts), match/switch 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.
CudaStorage::copy_strided_src (cognitive 23) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1785— CudaStorage::copy_strided_src has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 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.
ruvector_gpu_runner::runner::supervise (cognitive 31) crates/ruvector-gpu-runner/src/runner.rs:313— ruvector_gpu_runner::runner::supervise has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 2 (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.
ruvector_gpu_runner::runner::launch (cognitive 29) crates/ruvector-gpu-runner/src/runner.rs:114— ruvector_gpu_runner::runner::launch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 5 (8 pts), match/switch 2, 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.
KFACLayer::update (cognitive 31) crates/ruvector-math/src/information_geometry/kfac.rs:75— KFACLayer::update has cognitive complexity 31 (threshold 15). Drivers by points: loops 10 (22 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 14). 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.
KFACLayer::invert_matrix (cognitive 26) crates/ruvector-math/src/information_geometry/kfac.rs:200— KFACLayer::invert_matrix has cognitive complexity 26 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 3 (8 pts) (nesting depth added 14). 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.
HypergraphIndex::k_hop_neighbors (cognitive 30) crates/ruvector-core/src/advanced/hypergraph.rs:269— HypergraphIndex::k_hop_neighbors has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (17 pts), loops 4 (13 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HypergraphIndex::remove_entity (cognitive 16) crates/ruvector-core/src/advanced/hypergraph.rs:188— HypergraphIndex::remove_entity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 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.
SinkhornSolver::barycenter (cognitive 30) crates/ruvector-math/src/optimal_transport/sinkhorn.rs:301— SinkhornSolver::barycenter has cognitive complexity 30 (threshold 15). Drivers by points: loops 7 (23 pts), if/else 3 (6 pts), match/switch 1 (nesting depth added 19). 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.
SinkhornSolver::solve (cognitive 22) crates/ruvector-math/src/optimal_transport/sinkhorn.rs:124— SinkhornSolver::solve has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (7 pts), boolean chains 4 (nesting depth added 9). 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.
BenchmarkSuite::benchmark_simd (cognitive 30) crates/ruvector-mincut/src/optimization/benchmark.rs:290— BenchmarkSuite::benchmark_simd has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (17 pts), if/else 3 (13 pts) (nesting depth added 19). 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.
BenchmarkSuite::benchmark_cache (cognitive 17) crates/ruvector-mincut/src/optimization/benchmark.rs:235— BenchmarkSuite::benchmark_cache has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 1 (4 pts) (nesting depth added 10). 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.
Scheduler::schedule (cognitive 30) crates/ruvix/crates/nucleus/src/scheduler.rs:392— Scheduler::schedule has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 17). 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.
Scheduler::select_next_task_at (cognitive 19) crates/ruvix/crates/sched/src/scheduler.rs:266— Scheduler::select_next_task_at has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 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.
ContinuousBatchScheduler::schedule_preempted_requests (cognitive 29) crates/ruvllm/src/serving/scheduler.rs:412— ContinuousBatchScheduler::schedule_preempted_requests has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (27 pts), boolean chains 1, loops 1 (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.
ContinuousBatchScheduler::schedule_prefill_requests (cognitive 20) crates/ruvllm/src/serving/scheduler.rs:327— ContinuousBatchScheduler::schedule_prefill_requests has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 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.
IndexAdd::f (cognitive 29) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:813— IndexAdd::f has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (14 pts), match/switch 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.
IndexAdd::f (cognitive 23) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:623— IndexAdd::f has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 4 (8 pts), match/switch 1 (nesting depth added 13). 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.
QuantizedDepthwiseConv2d::depthwise_conv_int8_scalar (cognitive 28) crates/ruvector-cnn/src/layers/quantized_depthwise.rs:177— QuantizedDepthwiseConv2d::depthwise_conv_int8_scalar has cognitive complexity 28 (threshold 15). Drivers by points: loops 8 (21 pts), if/else 1 (6 pts), boolean chains 1 (nesting depth added 18). 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.
QuantizedDepthwiseConv2d::from_fp32 (cognitive 19) crates/ruvector-cnn/src/layers/quantized_depthwise.rs:50— QuantizedDepthwiseConv2d::from_fp32 has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 4 (6 pts) (nesting depth added 8). 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.
ruvector_coherence_hnsw::search::beam_search (cognitive 28) crates/ruvector-coherence-hnsw/src/search.rs:178— ruvector_coherence_hnsw::search::beam_search has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). 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. This shape REPEATS in the file: one other method here (ruvector_coherence_hnsw::search::adaptive_beam_search) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ruvector_coherence_hnsw::search::adaptive_beam_search (cognitive 28) crates/ruvector-coherence-hnsw/src/search.rs:283— ruvector_coherence_hnsw::search::adaptive_beam_search has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). 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. This shape REPEATS in the file: one other method here (ruvector_coherence_hnsw::search::beam_search) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MaintenanceWorker::perform_maintenance_cycle (cognitive 28) crates/ruvector-postgres/src/workers/maintenance.rs:332— MaintenanceWorker::perform_maintenance_cycle has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 1 (4 pts), boolean chains 1, 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.
MaintenanceWorker::perform_tier_management (cognitive 17) crates/ruvector-postgres/src/workers/maintenance.rs:467— MaintenanceWorker::perform_tier_management has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 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.
ruvector_rabitq::scan::scan_avx2 (cognitive 28) crates/ruvector-rabitq/src/scan.rs:120— ruvector_rabitq::scan::scan_avx2 has cognitive complexity 28 (threshold 15). Drivers by points: loops 10 (24 pts), if/else 3, boolean chains 1 (nesting depth added 14). 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.
ruvector_rabitq::scan::scan_scalar (cognitive 16) crates/ruvector-rabitq/src/scan.rs:51— ruvector_rabitq::scan::scan_scalar has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 3, boolean chains 1 (nesting depth added 7). 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.
MaxPool2D::f (cognitive 28) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:345— MaxPool2D::f has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 1 (7 pts) (nesting depth added 21). 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.
MaxPool2D::f (cognitive 28) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:363— MaxPool2D::f has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 1 (7 pts) (nesting depth added 21). 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.
Stack::read (cognitive 28) patches/candle-core-0.9.2/src/pickle.rs:437— Stack::read has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (7 pts), match/switch 2 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Stack::read (cognitive 26) patches/candle-core-0.8.4/src/pickle.rs:426— Stack::read has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (5 pts), match/switch 2 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpikeDrivenAttention::attention (cognitive 27) crates/ruvector-mincut-gated-transformer/src/attention/spike_driven.rs:201— SpikeDrivenAttention::attention has cognitive complexity 27 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 16). 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.
SpikeDrivenAttention::sparse_attention (cognitive 25) crates/ruvector-mincut-gated-transformer/src/attention/spike_driven.rs:333— SpikeDrivenAttention::sparse_attention has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 15). 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.
ruvector_agent_memory::arbitration::arbitrate (cognitive 26) crates/ruvector-agent-memory/src/arbitration.rs:300— ruvector_agent_memory::arbitration::arbitrate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 7 (10 pts), boolean chains 2 (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.
ruvector_agent_memory::witness_signing::verify_signed_chain (cognitive 25) crates/ruvector-agent-memory/src/witness_signing.rs:404— ruvector_agent_memory::witness_signing::verify_signed_chain has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (4 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.
DiffAnalyzer::analyze_locality (cognitive 26) crates/ruvllm/src/evaluation/diff_quality.rs:291— DiffAnalyzer::analyze_locality has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiffAnalyzer::analyze_minimality (cognitive 20) crates/ruvllm/src/evaluation/diff_quality.rs:227— DiffAnalyzer::analyze_minimality has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, 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.
rvf_forge_core::container::walk_segments (cognitive 26) crates/rvf-forge-core/src/container.rs:135— rvf_forge_core::container::walk_segments has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rvf_forge_core::inspect::declared_capabilities (cognitive 21) crates/rvf-forge-core/src/inspect.rs:216— rvf_forge_core::inspect::declared_capabilities has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 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.
FloatFormatter::new (cognitive 26) patches/candle-core-0.8.4/src/display.rs:299— FloatFormatter::new has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 14). 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.
FloatFormatter::new (cognitive 26) patches/candle-core-0.9.2/src/display.rs:310— FloatFormatter::new has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 14). 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.
VectorIndex::greedy_search_internal (cognitive 25) crates/mcp-brain-server/src/bin/local.rs:334— VectorIndex::greedy_search_internal has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (3 pts) (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.
VectorIndex::vamana_insert (cognitive 21) crates/mcp-brain-server/src/bin/local.rs:232— VectorIndex::vamana_insert has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (6 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.
FileStorage::load_cache (cognitive 25) crates/prime-radiant/src/storage/file.rs:346— FileStorage::load_cache has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (4 pts) (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.
FileStorage::recover_from_wal (cognitive 21) crates/prime-radiant/src/storage/file.rs:273— FileStorage::recover_from_wal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PolylogConnectivity::delete_edge (cognitive 25) crates/ruvector-mincut/src/connectivity/polylog.rs:313— PolylogConnectivity::delete_edge has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PolylogConnectivity::find_replacement (cognitive 20) crates/ruvector-mincut/src/connectivity/polylog.rs:401— PolylogConnectivity::find_replacement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrueSolver::project_matrix (cognitive 25) crates/ruvector-solver/src/true_solver.rs:153— TrueSolver::project_matrix has cognitive complexity 25 (threshold 15). Drivers by points: loops 10 (19 pts), if/else 2 (6 pts) (nesting depth added 13). 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.
TrueSolver::neumann_solve (cognitive 23) crates/ruvector-solver/src/true_solver.rs:301— TrueSolver::neumann_solve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (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.
Lexer::next_token (cognitive 25) crates/rvlite/src/cypher/lexer.rs:405— Lexer::next_token has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 3 (6 pts), loops 1 (3 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Lexer::scan_number (cognitive 21) crates/rvlite/src/cypher/lexer.rs:252— Lexer::scan_number has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoNCELoss::forward_detailed (cognitive 24) crates/ruvector-cnn/src/contrastive/infonce.rs:138— InfoNCELoss::forward_detailed has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 3 (4 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.
InfoNCELoss::forward_with_pairs (cognitive 21) crates/ruvector-cnn/src/contrastive/infonce.rs:288— InfoNCELoss::forward_with_pairs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 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.
FlatGraph::insert_batch (cognitive 24) crates/ruvector-core/src/index/flat_graph.rs:406— FlatGraph::insert_batch has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 1 (5 pts), boolean chains 2 (nesting depth added 14). 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.
FlatGraph::search_layer (cognitive 23) crates/ruvector-core/src/index/flat_graph.rs:233— FlatGraph::search_layer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (5 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.
rvf_solver_wasm::engine::run_acceptance_mode (cognitive 24) crates/rvf/rvf-solver-wasm/src/engine.rs:563— rvf_solver_wasm::engine::run_acceptance_mode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (3 pts), boolean chains 2 (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.
rvf_solver_wasm::engine::inject_noise (cognitive 23) crates/rvf/rvf-solver-wasm/src/engine.rs:719— rvf_solver_wasm::engine::inject_noise has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 2 (6 pts), loops 1 (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.
RaftNode::handle_append_entries_response (cognitive 23) crates/ruvector-raft/src/node.rs:297— RaftNode::handle_append_entries_response has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (23 pts) (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.
RaftNode::handle_append_entries (cognitive 18) crates/ruvector-raft/src/node.rs:231— RaftNode::handle_append_entries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (2 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.
rvagent_cli::display::print_markdown (cognitive 23) crates/rvAgent/rvagent-cli/src/display.rs:48— rvagent_cli::display::print_markdown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 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.
rvagent_cli::tui::render_frame (cognitive 22) crates/rvAgent/rvagent-cli/src/tui.rs:322— rvagent_cli::tui::render_frame has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (9 pts), match/switch 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.
HadamardTransform::hadamard_butterfly_neon (cognitive 22) crates/ruvllm/src/quantize/hadamard.rs:410— HadamardTransform::hadamard_butterfly_neon has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 2 (3 pts) (nesting depth added 14). 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. This shape REPEATS in the file: one other method here (HadamardTransform::hadamard_butterfly_avx2) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
HadamardTransform::hadamard_butterfly_avx2 (cognitive 22) crates/ruvllm/src/quantize/hadamard.rs:467— HadamardTransform::hadamard_butterfly_avx2 has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 2 (3 pts) (nesting depth added 14). 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. This shape REPEATS in the file: one other method here (HadamardTransform::hadamard_butterfly_neon) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SpeculativeDecoder::generate_tokens (cognitive 22) crates/ruvllm/src/speculative.rs:475— SpeculativeDecoder::generate_tokens has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts) (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.
SpeculativeDecoder::verify_drafts (cognitive 21) crates/ruvector-mincut-gated-transformer/src/speculative.rs:270— SpeculativeDecoder::verify_drafts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 3 (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.
ProofVerifier::mark_nonce (cognitive 22) crates/rvm/crates/rvm-cap/src/verify.rs:359— ProofVerifier::mark_nonce has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 2 (3 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.
ProofVerifier::verify_p3 (cognitive 16) crates/rvm/crates/rvm-cap/src/verify.rs:235— ProofVerifier::verify_p3 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (5 pts), 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.
CommonCrawlAdapter::query_cdx_live (cognitive 21) crates/mcp-brain-server/src/pipeline.rs:1067— CommonCrawlAdapter::query_cdx_live has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (5 pts), match/switch 2 (5 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.
CommonCrawlAdapter::test_connectivity (cognitive 16) crates/mcp-brain-server/src/pipeline.rs:805— CommonCrawlAdapter::test_connectivity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (5 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.
DeltaHnsw::search_layer (cognitive 21) crates/ruvector-delta-index/src/lib.rs:514— DeltaHnsw::search_layer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 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.
DeltaHnsw::connect_node (cognitive 19) crates/ruvector-delta-index/src/lib.rs:405— DeltaHnsw::connect_node has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 pts), match/switch 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.
RlmEmbedder::embed (cognitive 21) crates/ruvllm/src/bitnet/rlm_embedder.rs:170— RlmEmbedder::embed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 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.
RlmEmbedder::compute_context_embedding (cognitive 18) crates/ruvllm/src/bitnet/rlm_embedder.rs:286— RlmEmbedder::compute_context_embedding has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (7 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.
rvm_coherence::mincut::stoer_wagner_mincut (cognitive 21) crates/rvm/crates/rvm-coherence/src/mincut.rs:237— rvm_coherence::mincut::stoer_wagner_mincut has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 6 (9 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.
rvm_coherence::mincut::minimum_cut_phase (cognitive 18) crates/rvm/crates/rvm-coherence/src/mincut.rs:317— rvm_coherence::mincut::minimum_cut_phase has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (6 pts), boolean chains 4 (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.
rvm_memory::reconstruction::decompress (cognitive 21) crates/rvm/crates/rvm-memory/src/reconstruction.rs:392— rvm_memory::reconstruction::decompress has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), match/switch 1 (2 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.
rvm_memory::reconstruction::compress (cognitive 19) crates/rvm/crates/rvm-memory/src/reconstruction.rs:332— rvm_memory::reconstruction::compress has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (7 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.
AvgPool2D::f (cognitive 21) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:304— AvgPool2D::f has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). 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.
AvgPool2D::f (cognitive 21) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:322— AvgPool2D::f has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). 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.
ruvector_edge_authz::client::validate_registration (cognitive 20) crates/ruvector-edge-authz/src/client.rs:293— ruvector_edge_authz::client::validate_registration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, loops 1, match/switch 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.
ruvector_edge_authz::confidential::authenticate (cognitive 16) crates/ruvector-edge-authz/src/confidential.rs:227— ruvector_edge_authz::confidential::authenticate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ruvector_graph_transformer::verified_training::check_invariant (cognitive 20) crates/ruvector-graph-transformer/src/verified_training.rs:660— ruvector_graph_transformer::verified_training::check_invariant has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_graph_transformer::temporal::topological_sort (cognitive 16) crates/ruvector-graph-transformer/src/temporal.rs:1103— ruvector_graph_transformer::temporal::topological_sort has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (6 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.
EvalSuite::citation_correctness (cognitive 20) crates/ruvllm/src/bitnet/eval.rs:180— EvalSuite::citation_correctness has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EvalSuite::refusal_calibration (cognitive 17) crates/ruvllm/src/bitnet/eval.rs:255— EvalSuite::refusal_calibration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 1 (nesting depth added 2). 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.
QrEncoder::encode (cognitive 20) crates/rvf/rvf-runtime/src/qr_encode.rs:828— QrEncoder::encode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (7 pts), boolean chains 4 (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.
QrEncoder::to_ascii (cognitive 16) crates/rvf/rvf-runtime/src/qr_encode.rs:949— QrEncoder::to_ascii has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (3 pts), match/switch 1 (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.
ConvTranspose1D::f (cognitive 20) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:965— ConvTranspose1D::f has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (8 pts) (nesting depth added 12). 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.
ConvTranspose1D::f (cognitive 20) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1161— ConvTranspose1D::f has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (8 pts) (nesting depth added 12). 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.
BlockQ8K::from_float (cognitive 20) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1788— BlockQ8K::from_float has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 4 (7 pts) (nesting depth added 11). 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.
BlockQ8K::from_float (cognitive 19) patches/candle-core-0.9.2/src/quantized/k_quants.rs:2214— BlockQ8K::from_float has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 3 (6 pts) (nesting depth added 11). 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.
SimdDistanceOps::relax_batch (cognitive 19) crates/ruvector-mincut/src/optimization/simd_distance.rs:249— SimdDistanceOps::relax_batch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 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.
SimdDistanceOps::relax_batch (cognitive 16) crates/ruvector-mincut/src/optimization/simd_distance.rs:190— SimdDistanceOps::relax_batch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 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.
rvagent_a2a::server::push::deliver_webhook_impl (cognitive 19) crates/rvAgent/rvagent-a2a/src/server/push.rs:318— rvagent_a2a::server::push::deliver_webhook_impl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 1 (2 pts), 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.
rvagent_a2a::artifact_types::from_a2a_artifact (cognitive 17) crates/rvAgent/rvagent-a2a/src/artifact_types.rs:201— rvagent_a2a::artifact_types::from_a2a_artifact has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (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.
MetalStorage::reduce_op (cognitive 19) patches/candle-core-0.8.4/src/metal_backend/mod.rs:266— MetalStorage::reduce_op has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 2 (3 pts), 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.
MetalStorage::reduce_op (cognitive 19) patches/candle-core-0.9.2/src/metal_backend/mod.rs:285— MetalStorage::reduce_op has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 2 (3 pts), 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.
FlashAttention::compute (cognitive 18) crates/ruvector-attention/src/sparse/flash.rs:61— FlashAttention::compute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (7 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.
FlashAttention::forward_tiled (cognitive 16) crates/ruvector-postgres/src/attention/flash.rs:97— FlashAttention::forward_tiled has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 3 (nesting depth added 6). 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.
DerivationTree::find_parent (cognitive 18) crates/rvm/crates/rvm-cap/src/derivation.rs:279— DerivationTree::find_parent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 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.
DerivationTree::collect_subtree (cognitive 17) crates/rvm/crates/rvm-cap/src/derivation.rs:227— DerivationTree::collect_subtree has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 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.
ProductManifold::project (cognitive 17) crates/ruvector-math/src/product_manifold/manifold.rs:77— ProductManifold::project has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 6 (8 pts) (nesting depth added 8). 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.
ProductManifold::frechet_mean (cognitive 17) crates/ruvector-math/src/product_manifold/manifold.rs:452— ProductManifold::frechet_mean has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 3 (6 pts), match/switch 1 (nesting depth added 8). 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.
GomoryHuTree::build (cognitive 17) crates/ruvector-mincut/src/canonical/tree_packing/mod.rs:267— GomoryHuTree::build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 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.
GomoryHuTree::partition_on_edge (cognitive 16) crates/ruvector-mincut/src/canonical/tree_packing/mod.rs:405— GomoryHuTree::partition_on_edge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (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.
Codebook::train (cognitive 17) crates/ruvector-streaming-qng/src/pq.rs:30— Codebook::train has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 1 (4 pts) (nesting depth added 11). 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.
Codebook::update_one_pass (cognitive 16) crates/ruvector-streaming-qng/src/pq.rs:125— Codebook::update_one_pass has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (4 pts) (nesting depth added 9). 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.
PortableDB::layer_search (cognitive 17) crates/ruvector-wasm/src/portable.rs:224— PortableDB::layer_search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 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.
PortableDB::add (cognitive 17) crates/ruvector-wasm/src/portable.rs:272— PortableDB::add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (4 pts) (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.
Conv1D::f (cognitive 17) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:741— Conv1D::f has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 1 (4 pts), boolean chains 1 (nesting depth added 9). 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.
Conv1D::f (cognitive 17) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:937— Conv1D::f has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 1 (4 pts), boolean chains 1 (nesting depth added 9). 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.
Im2Col1D::f (cognitive 17) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:813— Im2Col1D::f has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (5 pts), boolean chains 2 (nesting depth added 10). 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.
Im2Col1D::f (cognitive 17) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1009— Im2Col1D::f has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (5 pts), boolean chains 2 (nesting depth added 10). 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.
fetchWithCache (cognitive 17) npm/packages/ruvector/src/core/onnx/loader.js:270— fetchWithCache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (5 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (4 pts) (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.
fetchWithCache (cognitive 17) npm/packages/ruvector/src/core/onnx/pkg/loader.js:157— fetchWithCache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (5 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (4 pts) (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.
ReduceSum::fold_impl (cognitive 16) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:221— ReduceSum::fold_impl has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ReduceSum::fold_impl (cognitive 16) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:239— ReduceSum::fold_impl has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication· Near-duplicate member family (4 members, 17 shared lines) · ×2
Near-duplicate member family (4 members, 17 shared lines) patches/candle-core-0.8.4/src/tensor.rs:594— patches/candle-core-0.8.4/src/tensor.rs:594-612 | patches/candle-core-0.8.4/src/tensor.rs:1606-1628 | patches/candle-core-0.9.2/src/tensor.rs:662-680 | patches/candle-core-0.9.2/src/tensor.rs:1930-1952 — These 4 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
Near-duplicate member family (4 members, 17 shared lines) patches/candle-core-0.8.4/src/tensor.rs:1631— patches/candle-core-0.8.4/src/tensor.rs:1631-1659 | patches/candle-core-0.8.4/src/tensor.rs:1662-1700 | patches/candle-core-0.9.2/src/tensor.rs:1955-1983 | patches/candle-core-0.9.2/src/tensor.rs:1986-2024 — These 4 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
Near-duplicate member pair (75 shared lines) patches/candle-core-0.8.4/src/metal_backend/mod.rs:266— patches/candle-core-0.8.4/src/metal_backend/mod.rs:266-402 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:285-423 — These two members are variants of one another: 75 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.
Near-duplicate member pair (75 shared lines) crates/ruvector-coherence-hnsw/src/search.rs:188— crates/ruvector-coherence-hnsw/src/search.rs:188-279 | crates/ruvector-coherence-hnsw/src/search.rs:292-386 — These two members are variants of one another: 75 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.
Near-duplicate member pair (42 shared lines) crates/rvf/rvf-runtime/src/store.rs:329— crates/rvf/rvf-runtime/src/store.rs:329-393 | crates/rvf/rvf-runtime/src/store.rs:415-481 — These two members are variants of one another: 42 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.
Near-duplicate member pair (42 shared lines) crates/ruvector-postgres/src/solver/operators.rs:238— crates/ruvector-postgres/src/solver/operators.rs:238-298 | crates/ruvector-postgres/src/solver/operators.rs:439-506 — These two members are variants of one another: 42 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.
Near-duplicate member pair (41 shared lines) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1669— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1669-1717 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2194-2242 — These two members are variants of one another: 41 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.
Near-duplicate member pair (41 shared lines) crates/ruvllm/src/metal/operations.rs:400— crates/ruvllm/src/metal/operations.rs:400-507 | crates/ruvllm/src/metal/operations.rs:530-616 — These two members are variants of one another: 41 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.
Near-duplicate member pair (33 shared lines) crates/ruvector-graph-transformer-node/src/transformer.rs:390— crates/ruvector-graph-transformer-node/src/transformer.rs:390-428 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:405-443 — These two members are variants of one another: 33 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.
Near-duplicate member pair (33 shared lines) patches/candle-core-0.8.4/src/metal_backend/mod.rs:109— patches/candle-core-0.8.4/src/metal_backend/mod.rs:109-162 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:118-177 — These two members are variants of one another: 33 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.
Near-duplicate member pair (31 shared lines) crates/ruvector-postgres/src/index/hnsw_am.rs:1669— crates/ruvector-postgres/src/index/hnsw_am.rs:1669-1806 | crates/ruvector-postgres/src/index/ivfflat_am.rs:1540-1660 — These two members are variants of one another: 31 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.
Near-duplicate member pair (31 shared lines) crates/ruvector-diskann/src/distance.rs:264— crates/ruvector-diskann/src/distance.rs:264-309 | crates/ruvector-diskann/src/distance.rs:367-408 — These two members are variants of one another: 31 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (56 corresponding lines) · ×2
Edited copy of a member (56 corresponding lines) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:741— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:741-796 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:937-992 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (56 corresponding lines) crates/ruvector-cnn/src/backbone/mobilenet.rs:143— crates/ruvector-cnn/src/backbone/mobilenet.rs:143-198 | crates/ruvector-cnn/src/backbone/mobilenet.rs:251-310 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×2
Edited copy of a member (26 corresponding lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:392— patches/candle-core-0.8.4/src/quantized/k_quants.rs:392-425 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:416-452 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1313— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1313-1341 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1579-1606 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×2
Edited copy of a member (25 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:571— patches/candle-core-0.8.4/src/storage.rs:571-595 | patches/candle-core-0.9.2/src/storage.rs:608-632 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/ruvector-nervous-system-wasm/src/hdc.rs:89— crates/ruvector-nervous-system-wasm/src/hdc.rs:89-113 | crates/ruvector-nervous-system/src/hdc/vector.rs:182-209 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) crates/ruvector-robotics/src/perception/obstacle_detector.rs:123— crates/ruvector-robotics/src/perception/obstacle_detector.rs:123-164 | crates/ruvector-robotics/src/perception/scene_graph.rs:99-137 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:938— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:938-958 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1134-1154 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:771— patches/candle-core-0.8.4/src/storage.rs:771-787 | patches/candle-core-0.9.2/src/storage.rs:832-848 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/ruvector-solver/src/cg.rs:142— crates/ruvector-solver/src/cg.rs:142-159 | crates/ruvector-solver/src/cg.rs:163-180 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×2
Edited copy of a member (13 corresponding lines) crates/ruvector-bet4-ivf-bench/src/kernel.rs:240— crates/ruvector-bet4-ivf-bench/src/kernel.rs:240-278 | crates/ruvector-bet4-ivf-bench/src/kernel.rs:290-307 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/ruvector-graph/src/cypher/ast.rs:400— crates/ruvector-graph/src/cypher/ast.rs:400-412 | crates/rvlite/src/cypher/ast.rs:400-412 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) crates/ruvector-cnn/src/layers/pooling.rs:97— crates/ruvector-cnn/src/layers/pooling.rs:97-114 | crates/ruvector-cnn/src/layers/pooling.rs:199-216 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) patches/candle-core-0.8.4/src/quantized/ggml_file.rs:80— patches/candle-core-0.8.4/src/quantized/ggml_file.rs:80-97 | patches/candle-core-0.9.2/src/quantized/ggml_file.rs:80-97 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (13 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (13 members, 50+ identical tokens) crates/ruvector-attention-node/src/attention.rs:66— crates/ruvector-attention-node/src/attention.rs:66-79 | crates/ruvector-attention-node/src/attention.rs:95-108 | crates/ruvector-attention-node/src/attention.rs:158-171 | crates/ruvector-attention-node/src/attention.rs:257-270 | crates/ruvector-attention-node/src/attention.rs:316-329 | crates/ruvector-attention-node/src/attention.rs:375-388 | crates/ruvector-attention-node/src/attention.rs:441-454 | crates/ruvector-attention-node/src/attention.rs:536-549 | crates/ruvector-attention-node/src/graph.rs:82-95 | crates/ruvector-attention-node/src/graph.rs:111-128 | crates/ruvector-attention-node/src/graph.rs:207-220 | crates/ruvector-attention-node/src/graph.rs:366-379 | crates/ruvector-crv/src/stage_ii.rs:101-128 — These 13 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 13 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 13 times.
Members sharing a duplicated core (13 members, 50+ identical tokens) crates/ruvector-postgres/src/attention/operators.rs:92— crates/ruvector-postgres/src/attention/operators.rs:92-168 | crates/ruvector-postgres/src/attention/operators.rs:187-237 | crates/ruvector-postgres/src/attention/operators.rs:291-328 | crates/ruvector-postgres/src/attention/operators.rs:341-417 | crates/ruvector-postgres/src/attention/operators.rs:427-508 | crates/ruvector-postgres/src/attention/operators.rs:517-556 | crates/ruvector-postgres/src/attention/operators.rs:566-640 | crates/ruvector-postgres/src/attention/operators.rs:651-752 | crates/ruvector-postgres/src/attention/operators.rs:762-843 | crates/ruvector-postgres/src/gnn/operators.rs:27-64 | crates/ruvector-postgres/src/gnn/operators.rs:75-98 | crates/ruvector-postgres/src/gnn/operators.rs:156-193 | crates/ruvector-postgres/src/gnn/operators.rs:213-302 — These 13 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 13 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 13 times.
Duplicated block (141 lines × 2) patches/candle-core-0.8.4/src/pickle.rs:427— patches/candle-core-0.8.4/src/pickle.rs:427-567 | patches/candle-core-0.9.2/src/pickle.rs:438-578 — before extracting anything, compare `patches/candle-core-0.8.4/src/pickle.rs` and `patches/candle-core-0.9.2/src/pickle.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 506 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 (141 lines × 2) patches/hnsw_rs/src/hnswio.rs:644— patches/hnsw_rs/src/hnswio.rs:644-784 | scripts/patches/hnsw_rs/src/hnswio.rs:644-784 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (60 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1365— crates/ruvector-postgres/src/graph/sparql/parser.rs:1365-1424 | crates/rvlite/src/sparql/parser.rs:1371-1430 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (60 lines × 2) patches/candle-core-0.8.4/src/display.rs:201— patches/candle-core-0.8.4/src/display.rs:201-260 | patches/candle-core-0.9.2/src/display.rs:212-271 — before extracting anything, compare `patches/candle-core-0.8.4/src/display.rs` and `patches/candle-core-0.9.2/src/display.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 304 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 (59 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:127— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:127-185 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:145-203 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (59 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:470— patches/candle-core-0.8.4/src/metal_backend/mod.rs:470-528 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:585-643 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (58 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:607— crates/ruvector-graph/src/cypher/parser.rs:607-664 | crates/rvlite/src/cypher/parser.rs:607-664 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (58 lines × 2) patches/candle-core-0.8.4/src/quantized/gguf_file.rs:396— patches/candle-core-0.8.4/src/quantized/gguf_file.rs:396-453 | patches/candle-core-0.9.2/src/quantized/gguf_file.rs:397-454 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/gguf_file.rs` and `patches/candle-core-0.9.2/src/quantized/gguf_file.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 280 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 (57 lines × 2) crates/ruvllm/src/evaluation/harness.rs:347— crates/ruvllm/src/evaluation/harness.rs:347-403 | crates/ruvllm/src/evaluation/real_harness.rs:739-795 — before extracting anything, compare `crates/ruvllm/src/evaluation/harness.rs` and `crates/ruvllm/src/evaluation/real_harness.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 79 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 (57 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:225— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:225-281 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:243-299 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (54 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:874— crates/ruvector-postgres/src/graph/sparql/parser.rs:874-927 | crates/rvlite/src/sparql/parser.rs:880-933 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (54 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1849— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1849-1902 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2270-2323 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (53 lines × 2) crates/ruvector-kge-ffi/src/ops.rs:186— crates/ruvector-kge-ffi/src/ops.rs:186-238 | crates/ruvector-kge-wasm/src/ops.rs:186-238 — before extracting anything, compare `crates/ruvector-kge-ffi/src/ops.rs` and `crates/ruvector-kge-wasm/src/ops.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 238 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 (53 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1055— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1055-1107 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1351-1403 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (52 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1627— crates/ruvector-postgres/src/graph/sparql/parser.rs:1627-1678 | crates/rvlite/src/sparql/parser.rs:1634-1685 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (52 lines × 2) patches/candle-core-0.8.4/src/display.rs:300— patches/candle-core-0.8.4/src/display.rs:300-351 | patches/candle-core-0.9.2/src/display.rs:311-362 — before extracting anything, compare `patches/candle-core-0.8.4/src/display.rs` and `patches/candle-core-0.9.2/src/display.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 304 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 (46 lines × 2) patches/hnsw_rs/src/hnswio.rs:479— patches/hnsw_rs/src/hnswio.rs:479-524 | scripts/patches/hnsw_rs/src/hnswio.rs:479-524 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (46 lines × 2) patches/hnsw_rs/src/hnswio.rs:1070— patches/hnsw_rs/src/hnswio.rs:1070-1115 | scripts/patches/hnsw_rs/src/hnswio.rs:1070-1115 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (41 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2048— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2048-2088 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2524-2564 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (41 lines × 2) patches/hnsw_rs/src/hnswio.rs:879— patches/hnsw_rs/src/hnswio.rs:879-919 | scripts/patches/hnsw_rs/src/hnswio.rs:879-919 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (37 lines × 2) crates/rvf/rvf-index/src/progressive.rs:191— crates/rvf/rvf-index/src/progressive.rs:191-227 | crates/rvf/rvf-index/src/progressive.rs:358-394 — 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 (37 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:334— patches/candle-core-0.8.4/src/backprop.rs:334-370 | patches/candle-core-0.9.2/src/backprop.rs:336-372 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (32–34 lines × 2) crates/ruvector-diverse-beam/src/bin/benchmark.rs:185— crates/ruvector-diverse-beam/src/bin/benchmark.rs:185-216 | crates/ruvector-diverse-beam/src/bin/benchmark.rs:231-264 — 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 (32–34 lines × 2) crates/ruvector-wasm/kernels/swiglu.rs:107— crates/ruvector-wasm/kernels/swiglu.rs:107-138 | crates/ruvector-wasm/kernels/swiglu.rs:161-194 — 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 (30–31 lines × 2) crates/ruvector-cnn/src/kernels/int8_avx2.rs:252— crates/ruvector-cnn/src/kernels/int8_avx2.rs:252-282 | crates/ruvector-cnn/src/kernels/int8_neon.rs:247-276 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (30–31 lines × 2) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:266— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:266-296 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:303-332 — before extracting anything, compare `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` and `patches/candle-core-0.9.2/src/cuda_backend/mod.rs` as WHOLE FILES: this scan already matched 66 separate duplicated blocks between them, totalling at least 663 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 (30 lines × 3) crates/ruvector-temporal-tensor/src/quantizer.rs:363— crates/ruvector-temporal-tensor/src/quantizer.rs:363-392 | crates/ruvector-temporal-tensor/src/quantizer.rs:455-484 | crates/ruvector-temporal-tensor/src/quantizer.rs:543-572 — 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.
Duplicated block (30 lines × 3) crates/ruvllm_sparse_attention/src/attention.rs:286— crates/ruvllm_sparse_attention/src/attention.rs:286-315 | crates/ruvllm_sparse_attention/src/attention.rs:448-477 | crates/ruvllm_sparse_attention/src/attention.rs:1458-1487 — 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.
Duplicated block (25–29 lines × 2) crates/ruvector-attention/src/moe/expert.rs:219— crates/ruvector-attention/src/moe/expert.rs:219-243 | crates/ruvector-attention/src/sparse/linear.rs:145-173 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (25–29 lines × 2) crates/ruvector-cnn/src/simd/avx2.rs:212— crates/ruvector-cnn/src/simd/avx2.rs:212-240 | crates/ruvector-cnn/src/simd/avx2.rs:371-395 — 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 (27–28 lines × 2) crates/mcp-brain-server/src/routes.rs:6228— crates/mcp-brain-server/src/routes.rs:6228-6254 | crates/mcp-brain-server/src/routes.rs:6278-6305 — 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 (27–28 lines × 2) crates/rvf/rvf-federation/src/aggregate.rs:212— crates/rvf/rvf-federation/src/aggregate.rs:212-239 | crates/rvf/rvf-federation/src/aggregate.rs:264-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (24–27 lines × 2) crates/ruvix/crates/nucleus/src/checkpoint.rs:192— crates/ruvix/crates/nucleus/src/checkpoint.rs:192-218 | crates/ruvix/crates/nucleus/src/checkpoint.rs:238-261 — 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 (24–27 lines × 2) scripts/training/export-to-rvf.py:83— scripts/training/export-to-rvf.py:83-109 | scripts/training/export-to-rvf.py:121-144 — 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 (25–26 lines × 2) crates/ruvector-consciousness/src/iit4.rs:267— crates/ruvector-consciousness/src/iit4.rs:267-292 | crates/ruvector-consciousness/src/iit4.rs:317-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.
Duplicated block (25–26 lines × 2) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:296— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:296-320 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:336-361 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 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 (24–26 lines × 2) crates/ruvllm/src/models/ruvltra.rs:241— crates/ruvllm/src/models/ruvltra.rs:241-266 | crates/ruvllm/src/models/ruvltra.rs:285-308 — 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 (24–26 lines × 2) crates/rvAgent/rvagent-middleware/src/hnsw.rs:527— crates/rvAgent/rvagent-middleware/src/hnsw.rs:527-550 | crates/rvAgent/rvagent-middleware/src/sona.rs:123-148 — 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 (23–24 lines × 2) crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:137— crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:137-160 | crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:187-209 — 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–24 lines × 2) crates/ruvector-postgres/src/quantization/scalar.rs:15— crates/ruvector-postgres/src/quantization/scalar.rs:15-38 | crates/ruvector-postgres/src/types/scalarvec.rs:59-81 — before extracting anything, compare `crates/ruvector-postgres/src/quantization/scalar.rs` and `crates/ruvector-postgres/src/types/scalarvec.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 94 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 (23 lines × 3) crates/ruvector-postgres/src/graph/sparql/executor.rs:438— crates/ruvector-postgres/src/graph/sparql/executor.rs:438-460 | crates/ruvector-postgres/src/graph/sparql/executor.rs:490-512 | crates/rvlite/src/sparql/executor.rs:382-404 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (23 lines × 3) patches/candle-core-0.8.4/src/quantized/k_quants.rs:808— patches/candle-core-0.8.4/src/quantized/k_quants.rs:808-830 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:859-881 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:917-939 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (21–23 lines × 2) crates/ruvector-coherence-hnsw/src/search.rs:238— crates/ruvector-coherence-hnsw/src/search.rs:238-260 | crates/ruvector-coherence-hnsw/src/search.rs:348-368 — 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 (21–23 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:1022— crates/ruvector-graph-transformer-node/src/transformer.rs:1022-1042 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:1092-1114 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (18–22 lines × 2) crates/ruvector-cnn/src/backbone/mobilenet.rs:145— crates/ruvector-cnn/src/backbone/mobilenet.rs:145-162 | crates/ruvector-cnn/src/backbone/mobilenet.rs:253-274 — 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 (18–22 lines × 2) crates/ruvector-cnn/src/kernels/int8_neon.rs:158— crates/ruvector-cnn/src/kernels/int8_neon.rs:158-179 | crates/ruvector-cnn/src/kernels/int8_neon.rs:372-389 — 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 (21–22 lines × 2) crates/ruvector-cnn/src/simd/neon.rs:62— crates/ruvector-cnn/src/simd/neon.rs:62-83 | crates/ruvector-core/src/simd_intrinsics.rs:773-793 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (21–22 lines × 2) crates/ruvector-mincut/src/jtree/coordinator.rs:417— crates/ruvector-mincut/src/jtree/coordinator.rs:417-438 | crates/ruvector-mincut/src/jtree/coordinator.rs:449-469 — 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 (17–22 lines × 2) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:421— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:421-442 | crates/ruvector-profiler/src/config_hash.rs:22-38 — before extracting anything, compare `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-profiler/src/config_hash.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 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 (17–22 lines × 2) scripts/create-brainpedia.py:258— scripts/create-brainpedia.py:258-274 | scripts/create-brainpedia.py:277-298 — 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 (20–21 lines × 2) crates/prime-radiant/src/coherence/engine.rs:655— crates/prime-radiant/src/coherence/engine.rs:655-674 | crates/prime-radiant/src/coherence/engine.rs:706-726 — 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 (20–21 lines × 2) crates/ruvector-math/src/spectral/mod.rs:78— crates/ruvector-math/src/spectral/mod.rs:78-98 | crates/ruvector-math/src/spectral/mod.rs:127-146 — 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 (19–21 lines × 2) crates/ruvector-core/src/quantization.rs:460— crates/ruvector-core/src/quantization.rs:460-478 | crates/ruvector-core/src/simd_intrinsics.rs:1333-1353 — before extracting anything, compare `crates/ruvector-core/src/quantization.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 (19–21 lines × 2) crates/ruvector-temporal-tensor/src/ffi.rs:49— crates/ruvector-temporal-tensor/src/ffi.rs:49-69 | crates/ruvector-temporal-tensor/src/ffi.rs:90-108 — 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 (18–20 lines × 2) crates/ruvix/crates/net/src/icmp.rs:250— crates/ruvix/crates/net/src/icmp.rs:250-267 | crates/ruvix/crates/net/src/ipv4.rs:397-416 — 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 (18–20 lines × 2) crates/ruvllm/src/quantize/pi_quant.rs:970— crates/ruvllm/src/quantize/pi_quant.rs:970-989 | crates/ruvllm/src/quantize/pi_quant.rs:1071-1088 — 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 (19 lines × 3) crates/ruvector-attention-node/src/async_ops.rs:165— crates/ruvector-attention-node/src/async_ops.rs:165-183 | crates/ruvector-attention-node/src/async_ops.rs:220-238 | crates/ruvector-attention-node/src/async_ops.rs:332-350 — 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.
Duplicated block (19 lines × 3) crates/ruvector-postgres/src/graph/sparql/executor.rs:460— crates/ruvector-postgres/src/graph/sparql/executor.rs:460-478 | crates/ruvector-postgres/src/graph/sparql/executor.rs:527-545 | crates/rvlite/src/sparql/executor.rs:404-422 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/executor.rs` and `crates/rvlite/src/sparql/executor.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 557 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 (14–19 lines × 2) crates/ruvector-temporal-tensor/src/persistence.rs:136— crates/ruvector-temporal-tensor/src/persistence.rs:136-154 | crates/ruvector-temporal-tensor/src/persistence.rs:156-169 — 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–19 lines × 2) crates/ruvector-wasm/kernels/rmsnorm.rs:116— crates/ruvector-wasm/kernels/rmsnorm.rs:116-134 | crates/ruvector-wasm/kernels/rmsnorm.rs:204-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 (15–18 lines × 2) crates/ruvector-coherence-hnsw/src/search.rs:215— crates/ruvector-coherence-hnsw/src/search.rs:215-232 | crates/ruvector-coherence-hnsw/src/search.rs:319-333 — 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–18 lines × 2) crates/ruvix/crates/cap/src/optimized.rs:265— crates/ruvix/crates/cap/src/optimized.rs:265-282 | crates/ruvix/crates/cap/src/optimized.rs:290-304 — 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–18 lines × 2) crates/ruvector-postgres/src/sparse/distance.rs:86— crates/ruvector-postgres/src/sparse/distance.rs:86-103 | crates/ruvector-postgres/src/sparse/distance.rs:129-142 — 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–18 lines × 2) crates/ruvector-speculative-ann/src/quantized_draft.rs:37— crates/ruvector-speculative-ann/src/quantized_draft.rs:37-50 | crates/ruvector-speculative-ann/src/quantized_draft.rs:66-83 — 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–17 lines × 4) crates/ruvector-cnn/src/simd/neon.rs:52— crates/ruvector-cnn/src/simd/neon.rs:52-68 | crates/ruvector-core/src/simd_intrinsics.rs:691-707 | crates/ruvector-core/src/simd_intrinsics.rs:764-779 | crates/ruvector-core/src/simd_intrinsics.rs:894-909 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (16–17 lines × 4) crates/ruvllm/src/models/ruvltra.rs:237— crates/ruvllm/src/models/ruvltra.rs:237-253 | crates/ruvllm/src/models/ruvltra.rs:282-297 | crates/ruvllm/src/models/ruvltra.rs:316-331 | crates/ruvllm/src/models/ruvltra_medium.rs:305-321 — before extracting anything, compare `crates/ruvllm/src/models/ruvltra.rs` and `crates/ruvllm/src/models/ruvltra_medium.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–17 lines × 3) crates/ruvector-cnn/src/simd/avx2.rs:335— crates/ruvector-cnn/src/simd/avx2.rs:335-351 | crates/ruvector-cnn/src/simd/avx2.rs:486-500 | crates/ruvector-cnn/src/simd/wasm.rs:249-263 — before extracting anything, compare `crates/ruvector-cnn/src/simd/avx2.rs` and `crates/ruvector-cnn/src/simd/wasm.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–17 lines × 3) crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:171— crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:171-187 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:241-255 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:311-325 — 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.
Duplicated block (16 lines × 4) patches/candle-core-0.8.4/src/tensor.rs:1354— patches/candle-core-0.8.4/src/tensor.rs:1354-1369 | patches/candle-core-0.8.4/src/tensor.rs:1470-1485 | patches/candle-core-0.9.2/src/tensor.rs:1611-1626 | patches/candle-core-0.9.2/src/tensor.rs:1794-1809 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (16 lines × 4) crates/ruvllm/src/hub/registry.rs:157— crates/ruvllm/src/hub/registry.rs:157-174 | crates/ruvllm/src/hub/registry.rs:188-203 | crates/ruvllm/src/hub/registry.rs:217-234 | crates/ruvllm/src/hub/registry.rs:248-263 — 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.
Duplicated block (14–16 lines × 2) crates/prime-radiant/src/simd/vectors.rs:60— crates/prime-radiant/src/simd/vectors.rs:60-75 | crates/prime-radiant/src/simd/vectors.rs:295-308 — 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–16 lines × 2) crates/ruvector-postgres/src/types/halfvec.rs:342— crates/ruvector-postgres/src/types/halfvec.rs:342-357 | crates/ruvector-postgres/src/types/halfvec.rs:463-476 — 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–15 lines × 3) crates/ruvector-attention/src/sheaf/attention.rs:276— crates/ruvector-attention/src/sheaf/attention.rs:276-289 | crates/ruvector-attention/src/sheaf/attention.rs:331-345 | crates/ruvector-attention/src/sheaf/attention.rs:453-467 — 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.
Duplicated block (14–15 lines × 3) crates/ruvector-cnn/src/kernels/int8_avx2.rs:139— crates/ruvector-cnn/src/kernels/int8_avx2.rs:139-152 | crates/ruvector-cnn/src/kernels/int8_neon.rs:126-139 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:132-146 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–15 lines × 3) crates/ruvector-core/src/quantization.rs:463— crates/ruvector-core/src/quantization.rs:463-475 | crates/ruvector-core/src/simd_intrinsics.rs:1284-1298 | crates/ruvector-core/src/simd_intrinsics.rs:1336-1348 — before extracting anything, compare `crates/ruvector-core/src/quantization.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–15 lines × 3) crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:273— crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:273-287 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kivi.rs:302-316 | crates/ruvector-turboquant/src/rotation.rs:197-209 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10–15 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:488— crates/ruvector-core/src/simd_intrinsics.rs:488-502 | crates/ruvector-core/src/simd_intrinsics.rs:705-714 — 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–15 lines × 2) crates/ruvector-hailo-cluster/src/bin/bench.rs:279— crates/ruvector-hailo-cluster/src/bin/bench.rs:279-293 | crates/ruvector-hailo-cluster/src/bin/embed.rs:275-284 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–14 lines × 3) crates/ruvector-attention/src/transport/centroid_ot.rs:164— crates/ruvector-attention/src/transport/centroid_ot.rs:164-176 | crates/ruvector-math/src/optimal_transport/sinkhorn.rs:104-116 | crates/ruvector-math/src/product_manifold/manifold.rs:179-192 — before extracting anything, compare `crates/ruvector-attention/src/transport/centroid_ot.rs` and `crates/ruvector-math/src/optimal_transport/sinkhorn.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 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 (13–14 lines × 3) crates/ruvector-mincut-gated-transformer/src/attention/window.rs:177— crates/ruvector-mincut-gated-transformer/src/attention/window.rs:177-190 | crates/ruvector-mincut-gated-transformer/src/attention/window.rs:339-351 | crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs:433-445 — before extracting anything, compare `crates/ruvector-mincut-gated-transformer/src/attention/window.rs` and `crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 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 (8–14 lines × 3) crates/rvf/rvf-cli/src/cmd/filter.rs:151— crates/rvf/rvf-cli/src/cmd/filter.rs:151-164 | crates/rvf/rvf-cli/src/cmd/freeze.rs:79-86 | crates/rvf/rvf-cli/src/cmd/rebuild_refcounts.rs:155-162 — 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 3 call sites, so a change lands once.
Duplicated block (8–14 lines × 3) scripts/training/evaluate-model.py:69— scripts/training/evaluate-model.py:69-76 | scripts/training/train-deobfuscator-v2.py:122-132 | scripts/training/train-deobfuscator.py:153-166 — 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 3 call sites, so a change lands once.
Duplicated block (11–14 lines × 2) crates/ruvector-core/src/advanced_features/sparse_vector.rs:230— crates/ruvector-core/src/advanced_features/sparse_vector.rs:230-243 | crates/ruvector-core/src/advanced_features/sparse_vector.rs:392-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–14 lines × 2) crates/rvf/rvf-runtime/src/store.rs:2445— crates/rvf/rvf-runtime/src/store.rs:2445-2458 | crates/rvf/rvf-runtime/src/store.rs:2557-2567 — 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–14 lines × 2) crates/ruvector-postgres/src/graph/sparql/functions.rs:483— crates/ruvector-postgres/src/graph/sparql/functions.rs:483-491 | crates/ruvector-postgres/src/graph/sparql/functions.rs:509-522 — 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–14 lines × 2) scripts/training/train-deobfuscator-v2.py:327— scripts/training/train-deobfuscator-v2.py:327-335 | scripts/training/train-deobfuscator.py:331-344 — 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 `scripts/training/train-deobfuscator-v2.py:327` 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 (12–13 lines × 4) crates/ruvector-attention/src/transport/centroid_ot.rs:162— crates/ruvector-attention/src/transport/centroid_ot.rs:162-173 | crates/ruvector-math/src/optimal_transport/sinkhorn.rs:102-113 | crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:193-204 | crates/ruvector-math/src/product_manifold/manifold.rs:177-189 — before extracting anything, compare `crates/ruvector-attention/src/transport/centroid_ot.rs` and `crates/ruvector-math/src/optimal_transport/sinkhorn.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 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 (12–13 lines × 4) crates/ruvllm/src/backends/gemma2.rs:906— crates/ruvllm/src/backends/gemma2.rs:906-918 | crates/ruvllm/src/backends/phi3.rs:775-787 | crates/ruvllm/src/models/ruvltra.rs:1085-1097 | crates/ruvllm/src/models/ruvltra_medium.rs:975-986 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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–13 lines × 3) crates/mcp-brain-server/src/aggregate.rs:22— crates/mcp-brain-server/src/aggregate.rs:22-34 | crates/mcp-brain-server/src/aggregate.rs:146-156 | crates/mcp-brain-server/src/cognitive.rs:98-108 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11–13 lines × 3) crates/ruvllm/src/kernels/attention.rs:906— crates/ruvllm/src/kernels/attention.rs:906-916 | crates/ruvllm/src/kernels/attention.rs:991-1001 | crates/ruvllm/src/kernels/attention.rs:1134-1146 — 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.
Duplicated block (9–13 lines × 2) crates/ruvector-cnn/src/layers/quantized_conv2d.rs:71— crates/ruvector-cnn/src/layers/quantized_conv2d.rs:71-83 | crates/ruvector-cnn/src/layers/quantized_depthwise.rs:70-78 — before extracting anything, compare `crates/ruvector-cnn/src/layers/quantized_conv2d.rs` and `crates/ruvector-cnn/src/layers/quantized_depthwise.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 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 (9–13 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:568— crates/ruvector-core/src/simd_intrinsics.rs:568-580 | crates/ruvector-core/src/simd_intrinsics.rs:815-823 — 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–13 lines × 2) crates/ruvector-graph-transformer/src/physics.rs:386— crates/ruvector-graph-transformer/src/physics.rs:386-398 | crates/ruvector-graph-transformer/src/physics.rs:545-554 — 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–13 lines × 2) crates/ruvector-robotics/src/domain_expansion.rs:166— crates/ruvector-robotics/src/domain_expansion.rs:166-175 | crates/ruvector-robotics/src/domain_expansion.rs:198-210 — 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–12 lines × 5) crates/ruvector-attention/src/transport/cached_projections.rs:69— crates/ruvector-attention/src/transport/cached_projections.rs:69-79 | crates/ruvector-attention/src/transport/centroid_ot.rs:148-158 | crates/ruvector-math/src/optimal_transport/sinkhorn.rs:88-98 | crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:121-132 | crates/ruvector-math/src/product_manifold/manifold.rs:162-173 — before extracting anything, compare `crates/ruvector-attention/src/transport/cached_projections.rs` and `crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 (11–12 lines × 5) crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:108— crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:108-119 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:213-223 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:320-330 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:421-431 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:137-148 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11–12 lines × 4) crates/ruvector-core/src/simd_intrinsics.rs:479— crates/ruvector-core/src/simd_intrinsics.rs:479-490 | crates/ruvector-core/src/simd_intrinsics.rs:523-533 | crates/ruvector-core/src/simd_intrinsics.rs:563-573 | crates/ruvector-core/src/simd_intrinsics.rs:611-621 — 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.
Duplicated block (11–12 lines × 4) crates/ruvector-graph/src/cypher/parser.rs:570— crates/ruvector-graph/src/cypher/parser.rs:570-580 | crates/ruvector-graph/src/cypher/parser.rs:608-619 | crates/rvlite/src/cypher/parser.rs:570-580 | crates/rvlite/src/cypher/parser.rs:608-619 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (10–12 lines × 4) crates/ruvector-kge/src/train/loss.rs:35— crates/ruvector-kge/src/train/loss.rs:35-44 | crates/ruvllm/src/kernels/activations.rs:603-614 | crates/ruvllm/src/kernels/ane_ops.rs:640-651 | crates/ruvllm/src/kernels/attention.rs:1064-1075 — before extracting anything, compare `crates/ruvllm/src/kernels/activations.rs` and `crates/ruvllm/src/kernels/attention.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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–12 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1280— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1280-1291 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1477-1486 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1482-1493 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1743-1752 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (9–12 lines × 3) crates/ruvector-cnn/src/kernels/int8_avx2.rs:155— crates/ruvector-cnn/src/kernels/int8_avx2.rs:155-166 | crates/ruvector-cnn/src/kernels/int8_neon.rs:149-157 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:151-159 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (9–12 lines × 3) crates/ruvector-solver/src/simd.rs:102— crates/ruvector-solver/src/simd.rs:102-113 | crates/ruvector-solver/src/simd.rs:204-212 | crates/ruvector-solver/src/simd.rs:348-356 — 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.
Duplicated block (10–12 lines × 3) crates/ruvector-postgres/src/types/halfvec.rs:350— crates/ruvector-postgres/src/types/halfvec.rs:350-361 | crates/ruvector-postgres/src/types/halfvec.rs:402-411 | crates/ruvector-postgres/src/types/halfvec.rs:470-479 — 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.
Duplicated block (10–12 lines × 3) crates/ruvllm/src/bitnet/backend.rs:3004— crates/ruvllm/src/bitnet/backend.rs:3004-3015 | crates/ruvllm/src/bitnet/backend.rs:3227-3236 | crates/ruvllm/src/bitnet/backend.rs:3295-3304 — 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.
Duplicated block (8–12 lines × 2) crates/ruvector-core/src/simd_intrinsics.rs:104— crates/ruvector-core/src/simd_intrinsics.rs:104-115 | crates/ruvector-core/src/simd_intrinsics.rs:983-990 — 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 (8–12 lines × 2) crates/ruvllm_sparse_attention/src/attention.rs:1131— crates/ruvllm_sparse_attention/src/attention.rs:1131-1138 | crates/ruvllm_sparse_attention/src/attention.rs:1961-1972 — 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 (3–12 lines × 3) crates/ruvllm/src/bitnet/expert_cache.rs:540— crates/ruvllm/src/bitnet/expert_cache.rs:540-551 | crates/ruvllm/src/bitnet/expert_cache.rs:559-561 | crates/ruvllm/src/bitnet/expert_cache.rs:599-610 — 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.
Duplicated block (3–12 lines × 3) crates/ruvllm_sparse_attention/src/attention.rs:329— crates/ruvllm_sparse_attention/src/attention.rs:329-340 | crates/ruvllm_sparse_attention/src/attention.rs:491-493 | crates/ruvllm_sparse_attention/src/attention.rs:1501-1512 — 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.
Duplicated block (8–11 lines × 3) crates/ruvector-cnn/src/contrastive/infonce.rs:365— crates/ruvector-cnn/src/contrastive/infonce.rs:365-375 | crates/ruvector-postgres/src/distance/scalar.rs:42-51 | crates/rvf/rvf-index/src/distance.rs:33-40 — before extracting anything, compare `crates/ruvector-postgres/src/distance/scalar.rs` and `crates/rvf/rvf-index/src/distance.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 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 (8–11 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:132— crates/ruvector-core/src/simd_intrinsics.rs:132-142 | crates/ruvector-core/src/simd_intrinsics.rs:1078-1085 | crates/ruvector-postgres/src/distance/simd.rs:1015-1022 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvector-postgres/src/distance/simd.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 (7–11 lines × 3) crates/ruvector-solver/src/simd.rs:122— crates/ruvector-solver/src/simd.rs:122-130 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:490-500 | crates/rvf/rvf-index/src/distance.rs:129-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (7–11 lines × 3) patches/candle-core-0.8.4/src/quantized/avx.rs:185— patches/candle-core-0.8.4/src/quantized/avx.rs:185-191 | patches/candle-core-0.8.4/src/quantized/avx.rs:394-404 | patches/candle-core-0.8.4/src/quantized/avx.rs:617-623 — 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.
Duplicated block (3–11 lines × 3) crates/ruvector-sparse-inference/src/precision/quantizers.rs:89— crates/ruvector-sparse-inference/src/precision/quantizers.rs:89-91 | crates/ruvector-sparse-inference/src/precision/quantizers.rs:218-228 | crates/ruvector-sparse-inference/src/precision/quantizers.rs:300-310 — 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.
Duplicated block (3–11 lines × 3) crates/ruvllm/src/models/openmythos/attention.rs:205— crates/ruvllm/src/models/openmythos/attention.rs:205-214 | crates/ruvllm/src/models/openmythos/attention.rs:437-439 | crates/ruvllm/src/models/rdt.rs:618-628 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 11) crates/prime-radiant/src/simd/matrix.rs:316— crates/prime-radiant/src/simd/matrix.rs:316-325 | crates/ruvllm/src/backends/gemma2.rs:650-659 | crates/ruvllm/src/backends/phi3.rs:528-537 | crates/ruvllm/src/kernels/matmul.rs:846-855 | crates/ruvllm/src/kernels/matmul.rs:1166-1175 | crates/ruvllm/src/models/ruvltra.rs:655-664 | crates/ruvllm/src/models/ruvltra.rs:850-859 | crates/ruvllm/src/models/ruvltra_medium.rs:654-663 | crates/ruvllm/src/qat/lora_qat.rs:682-691 | crates/ruvllm/src/qat/lora_qat.rs:697-706 | crates/ruvllm/src/qat/lora_qat.rs:711-720 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 × 11) crates/ruvix/crates/boot/src/manifest.rs:652— crates/ruvix/crates/boot/src/manifest.rs:652-661 | crates/rvf/rvf-quant/src/binary.rs:56-65 | crates/rvf/rvf-quant/src/binary.rs:66-75 | crates/rvf/rvf-runtime/src/membership.rs:161-170 | crates/rvf/rvf-runtime/src/read_path.rs:471-480 | crates/rvf/rvf-runtime/src/read_path.rs:525-534 | crates/rvf/rvf-runtime/src/read_path.rs:633-642 | crates/rvf/rvf-server/src/tcp.rs:263-272 | crates/rvf/rvf-server/src/tcp.rs:333-342 | crates/rvf/rvf-wasm/src/lib.rs:479-488 | crates/rvm/crates/rvm-proof/src/lib.rs:198-207 — before extracting anything, compare `crates/ruvix/crates/boot/src/manifest.rs` and `crates/rvf/rvf-runtime/src/read_path.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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 (10 lines × 10) crates/ruvllm_sparse_attention/src/attention.rs:295— crates/ruvllm_sparse_attention/src/attention.rs:295-304 | crates/ruvllm_sparse_attention/src/attention.rs:313-322 | crates/ruvllm_sparse_attention/src/attention.rs:457-466 | crates/ruvllm_sparse_attention/src/attention.rs:475-484 | crates/ruvllm_sparse_attention/src/attention.rs:1143-1152 | crates/ruvllm_sparse_attention/src/attention.rs:1162-1171 | crates/ruvllm_sparse_attention/src/attention.rs:1467-1476 | crates/ruvllm_sparse_attention/src/attention.rs:1485-1494 | crates/ruvllm_sparse_attention/src/attention.rs:1981-1990 | crates/ruvllm_sparse_attention/src/attention.rs:2000-2009 — all 10 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.
Duplicated block (10 lines × 10) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2309— patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2309-2318 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2325-2334 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2341-2350 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2357-2366 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2373-2382 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2389-2398 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2405-2414 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2421-2430 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2437-2446 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2453-2462 — all 10 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.
Duplicated block (9–10 lines × 3) crates/ruvector-core/src/advanced_features/matryoshka.rs:243— crates/ruvector-core/src/advanced_features/matryoshka.rs:243-251 | crates/ruvector-core/src/advanced_features/matryoshka.rs:405-413 | crates/ruvector-core/src/advanced_features/multi_vector.rs:194-203 — before extracting anything, compare `crates/ruvector-core/src/advanced_features/matryoshka.rs` and `crates/ruvector-core/src/advanced_features/multi_vector.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 (9–10 lines × 3) crates/ruvector-delta-wasm/src/apply.rs:81— crates/ruvector-delta-wasm/src/apply.rs:81-90 | crates/ruvector-delta-wasm/src/simd.rs:24-32 | crates/ruvector-delta-wasm/src/simd.rs:59-67 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7–10 lines × 2) crates/ruvector-attention/src/transport/centroid_ot.rs:89— crates/ruvector-attention/src/transport/centroid_ot.rs:89-98 | crates/ruvector-diskann/src/pq.rs:117-123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7–10 lines × 2) crates/ruvector-delta-index/src/lib.rs:242— crates/ruvector-delta-index/src/lib.rs:242-251 | crates/ruvector-delta-index/src/lib.rs:270-276 — 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 (8–9 lines × 6) crates/prime-radiant/src/ruvllm_integration/memory_layer.rs:1024— crates/prime-radiant/src/ruvllm_integration/memory_layer.rs:1024-1032 | crates/ruvector-coherence-hnsw/src/coherence.rs:20-27 | crates/ruvector-maxsim/src/score.rs:19-26 | crates/ruvector-maxsim/src/score.rs:92-99 | crates/ruvector-temporal-tensor/src/agentdb.rs:78-86 | crates/rvAgent/rvagent-middleware/src/hnsw.rs:172-180 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8–9 lines × 6) crates/ruvector-cnn/src/simd/neon.rs:21— crates/ruvector-cnn/src/simd/neon.rs:21-29 | crates/ruvector-core/src/simd_intrinsics.rs:655-663 | crates/ruvector-core/src/simd_intrinsics.rs:735-742 | crates/ruvector-core/src/simd_intrinsics.rs:804-811 | crates/ruvector-core/src/simd_intrinsics.rs:864-871 | crates/ruvllm/src/kernels/matmul.rs:1187-1195 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (9 lines × 5) crates/rvAgent/rvagent-mcp/src/client.rs:35— crates/rvAgent/rvagent-mcp/src/client.rs:35-43 | crates/rvAgent/rvagent-mcp/src/client.rs:71-79 | crates/rvAgent/rvagent-mcp/src/client.rs:98-106 | crates/rvAgent/rvagent-mcp/src/client.rs:119-127 | crates/rvAgent/rvagent-mcp/src/client.rs:139-147 — all 5 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.
Duplicated block (9 lines × 5) crates/ruvector-py/src/cluster.rs:75— crates/ruvector-py/src/cluster.rs:75-83 | crates/ruvector-py/src/gnn.rs:149-157 | crates/ruvector-py/src/gnn.rs:369-377 | crates/ruvector-py/src/hnsw.rs:256-264 | crates/ruvector-py/src/rabitq.rs:412-420 — before extracting anything, compare `crates/ruvector-py/src/hnsw.rs` and `crates/ruvector-py/src/rabitq.rs` 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.
Duplicated block (7–9 lines × 3) crates/ruvector-math/src/information_geometry/fisher.rs:71— crates/ruvector-math/src/information_geometry/fisher.rs:71-79 | crates/ruvector-math/src/information_geometry/kfac.rs:89-95 | crates/ruvector-math/src/information_geometry/kfac.rs:102-108 — before extracting anything, compare `crates/ruvector-math/src/information_geometry/fisher.rs` and `crates/ruvector-math/src/information_geometry/kfac.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 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 (7–9 lines × 3) crates/ruvector-solver-wasm/src/lib.rs:483— crates/ruvector-solver-wasm/src/lib.rs:483-491 | crates/ruvector-solver/src/cg.rs:325-332 | crates/ruvector-solver/src/neumann.rs:456-462 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (8 lines × 7) crates/ruvector-graph-transformer-node/src/lib.rs:111— crates/ruvector-graph-transformer-node/src/lib.rs:111-118 | crates/ruvector-graph-transformer-node/src/lib.rs:174-182 | crates/ruvector-graph-transformer-node/src/lib.rs:234-242 | crates/ruvector-graph-transformer-node/src/lib.rs:300-308 | crates/ruvector-graph-transformer-node/src/lib.rs:344-352 | crates/ruvector-graph-transformer-node/src/lib.rs:473-481 | crates/ruvector-graph-transformer-node/src/lib.rs:510-518 — all 7 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.
Duplicated block (8 lines × 7) crates/photonlayer-bench/src/decoder.rs:39— crates/photonlayer-bench/src/decoder.rs:39-46 | crates/prime-radiant/src/coherence/spectral.rs:561-568 | crates/ruvector-bench/src/lib.rs:125-132 | crates/ruvector-cnn/src/lib.rs:284-291 | crates/ruvector-memory-admission/src/dataset.rs:131-138 | crates/ruvector-namespace-merge/src/dataset.rs:166-173 | crates/ruvllm/src/qat/reasoning_loss.rs:412-419 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times.
Duplicated block (6–8 lines × 2) crates/emergent-time/src/agentic_time.rs:585— crates/emergent-time/src/agentic_time.rs:585-590 | crates/emergent-time/src/weight_learning.rs:170-177 — before extracting anything, compare `crates/emergent-time/src/agentic_time.rs` and `crates/emergent-time/src/weight_learning.rs` as WHOLE FILES: this scan already matched 5 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 (6–8 lines × 2) crates/ruvllm/src/metal/context.rs:214— crates/ruvllm/src/metal/context.rs:214-221 | crates/ruvllm/src/metal/context.rs:270-275 — 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 (7 lines × 5) crates/ruvector-cnn/src/simd/neon.rs:22— crates/ruvector-cnn/src/simd/neon.rs:22-29 | crates/ruvector-core/src/simd_intrinsics.rs:656-663 | crates/ruvector-core/src/simd_intrinsics.rs:736-742 | crates/ruvector-core/src/simd_intrinsics.rs:865-871 | crates/ruvllm/src/kernels/norm.rs:230-237 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (7 lines × 5) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1176— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1176-1182 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1366-1372 | patches/candle-core-0.8.4/src/quantized/simd128.rs:184-190 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1378-1384 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1632-1638 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.8.4/src/quantized/simd128.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 (4–7 lines × 4) crates/ruvector-attention-node/src/async_ops.rs:145— crates/ruvector-attention-node/src/async_ops.rs:145-151 | crates/ruvector-attention-node/src/async_ops.rs:199-205 | crates/ruvector-attention-node/src/async_ops.rs:279-285 | crates/ruvector-gnn-node/src/lib.rs:375-378 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (4–7 lines × 4) crates/ruvector-core/src/agenticdb.rs:380— crates/ruvector-core/src/agenticdb.rs:380-386 | crates/ruvector-core/src/agenticdb.rs:476-482 | crates/ruvector-core/src/agenticdb.rs:588-594 | crates/ruvector-core/src/agenticdb.rs:695-698 — 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.
Duplicated block (5–7 lines × 3) crates/emergent-time/src/real_matrix.rs:194— crates/emergent-time/src/real_matrix.rs:194-200 | crates/emergent-time/src/real_matrix.rs:201-207 | crates/emergent-time/src/real_matrix.rs:208-212 — 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.
Duplicated block (5–7 lines × 3) crates/ruvllm/src/training/real_trainer.rs:345— crates/ruvllm/src/training/real_trainer.rs:345-349 | crates/ruvllm/src/training/real_trainer.rs:351-357 | crates/ruvllm/src/training/real_trainer.rs:360-366 — 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.
Duplicated block (6 lines × 8) crates/ruvllm/src/metal/context.rs:471— crates/ruvllm/src/metal/context.rs:471-476 | crates/ruvllm/src/metal/context.rs:546-551 | crates/ruvllm/src/metal/context.rs:615-620 | crates/ruvllm/src/metal/context.rs:680-685 | crates/ruvllm/src/metal/context.rs:728-733 | crates/ruvllm/src/metal/context.rs:797-802 | crates/ruvllm/src/metal/context.rs:887-892 | crates/ruvllm/src/metal/context.rs:960-965 — all 8 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.
Duplicated block (6 lines × 8) crates/ruvector-raft/src/rpc.rs:79— crates/ruvector-raft/src/rpc.rs:79-84 | crates/ruvector-raft/src/rpc.rs:138-143 | crates/ruvector-raft/src/rpc.rs:187-192 | crates/ruvector-raft/src/rpc.rs:229-234 | crates/ruvector-raft/src/rpc.rs:296-301 | crates/ruvector-raft/src/rpc.rs:343-348 | crates/ruvector-raft/src/rpc.rs:382-387 | crates/ruvector-raft/src/state.rs:102-107 — there are 8 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (4–6 lines × 3) crates/mcp-brain/src/embed.rs:312— crates/mcp-brain/src/embed.rs:312-317 | crates/ruvector-attention/src/curvature/fused_attention.rs:269-274 | scripts/seed-brain.rs:255-258 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (4–6 lines × 3) crates/ruvector-spann/src/index.rs:53— crates/ruvector-spann/src/index.rs:53-56 | crates/ruvector-spann/src/index.rs:229-234 | crates/ruvector-spann/src/index.rs:342-347 — 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.
Duplicated block (1–6 lines × 12) crates/mcp-brain/src/embed.rs:408— crates/mcp-brain/src/embed.rs:408-413 | crates/prime-radiant/src/attention/adapter.rs:166-166 | crates/prime-radiant/src/attention/diffusion.rs:250-250 | crates/prime-radiant/src/attention/topology.rs:229-229 | crates/ruvector-attention/src/topology/coherence.rs:266-266 | crates/ruvector-cnn-wasm/src/lib.rs:170-170 | crates/ruvector-crv/src/stage_ii.rs:172-177 | crates/ruvector-diverse-beam/src/lib.rs:64-64 | crates/ruvector-query-cache/src/lib.rs:110-110 | crates/ruvector-spann/src/distance.rs:23-23 | crates/ruvllm-wasm/src/hnsw_router.rs:302-302 | crates/ruvllm/src/qat/reasoning_loss.rs:396-396 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 12 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 12 times.
Duplicated block (1–6 lines × 12) crates/ruvector-fpga-transformer/src/backend/native_sim.rs:283— crates/ruvector-fpga-transformer/src/backend/native_sim.rs:283-283 | crates/ruvector-fpga-transformer/src/backend/native_sim.rs:284-284 | crates/ruvector-fpga-transformer/src/backend/native_sim.rs:450-450 | crates/ruvector-fpga-transformer/src/backend/native_sim.rs:451-451 | crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs:287-287 | crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs:288-288 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:458-459 | crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:469-470 | crates/ruvector-sparse-inference/src/ops.rs:204-204 | crates/ruvector-sparse-inference/src/ops.rs:205-205 | crates/ruvllm/src/training/grpo.rs:289-297 | crates/ruvllm/src/training/grpo.rs:461-466 — before extracting anything, compare `crates/ruvector-fpga-transformer/src/backend/native_sim.rs` and `crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 × 10) crates/prime-radiant/src/attention/adapter.rs:200— crates/prime-radiant/src/attention/adapter.rs:200-204 | crates/ruvector-attention/src/curvature/fused_attention.rs:326-330 | crates/ruvector-attention/src/graph/dual_space.rs:257-261 | crates/ruvector-attention/src/graph/rope.rs:184-188 | crates/ruvector-attention/src/pde_attention/diffusion.rs:230-234 | crates/ruvector-attention/src/sheaf/attention.rs:356-360 | crates/ruvector-attention/src/sheaf/attention.rs:478-482 | crates/ruvector-attention/src/topology/gated_attention.rs:288-292 | crates/ruvector-attention/src/transport/centroid_ot.rs:335-339 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:324-328 — before extracting anything, compare `crates/prime-radiant/src/attention/adapter.rs` and `crates/ruvector-attention/src/curvature/fused_attention.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (5 lines × 10) patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2304— patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2304-2308 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2320-2324 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2336-2340 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2352-2356 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2368-2372 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2384-2388 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2400-2404 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2416-2420 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2432-2436 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2448-2452 — all 10 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.
Duplicated block (2–5 lines × 3) crates/ruvector-attention/src/attention/multi_head.rs:86— crates/ruvector-attention/src/attention/multi_head.rs:86-90 | crates/ruvector-gnn/src/layer.rs:150-154 | crates/ruvector-postgres/src/attention/multi_head.rs:142-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (2–5 lines × 3) crates/ruvector-edge-index/src/persist/mod.rs:157— crates/ruvector-edge-index/src/persist/mod.rs:157-158 | crates/ruvix/crates/region/src/immutable.rs:232-236 | crates/rvm/crates/rvm-boot/src/entry.rs:227-231 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
R10 · Code Duplication· Duplicated block with local edits (46 matched lines × 2 locations) · ×2
Duplicated block with local edits (46 matched lines × 2 locations) npm/packages/kge/src/cli/args.ts:9— npm/packages/kge/src/cli/args.ts:9 · npm/packages/typesafe/src/cli/args.ts:9 — the two spans are one implementation copied and then locally edited — 365 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (46 matched lines × 2 locations) npm/packages/ruvector/src/decompiler/statement-parser.js:191— npm/packages/ruvector/src/decompiler/statement-parser.js:191 · REDACTED:117 — the two spans are one implementation copied and then locally edited — 290 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (38 matched lines × 2 locations) · ×2
Duplicated block with local edits (38 matched lines × 2 locations) npm/packages/agentic-synth/src/generators/events.ts:61— npm/packages/agentic-synth/src/generators/events.ts:61 · npm/packages/agentic-synth/src/generators/timeseries.ts:62 — the two spans are one implementation copied and then locally edited — 251 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (38 matched lines × 2 locations) npm/packages/kge/index.js:24— npm/packages/kge/index.js:24 · npm/packages/typesafe/index.js:24 — the two spans are one implementation copied and then locally edited — 217 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (30 lines × 2 locations) npm/packages/graph-data-generator/bin/cli.js:27— npm/packages/graph-data-generator/bin/cli.js:27 · npm/packages/graph-data-generator/bin/cli.js:146 — 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 (30 lines × 2 locations) npm/packages/router/index.js:20— npm/packages/router/index.js:20 · npm/packages/tiny-dancer/index.js:48 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (29 lines × 2 locations) npm/packages/rvforge/src/config.ts:59— npm/packages/rvforge/src/config.ts:59 · npm/packages/rvforge/src/project.ts:226 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (29 lines × 2 locations) REDACTED:123— REDACTED:123 · REDACTED:173 — 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 (28 lines × 2 locations) npm/packages/graph-data-generator/src/generators/entity-relationships.ts:47— npm/packages/graph-data-generator/src/generators/entity-relationships.ts:47 · npm/packages/graph-data-generator/src/generators/knowledge-graph.ts:72 — the 2 copies are spread across 2 files, 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 (28 lines × 2 locations) npm/packages/rudag/src/dag.ts:529— npm/packages/rudag/src/dag.ts:529 · npm/packages/rudag/src/dag.ts:564 — 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.
Dead file (~392 LoC) npm/packages/agentic-synth/training/openrouter-training-fixed.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~392 LoC) npm/packages/postgres-cli/src/commands/hyperbolic.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~311 LoC) npm/packages/postgres-cli/src/commands/sparse.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~311 LoC) npm/packages/ruvector/src/workers/benchmark.ts— no import path from any entry point (392 application, 346 tooling, 243 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (npm/packages/ruvector/src/workers/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
`async` callback passed to `forEach` ui/ruvocal/src/routes/api/v2/export/+REDACTED:61— `forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape.
`async` callback passed to `forEach` ui/ruvocal/scripts/populate.ts:155— `forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape.
X29 · Per-element action decided by a fixed element· Per-element action decided by a fixed element · ×2
Per-element action decided by a fixed element crates/ruvllm/src/reasoning_bank/pattern_store.rs:744— This loop runs once per element of `patterns`, and the statement it guards acts on the element it is on — `patterns[j]`. The test deciding whether that statement runs does not: `let Some(target) = p.get_mut(& patterns[i].id)` reads `patterns[i]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out.
Per-element action decided by a fixed element crates/ruvector-postgres/src/learning/reasoning_bank.rs:119— This loop runs once per element of `patterns`, and the statement it guards acts on the element it is on — `patterns[j]`. The test deciding whether that statement runs does not: `let Some(mut entry_i) = self.patterns.get_mut(& patterns[i] .0)` reads `patterns[i]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out.
AC1 · Text alternatives· <video> without a captions track · ×1
<video> without a captions track ui/ruvocal/src/lib/components/chat/UploadedFile.svelte:166— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC4 · Keyboard semantics· Link used as a button (placeholder href) · ×1
Link used as a button (placeholder href) crates/mcp-brain-server/static/index.html:1022— An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
Low contrast Tailwind colour pair (1.0:1) ui/ruvocal/src/lib/components/chat/VoiceRecorder.svelte:193— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
ruvector_cli::main (cyclomatic 52) crates/ruvector-cli/src/main.rs:148— ruvector_cli::main has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ArenaCactus::build_from_compact_graph (cyclomatic 47) crates/cognitum-gate-kernel/src/canonical_witness.rs:138— ArenaCactus::build_from_compact_graph has cyclomatic complexity 47 (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.
Tokenizer::next_token (cyclomatic 46) crates/rvlite/src/sql/parser.rs:169— Tokenizer::next_token has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ruos_thermal::main (cyclomatic 39) crates/ruos-thermal/src/main.rs:17— ruos_thermal::main has cyclomatic complexity 39 (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.
benchmark (cyclomatic 38) crates/micro-hnsw-wasm/benchmark.js:10— benchmark has cyclomatic complexity 38 (threshold 15). 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.
splitMegaStatement (cyclomatic 37) REDACTED:217— splitMegaStatement has cyclomatic complexity 37 (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.
DevelopmentalProgram::grow_step (cyclomatic 36) crates/ruvector-graph-transformer/src/self_organizing.rs:242— DevelopmentalProgram::grow_step has cyclomatic complexity 36 (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.
TensorNameMapper::categorize (cyclomatic 36) crates/ruvllm/src/gguf/loader.rs:349— TensorNameMapper::categorize has cyclomatic complexity 36 (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.
StreamIngest::query_with (cyclomatic 34) crates/rvf/rvf-runtime/src/progressive_stream/ingest/query.rs:126— StreamIngest::query_with has cyclomatic complexity 34 (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.
Lexer::next_token (cyclomatic 34) crates/rvlite/src/cypher/lexer.rs:405— Lexer::next_token has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Lexer::scan_identifier (cyclomatic 39) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
SemanticAnalyzer::analyze_expression (cyclomatic 33) crates/ruvector-graph/src/cypher/semantic.rs:434— SemanticAnalyzer::analyze_expression has cyclomatic complexity 33 (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.
GeoMipPhiEngine::compute_phi (cyclomatic 32) crates/ruvector-consciousness/src/geomip.rs:181— GeoMipPhiEngine::compute_phi has cyclomatic complexity 32 (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.
validate_release.validate (cyclomatic 31) python/portfolio/validate_release.py:14— validate_release.validate 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.
ProblemDetector::detect_problems (cyclomatic 30) crates/ruvector-postgres/src/healing/detector.rs:422— ProblemDetector::detect_problems has cyclomatic complexity 30 (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.
HybridPipeline::route_operation (cyclomatic 30) crates/ruvllm/src/backends/hybrid_pipeline.rs:468— HybridPipeline::route_operation has cyclomatic complexity 30 (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.
FirestoreClient::firestore_list_checked (cyclomatic 29) crates/mcp-brain-server/src/store.rs:374— FirestoreClient::firestore_list_checked has cyclomatic complexity 29 (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.
ruvllm_cli::commands::chat::handle_command (cyclomatic 29) crates/ruvllm-cli/src/commands/chat.rs:461— ruvllm_cli::commands::chat::handle_command has cyclomatic complexity 29 (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.
StreamVerifier::on_chunk (cyclomatic 29) crates/rvf/rvf-wire/src/stream/verifier.rs:412— StreamVerifier::on_chunk has cyclomatic complexity 29 (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.
parseTopLevelStatements (cyclomatic 28) npm/packages/ruvector/src/decompiler/statement-parser.js:27— parseTopLevelStatements has cyclomatic complexity 28 (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.
MobileNetV3Large::process_inverted_residual (cyclomatic 27) crates/ruvector-cnn/src/backbone/mobilenet.rs:349— MobileNetV3Large::process_inverted_residual has cyclomatic complexity 27 (threshold 15). 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.
MinCutGatedAttention::compute_min_cut (cyclomatic 26) crates/ruvector-dag/src/attention/mincut_gated.rs:43— MinCutGatedAttention::compute_min_cut has cyclomatic complexity 26 (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.
MemSqlStore::run (cyclomatic 26) crates/ruvector-edge-store/src/mem_store/mod.rs:133— MemSqlStore::run has cyclomatic complexity 26 (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.
ruvllm_retrieval_diffusion::sample_logits (cyclomatic 26) crates/ruvllm_retrieval_diffusion/src/lib.rs:199— ruvllm_retrieval_diffusion::sample_logits 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.
DiskAnnIndex::load_impl (cyclomatic 25) crates/ruvector-diskann/src/index.rs:473— DiskAnnIndex::load_impl has cyclomatic complexity 25 (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.
evaluate-model.evaluate (cyclomatic 25) scripts/training/evaluate-model.py:123— evaluate-model.evaluate has cyclomatic complexity 25 (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.
decompileGguf::readValue (cyclomatic 25) npm/packages/ruvector/src/decompiler/model-decompiler.js:60— decompileGguf::readValue has cyclomatic complexity 25 (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.
BrainTrainer::discover_space (cyclomatic 24) crates/mcp-brain-server/src/trainer.rs:242— BrainTrainer::discover_space 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.
ruvector_sota_bench::bin::sota_all::main (cyclomatic 24) crates/ruvector-sota-bench/src/bin/sota_all.rs:104— ruvector_sota_bench::bin::sota_all::main 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.
AgentGraph::run (cyclomatic 24) crates/rvAgent/rvagent-core/src/graph.rs:247— AgentGraph::run has cyclomatic complexity 24 (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.
inferPurpose (cyclomatic 24) npm/packages/ruvector/src/decompiler/style-improver.js:302— inferPurpose has cyclomatic complexity 24 (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.
RoadRouter::route (cyclomatic 23) crates/ruvector-mincut/src/routing/mod.rs:384— RoadRouter::route 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.
Supervisor.run (cyclomatic 23) REDACTED:129— Supervisor.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.
resume_release.validate_archive (cyclomatic 23) REDACTED:154— resume_release.validate_archive 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.
inferParamType (cyclomatic 23) npm/packages/ruvector/src/decompiler/style-improver.js:361— inferParamType has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
micro_hnsw_wasm::search (cyclomatic 22) crates/micro-hnsw-wasm/src/lib.rs:313— micro_hnsw_wasm::search 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.
FlashAttention3::forward (cyclomatic 22) crates/ruvector-attention/src/attention/flash.rs:168— FlashAttention3::forward 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.
DeltaAwareTraversal::neighbors (cyclomatic 22) crates/ruvector-delta-graph/src/traversal.rs:251— DeltaAwareTraversal::neighbors 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.
PayloadIndex::remove (cyclomatic 22) crates/ruvector-filter/src/index.rs:117— PayloadIndex::remove 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.
ruvector_mincut_gated_transformer::spectral::lanczos_sparse (cyclomatic 22) crates/ruvector-mincut-gated-transformer/src/spectral.rs:557— ruvector_mincut_gated_transformer::spectral::lanczos_sparse has cyclomatic complexity 22 (threshold 15). 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.
RuvltraQuantizer::quantize_tensor (cyclomatic 22) crates/ruvllm/src/quantize/ruvltra_quant.rs:952— RuvltraQuantizer::quantize_tensor has cyclomatic complexity 22 (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.
sonic_ct::organ::detect_organs (cyclomatic 22) crates/sonic-ct/src/organ.rs:119— sonic_ct::organ::detect_organs 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.
ruvector_consciousness::rsvd_emergence::randomized_svd (cyclomatic 21) crates/ruvector-consciousness/src/rsvd_emergence.rs:44— ruvector_consciousness::rsvd_emergence::randomized_svd has cyclomatic complexity 21 (threshold 15). 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.
CrvSessionManager::find_convergence (cyclomatic 21) crates/ruvector-crv/src/session.rs:263— CrvSessionManager::find_convergence 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.
ProductQuantizer::train (cyclomatic 21) crates/ruvector-diskann/src/pq.rs:46— ProductQuantizer::train has cyclomatic complexity 21 (threshold 15). 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.
ToolOrchestrationDomain::score_orchestration (cyclomatic 21) crates/ruvector-domain-expansion/src/tool_orchestration.rs:394— ToolOrchestrationDomain::score_orchestration 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.
ruvector_graph_condense::cutloss::cut_and_ortho (cyclomatic 21) crates/ruvector-graph-condense/src/cutloss.rs:275— ruvector_graph_condense::cutloss::cut_and_ortho has cyclomatic complexity 21 (threshold 15). 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.
ApproxMinCut::stoer_wagner (cyclomatic 21) crates/ruvector-mincut/src/algorithm/approximate.rs:450— ApproxMinCut::stoer_wagner 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.
TensorInfo::tensor_type (cyclomatic 21) crates/ruvllm/src/gguf/tensors.rs:86— TensorInfo::tensor_type 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.
ErrorCategory::classify (cyclomatic 21) crates/ruvllm/src/reflection/error_recovery.rs:250— ErrorCategory::classify 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.
rvagent_backends::gemini::sanitize_schema (cyclomatic 21) crates/rvAgent/rvagent-backends/src/gemini.rs:573— rvagent_backends::gemini::sanitize_schema has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
rvf_cli::cmd::verify_attestation::run (cyclomatic 21) crates/rvf/rvf-cli/src/cmd/verify_attestation.rs:85— rvf_cli::cmd::verify_attestation::run 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.
photonlayer_bench::privacy::ridge_least_squares (cyclomatic 20) crates/photonlayer-bench/src/privacy.rs:54— photonlayer_bench::privacy::ridge_least_squares has cyclomatic complexity 20 (threshold 15). 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.
MinCutRetriever::retrieve (cyclomatic 20) crates/ruvector-bounded-rag/src/lib.rs:454— MinCutRetriever::retrieve 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.
FilterExpression::evaluate (cyclomatic 20) crates/ruvector-core/src/advanced_features/filtered_search.rs:55— FilterExpression::evaluate 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.
EntropyScaledEf::search (cyclomatic 20) crates/ruvector-entropy-ann/src/search.rs:338— EntropyScaledEf::search 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.
AdaptiveRadixTree::insert_recursive (cyclomatic 20) crates/ruvector-graph/src/optimization/adaptive_radix.rs:39— AdaptiveRadixTree::insert_recursive 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.
AdjSnapshot::global_mincut_value (cyclomatic 20) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:145— AdjSnapshot::global_mincut_value 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.
ruvector_retrieval_receipt::bin::benchmark::main (cyclomatic 20) crates/ruvector-retrieval-receipt/src/bin/benchmark.rs:535— ruvector_retrieval_receipt::bin::benchmark::main 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.
ConsoleFilter::matches (cyclomatic 20) crates/ruvix/qemu-swarm/src/console.rs:193— ConsoleFilter::matches 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.
VecParse::feed (cyclomatic 20) crates/rvf/rvf-runtime/src/progressive_stream/vectors.rs:219— VecParse::feed 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.
ParsedSeed::parse_manifest (cyclomatic 20) crates/rvf/rvf-runtime/src/qr_seed.rs:519— ParsedSeed::parse_manifest 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.
Phantom::build_slice (cyclomatic 20) crates/sonic-ct/src/phantom.rs:95— Phantom::build_slice 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.
build-optimal-dataset.semantic_context (cyclomatic 20) scripts/training/build-optimal-dataset.py:54— build-optimal-dataset.semantic_context 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.
splitModules (cyclomatic 20) REDACTED:300— splitModules 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.
decompileSource (cyclomatic 20) REDACTED:157— decompileSource 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.
ruvector_edge_authz::confidential::authenticate (cyclomatic 19) crates/ruvector-edge-authz/src/confidential.rs:227— ruvector_edge_authz::confidential::authenticate has cyclomatic complexity 19 (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.
VectorShard::plan_upsert (cyclomatic 19) crates/ruvector-edge-store/src/shard/write.rs:129— VectorShard::plan_upsert has cyclomatic complexity 19 (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.
GameTheoreticAttention::compute (cyclomatic 19) crates/ruvector-graph-transformer/src/economic.rs:71— GameTheoreticAttention::compute 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.
SpectralClustering::kmeans (cyclomatic 19) crates/ruvector-math/src/spectral/clustering.rs:210— SpectralClustering::kmeans has cyclomatic complexity 19 (threshold 15). 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.
AttractorDynamics::karger_contract_fast (cyclomatic 19) crates/ruvector-mincut/src/snn/attractor.rs:416— AttractorDynamics::karger_contract_fast has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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.
SubpolynomialMinCut::build_level (cyclomatic 19) crates/ruvector-mincut/src/subpolynomial/mod.rs:476— SubpolynomialMinCut::build_level 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.
ruvector_solver_wasm::analyze_sparsity (cyclomatic 19) crates/ruvector-solver-wasm/src/lib.rs:349— ruvector_solver_wasm::analyze_sparsity 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.
AgentRouter::classify_task (cyclomatic 19) crates/ruvllm/src/claude_flow/agent_router.rs:200— AgentRouter::classify_task has cyclomatic complexity 19 (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.
ModelSelector::apply_criteria (cyclomatic 19) crates/ruvllm/src/claude_flow/model_router.rs:935— ModelSelector::apply_criteria has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
KvCacheF16::decode_step_f16 (cyclomatic 19) crates/ruvllm_sparse_attention/src/attention.rs:1908— KvCacheF16::decode_step_f16 has cyclomatic complexity 19 (threshold 15). 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.
ruvllm_sparse_attention::attention::build_landmark_candidates (cyclomatic 19) crates/ruvllm_sparse_attention/src/attention.rs:656— ruvllm_sparse_attention::attention::build_landmark_candidates 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.
StreamClient::run (cyclomatic 19) crates/rvf/rvf-runtime/src/progressive_stream/client.rs:149— StreamClient::run 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.
MinCutBridge::find_min_cut (cyclomatic 19) crates/rvm/crates/rvm-coherence/src/mincut.rs:112— MinCutBridge::find_min_cut 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.
llamaindex._match_filter_value (cyclomatic 19) crates/ruvector-py/python/ruvector/integrations/llamaindex.py:116— llamaindex._match_filter_value has cyclomatic complexity 19 (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.
convert_weights.main (cyclomatic 19) crates/timesfm/scripts/convert_weights.py:291— convert_weights.main has cyclomatic complexity 19 (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.
hasBraceBalance (cyclomatic 19) REDACTED:171— hasBraceBalance 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.
createRuField (cyclomatic 19) npm/packages/mincut-wasm/routing/client.mjs:51— createRuField has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HierarchicalPhiEngine::compute_phi (cyclomatic 18) crates/ruvector-consciousness/src/phi.rs:721— HierarchicalPhiEngine::compute_phi 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.
GraphCoarsener::aggregate_features (cyclomatic 18) crates/ruvector-graph-transformer/src/self_organizing.rs:612— GraphCoarsener::aggregate_features has cyclomatic complexity 18 (threshold 15). 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.
ReplacementEdgeIndex::find_components_after_cut (cyclomatic 18) crates/ruvector-mincut/src/algorithm/replacement.rs:184— ReplacementEdgeIndex::find_components_after_cut 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.
DeterministicLocalKCut::deterministic_bfs (cyclomatic 18) crates/ruvector-mincut/src/localkcut/paper_impl.rs:259— DeterministicLocalKCut::deterministic_bfs 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.
ruvector_mincut::canonical::source_anchored::canonical_mincut (cyclomatic 18) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:530— ruvector_mincut::canonical::source_anchored::canonical_mincut 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.
MincutComputer::compute_algebraic_connectivity (cyclomatic 18) crates/ruvector-postgres/src/integrity/mincut.rs:286— MincutComputer::compute_algebraic_connectivity has cyclomatic complexity 18 (threshold 15). 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.
FactorSet::from_data (cyclomatic 18) crates/ruvector-temporal-tensor/src/delta.rs:254— FactorSet::from_data has cyclomatic complexity 18 (threshold 15). 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.
IntelligentContextManager::prepare_context (cyclomatic 18) crates/ruvllm/src/context/context_manager.rs:408— IntelligentContextManager::prepare_context 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.
JsonSchemaValidator::validate_against_schema (cyclomatic 18) crates/ruvllm/src/quality/validators.rs:267— JsonSchemaValidator::validate_against_schema 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.
rvf_server::stream::body (cyclomatic 18) crates/rvf/rvf-server/src/stream.rs:438— rvf_server::stream::body 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_health.failed_base_checks (cyclomatic 18) scripts/research-gate/base_health.py:85— base_health.failed_base_checks 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.
preflight_scan.main (cyclomatic 18) scripts/research-gate/preflight_scan.py:58— preflight_scan.main 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.
isStatementBoundaryAfterBrace (cyclomatic 18) npm/packages/ruvector/src/decompiler/statement-parser.js:132— isStatementBoundaryAfterBrace 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.
EscalationLadder::run (cyclomatic 17) crates/mcp-gate/src/monitor/mod.rs:305— EscalationLadder::run 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.
RiskGate::evaluate (cyclomatic 17) crates/neural-trader-strategies/src/risk.rs:130— RiskGate::evaluate has cyclomatic complexity 17 (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.
IncoherenceIsolator::find_isolated_regions (cyclomatic 17) crates/prime-radiant/src/mincut/mod.rs:253— IncoherenceIsolator::find_isolated_regions 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.
SheafSubgraph::from_graph (cyclomatic 17) crates/prime-radiant/src/substrate/mod.rs:150— SheafSubgraph::from_graph 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.
RingAttention::ring_forward (cyclomatic 17) crates/ruvector-attention/src/attention/flash.rs:361— RingAttention::ring_forward 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.
InfoNCELoss::forward_detailed (cyclomatic 17) crates/ruvector-cnn/src/contrastive/infonce.rs:138— InfoNCELoss::forward_detailed 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.
VectorDB::new (cyclomatic 17) crates/ruvector-core/src/vector_db.rs:106— VectorDB::new 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.
ruvector_core::advanced_features::product_quantization::kmeans_clustering (cyclomatic 17) crates/ruvector-core/src/advanced_features/product_quantization.rs:341— ruvector_core::advanced_features::product_quantization::kmeans_clustering has cyclomatic complexity 17 (threshold 15). 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.
StageIIIEncoder::encode_element (cyclomatic 17) crates/ruvector-crv/src/stage_iii.rs:42— StageIIIEncoder::encode_element has cyclomatic complexity 17 (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.
GraphState::apply_delta (cyclomatic 17) crates/ruvector-delta-graph/src/lib.rs:404— GraphState::apply_delta has cyclomatic complexity 17 (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.
ruvector_edge_analytics::cost::certificate (cyclomatic 17) crates/ruvector-edge-analytics/src/cost.rs:113— ruvector_edge_analytics::cost::certificate 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.
ResourceUrl::parse (cyclomatic 17) crates/ruvector-edge-auth/src/resource.rs:38— ResourceUrl::parse has cyclomatic complexity 17 (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.
HnswIndex::compact (cyclomatic 17) crates/ruvector-edge-index/src/hnsw/compact.rs:76— HnswIndex::compact 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.
InhibitionStrategy::apply (cyclomatic 17) crates/ruvector-graph-transformer/src/biological.rs:167— InhibitionStrategy::apply 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.
GaugeEquivariantMP::forward (cyclomatic 17) crates/ruvector-graph-transformer/src/physics.rs:345— GaugeEquivariantMP::forward has cyclomatic complexity 17 (threshold 15). 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.
ruvector_hnsw_repair::strategy::repair_one (cyclomatic 17) crates/ruvector-hnsw-repair/src/strategy.rs:139— ruvector_hnsw_repair::strategy::repair_one 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.
KFACLayer::update (cyclomatic 17) crates/ruvector-math/src/information_geometry/kfac.rs:75— KFACLayer::update has cyclomatic complexity 17 (threshold 15). 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.
SpikeTrain::cross_correlation (cyclomatic 17) crates/ruvector-mincut/src/snn/neuron.rs:363— SpikeTrain::cross_correlation has cyclomatic complexity 17 (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.
NapiSolver::pagerank (cyclomatic 17) crates/ruvector-solver-node/src/lib.rs:826— NapiSolver::pagerank has cyclomatic complexity 17 (threshold 15). 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.
ruvector_typesafe_core::limits::validate (cyclomatic 17) crates/ruvector-typesafe-core/src/limits.rs:12— ruvector_typesafe_core::limits::validate 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.
HooksIntegration::fallback_routing (cyclomatic 17) crates/ruvllm/src/claude_flow/hooks_integration.rs:908— HooksIntegration::fallback_routing has cyclomatic complexity 17 (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.
ToolDatasetGenerator::generate_param_value (cyclomatic 17) crates/ruvllm/src/training/tool_dataset.rs:653— ToolDatasetGenerator::generate_param_value 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. This is NOT this file's highest cyclomatic complexity: ToolCategory::name (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Tui::handle_key (cyclomatic 17) crates/rvAgent/rvagent-cli/src/tui.rs:216— Tui::handle_key has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
UnicodeSecurityMiddleware::before_agent (cyclomatic 17) crates/rvAgent/rvagent-middleware/src/unicode_security_middleware.rs:93— UnicodeSecurityMiddleware::before_agent 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.
AgiContainerBuilder::build_sections (cyclomatic 17) crates/rvf/rvf-runtime/src/agi_container.rs:208— AgiContainerBuilder::build_sections has cyclomatic complexity 17 (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. This is NOT this file's highest cyclomatic complexity: ParsedAgiManifest::parse (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
rvf_solver_wasm::engine::inject_noise (cyclomatic 17) crates/rvf/rvf-solver-wasm/src/engine.rs:719— rvf_solver_wasm::engine::inject_noise 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.
Executor::match_relationship_pattern (cyclomatic 17) crates/rvlite/src/cypher/executor.rs:372— Executor::match_relationship_pattern 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.
rvm_wasm::validate_module (cyclomatic 17) crates/rvm/crates/rvm-wasm/src/lib.rs:166— rvm_wasm::validate_module 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.
UpsampleBilinear2D::f (cyclomatic 17) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:478— UpsampleBilinear2D::f has cyclomatic complexity 17 (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. This is NOT this file's highest cyclomatic complexity: CpuStorage::to_dtype (cyclomatic 102) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
RealMatrix::symmetric_eigen (cyclomatic 16) crates/emergent-time/src/real_matrix.rs:122— RealMatrix::symmetric_eigen has cyclomatic complexity 16 (threshold 15). 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.
MinCutPhiEngine::compute_phi (cyclomatic 16) crates/ruvector-consciousness/src/mincut_phi.rs:48— MinCutPhiEngine::compute_phi 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.
CommunityDetection::detect_communities (cyclomatic 16) crates/ruvector-core/src/advanced_features/graph_rag.rs:236— CommunityDetection::detect_communities 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.
RustSynthesisDomain::score_solution (cyclomatic 16) crates/ruvector-domain-expansion/src/rust_synthesis.rs:336— RustSynthesisDomain::score_solution 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.
RestoreSession::begin (cyclomatic 16) crates/ruvector-edge-snapshot/src/restore.rs:124— RestoreSession::begin 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.
NativeSimBackend::run_layer (cyclomatic 16) crates/ruvector-fpga-transformer/src/backend/native_sim.rs:170— NativeSimBackend::run_layer has cyclomatic complexity 16 (threshold 15). 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.
IncentiveAlignedMPNN::step (cyclomatic 16) crates/ruvector-graph-transformer/src/economic.rs:487— IncentiveAlignedMPNN::step 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.
VietorisRips::build (cyclomatic 16) crates/ruvector-math/src/homology/filtration.rs:111— VietorisRips::build has cyclomatic complexity 16 (threshold 15). 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.
ruvector_math::tensor_networks::contraction::contract_tensors (cyclomatic 16) crates/ruvector-math/src/tensor_networks/contraction.rs:194— ruvector_math::tensor_networks::contraction::contract_tensors 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.
RuFieldRouter::ingest_json (cyclomatic 16) crates/ruvector-mincut/src/routing/rufield.rs:194— RuFieldRouter::ingest_json 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.
ruvector_robotics::cognitive::behavior_tree::eval (cyclomatic 16) crates/ruvector-robotics/src/cognitive/behavior_tree.rs:136— ruvector_robotics::cognitive::behavior_tree::eval has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SolverOrchestrator::analyze_sparsity (cyclomatic 16) crates/ruvector-solver/src/router.rs:480— SolverOrchestrator::analyze_sparsity 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.
Shell::dispatch_command (cyclomatic 16) crates/ruvix/crates/shell/src/lib.rs:369— Shell::dispatch_command has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AneInfo::detect_ane_tops (cyclomatic 16) crates/ruvllm/src/autodetect.rs:743— AneInfo::detect_ane_tops 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.
MythosConfig::validate (cyclomatic 16) crates/ruvllm/src/models/openmythos/config.rs:145— MythosConfig::validate 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.
FormatValidator::simple_match (cyclomatic 16) crates/ruvllm/src/quality/validators.rs:642— FormatValidator::simple_match has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ConfidenceChecker::identify_weak_points (cyclomatic 16) crates/ruvllm/src/reflection/confidence.rs:489— ConfidenceChecker::identify_weak_points 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.
WasmMcpServer::execute_tool (cyclomatic 16) crates/rvAgent/rvagent-wasm/src/mcp.rs:729— WasmMcpServer::execute_tool 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.
HnswGraph::search_layer (cyclomatic 16) crates/rvf/rvf-index/src/hnsw.rs:311— HnswGraph::search_layer 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.
MetadataSegment::decode (cyclomatic 16) crates/rvf/rvf-types/src/metadata.rs:159— MetadataSegment::decode 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.
rvf_types::metadata::validate_segment (cyclomatic 16) crates/rvf/rvf-types/src/metadata.rs:249— rvf_types::metadata::validate_segment 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.
crate::scripts::seed-brain::main (cyclomatic 16) scripts/seed-brain.rs:37— crate::scripts::seed-brain::main 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.
Collection._load_validated (cyclomatic 16) crates/ruvector-py/python/ruvector/collection.py:702— Collection._load_validated 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.
heuristicName (cyclomatic 16) REDACTED:322— heuristicName has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Yanked release: spin — `spin` resolves to 0.9.8 in the committed REDACTED, and crates.io reports that release as YANKED. A yanked release is one the publisher has withdrawn and asked you to stop using; it keeps resolving only so existing locks do not break. The current stable release is 0.12.3. Run `cargo update -p spin` and commit the updated lock.
DevelopmentalProgram::grow_step (cognitive 98) crates/ruvector-graph-transformer/src/self_organizing.rs:242— DevelopmentalProgram::grow_step has cognitive complexity 98 (threshold 15). Drivers by points: if/else 16 (68 pts), loops 5 (15 pts), boolean chains 13, match/switch 1 (2 pts) (nesting depth added 63). 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.
ruvector_graph_node::cypher_exec::exec_pattern (cognitive 96) crates/ruvector-graph-node/src/cypher_exec.rs:427— ruvector_graph_node::cypher_exec::exec_pattern has cognitive complexity 96 (threshold 15). Drivers by points: if/else 21 (81 pts), match/switch 4 (8 pts), loops 3 (7 pts) (nesting depth added 68). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ruvector_py::graph::cypher_exec::exec_pattern (cognitive 96) crates/ruvector-py/src/graph/cypher_exec.rs:141— ruvector_py::graph::cypher_exec::exec_pattern has cognitive complexity 96 (threshold 15). Drivers by points: if/else 21 (81 pts), match/switch 4 (8 pts), loops 3 (7 pts) (nesting depth added 68). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ArenaCactus::build_from_compact_graph (cognitive 79) crates/cognitum-gate-kernel/src/canonical_witness.rs:138— ArenaCactus::build_from_compact_graph has cognitive complexity 79 (threshold 15). Drivers by points: if/else 26 (54 pts), loops 10 (13 pts), boolean chains 12 (nesting depth added 31). 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.
CrvSessionManager::find_convergence (cognitive 71) crates/ruvector-crv/src/session.rs:263— CrvSessionManager::find_convergence has cognitive complexity 71 (threshold 15). Drivers by points: if/else 11 (41 pts), loops 9 (28 pts), boolean chains 2 (nesting depth added 49). 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.
AgentGraph::run (cognitive 65) crates/rvAgent/rvagent-core/src/graph.rs:247— AgentGraph::run has cognitive complexity 65 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 5 (20 pts), loops 6 (18 pts), boolean chains 3 (nesting depth added 41). 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.
MobileNetV3Large::process_inverted_residual (cognitive 64) crates/ruvector-cnn/src/backbone/mobilenet.rs:349— MobileNetV3Large::process_inverted_residual has cognitive complexity 64 (threshold 15). Drivers by points: loops 20 (52 pts), if/else 5 (10 pts), boolean chains 2 (nesting depth added 37). 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.
FlashAttention3::forward (cognitive 61) crates/ruvector-attention/src/attention/flash.rs:168— FlashAttention3::forward has cognitive complexity 61 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 8 (27 pts), boolean chains 3 (nesting depth added 39). 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.
ruos_thermal::main (cognitive 57) crates/ruos-thermal/src/main.rs:17— ruos_thermal::main has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 9 (17 pts), match/switch 6 (14 pts), boolean chains 1 (nesting depth added 27). 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.
EntropyScaledEf::search (cognitive 56) crates/ruvector-entropy-ann/src/search.rs:338— EntropyScaledEf::search has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (49 pts), loops 4 (7 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
JsonSchemaValidator::validate_against_schema (cognitive 53) crates/ruvllm/src/quality/validators.rs:267— JsonSchemaValidator::validate_against_schema has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 4 (13 pts) (nesting depth added 34). 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.
GeoMipPhiEngine::compute_phi (cognitive 52) crates/ruvector-consciousness/src/geomip.rs:181— GeoMipPhiEngine::compute_phi has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (38 pts), boolean chains 8, loops 4 (6 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.
ruvllm_retrieval_diffusion::sample_logits (cognitive 52) crates/ruvllm_retrieval_diffusion/src/lib.rs:199— ruvllm_retrieval_diffusion::sample_logits has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 8 (16 pts), boolean chains 3 (nesting depth added 25). 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.
UnicodeSecurityMiddleware::before_agent (cognitive 52) crates/rvAgent/rvagent-middleware/src/unicode_security_middleware.rs:93— UnicodeSecurityMiddleware::before_agent has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 3 (9 pts), match/switch 1 (2 pts) (nesting depth added 36). 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.
resume_release.validate_archive (cognitive 52) REDACTED:154— resume_release.validate_archive has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (43 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 29). 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.
SheafSubgraph::from_graph (cognitive 51) crates/prime-radiant/src/substrate/mod.rs:150— SheafSubgraph::from_graph has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (39 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 34). 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.
ProblemDetector::detect_problems (cognitive 51) crates/ruvector-postgres/src/healing/detector.rs:422— ProblemDetector::detect_problems has cognitive complexity 51 (threshold 15). Drivers by points: if/else 34 (48 pts), loops 2, 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.
HierarchicalPhiEngine::compute_phi (cognitive 50) crates/ruvector-consciousness/src/phi.rs:721— HierarchicalPhiEngine::compute_phi has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 4 (12 pts), boolean chains 2 (nesting depth added 30). 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.
validate_release.validate (cognitive 49) python/portfolio/validate_release.py:14— validate_release.validate has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 12, loops 4 (6 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.
splitMegaStatement (cognitive 49) REDACTED:217— splitMegaStatement has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 9, ternaries 3 (7 pts), loops 2 (4 pts) (nesting depth added 21). 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.
ruvector_graph_condense::cutloss::cut_and_ortho (cognitive 48) crates/ruvector-graph-condense/src/cutloss.rs:275— ruvector_graph_condense::cutloss::cut_and_ortho has cognitive complexity 48 (threshold 15). Drivers by points: loops 10 (25 pts), if/else 13 (22 pts), boolean chains 1 (nesting depth added 24). 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.
FactorSet::from_data (cognitive 48) crates/ruvector-temporal-tensor/src/delta.rs:254— FactorSet::from_data has cognitive complexity 48 (threshold 15). Drivers by points: loops 13 (36 pts), if/else 5 (12 pts) (nesting depth added 30). 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.
ConsoleIO::register_node (cognitive 48) crates/ruvix/qemu-swarm/src/console.rs:305— ConsoleIO::register_node has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (37 pts), match/switch 3 (8 pts), loops 2 (3 pts) (nesting depth added 35). 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.
parseTopLevelStatements (cognitive 48) npm/packages/ruvector/src/decompiler/statement-parser.js:27— parseTopLevelStatements has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (31 pts), boolean chains 8, ternaries 3 (8 pts), loops 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.
MinCutBridge::find_min_cut (cognitive 47) crates/rvm/crates/rvm-coherence/src/mincut.rs:112— MinCutBridge::find_min_cut has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 4 (9 pts) (nesting depth added 28). 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.
benchmark (cognitive 47) crates/micro-hnsw-wasm/benchmark.js:10— benchmark has cognitive complexity 47 (threshold 15). Drivers by points: loops 35 (43 pts), if/else 4 (nesting depth added 8). 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.
MinCutRetriever::retrieve (cognitive 46) crates/ruvector-bounded-rag/src/lib.rs:454— MinCutRetriever::retrieve has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 11 (18 pts) (nesting depth added 27). 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.
MinCutGatedAttention::compute_min_cut (cognitive 46) crates/ruvector-dag/src/attention/mincut_gated.rs:43— MinCutGatedAttention::compute_min_cut has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 11 (19 pts), match/switch 2 (4 pts), boolean chains 3 (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.
ruvector_hnsw_repair::strategy::repair_one (cognitive 46) crates/ruvector-hnsw-repair/src/strategy.rs:139— ruvector_hnsw_repair::strategy::repair_one has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 3 (7 pts) (nesting depth added 28). 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.
HnswRouter::consolidate_patterns (cognitive 45) crates/ruvllm/src/claude_flow/hnsw_router.rs:727— HnswRouter::consolidate_patterns has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (40 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 33). 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.
evaluate-model.evaluate (cognitive 45) scripts/training/evaluate-model.py:123— evaluate-model.evaluate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 8 (10 pts), ternaries 3 (6 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.
RingAttention::ring_forward (cognitive 44) crates/ruvector-attention/src/attention/flash.rs:361— RingAttention::ring_forward has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 5 (13 pts), boolean chains 2 (nesting depth added 25). 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.
DeltaAwareTraversal::neighbors (cognitive 44) crates/ruvector-delta-graph/src/traversal.rs:251— DeltaAwareTraversal::neighbors has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (34 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 25). 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.
InhibitionStrategy::apply (cognitive 43) crates/ruvector-graph-transformer/src/biological.rs:167— InhibitionStrategy::apply has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 4 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 28). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
VietorisRips::build (cognitive 43) crates/ruvector-math/src/homology/filtration.rs:111— VietorisRips::build has cognitive complexity 43 (threshold 15). Drivers by points: loops 10 (27 pts), if/else 5 (16 pts) (nesting depth added 28). 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.
Phantom::build_slice (cognitive 43) crates/sonic-ct/src/phantom.rs:95— Phantom::build_slice has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 8 (18 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MincutSparseAttention::build_sparse_positions (cognitive 42) crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs:366— MincutSparseAttention::build_sparse_positions has cognitive complexity 42 (threshold 15). Drivers by points: loops 7 (22 pts), if/else 7 (20 pts) (nesting depth added 28). 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.
AdjSnapshot::global_mincut_value (cognitive 41) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:145— AdjSnapshot::global_mincut_value has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 9 (18 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.
crate::scripts::seed-brain::main (cognitive 41) scripts/seed-brain.rs:37— crate::scripts::seed-brain::main has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 4 (9 pts), loops 4 (5 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HybridPipeline::route_operation (cognitive 40) crates/ruvllm/src/backends/hybrid_pipeline.rs:468— HybridPipeline::route_operation has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 6, match/switch 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.
RealMatrix::symmetric_eigen (cognitive 39) crates/emergent-time/src/real_matrix.rs:122— RealMatrix::symmetric_eigen has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (24 pts), if/else 8 (15 pts) (nesting depth added 22). 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.
TensorNameMapper::categorize (cognitive 39) crates/ruvllm/src/gguf/loader.rs:349— TensorNameMapper::categorize has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 18 (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.
KvCacheF16::decode_step_f16 (cognitive 39) crates/ruvllm_sparse_attention/src/attention.rs:1908— KvCacheF16::decode_step_f16 has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (24 pts), if/else 9 (14 pts), boolean chains 1 (nesting depth added 20). 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.
CommunityDetection::detect_communities (cognitive 38) crates/ruvector-core/src/advanced_features/graph_rag.rs:236— CommunityDetection::detect_communities has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 6 (10 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Conv2D::f (cognitive 38) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1034— Conv2D::f has cognitive complexity 38 (threshold 15). Drivers by points: loops 9 (25 pts), if/else 2 (11 pts), boolean chains 2 (nesting depth added 25). 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.
classifyStatement (cognitive 38) REDACTED:40— classifyStatement has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 3 (7 pts), error handling 1 (5 pts), ternaries 1 (nesting depth added 25). 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.
IncoherenceIsolator::find_isolated_regions (cognitive 37) crates/prime-radiant/src/mincut/mod.rs:253— IncoherenceIsolator::find_isolated_regions has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 21). 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.
Conv2d::conv_generic (cognitive 37) crates/ruvector-cnn/src/layers/conv.rs:386— Conv2d::conv_generic has cognitive complexity 37 (threshold 15). Drivers by points: loops 7 (29 pts), if/else 1 (7 pts), boolean chains 1 (nesting depth added 28). 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.
SemanticAnalyzer::analyze_expression (cognitive 37) crates/ruvector-graph/src/cypher/semantic.rs:434— SemanticAnalyzer::analyze_expression has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (9 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MorphogeneticSNN::apply_growth_rules (cognitive 37) crates/ruvector-mincut/src/snn/morphogenetic.rs:359— MorphogeneticSNN::apply_growth_rules has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 5 (9 pts) (nesting depth added 24). 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.
splitModules (cognitive 37) REDACTED:300— splitModules has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 7 (10 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QuantizedAvgPool2d::forward_int8 (cognitive 36) crates/ruvector-cnn/src/layers/quantized_pooling.rs:128— QuantizedAvgPool2d::forward_int8 has cognitive complexity 36 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 4 (14 pts), boolean chains 1 (nesting depth added 25). 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.
RealContrastiveTrainer::train (cognitive 36) crates/ruvllm/src/training/real_trainer.rs:232— RealContrastiveTrainer::train has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 3 (6 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.
RuvltraQuantizer::quantize_tensor (cognitive 35) crates/ruvllm/src/quantize/ruvltra_quant.rs:952— RuvltraQuantizer::quantize_tensor has cognitive complexity 35 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 7 (13 pts), boolean chains 5, match/switch 1 (nesting depth added 15). 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.
preflight_scan.main (cognitive 35) scripts/research-gate/preflight_scan.py:58— preflight_scan.main has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemSqlStore::run (cognitive 34) crates/ruvector-edge-store/src/mem_store/mod.rs:133— MemSqlStore::run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (9 pts), match/switch 4 (8 pts), boolean chains 1 (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.
NativeSimBackend::run_layer (cognitive 34) crates/ruvector-fpga-transformer/src/backend/native_sim.rs:170— NativeSimBackend::run_layer has cognitive complexity 34 (threshold 15). Drivers by points: loops 12 (31 pts), if/else 2, boolean chains 1 (nesting depth added 19). 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.
GameTheoreticAttention::compute (cognitive 34) crates/ruvector-graph-transformer/src/economic.rs:71— GameTheoreticAttention::compute has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 7 (12 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.
Trainer::fit_with_multiplicity (cognitive 34) crates/ruvector-kge/src/train/mod.rs:180— Trainer::fit_with_multiplicity has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 3 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 21). 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.
ExpertCache::compute_base_eviction_scores (cognitive 34) crates/ruvllm/src/bitnet/expert_cache.rs:528— ExpertCache::compute_base_eviction_scores has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (10 pts), boolean chains 1, match/switch 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.
StreamClient::run (cognitive 34) crates/rvf/rvf-runtime/src/progressive_stream/client.rs:149— StreamClient::run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpsampleBilinear2D::f (cognitive 34) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:478— UpsampleBilinear2D::f has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (21 pts), loops 6 (12 pts), boolean chains 1 (nesting depth added 11). 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.
decompileSource (cognitive 34) REDACTED:157— decompileSource has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (7 pts), loops 2 (5 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 16). 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.
Router::route (cognitive 33) crates/ruvector-tiny-dancer-core/src/router.rs:65— Router::route has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 3 (9 pts), boolean chains 2, loops 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.
IntelligentContextManager::prepare_context (cognitive 33) crates/ruvllm/src/context/context_manager.rs:408— IntelligentContextManager::prepare_context has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 4 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SheafConvolution::forward (cognitive 32) crates/prime-radiant/src/cohomology/neural.rs:344— SheafConvolution::forward has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 2 (5 pts) (nesting depth added 23). 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.
MinCutPhiEngine::compute_phi (cognitive 32) crates/ruvector-consciousness/src/mincut_phi.rs:48— MinCutPhiEngine::compute_phi has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 2 (4 pts), boolean chains 2 (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.
GraphDatabase::delete_node (cognitive 32) crates/ruvector-graph-node/src/lib.rs:870— GraphDatabase::delete_node has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (11 pts), boolean chains 1 (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.
WebGpuInference::attention_cpu (cognitive 32) crates/ruvllm-wasm/src/webgpu/compute.rs:614— WebGpuInference::attention_cpu has cognitive complexity 32 (threshold 15). Drivers by points: loops 8 (23 pts), if/else 2 (8 pts), boolean chains 1 (nesting depth added 21). 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.
IncentiveAlignedMPNN::step (cognitive 31) crates/ruvector-graph-transformer/src/economic.rs:487— IncentiveAlignedMPNN::step has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4 (8 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.
GaugeEquivariantMP::forward (cognitive 31) crates/ruvector-graph-transformer/src/physics.rs:345— GaugeEquivariantMP::forward has cognitive complexity 31 (threshold 15). Drivers by points: loops 10 (17 pts), if/else 6 (13 pts), boolean chains 1 (nesting depth added 14). 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.
NapiSolver::pagerank (cognitive 31) crates/ruvector-solver-node/src/lib.rs:826— NapiSolver::pagerank has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (17 pts), if/else 7 (12 pts), boolean chains 2 (nesting depth added 14). 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.
AneInfo::detect_ane_tops (cognitive 31) crates/ruvllm/src/autodetect.rs:743— AneInfo::detect_ane_tops has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (31 pts) (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.
rvf_wasm::rvf_store_open (cognitive 31) crates/rvf/rvf-wasm/src/lib.rs:447— rvf_wasm::rvf_store_open has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (10 pts), boolean chains 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.
Supervisor.run (cognitive 31) REDACTED:129— Supervisor.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, loops 5, error handling 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.
update (cognitive 31) npm/packages/spiking-neural/src/index.js:52— update has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (9 pts), boolean chains 2 (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.
SparseResidualAttention::generate_mask (cognitive 30) crates/ruvector-attention/src/sheaf/sparse.rs:298— SparseResidualAttention::generate_mask has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QuantizedMaxPool2d::forward_int8 (cognitive 30) crates/ruvector-cnn/src/layers/quantized_pooling.rs:37— QuantizedMaxPool2d::forward_int8 has cognitive complexity 30 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 2 (8 pts), boolean chains 1 (nesting depth added 21). 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.
WasmCnnEmbedder::extract (cognitive 30) crates/ruvector-cnn-wasm/src/lib.rs:71— WasmCnnEmbedder::extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 6 (14 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.
GraphState::apply_delta (cognitive 30) crates/ruvector-delta-graph/src/lib.rs:404— GraphState::apply_delta has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (12 pts), if/else 3 (9 pts), match/switch 2 (8 pts), boolean chains 1 (nesting depth added 16). 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.
DomainExpansionEngine::evaluate_population (cognitive 30) crates/ruvector-domain-expansion/src/lib.rs:237— DomainExpansionEngine::evaluate_population has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 3 (7 pts) (nesting depth added 21). 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.
SDPSolver::project_psd_small (cognitive 30) crates/ruvector-math/src/optimization/sdp.rs:198— SDPSolver::project_psd_small has cognitive complexity 30 (threshold 15). Drivers by points: loops 9 (20 pts), if/else 5 (10 pts) (nesting depth added 16). 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.
TieredStore::tick (cognitive 30) crates/ruvector-temporal-tensor/src/store.rs:876— TieredStore::tick has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 2 (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.
ruvector_acorn::search::acorn_search (cognitive 29) crates/ruvector-acorn/src/search.rs:30— ruvector_acorn::search::acorn_search has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 2 (3 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.
VectorStorage::new (cognitive 29) crates/ruvector-core/src/storage.rs:72— VectorStorage::new has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 2 (6 pts), loops 1 (4 pts), boolean chains 2 (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.
VerifiedTrainer::train_step (cognitive 29) crates/ruvector-graph-transformer/src/verified_training.rs:409— VerifiedTrainer::train_step has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (26 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MincutComputer::compute_algebraic_connectivity (cognitive 29) crates/ruvector-postgres/src/integrity/mincut.rs:286— MincutComputer::compute_algebraic_connectivity has cognitive complexity 29 (threshold 15). Drivers by points: loops 12 (21 pts), if/else 6 (8 pts) (nesting depth added 11). 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.
Gemma2Attention::forward (cognitive 29) crates/ruvllm/src/backends/gemma2.rs:335— Gemma2Attention::forward has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 8 (13 pts) (nesting depth added 15). 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.
VecParse::feed (cognitive 29) crates/rvf/rvf-runtime/src/progressive_stream/vectors.rs:219— VecParse::feed has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 6, 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.
Tokenizer::next_token (cognitive 29) crates/rvlite/src/sql/parser.rs:169— Tokenizer::next_token has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 4 (6 pts), boolean chains 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
insert (cognitive 29) npm/packages/agentic-synth/src/adapters/ruvector.js:85— insert has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (3 pts) (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.
ruvector_bet4_ivf_bench::pca::project_topm (cognitive 28) crates/ruvector-bet4-ivf-bench/src/pca.rs:11— ruvector_bet4_ivf_bench::pca::project_topm has cognitive complexity 28 (threshold 15). Drivers by points: loops 10 (24 pts), if/else 2 (4 pts) (nesting depth added 16). 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.
VectorDB::new (cognitive 28) crates/ruvector-core/src/vector_db.rs:106— VectorDB::new has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 3 (4 pts), boolean chains 2, 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.
EntropyThresholdBeam::search (cognitive 28) crates/ruvector-entropy-ann/src/search.rs:212— EntropyThresholdBeam::search has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (3 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.
TropicalMatrix::max_cycle_mean (cognitive 28) crates/ruvector-math/src/tropical/matrix.rs:138— TropicalMatrix::max_cycle_mean has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 6 (11 pts), boolean chains 2 (nesting depth added 16). 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.
Fat32DirEntry::matches_name (cognitive 28) crates/ruvix/crates/fs/src/fat32.rs:309— Fat32DirEntry::matches_name has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 3 (6 pts) (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.
XLoraManager::apply (cognitive 28) crates/ruvllm/src/backends/mistral_backend.rs:526— XLoraManager::apply has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 3 (9 pts), match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FrameReader::feed (cognitive 28) crates/rvf/rvf-wire/src/stream/frame.rs:100— FrameReader::feed has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 3 (9 pts), boolean chains 1, loops 1 (nesting depth added 16). 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.
EscalationLadder::run (cognitive 27) crates/mcp-gate/src/monitor/mod.rs:305— EscalationLadder::run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 5 (9 pts), boolean chains 1, 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.
CentroidCache::build (cognitive 27) crates/ruvector-attention/src/transport/centroid_ot.rs:65— CentroidCache::build has cognitive complexity 27 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 3 (8 pts), boolean chains 1 (nesting depth added 15). 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.
ToolOrchestrationDomain::score_orchestration (cognitive 27) crates/ruvector-domain-expansion/src/tool_orchestration.rs:394— ToolOrchestrationDomain::score_orchestration has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 4, loops 2, match/switch 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.
FisherInformation::invert_fim (cognitive 27) crates/ruvector-math/src/information_geometry/fisher.rs:158— FisherInformation::invert_fim has cognitive complexity 27 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 4 (9 pts) (nesting depth added 14). 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.
ParallelInference::attention_single_thread (cognitive 27) crates/ruvllm-wasm/src/workers/mod.rs:353— ParallelInference::attention_single_thread has cognitive complexity 27 (threshold 15). Drivers by points: loops 10 (27 pts) (nesting depth added 17). 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.
rvagent_backends::gemini::sanitize_schema (cognitive 27) crates/rvAgent/rvagent-backends/src/gemini.rs:573— rvagent_backends::gemini::sanitize_schema has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 9 (12 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
rvf_types::metadata::validate_segment (cognitive 27) crates/rvf/rvf-types/src/metadata.rs:249— rvf_types::metadata::validate_segment has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (10 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.
convert_weights.main (cognitive 27) crates/timesfm/scripts/convert_weights.py:291— convert_weights.main has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (5 pts), ternaries 3 (5 pts), boolean chains 3, error handling 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
buildModuleTree (cognitive 27) npm/packages/ruvector/src/decompiler/module-tree.js:21— buildModuleTree has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 7 (13 pts) (nesting depth added 15). Of this number, 26 points are the body's own statements and 1 belongs to 4 function literals inside it that branch. 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.
SheafNeuralLayer::forward (cognitive 26) crates/prime-radiant/src/cohomology/neural.rs:204— SheafNeuralLayer::forward has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (11 pts), boolean chains 2 (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.
MistralBackend::load_model (cognitive 26) crates/ruvllm/src/backends/mistral_backend.rs:1089— MistralBackend::load_model has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (4 pts), loops 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.
AnthropicClient::build_request (cognitive 26) crates/rvAgent/rvagent-backends/src/anthropic.rs:188— AnthropicClient::build_request has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (5 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrainingPipeline::run_training (cognitive 26) crates/sona/src/training/pipeline.rs:484— TrainingPipeline::run_training has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), boolean chains 3 (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.
decompileGguf::readValue (cognitive 26) npm/packages/ruvector/src/decompiler/model-decompiler.js:60— decompileGguf::readValue has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 8 (11 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
StageVIModeler::bisect_by_similarity (cognitive 25) crates/ruvector-crv/src/stage_vi.rs:233— StageVIModeler::bisect_by_similarity has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (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.
ruvector_edge_snapshot::rvf_summary::inspect_tail (cognitive 25) crates/ruvector-edge-snapshot/src/rvf_summary.rs:84— ruvector_edge_snapshot::rvf_summary::inspect_tail has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (22 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.
EdgeCutMinimizer::coarsen_graph (cognitive 25) crates/ruvector-graph/src/distributed/shard.rs:286— EdgeCutMinimizer::coarsen_graph has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (4 pts) (nesting depth added 16). 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.
TensorInfo::tensor_type (cognitive 25) crates/ruvllm/src/gguf/tensors.rs:86— TensorInfo::tensor_type has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8 (nesting depth added 2). 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.
AdapterTrainer::train (cognitive 25) crates/ruvllm/src/lora/adapters/trainer.rs:254— AdapterTrainer::train has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (3 pts), boolean chains 1 (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.
ContrastiveTrainer::train (cognitive 25) crates/ruvllm/src/training/contrastive.rs:294— ContrastiveTrainer::train has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (6 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.
rvforge_reader::dock_text::strip_ansi (cognitive 25) crates/rvforge-reader/src/dock_text.rs:153— rvforge_reader::dock_text::strip_ansi has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (7 pts), match/switch 1 (2 pts), boolean chains 1 (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.
CoherenceEngine::recommend (cognitive 25) crates/rvm/crates/rvm-coherence/src/engine.rs:460— CoherenceEngine::recommend has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (9 pts), loops 3 (4 pts) (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.
rvm_witness::versioned::verify_log_bytes (cognitive 25) crates/rvm/crates/rvm-witness/src/versioned.rs:255— rvm_witness::versioned::verify_log_bytes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CohomologyPooling::pool (cognitive 24) crates/prime-radiant/src/cohomology/neural.rs:445— CohomologyPooling::pool has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 6 (10 pts), match/switch 1 (nesting depth added 11). 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.
ThermalSensor::read (cognitive 24) crates/ruos-thermal/src/lib.rs:202— ThermalSensor::read has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), match/switch 2 (4 pts) (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.
ruvector_adaptive_ann::search::beam_search (cognitive 24) crates/ruvector-adaptive-ann/src/search.rs:55— ruvector_adaptive_ann::search::beam_search has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (3 pts) (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.
TripletLoss::mine_hard_triplets (cognitive 24) crates/ruvector-cnn/src/contrastive/triplet.rs:276— TripletLoss::mine_hard_triplets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (3 pts) (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.
RvfImporter::rows_from (cognitive 24) crates/ruvector-edge-snapshot/src/rvf_import.rs:365— RvfImporter::rows_from has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (5 pts), boolean chains 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.
GraphStorage::new (cognitive 24) crates/ruvector-graph/src/storage.rs:82— GraphStorage::new has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (3 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.
TypedGraph::traverse_from (cognitive 24) crates/ruvector-graph/src/typed_graph.rs:555— TypedGraph::traverse_from has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (5 pts) (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.
DendriticAttention::assign_to_branches (cognitive 24) crates/ruvector-graph-transformer/src/biological.rs:779— DendriticAttention::assign_to_branches has cognitive complexity 24 (threshold 15). Drivers by points: loops 8 (19 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Fragmentation::trim (cognitive 24) crates/ruvector-mincut/src/fragmentation/mod.rs:314— Fragmentation::trim has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 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.
LocalKCut::find_cut (cognitive 24) crates/ruvector-mincut/src/localkcut/mod.rs:232— LocalKCut::find_cut has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (4 pts), loops 2 (3 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.
CausalGraph::transitive_closure (cognitive 24) crates/ruvector-mincut/src/snn/causal.rs:150— CausalGraph::transitive_closure has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 5 (9 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.
SpikeTrain::cross_correlation (cognitive 24) crates/ruvector-mincut/src/snn/neuron.rs:363— SpikeTrain::cross_correlation has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 4 (7 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ruvector_rairs::kmeans::train (cognitive 24) crates/ruvector-rairs/src/kmeans.rs:12— ruvector_rairs::kmeans::train has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 4 (9 pts) (nesting depth added 13). 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.
rvf_launch::qemu::build_command (cognitive 24) crates/rvf/rvf-launch/src/qemu.rs:80— rvf_launch::qemu::build_command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (21 pts), match/switch 2, loops 1 (nesting depth added 5). 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.
rvm_checkpoint::base64::decode (cognitive 24) crates/rvm/crates/rvm-checkpoint/src/base64.rs:59— rvm_checkpoint::base64::decode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, match/switch 1 (2 pts), 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.
FennelPlacer::place (cognitive 24) crates/rvm/crates/rvm-coherence/src/fennel.rs:195— FennelPlacer::place has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts), match/switch 1 (nesting depth added 14). 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.
Collection._load_validated (cognitive 24) crates/ruvector-py/python/ruvector/collection.py:702— Collection._load_validated has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 1 (2 pts), ternaries 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.
inferPurpose (cognitive 24) npm/packages/ruvector/src/decompiler/style-improver.js:302— inferPurpose has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 11, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
PageHinkley::first_alarm (cognitive 23) crates/emergent-time/src/adaptive.rs:127— PageHinkley::first_alarm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 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.
McpBrainTools::brain_sync (cognitive 23) crates/mcp-brain/src/tools.rs:622— McpBrainTools::brain_sync has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (6 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.
CohomologyComputer::row_reduce (cognitive 23) crates/prime-radiant/src/cohomology/cohomology_group.rs:305— CohomologyComputer::row_reduce has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 4 (10 pts) (nesting depth added 13). 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.
GraphLaplacian::apply (cognitive 23) crates/ruvector-attention/src/pde_attention/laplacian.rs:108— GraphLaplacian::apply has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 4 (7 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FilterExpression::evaluate (cognitive 23) crates/ruvector-core/src/advanced_features/filtered_search.rs:55— FilterExpression::evaluate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
StageIIIEncoder::encode (cognitive 23) crates/ruvector-crv/src/stage_iii.rs:119— StageIIIEncoder::encode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (7 pts) (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.
ruvector_entropy_ann::search::beam_expand (cognitive 23) crates/ruvector-entropy-ann/src/search.rs:79— ruvector_entropy_ann::search::beam_expand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (3 pts) (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.
GATLayer::forward (cognitive 23) crates/ruvector-gnn/src/graphmae.rs:196— GATLayer::forward has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 4 (8 pts) (nesting depth added 13). 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.
ShardCoordinator::execute_query (cognitive 23) crates/ruvector-graph/src/distributed/coordinator.rs:240— ShardCoordinator::execute_query has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GrangerCausalityExtractor::extract (cognitive 23) crates/ruvector-graph-transformer/src/temporal.rs:1029— GrangerCausalityExtractor::extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (9 pts), boolean chains 3 (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.
RabitqIndex::build (cognitive 23) crates/ruvector-py/src/rabitq.rs:137— RabitqIndex::build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (8 pts), match/switch 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.
Storage::new (cognitive 23) crates/ruvector-router-core/src/storage.rs:24— Storage::new has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (4 pts), boolean chains 3, loops 1 (3 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.
ForwardPushSolver::forward_push_core (cognitive 23) crates/ruvector-solver/src/forward_push.rs:144— ForwardPushSolver::forward_push_core has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), boolean chains 3 (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.
GraphStore::remove_node (cognitive 23) crates/ruvix/crates/nucleus/src/graph_store.rs:333— GraphStore::remove_node has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 2, loops 2 (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.
ConsoleFilter::matches (cognitive 23) crates/ruvix/qemu-swarm/src/console.rs:193— ConsoleFilter::matches has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 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.
rvf_quant::product::kmeans (cognitive 23) crates/rvf/rvf-quant/src/product.rs:185— rvf_quant::product::kmeans has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (20 pts), if/else 1 (3 pts) (nesting depth added 13). 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.
rvm_wasm::validate_module (cognitive 23) crates/rvm/crates/rvm-wasm/src/lib.rs:166— rvm_wasm::validate_module has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (2 pts), loops 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.
hasBraceBalance (cognitive 23) REDACTED:171— hasBraceBalance has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, 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.
LoraFederationStore::aggregate (cognitive 22) crates/mcp-brain-server/src/types.rs:1075— LoraFederationStore::aggregate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 5 (7 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.
InMemoryWitnessRepository::verify_chain (cognitive 22) crates/prime-radiant/src/governance/repository.rs:681— InMemoryWitnessRepository::verify_chain has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 1 (nesting depth added 13). 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.
SheafAttention::compute_with_mask (cognitive 22) crates/ruvector-attention/src/sheaf/attention.rs:398— SheafAttention::compute_with_mask has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 3 (4 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.
DepthwiseSeparableConv::depthwise_generic (cognitive 22) crates/ruvector-cnn/src/layers/conv.rs:622— DepthwiseSeparableConv::depthwise_generic has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (6 pts), boolean chains 1 (nesting depth added 15). 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.
StageIEncoder::encode_stroke (cognitive 22) crates/ruvector-crv/src/stage_i.rs:87— StageIEncoder::encode_stroke has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (7 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.
AlphaComplex::build (cognitive 22) crates/ruvector-math/src/homology/filtration.rs:198— AlphaComplex::build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 6 (10 pts) (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.
TensorNetwork::contract_all (cognitive 22) crates/ruvector-math/src/tensor_networks/contraction.rs:156— TensorNetwork::contract_all has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparseCSR::from_boundary_edges (cognitive 22) crates/ruvector-mincut-gated-transformer/src/spectral.rs:83— SparseCSR::from_boundary_edges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5, boolean chains 2 (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.
RealityGraph::query (cognitive 22) crates/ruvector-perception/src/reality.rs:83— RealityGraph::query has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 4 (7 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TripleStore::remove (cognitive 22) crates/ruvector-postgres/src/graph/sparql/triple_store.rs:261— TripleStore::remove has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (2 pts) (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.
BpeTokenizer::token_to_bytes (cognitive 22) crates/ruvllm/src/bitnet/tokenizer.rs:247— BpeTokenizer::token_to_bytes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Diffuser::make_bidir_kv (cognitive 22) crates/ruvllm_retrieval_diffusion/src/lib.rs:470— Diffuser::make_bidir_kv has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 4 (9 pts), boolean chains 2 (nesting depth added 12). 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.
UnicodeSecurityChecker::check (cognitive 22) crates/rvAgent/rvagent-middleware/src/unicode_security.rs:242— UnicodeSecurityChecker::check has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 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.
resume_release.precheck (cognitive 22) REDACTED:325— resume_release.precheck has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (4 pts), error handling 1 (2 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.
create-brainpedia.main (cognitive 22) scripts/create-brainpedia.py:214— create-brainpedia.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), boolean chains 1, ternaries 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.
base_health.failed_base_checks (cognitive 22) scripts/research-gate/base_health.py:85— base_health.failed_base_checks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 4, ternaries 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.
train-lora.main (cognitive 22) scripts/train-lora.py:94— train-lora.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (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, 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.
upvote_memories.main (cognitive 22) scripts/upvote_memories.py:41— upvote_memories.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (4 pts), loops 3 (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.
mcp_gate::schema_cache::write_canonical (cognitive 21) crates/mcp-gate/src/schema_cache.rs:128— mcp_gate::schema_cache::write_canonical has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), match/switch 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.
WasmCriticalPathAttention::compute_critical_path (cognitive 21) crates/ruvector-attention-unified-wasm/src/dag.rs:276— WasmCriticalPathAttention::compute_critical_path has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts), match/switch 1 (3 pts) (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.
QuantumCollapseEngine::collapse_to_mip (cognitive 21) crates/ruvector-consciousness/src/collapse.rs:48— QuantumCollapseEngine::collapse_to_mip has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 6 (10 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.
CriticalPathAttention::compute_critical_path (cognitive 21) crates/ruvector-dag/src/attention/critical_path.rs:40— CriticalPathAttention::compute_critical_path has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts), match/switch 1 (3 pts) (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.
HierarchicalLorentzAttention::compute_depths (cognitive 21) crates/ruvector-dag/src/attention/hierarchical_lorentz.rs:70— HierarchicalLorentzAttention::compute_depths has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (10 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.
PlanningDomain::score_plan (cognitive 21) crates/ruvector-domain-expansion/src/planning.rs:369— PlanningDomain::score_plan has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, loops 1, match/switch 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.
GeodesicMessagePassing::propagate (cognitive 21) crates/ruvector-graph-transformer/src/manifold.rs:568— GeodesicMessagePassing::propagate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), match/switch 2 (4 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.
RetrocausalAttention::causal_pass (cognitive 21) crates/ruvector-graph-transformer/src/temporal.rs:613— RetrocausalAttention::causal_pass has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (10 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.
HailoEmbedder::open_inner (cognitive 21) crates/ruvector-hailo/src/lib.rs:329— HailoEmbedder::open_inner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, match/switch 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.
ruvector_hyperbolic_hnsw::poincare::frechet_mean (cognitive 21) crates/ruvector-hyperbolic-hnsw/src/poincare.rs:463— ruvector_hyperbolic_hnsw::poincare::frechet_mean has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 6 (9 pts) (nesting depth added 8). 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.
EulerTourTree::split (cognitive 21) crates/ruvector-mincut/src/euler/mod.rs:644— EulerTourTree::split has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (21 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.
ruvector_perception::coherence::detect_boundary (cognitive 21) crates/ruvector-perception/src/coherence.rs:25— ruvector_perception::coherence::detect_boundary has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 6 (9 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
RoboticsDomain::score_skill_sequence (cognitive 21) crates/ruvector-robotics/src/domain_expansion.rs:439— RoboticsDomain::score_skill_sequence has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 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.
LocalStorage::list (cognitive 21) crates/ruvector-snapshot/src/storage.rs:169— LocalStorage::list has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (20 pts), 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.
ruvector_staged_workspace::adapter::handle (cognitive 21) crates/ruvector-staged-workspace/src/adapter.rs:244— ruvector_staged_workspace::adapter::handle has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 8 (17 pts), if/else 1 (2 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TierRouter::route (cognitive 21) crates/ruvix/crates/proof/src/routing.rs:119— TierRouter::route has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PretrainPipeline::run_synthetic_phase (cognitive 21) crates/ruvllm/src/claude_flow/pretrain_pipeline.rs:875— PretrainPipeline::run_synthetic_phase has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 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.
ErrorCategory::classify (cognitive 21) crates/ruvllm/src/reflection/error_recovery.rs:250— ErrorCategory::classify has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 10. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ToolDatasetGenerator::generate_param_value (cognitive 21) crates/ruvllm/src/training/tool_dataset.rs:653— ToolDatasetGenerator::generate_param_value has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (3 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.
TaskContext::from_metadata (cognitive 21) crates/rvAgent/rvagent-a2a/src/context.rs:113— TaskContext::from_metadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (7 pts) (nesting depth added 14). 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.
StateBackend::ls_info (cognitive 21) crates/rvAgent/rvagent-backends/src/state.rs:56— StateBackend::ls_info has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). 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.
build-optimal-dataset.semantic_context (cognitive 21) scripts/training/build-optimal-dataset.py:54— build-optimal-dataset.semantic_context has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
train-deobfuscator-v2.train (cognitive 21) scripts/training/train-deobfuscator-v2.py:153— train-deobfuscator-v2.train has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (9 pts), ternaries 1 (nesting depth added 11). 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.
isInsideStringOrComment (cognitive 21) npm/packages/ruvector/src/decompiler/reference-tracker.js:113— isInsideStringOrComment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, 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.
(anonymous) (cognitive 21) ui/ruvocal/static/chatui/welcome.js:148— (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 pts), ternaries 1 (3 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.
CompactGraph::recompute_components (cognitive 20) crates/cognitum-gate-kernel/src/shard.rs:565— CompactGraph::recompute_components has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 5, boolean chains 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. 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.
prime_radiant::simd::matrix::matmul_blocked (cognitive 20) crates/prime-radiant/src/simd/matrix.rs:268— prime_radiant::simd::matrix::matmul_blocked has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (20 pts) (nesting depth added 14). 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.
GreedyBisectionPhiEngine::compute_phi (cognitive 20) crates/ruvector-consciousness/src/phi.rs:601— GreedyBisectionPhiEngine::compute_phi has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 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.
CoherenceBeam::search (cognitive 20) crates/ruvector-diverse-beam/src/search.rs:259— CoherenceBeam::search has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 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.
RustSynthesisDomain::score_solution (cognitive 20) crates/ruvector-domain-expansion/src/rust_synthesis.rs:336— RustSynthesisDomain::score_solution has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, 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.
LagrangianAttention::forward (cognitive 20) crates/ruvector-graph-transformer/src/physics.rs:518— LagrangianAttention::forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HyperbolicHnsw::search_layer (cognitive 20) crates/ruvector-hyperbolic-hnsw/src/hnsw.rs:329— HyperbolicHnsw::search_layer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConjugateGradientSolver::solve_inner (cognitive 20) crates/ruvector-solver/src/cg.rs:376— ConjugateGradientSolver::solve_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts), match/switch 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.
MultiProbe::train (cognitive 20) crates/ruvector-typesafe-core/src/heads/probe.rs:43— MultiProbe::train has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 2 (5 pts) (nesting depth added 12). 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.
ruvix_rpi_boot::config::parse_arg (cognitive 20) crates/ruvix/crates/rpi-boot/src/config.rs:195— ruvix_rpi_boot::config::parse_arg has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 1 (2 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.
ModelSelector::apply_criteria (cognitive 20) crates/ruvllm/src/claude_flow/model_router.rs:935— ModelSelector::apply_criteria has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 4 (8 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ConfidenceChecker::identify_weak_points (cognitive 20) crates/ruvllm/src/reflection/confidence.rs:489— ConfidenceChecker::identify_weak_points has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, 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.
ErrorPatternLearner::suggest_recovery (cognitive 20) crates/ruvllm/src/reflection/error_recovery.rs:682— ErrorPatternLearner::suggest_recovery 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.
GeminiClient::build_request (cognitive 20) crates/rvAgent/rvagent-backends/src/gemini.rs:216— GeminiClient::build_request has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MicroVm::shutdown (cognitive 20) crates/rvf/rvf-launch/src/lib.rs:459— MicroVm::shutdown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts), match/switch 1 (2 pts) (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.
StreamDescriptorBuilder::build (cognitive 20) crates/rvf/rvf-wire/src/stream/builder.rs:106— StreamDescriptorBuilder::build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, 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.
RegionManager::create (cognitive 20) crates/rvm/crates/rvm-memory/src/region.rs:165— RegionManager::create has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 1, match/switch 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.
sonic_ct_wasm::sct_vol_step (cognitive 20) crates/sonic-ct-wasm/src/lib.rs:247— sonic_ct_wasm::sct_vol_step has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (3 pts), match/switch 2 (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, 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.
Collection.from_vectors (cognitive 20) crates/ruvector-py/python/ruvector/collection.py:201— Collection.from_vectors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (5 pts), loops 1 (2 pts), boolean chains 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.
contamination_check.run_contamination_check (cognitive 20) scripts/training/contamination_check.py:105— contamination_check.run_contamination_check has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (5 pts), ternaries 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.
run_sft.release_gate_check (cognitive 20) scripts/training/run_sft.py:270— run_sft.release_gate_check has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 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.
isStatementBoundaryAfterBrace (cognitive 20) npm/packages/ruvector/src/decompiler/statement-parser.js:132— isStatementBoundaryAfterBrace has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (6 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.
photonlayer_core::detector::capture_with (cognitive 19) crates/photonlayer-core/src/detector.rs:67— photonlayer_core::detector::capture_with has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 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.
ruvector_bench::bin::turbo4_ablation::main (cognitive 19) crates/ruvector-bench/src/bin/turbo4_ablation.rs:126— ruvector_bench::bin::turbo4_ablation::main has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (7 pts), if/else 3 (6 pts), match/switch 3 (5 pts), boolean chains 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.
ruvector_dag_wasm::compute_attention (cognitive 19) crates/ruvector-dag-wasm/src/lib.rs:290— ruvector_dag_wasm::compute_attention has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (7 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Federation::execute_federated (cognitive 19) crates/ruvector-graph/src/distributed/federation.rs:292— Federation::execute_federated has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (8 pts), loops 3 (6 pts), if/else 4 (5 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.
GraphCondenser::condense (cognitive 19) crates/ruvector-graph-condense/src/condense.rs:115— GraphCondenser::condense has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 5 (6 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.
GromovWasserstein::solve (cognitive 19) crates/ruvector-math/src/optimal_transport/gromov_wasserstein.rs:203— GromovWasserstein::solve has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (8 pts), boolean chains 1 (nesting depth added 10). 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.
TropicalNeuralAnalysis::decision_boundary_complexity (cognitive 19) crates/ruvector-math/src/tropical/neural_analysis.rs:267— TropicalNeuralAnalysis::decision_boundary_complexity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 4 (7 pts) (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.
MetaCognitiveMinCut::strange_loop_step (cognitive 19) crates/ruvector-mincut/src/snn/strange_loop.rs:287— MetaCognitiveMinCut::strange_loop_step has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 pts), match/switch 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.
EpropNetwork::forward (cognitive 19) crates/ruvector-nervous-system/src/plasticity/eprop.rs:390— EpropNetwork::forward has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 3 (6 pts) (nesting depth added 9). 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.
Quantizer3Bit::dequantize (cognitive 19) crates/ruvector-sparse-inference/src/precision/quantizers.rs:116— Quantizer3Bit::dequantize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), 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.
DeviceTree::parse_structure_block (cognitive 19) crates/ruvix/crates/dtb/src/parser.rs:313— DeviceTree::parse_structure_block has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (2 pts), loops 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.
Fat32Fs::read_directory (cognitive 19) crates/ruvix/crates/fs/src/fat32.rs:619— Fat32Fs::read_directory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 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.
ruvix_fs::path::normalize_path (cognitive 19) crates/ruvix/crates/fs/src/path.rs:399— ruvix_fs::path::normalize_path has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2, match/switch 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.
AgentRouter::classify_task (cognitive 19) crates/ruvllm/src/claude_flow/agent_router.rs:200— AgentRouter::classify_task has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 9. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
McpToolRegistry::validate_args (cognitive 19) crates/rvAgent/rvagent-mcp/src/registry.rs:148— McpToolRegistry::validate_args has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 11). 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.
PolicyEvaluator::evaluate_rule (cognitive 19) crates/rvm/crates/rvm-proof/src/policy.rs:90— PolicyEvaluator::evaluate_rule has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Collection._search_rabitq (cognitive 19) crates/ruvector-py/python/ruvector/collection.py:471— Collection._search_rabitq has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (3 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.
reconstructRunnable (cognitive 19) npm/packages/ruvector/src/decompiler/reconstructor.js:339— reconstructRunnable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, error handling 2, loops 2, ternaries 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 4 belong to 16 function items inside it that branch. 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.
inferParamType (cognitive 19) npm/packages/ruvector/src/decompiler/style-improver.js:361— inferParamType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
skipRegex (cognitive 19) npm/packages/ruvector/src/decompiler/statement-parser.js:261— skipRegex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 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.
findMainBundle (cognitive 19) npm/packages/ruvector/src/decompiler/npm-fetch.js:85— findMainBundle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 18 points are the body's own statements and 1 belongs to 4 function literals inside it that branch. 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.
RiskGate::evaluate (cognitive 18) crates/neural-trader-strategies/src/risk.rs:130— RiskGate::evaluate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6 (nesting depth added 2). 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.
TopologyGate::compute_coherence_metrics (cognitive 18) crates/prime-radiant/src/attention/topology.rs:135— TopologyGate::compute_coherence_metrics has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (6 pts), boolean chains 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.
SheafDiffusion::diffuse_adaptive (cognitive 18) crates/prime-radiant/src/cohomology/diffusion.rs:241— SheafDiffusion::diffuse_adaptive has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 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.
InMemoryLineageRepository::verify_no_cycles (cognitive 18) crates/prime-radiant/src/governance/repository.rs:907— InMemoryLineageRepository::verify_no_cycles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (7 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.
AcornGraph::build (cognitive 18) crates/ruvector-acorn/src/graph.rs:50— AcornGraph::build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (5 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.
DagSonaEngine::hash_dag (cognitive 18) crates/ruvector-dag/src/sona/engine.rs:201— DagSonaEngine::hash_dag has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (16 pts), match/switch 1 (2 pts) (nesting depth added 11). 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.
RestoreSession::accept_inner (cognitive 18) crates/ruvector-edge-snapshot/src/restore.rs:235— RestoreSession::accept_inner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), match/switch 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.
P::where_clause (cognitive 18) crates/ruvector-edge-store/src/mem_store/parse.rs:221— P::where_clause has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), match/switch 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.
SpikingGraphAttention::step (cognitive 18) crates/ruvector-graph-transformer/src/biological.rs:914— SpikingGraphAttention::step has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4, boolean chains 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.
HamiltonianGraphNet::forward (cognitive 18) crates/ruvector-graph-transformer/src/physics.rs:155— HamiltonianGraphNet::forward has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 2 (nesting depth added 9). 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.
ruvector_lsm_ann::segment::greedy_search_internal (cognitive 18) crates/ruvector-lsm-ann/src/segment.rs:169— ruvector_lsm_ann::segment::greedy_search_internal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 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.
NetworkContraction::greedy_order (cognitive 18) crates/ruvector-math/src/tensor_networks/contraction.rs:334— NetworkContraction::greedy_order has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 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.
TropicalEigen::power_iteration (cognitive 18) crates/ruvector-math/src/tropical/matrix.rs:197— TropicalEigen::power_iteration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 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.
HnswMaxSim::search_tokens (cognitive 18) crates/ruvector-maxsim/src/hnsw.rs:85— HnswMaxSim::search_tokens has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 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.
ValueNetwork::update (cognitive 18) crates/ruvector-mincut/src/snn/optimizer.rs:240— ValueNetwork::update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (7 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.
MinCutWrapper::process_instances (cognitive 18) crates/ruvector-mincut/src/wrapper/mod.rs:388— MinCutWrapper::process_instances has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (3 pts), 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.
BlockInt4Weights::from_f32_with_block_size (cognitive 18) crates/ruvector-mincut-gated-transformer/src/kernel/quant4.rs:309— BlockInt4Weights::from_f32_with_block_size has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (9 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.
KVQuantQuantizer::quantize_value_nonuniform (cognitive 18) crates/ruvector-mincut-gated-transformer/src/kv_cache/kvquant.rs:274— KVQuantQuantizer::quantize_value_nonuniform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (5 pts), match/switch 1 (3 pts) (nesting depth added 5). 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.
ruvector_rulake::bin::rulake-demo::main (cognitive 18) crates/ruvector-rulake/src/bin/rulake-demo.rs:246— ruvector_rulake::bin::rulake-demo::main has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 6 (8 pts) (nesting depth added 7). 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.
BackwardPushSolver::backward_push_core (cognitive 18) crates/ruvector-solver/src/backward_push.rs:172— BackwardPushSolver::backward_push_core has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector_streaming_qng::bin::benchmark::main (cognitive 18) crates/ruvector-streaming-qng/src/bin/benchmark.rs:235— ruvector_streaming_qng::bin::benchmark::main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
CoreMLStreamIterator::sample_token (cognitive 18) crates/ruvllm/src/backends/coreml_backend.rs:686— CoreMLStreamIterator::sample_token has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 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. This shape REPEATS in the file: one other method here (CoreMLBackend::sample_token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CoreMLBackend::sample_token (cognitive 18) crates/ruvllm/src/backends/coreml_backend.rs:1106— CoreMLBackend::sample_token has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 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. This shape REPEATS in the file: one other method here (CoreMLStreamIterator::sample_token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Gemma2Model::forward (cognitive 18) crates/ruvllm/src/backends/gemma2.rs:847— Gemma2Model::forward has cognitive complexity 18 (threshold 15). Drivers by points: loops 8 (13 pts), if/else 4 (5 pts) (nesting depth added 6). 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.
Phi3Attention::forward (cognitive 18) crates/ruvllm/src/backends/phi3.rs:272— Phi3Attention::forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (6 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.
MythosConfig::validate (cognitive 18) crates/ruvllm/src/models/openmythos/config.rs:145— MythosConfig::validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, match/switch 1 (nesting depth added 3). 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.
RuvLtraAttention::forward (cognitive 18) crates/ruvllm/src/models/ruvltra.rs:510— RuvLtraAttention::forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (6 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.
ruvllm_wasm::workers::feature_detect::optimal_worker_count (cognitive 18) crates/ruvllm-wasm/src/workers/feature_detect.rs:122— ruvllm_wasm::workers::feature_detect::optimal_worker_count has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (18 pts) (nesting depth added 11). 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.
BudgetLedger::try_consume (cognitive 18) crates/rvAgent/rvagent-a2a/src/budget.rs:184— BudgetLedger::try_consume has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (2 pts), boolean chains 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.
LocalShellBackend::execute (cognitive 18) crates/rvAgent/rvagent-backends/src/local_shell.rs:230— LocalShellBackend::execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), match/switch 2 (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.
CowEngine::flush_writes (cognitive 18) crates/rvf/rvf-runtime/src/cow.rs:221— CowEngine::flush_writes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), match/switch 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.
Gather::f (cognitive 18) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:595— Gather::f has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), match/switch 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.
llamaindex._match_filter_value (cognitive 18) crates/ruvector-py/python/ruvector/integrations/llamaindex.py:116— llamaindex._match_filter_value has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
predictName (cognitive 18) REDACTED:187— predictName has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 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.
LearnedWeights::fit (cognitive 17) crates/emergent-time/src/weight_learning.rs:257— LearnedWeights::fit has cognitive complexity 17 (threshold 15). Drivers by points: loops 11 (17 pts) (nesting depth added 6). 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.
emergent_time::wheeler_dewitt::bipartite_constraint (cognitive 17) crates/emergent-time/src/wheeler_dewitt.rs:35— emergent_time::wheeler_dewitt::bipartite_constraint has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (7 pts) (nesting depth added 10). 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.
ruvector_attention_cli::commands::repl::run (cognitive 17) crates/ruvector-attention-cli/src/commands/repl.rs:114— ruvector_attention_cli::commands::repl::run has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 2 (7 pts), loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BnBIvf::search_nprobe_abandon (cognitive 17) crates/ruvector-bet4-ivf-bench/src/kernel.rs:235— BnBIvf::search_nprobe_abandon has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 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.
CapGraphIndex::search (cognitive 17) crates/ruvector-capgated/src/cap_graph.rs:131— CapGraphIndex::search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (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.
ParallelStochasticPhiEngine::compute_phi (cognitive 17) crates/ruvector-consciousness/src/parallel.rs:159— ParallelStochasticPhiEngine::compute_phi has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 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.
StageIVEncoder::encode (cognitive 17) crates/ruvector-crv/src/stage_iv.rs:122— StageIVEncoder::encode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (7 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.
StageVEngine::encode (cognitive 17) crates/ruvector-crv/src/stage_v.rs:110— StageVEngine::encode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (8 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.
QueryDag::compute_depths (cognitive 17) crates/ruvector-dag/src/dag/query_dag.rs:217— QueryDag::compute_depths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 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.
ruvector_dag::sona::reasoning_bank::kmeans_pp_init (cognitive 17) crates/ruvector-dag/src/sona/reasoning_bank.rs:208— ruvector_dag::sona::reasoning_bank::kmeans_pp_init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector_diverse_beam::bin::benchmark::main (cognitive 17) crates/ruvector-diverse-beam/src/bin/benchmark.rs:173— ruvector_diverse_beam::bin::benchmark::main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), 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.
ResourceUrl::parse (cognitive 17) crates/ruvector-edge-auth/src/resource.rs:38— ResourceUrl::parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
Registry::list_packages (cognitive 17) crates/ruvector-edge-registry/src/registry/list.rs:163— Registry::list_packages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), match/switch 2, boolean chains 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.
TenantLedger::idem_store (cognitive 17) crates/ruvector-edge-store/src/ledger/idem.rs:184— TenantLedger::idem_store has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
HyperbatchIterator::reorder_bfs (cognitive 17) crates/ruvector-gnn/src/cold_tier.rs:307— HyperbatchIterator::reorder_bfs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimdTraversal::parallel_dfs (cognitive 17) crates/ruvector-graph/src/optimization/simd_traversal.rs:197— SimdTraversal::parallel_dfs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HailoClusterEmbedder::embed_batch_blocking_with_request_id (cognitive 17) crates/ruvector-hailo-cluster/src/lib.rs:534— HailoClusterEmbedder::embed_batch_blocking_with_request_id has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector_kalshi::ws_client::pump_frames (cognitive 17) crates/ruvector-kalshi/src/ws_client.rs:125— ruvector_kalshi::ws_client::pump_frames has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (7 pts), if/else 1 (5 pts), loops 2 (5 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.
ContinualUpdate::grow (cognitive 17) crates/ruvector-kge/src/optimize/continual.rs:61— ContinualUpdate::grow has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (7 pts) (nesting depth added 10). 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.
WassersteinDistance::wasserstein_finite (cognitive 17) crates/ruvector-math/src/homology/distance.rs:160— WassersteinDistance::wasserstein_finite has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SphericalSpace::frechet_mean (cognitive 17) crates/ruvector-math/src/spherical/mod.rs:226— SphericalSpace::frechet_mean has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 3 (6 pts), match/switch 1 (nesting depth added 8). 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.
DynamicGraph::connected_components (cognitive 17) crates/ruvector-mincut/src/graph/mod.rs:356— DynamicGraph::connected_components has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 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.
BmsspJTreeLevel::native_shortest_paths (cognitive 17) crates/ruvector-mincut/src/jtree/level.rs:410— BmsspJTreeLevel::native_shortest_paths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MinCutMonitor::notify (cognitive 17) crates/ruvector-mincut/src/monitoring/mod.rs:321— MinCutMonitor::notify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 2 (nesting depth added 2). 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.
RuFieldRouter::ingest_json (cognitive 17) crates/ruvector-mincut/src/routing/rufield.rs:194— RuFieldRouter::ingest_json has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5 (nesting depth added 2). 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.
PolicySNN::run_until_decision (cognitive 17) crates/ruvector-mincut/src/snn/optimizer.rs:374— PolicySNN::run_until_decision has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 1 (2 pts) (nesting depth added 9). 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.
AdaptiveKVCache::attention (cognitive 17) crates/ruvector-mincut-gated-transformer/src/kv_cache/manager.rs:265— AdaptiveKVCache::attention has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 1 (2 pts) (nesting depth added 9). 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.
Mr60Parser::feed (cognitive 17) crates/ruvector-mmwave/src/lib.rs:147— Mr60Parser::feed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IvfFlatIndex::train (cognitive 17) crates/ruvector-postgres/src/index/ivfflat.rs:138— IvfFlatIndex::train has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 2 (4 pts) (nesting depth added 9). 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.
NeumannSolver::solve (cognitive 17) crates/ruvector-solver/src/neumann.rs:195— NeumannSolver::solve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (5 pts), boolean chains 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.
ruvector_spann::kmeans::kmeans (cognitive 17) crates/ruvector-spann/src/kmeans.rs:11— ruvector_spann::kmeans::kmeans has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 1 (3 pts) (nesting depth added 10). 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.
SystemCapabilities::select_compute_backend_for_model (cognitive 17) crates/ruvllm/src/autodetect.rs:1107— SystemCapabilities::select_compute_backend_for_model has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 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.
HooksIntegration::fallback_routing (cognitive 17) crates/ruvllm/src/claude_flow/hooks_integration.rs:908— HooksIntegration::fallback_routing has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
LoraAdapter::forward_simd_neon_impl (cognitive 17) crates/ruvllm/src/lora/micro_lora.rs:311— LoraAdapter::forward_simd_neon_impl has cognitive complexity 17 (threshold 15). Drivers by points: loops 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Pattern::infer_category (cognitive 17) crates/ruvllm/src/reasoning_bank/pattern_store.rs:279— Pattern::infer_category has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (nesting depth added 3). 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.
FilesystemBackend::grep_sync (cognitive 17) crates/rvAgent/rvagent-backends/src/filesystem.rs:328— FilesystemBackend::grep_sync has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), match/switch 1 (2 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.
PatchToolCallsMiddleware::before_agent (cognitive 17) crates/rvAgent/rvagent-middleware/src/patch_tool_calls.rs:53— PatchToolCallsMiddleware::before_agent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 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.
rvf_import::bin::rvf_import::main (cognitive 17) crates/rvf/rvf-import/src/bin/rvf_import.rs:57— rvf_import::bin::rvf_import::main has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (10 pts), if/else 5 (7 pts) (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HttpTransport::fetch (cognitive 17) crates/rvf/rvf-server/src/stream_client.rs:103— HttpTransport::fetch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1, match/switch 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.
MetadataSegment::decode (cognitive 17) crates/rvf/rvf-types/src/metadata.rs:159— MetadataSegment::decode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, loops 4 (6 pts), match/switch 2 (4 pts), boolean chains 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.
rvm_proof::verify (cognitive 17) crates/rvm/crates/rvm-proof/src/lib.rs:148— rvm_proof::verify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), match/switch 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.
Scatter::f (cognitive 17) patches/candle-core-0.9.2/src/cpu_backend/mod.rs:743— Scatter::f has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (6 pts), match/switch 3 (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.
Collection._search_hnsw (cognitive 17) crates/ruvector-py/python/ruvector/collection.py:425— Collection._search_hnsw has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (3 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.
salesforce.sync_records_to_collection (cognitive 17) crates/ruvector-py/python/ruvector/integrations/salesforce.py:210— salesforce.sync_records_to_collection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2 (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.
scorePatternMatch (cognitive 17) REDACTED:147— scorePatternMatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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.
ByzantineAggregator::aggregate_weighted (cognitive 16) crates/mcp-brain-server/src/aggregate.rs:78— ByzantineAggregator::aggregate_weighted has cognitive complexity 16 (threshold 15). Drivers by points: loops 8 (11 pts), if/else 4, boolean chains 1 (nesting depth added 3). 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.
HyperbolicAdapter::frechet_mean (cognitive 16) crates/prime-radiant/src/hyperbolic/adapter.rs:110— HyperbolicAdapter::frechet_mean has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 3 (4 pts) (nesting depth added 6). 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.
MinCutAdapter::compute_isolation (cognitive 16) crates/prime-radiant/src/mincut/adapter.rs:157— MinCutAdapter::compute_isolation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 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.
HysteresisTracker::update (cognitive 16) crates/prime-radiant/src/neural_gate/gate.rs:53— HysteresisTracker::update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 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.
RestrictionMap::apply (cognitive 16) crates/prime-radiant/src/substrate/restriction.rs:533— RestrictionMap::apply has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3, match/switch 1 (nesting depth added 6). 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.
ruvector_attention_wasm::utils::random_orthogonal_matrix (cognitive 16) crates/ruvector-attention-wasm/src/utils.rs:136— ruvector_attention_wasm::utils::random_orthogonal_matrix has cognitive complexity 16 (threshold 15). Drivers by points: loops 8 (16 pts) (nesting depth added 8). 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.
TopologicalAnalyzer::compute_clustering_coefficient (cognitive 16) crates/ruvector-core/src/advanced/tda.rs:130— TopologicalAnalyzer::compute_clustering_coefficient has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 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.
TransformerEncoder::layer_forward (cognitive 16) crates/ruvector-decompiler/src/transformer.rs:147— TransformerEncoder::layer_forward has cognitive complexity 16 (threshold 15). Drivers by points: loops 8 (16 pts) (nesting depth added 8). 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.
PolicyKnobs::crossover (cognitive 16) crates/ruvector-domain-expansion/src/policy_kernel.rs:91— PolicyKnobs::crossover has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
Version::parse (cognitive 16) crates/ruvector-edge-registry/src/version.rs:76— Version::parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
GraphDB::load_from_storage (cognitive 16) crates/ruvector-graph/src/graph.rs:72— GraphDB::load_from_storage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 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.
TransactionManager::commit (cognitive 16) crates/ruvector-graph/src/transaction.rs:131— TransactionManager::commit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (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.
PlantedPartition::generate (cognitive 16) crates/ruvector-graph-condense/src/synthetic.rs:62— PlantedPartition::generate has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 3 (7 pts) (nesting depth added 8). 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.
BottleneckDistance::can_match (cognitive 16) crates/ruvector-math/src/homology/distance.rs:79— BottleneckDistance::can_match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 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.
PathDistanceCache::update_predictions (cognitive 16) crates/ruvector-mincut/src/optimization/cache.rs:312— PathDistanceCache::update_predictions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 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.
DegreePresparse::presparse (cognitive 16) crates/ruvector-mincut/src/optimization/dspar.rs:143— DegreePresparse::presparse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2, boolean chains 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.
WitnessTree::build_spanning_tree (cognitive 16) crates/ruvector-mincut/src/witness/mod.rs:425— WitnessTree::build_spanning_tree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 5 (8 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.
SQuatQuantizer::gram_schmidt (cognitive 16) crates/ruvector-mincut-gated-transformer/src/kv_cache/squat.rs:179— SQuatQuantizer::gram_schmidt has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 1 (2 pts) (nesting depth added 9). 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.
HealingWorker::check_health (cognitive 16) crates/ruvector-postgres/src/healing/worker.rs:266— HealingWorker::check_health has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (2 pts), boolean chains 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.
LargePayloadSegment::try_allocate_range (cognitive 16) crates/ruvector-postgres/src/workers/ipc.rs:425— LargePayloadSegment::try_allocate_range has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 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.
FailoverManager::start_monitoring (cognitive 16) crates/ruvector-replication/src/failover.rs:155— FailoverManager::start_monitoring has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BmsspSolver::solve (cognitive 16) crates/ruvector-solver/src/bmssp.rs:719— BmsspSolver::solve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 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.
ReplayEngine::verify_state (cognitive 16) crates/ruvix/crates/nucleus/src/checkpoint.rs:479— ReplayEngine::verify_state has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (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.
PartitionManager::select_next_partition (cognitive 16) crates/ruvix/crates/sched/src/partition.rs:252— PartitionManager::select_next_partition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, 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.
Phi3Model::forward (cognitive 16) crates/ruvllm/src/backends/phi3.rs:718— Phi3Model::forward has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 4 (5 pts) (nesting depth added 5). 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.
ModelCard::to_markdown (cognitive 16) crates/ruvllm/src/hub/model_card.rs:107— ModelCard::to_markdown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 4 (8 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.
RuvLtraModel::forward (cognitive 16) crates/ruvllm/src/models/ruvltra.rs:1028— RuvLtraModel::forward has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 4 (5 pts) (nesting depth added 5). 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.
DiversityAnalyzer::detect_mode_collapse (cognitive 16) crates/ruvllm/src/quality/diversity.rs:256— DiversityAnalyzer::detect_mode_collapse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 2 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
PatternConsolidator::find_mergeable_patterns (cognitive 16) crates/ruvllm/src/reasoning_bank/consolidation.rs:334— PatternConsolidator::find_mergeable_patterns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), boolean chains 2 (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.
PatternStore::merge_similar (cognitive 16) crates/ruvllm/src/reasoning_bank/pattern_store.rs:720— PatternStore::merge_similar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (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.
DatasetGenerator::augment_examples (cognitive 16) crates/ruvllm/src/training/claude_dataset.rs:987— DatasetGenerator::augment_examples has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 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.
McpToolTrainer::predict_tool (cognitive 16) crates/ruvllm/src/training/mcp_tools.rs:582— McpToolTrainer::predict_tool has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
Retriever::generate_fast (cognitive 16) crates/ruvllm_retrieval_diffusion/src/lib.rs:387— Retriever::generate_fast has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (8 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.
LocalFsBackend::execute (cognitive 16) crates/rvAgent/rvagent-tools/src/local.rs:394— LocalFsBackend::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (4 pts), 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.
WasmMcpServer::execute_tool (cognitive 16) crates/rvAgent/rvagent-wasm/src/mcp.rs:729— WasmMcpServer::execute_tool has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 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.
WasmRvfBuilder::parse_internal (cognitive 16) crates/rvAgent/rvagent-wasm/src/rvf.rs:483— WasmRvfBuilder::parse_internal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), match/switch 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.
rvf_crypto::attestation::verify_attestation_witness_payload (cognitive 16) crates/rvf/rvf-crypto/src/attestation.rs:213— rvf_crypto::attestation::verify_attestation_witness_payload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2, boolean chains 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.
AgiContainerBuilder::build_sections (cognitive 16) crates/rvf/rvf-runtime/src/agi_container.rs:208— AgiContainerBuilder::build_sections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
BuddyAllocator::find_first_free (cognitive 16) crates/rvm/crates/rvm-memory/src/allocator.rs:313— BuddyAllocator::find_first_free has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, 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.
ReconstructionPipeline::reconstruct (cognitive 16) crates/rvm/crates/rvm-memory/src/reconstruction.rs:183— ReconstructionPipeline::reconstruct has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), 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.
cli.serve (cognitive 16) crates/ruvector-py/python/ruvector/cli.py:461— cli.serve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 4 (6 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ruvector_graph.reachable (cognitive 16) python/portfolio/ruvector-graph/src/ruvector_graph/__init__.py:7— ruvector_graph.reachable 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.
expandCommaExprs (cognitive 16) npm/packages/ruvector/src/decompiler/style-improver.js:119— expandCommaExprs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 2 (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.
generateJSDoc (cognitive 16) npm/packages/ruvector/src/decompiler/style-improver.js:238— generateJSDoc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts) (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.
addIntentAsync (cognitive 16) npm/packages/router/index.js:149— addIntentAsync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5, loops 2 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validateToolCall (cognitive 16) npm/packages/ruvector/src/optimizer/tool-schemas.js:120— validateToolCall has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Near-duplicate member family (12 members, 6 shared lines) · ×1
Near-duplicate member family (12 members, 6 shared lines) crates/ruvector-attention-unified-wasm/src/neural.rs:101— crates/ruvector-attention-unified-wasm/src/neural.rs:101-111 | crates/ruvector-attention-unified-wasm/src/neural.rs:172-182 | crates/ruvector-attention-unified-wasm/src/neural.rs:224-234 | crates/ruvector-attention-unified-wasm/src/neural.rs:270-280 | crates/ruvector-attention-unified-wasm/src/neural.rs:317-327 | crates/ruvector-attention-unified-wasm/src/neural.rs:369-379 | crates/ruvector-attention-wasm/src/attention.rs:70-80 | crates/ruvector-attention-wasm/src/attention.rs:128-138 | crates/ruvector-attention-wasm/src/attention.rs:173-183 | crates/ruvector-attention-wasm/src/attention.rs:212-222 | crates/ruvector-attention-wasm/src/attention.rs:252-262 | crates/ruvector-attention-wasm/src/attention.rs:297-307 — These 12 members are variants of one another: a block of 6 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 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 12 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 20 shared lines) · ×1
Near-duplicate member family (8 members, 20 shared lines) crates/ruvector-attention/src/curvature/fused_attention.rs:278— crates/ruvector-attention/src/curvature/fused_attention.rs:278-302 | crates/ruvector-attention/src/curvature/tangent_space.rs:167-191 | crates/ruvector-attention/src/info_geometry/fisher.rs:162-186 | crates/ruvector-attention/src/pde_attention/diffusion.rs:176-200 | crates/ruvector-attention/src/topology/gated_attention.rs:240-264 | crates/ruvector-attention/src/transport/cached_projections.rs:68-92 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:289-313 | crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:119-146 — These 8 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 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 8 times.
D4 · Code Duplication· Near-duplicate member family (7 members, 12 shared lines) · ×1
Near-duplicate member family (7 members, 12 shared lines) crates/ruvector-attention/src/graph/dual_space.rs:277— crates/ruvector-attention/src/graph/dual_space.rs:277-291 | crates/ruvector-attention/src/graph/edge_featured.rs:296-311 | crates/ruvector-attention/src/graph/rope.rs:225-239 | crates/ruvector-attention/src/moe/moe_attention.rs:184-198 | crates/ruvector-attention/src/sparse/flash.rs:150-164 | crates/ruvector-attention/src/sparse/linear.rs:181-195 | crates/ruvector-attention/src/sparse/local_global.rs:139-153 — These 7 members are variants of one another: a block of 12 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 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 7 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 14 shared lines) · ×1
Near-duplicate member family (5 members, 14 shared lines) crates/ruvector-attention/src/curvature/fused_attention.rs:318— crates/ruvector-attention/src/curvature/fused_attention.rs:318-333 | crates/ruvector-attention/src/pde_attention/diffusion.rs:222-237 | crates/ruvector-attention/src/topology/gated_attention.rs:280-295 | crates/ruvector-attention/src/transport/centroid_ot.rs:327-342 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:316-331 — These 5 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 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 5 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 11 shared lines) · ×1
Near-duplicate member family (5 members, 11 shared lines) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2203— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2203-2241 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2304-2345 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1345-1389 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1457-1505 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2727-2765 — These 5 members are variants of one another: a block of 11 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 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 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 91 shared lines) · ×1
Near-duplicate member family (4 members, 91 shared lines) crates/ruvector-graph/src/cypher/parser.rs:184— crates/ruvector-graph/src/cypher/parser.rs:184-319 | crates/ruvector-graph/src/cypher/parser.rs:322-418 | crates/rvlite/src/cypher/parser.rs:184-319 | crates/rvlite/src/cypher/parser.rs:322-418 — These 4 members are variants of one another: a block of 91 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 46 shared lines) · ×1
Near-duplicate member family (4 members, 46 shared lines) patches/hnsw_rs/src/hnswio.rs:436— patches/hnsw_rs/src/hnswio.rs:436-524 | patches/hnsw_rs/src/hnswio.rs:536-613 | scripts/patches/hnsw_rs/src/hnswio.rs:436-524 | scripts/patches/hnsw_rs/src/hnswio.rs:536-613 — These 4 members are variants of one another: a block of 46 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 38 shared lines) · ×1
Near-duplicate member family (4 members, 38 shared lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1252— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1252-1311 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1450-1525 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1454-1512 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1716-1789 — These 4 members are variants of one another: a block of 38 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 30 shared lines) · ×1
Near-duplicate member family (4 members, 30 shared lines) crates/ruvector-cnn/src/simd/neon.rs:18— crates/ruvector-cnn/src/simd/neon.rs:18-83 | crates/ruvector-core/src/simd_intrinsics.rs:652-724 | crates/ruvector-core/src/simd_intrinsics.rs:732-793 | crates/ruvector-core/src/simd_intrinsics.rs:861-923 — These 4 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 22 shared lines) · ×1
Near-duplicate member family (4 members, 22 shared lines) patches/hnsw_rs/src/hnsw.rs:1535— patches/hnsw_rs/src/hnsw.rs:1535-1584 | patches/hnsw_rs/src/hnsw.rs:1595-1684 | scripts/patches/hnsw_rs/src/hnsw.rs:1421-1470 | scripts/patches/hnsw_rs/src/hnsw.rs:1481-1570 — These 4 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 20 shared lines) · ×1
Near-duplicate member family (4 members, 20 shared lines) crates/ruvector-core/src/simd_intrinsics.rs:207— crates/ruvector-core/src/simd_intrinsics.rs:207-268 | crates/ruvector-core/src/simd_intrinsics.rs:278-328 | crates/ruvector-core/src/simd_intrinsics.rs:339-396 | crates/ruvector-core/src/simd_intrinsics.rs:406-461 — These 4 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 19 shared lines) · ×1
Near-duplicate member family (4 members, 19 shared lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1252— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1252-1311 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1454-1512 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1514-1577 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1791-1871 — These 4 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 11 shared lines) · ×1
Near-duplicate member family (4 members, 11 shared lines) patches/candle-core-0.8.4/src/safetensors.rs:279— patches/candle-core-0.8.4/src/safetensors.rs:279-297 | patches/candle-core-0.8.4/src/safetensors.rs:306-332 | patches/candle-core-0.9.2/src/safetensors.rs:434-452 | patches/candle-core-0.9.2/src/safetensors.rs:461-487 — These 4 members are variants of one another: a block of 11 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 9 shared lines) · ×1
Near-duplicate member family (4 members, 9 shared lines) crates/ruvix/crates/boot/src/manifest.rs:642— crates/ruvix/crates/boot/src/manifest.rs:642-708 | crates/rvf/rvf-quant/src/binary.rs:46-85 | crates/rvf/rvf-runtime/src/store.rs:4425-4499 | crates/rvf/rvf-wasm/src/segment.rs:17-77 — These 4 members are variants of one another: a block of 9 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 7 shared lines) · ×1
Near-duplicate member family (4 members, 7 shared lines) crates/ruvector-bench/src/bin/memory_benchmark.rs:93— crates/ruvector-bench/src/bin/memory_benchmark.rs:93-194 | crates/ruvector-bench/src/bin/memory_benchmark.rs:196-300 | crates/ruvector-bench/src/bin/memory_benchmark.rs:302-398 | crates/ruvector-bench/src/bin/profiling_benchmark.rs:131-182 — These 4 members are variants of one another: a block of 7 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 2 shared lines) · ×1
Near-duplicate member family (4 members, 2 shared lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:890— patches/candle-core-0.8.4/src/quantized/k_quants.rs:890-1009 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1095-1149 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:997-1117 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1298-1350 — These 4 members are variants of one another: a block of 2 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 54 shared lines) · ×1
Near-duplicate member family (3 members, 54 shared lines) crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:98— crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:98-202 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:204-305 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:307-409 — These 3 members are variants of one another: a block of 54 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 53 shared lines) · ×1
Near-duplicate member family (3 members, 53 shared lines) crates/ruvllm-wasm/src/workers/pool.rs:716— crates/ruvllm-wasm/src/workers/pool.rs:716-798 | crates/ruvllm-wasm/src/workers/pool.rs:880-970 | crates/ruvllm-wasm/src/workers/pool.rs:979-1081 — These 3 members are variants of one another: a block of 53 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 48 shared lines) · ×1
Near-duplicate member family (3 members, 48 shared lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1011— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1011-1092 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1119-1198 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1200-1295 — These 3 members are variants of one another: a block of 48 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 45 shared lines) · ×1
Near-duplicate member family (3 members, 45 shared lines) crates/ruvllm_sparse_attention/src/attention.rs:137— crates/ruvllm_sparse_attention/src/attention.rs:137-340 | crates/ruvllm_sparse_attention/src/attention.rs:373-499 | crates/ruvllm_sparse_attention/src/attention.rs:1306-1512 — These 3 members are variants of one another: a block of 45 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 43 shared lines) · ×1
Near-duplicate member family (3 members, 43 shared lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1643— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1643-1713 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1989-2059 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2061-2139 — These 3 members are variants of one another: a block of 43 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 34 shared lines) · ×1
Near-duplicate member family (3 members, 34 shared lines) crates/ruvector-entropy-ann/src/search.rs:79— crates/ruvector-entropy-ann/src/search.rs:79-143 | crates/ruvector-entropy-ann/src/search.rs:212-283 | crates/ruvector-entropy-ann/src/search.rs:338-447 — These 3 members are variants of one another: a block of 34 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 26 shared lines) · ×1
Near-duplicate member family (3 members, 26 shared lines) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:420— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:420-507 | crates/ruvector-profiler/src/config_hash.rs:20-93 | crates/rvf/rvf-types/src/sha256.rs:129-187 — These 3 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 24 shared lines) · ×1
Near-duplicate member family (3 members, 24 shared lines) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1514— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1514-1571 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1819-1881 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:2004-2066 — These 3 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 13 shared lines) · ×1
Near-duplicate member family (3 members, 13 shared lines) patches/candle-core-0.8.4/src/cpu/avx.rs:131— patches/candle-core-0.8.4/src/cpu/avx.rs:131-147 | patches/candle-core-0.9.2/src/cpu/avx.rs:131-147 | patches/candle-core-0.9.2/src/cpu/avx.rs:210-226 — These 3 members are variants of one another: a block of 13 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
Near-duplicate member pair (519 shared lines) patches/candle-core-0.8.4/src/backprop.rs:163— patches/candle-core-0.8.4/src/backprop.rs:163-713 | patches/candle-core-0.9.2/src/backprop.rs:165-728 — These two members are variants of one another: 519 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.
Near-duplicate member pair (93 shared lines) patches/candle-core-0.8.4/src/metal_backend/mod.rs:916— patches/candle-core-0.8.4/src/metal_backend/mod.rs:916-1019 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:962-1069 — These two members are variants of one another: 93 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.
Near-duplicate member pair (91 shared lines) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:171— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:171-273 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:220-322 — These two members are variants of one another: 91 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.
Near-duplicate member pair (85 shared lines) patches/candle-core-0.8.4/src/npy.rs:102— patches/candle-core-0.8.4/src/npy.rs:102-195 | patches/candle-core-0.9.2/src/npy.rs:109-202 — These two members are variants of one another: 85 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.
Near-duplicate member pair (81 shared lines) crates/ruvector-postgres/src/graph/sparql/executor.rs:1232— crates/ruvector-postgres/src/graph/sparql/executor.rs:1232-1407 | crates/rvlite/src/sparql/executor.rs:607-697 — These two members are variants of one another: 81 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.
Near-duplicate member pair (73 shared lines) patches/candle-core-0.8.4/src/display.rs:200— patches/candle-core-0.8.4/src/display.rs:200-285 | patches/candle-core-0.9.2/src/display.rs:211-296 — These two members are variants of one another: 73 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.
Near-duplicate member pair (67 shared lines) patches/candle-core-0.8.4/src/cpu_backend/utils.rs:90— patches/candle-core-0.8.4/src/cpu_backend/utils.rs:90-161 | patches/candle-core-0.9.2/src/cpu_backend/utils.rs:139-210 — These two members are variants of one another: 67 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.
Near-duplicate member pair (65 shared lines) patches/hnsw_rs/src/hnswio.rs:1221— patches/hnsw_rs/src/hnswio.rs:1221-1289 | scripts/patches/hnsw_rs/src/hnswio.rs:1221-1289 — These two members are variants of one another: 65 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.
Near-duplicate member pair (62 shared lines) crates/ruvllm/src/backends/coreml_backend.rs:686— crates/ruvllm/src/backends/coreml_backend.rs:686-764 | crates/ruvllm/src/backends/coreml_backend.rs:1106-1187 — These two members are variants of one another: 62 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.
Near-duplicate member pair (57 shared lines) crates/ruvllm/src/backends/phi3.rs:277— crates/ruvllm/src/backends/phi3.rs:277-364 | crates/ruvllm/src/models/ruvltra.rs:515-616 — These two members are variants of one another: 57 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.
Near-duplicate member pair (53 shared lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:769— patches/candle-core-0.8.4/src/quantized/k_quants.rs:769-832 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:820-882 — These two members are variants of one another: 53 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.
Near-duplicate member pair (52 shared lines) crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:304— crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:304-390 | crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:420-504 — These two members are variants of one another: 52 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.
Near-duplicate member pair (47 shared lines) crates/ruvllm/src/quantize/pi_quant_simd.rs:456— crates/ruvllm/src/quantize/pi_quant_simd.rs:456-571 | crates/ruvllm/src/quantize/pi_quant_simd.rs:733-823 — These two members are variants of one another: 47 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.
Near-duplicate member pair (46 shared lines) patches/candle-core-0.8.4/src/metal_backend/mod.rs:1109— patches/candle-core-0.8.4/src/metal_backend/mod.rs:1109-1165 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1161-1218 — These two members are variants of one another: 46 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.
Near-duplicate member pair (38 shared lines) crates/ruvector-pq-search/src/codebook.rs:143— crates/ruvector-pq-search/src/codebook.rs:143-204 | crates/ruvector-pq-search/src/ivf_pq.rs:121-180 — These two members are variants of one another: 38 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.
Near-duplicate member pair (30 shared lines) crates/ruvector-diverse-beam/src/search.rs:102— crates/ruvector-diverse-beam/src/search.rs:102-141 | crates/ruvector-diverse-beam/src/search.rs:259-315 — These two members are variants of one another: 30 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.
Near-duplicate member pair (28 shared lines) crates/ruvllm_sparse_attention/src/attention.rs:1073— crates/ruvllm_sparse_attention/src/attention.rs:1073-1186 | crates/ruvllm_sparse_attention/src/attention.rs:1912-2028 — These two members are variants of one another: 28 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.
Near-duplicate member pair (27 shared lines) crates/ruvector-math/src/product_manifold/manifold.rs:452— crates/ruvector-math/src/product_manifold/manifold.rs:452-498 | crates/ruvector-math/src/spherical/mod.rs:226-273 — These two members are variants of one another: 27 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.
Near-duplicate member pair (20 shared lines) crates/ruvector-speculative-ann/src/bin/benchmark.rs:157— crates/ruvector-speculative-ann/src/bin/benchmark.rs:157-183 | crates/ruvector-speculative-ann/src/bin/benchmark.rs:247-284 — These two members are variants of one another: 20 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.
Near-duplicate member pair (18 shared lines) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1221— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1221-1243 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1329-1351 — These two members are variants of one another: 18 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (137 corresponding lines) · ×1
Edited copy of a member (137 corresponding lines) crates/ruvector-postgres/src/graph/sparql/parser.rs:791— crates/ruvector-postgres/src/graph/sparql/parser.rs:791-927 | crates/rvlite/src/sparql/parser.rs:797-933 — These two members are one piece of code written twice and then edited apart: 137 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1585— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1585-1641 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1930-1987 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:965— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:965-1027 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1161-1223 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) patches/candle-core-0.8.4/src/quantized/gguf_file.rs:494— patches/candle-core-0.8.4/src/quantized/gguf_file.rs:494-538 | patches/candle-core-0.9.2/src/quantized/gguf_file.rs:495-539 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (54 corresponding lines) · ×1
Edited copy of a member (54 corresponding lines) patches/candle-core-0.8.4/src/tensor.rs:1412— patches/candle-core-0.8.4/src/tensor.rs:1412-1465 | patches/candle-core-0.9.2/src/tensor.rs:1736-1789 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:717— patches/candle-core-0.8.4/src/quantized/k_quants.rs:717-766 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:767-817 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) patches/hnsw_rs/src/hnswio.rs:1126— patches/hnsw_rs/src/hnswio.rs:1126-1178 | scripts/patches/hnsw_rs/src/hnswio.rs:1126-1178 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) patches/candle-core-0.8.4/src/quantized/ggml_file.rs:194— patches/candle-core-0.8.4/src/quantized/ggml_file.rs:194-222 | patches/candle-core-0.9.2/src/quantized/ggml_file.rs:195-223 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1528— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1528-1563 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1874-1908 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1397— patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1397-1448 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1889-1940 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) patches/hnsw_rs/src/libext.rs:213— patches/hnsw_rs/src/libext.rs:213-770 | scripts/patches/hnsw_rs/src/libext.rs:213-770 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) crates/ruvector-postgres/src/graph/sparql/executor.rs:1181— crates/ruvector-postgres/src/graph/sparql/executor.rs:1181-1226 | crates/rvlite/src/sparql/executor.rs:547-587 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2249— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2249-2296 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2773-2820 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) crates/ruvector-attention/src/moe/expert.rs:211— crates/ruvector-attention/src/moe/expert.rs:211-243 | crates/ruvector-attention/src/sparse/linear.rs:119-173 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) patches/candle-core-0.8.4/src/storage.rs:333— patches/candle-core-0.8.4/src/storage.rs:333-360 | patches/candle-core-0.9.2/src/storage.rs:342-369 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) patches/candle-core-0.8.4/src/streaming.rs:177— patches/candle-core-0.8.4/src/streaming.rs:177-196 | patches/candle-core-0.9.2/src/streaming.rs:177-196 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) patches/hnsw_rs/src/hnswio.rs:1181— patches/hnsw_rs/src/hnswio.rs:1181-1212 | scripts/patches/hnsw_rs/src/hnswio.rs:1181-1212 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) crates/photonlayer-bench/src/learn.rs:107— crates/photonlayer-bench/src/learn.rs:107-144 | crates/photonlayer-bench/src/mnist_bench.rs:229-254 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) crates/ruvector-attention/src/graph/dual_space.rs:14— crates/ruvector-attention/src/graph/dual_space.rs:14-26 | crates/ruvector-attention/src/moe/expert.rs:103-115 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) crates/ruvector-delta-wasm/src/simd.rs:118— crates/ruvector-delta-wasm/src/simd.rs:118-146 | crates/ruvector-delta-wasm/src/simd.rs:155-178 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) crates/ruvector-core/src/advanced_features/mmr.rs:199— crates/ruvector-core/src/advanced_features/mmr.rs:199-209 | crates/ruvector-core/src/advanced_features/product_quantization.rs:293-312 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) scripts/train-lora.py:46— scripts/train-lora.py:46-57 | scripts/train-lora.py:61-73 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (29 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (29 members, 50+ identical tokens) crates/mcp-brain/src/embed.rs:402— crates/mcp-brain/src/embed.rs:402-413 | crates/prime-radiant/src/attention/diffusion.rs:247-257 | crates/prime-radiant/src/attention/topology.rs:226-236 | crates/prime-radiant/src/ruvllm_integration/traits.rs:350-364 | crates/prime-radiant/src/storage/file.rs:556-567 | crates/prime-radiant/src/storage/memory.rs:196-210 | REDACTED:861-875 | crates/ruvector-attention-unified-wasm/src/lib.rs:262-280 | crates/ruvector-attention-wasm/src/utils.rs:18-32 | crates/ruvector-attention/src/training/loss.rs:42-47 | crates/ruvector-attention/src/training/mining.rs:64-69 | crates/ruvector-cli/src/cli/hooks.rs:657-669 | crates/ruvector-cluster-rag/src/lib.rs:60-69 | crates/ruvector-core/src/advanced/neural_hash.rs:347-357 | crates/ruvector-core/src/advanced_features/graph_rag.rs:490-501 | crates/ruvector-core/src/simd_intrinsics.rs:1191-1196 | crates/ruvector-dag/src/sona/reasoning_bank.rs:189-198 | crates/ruvector-diverse-beam/src/lib.rs:60-70 | crates/ruvector-gnn-wasm/src/lib.rs:347-365 | crates/ruvector-graph-transformer/src/biological.rs:63-120 | crates/ruvector-hybrid/src/main.rs:44-53 | crates/ruvector-mincut-gated-transformer/src/spectral.rs:753-777 | crates/ruvector-nervous-system/src/integration/ruvector.rs:392-402 | crates/ruvector-postgres/src/routing/router.rs:410-424 | crates/ruvector-spann/src/distance.rs:19-28 | crates/ruvllm-wasm/src/hnsw_router.rs:295-309 | crates/ruvllm/src/context/working_memory.rs:559-573 | crates/ruvllm/src/quality/coherence.rs:687-701 | crates/ruvllm/src/quality/diversity.rs:738-752 — These 29 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 29 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 29 times.
D4 · Code Duplication· Members sharing a duplicated core (21 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (21 members, 50+ identical tokens) crates/photonlayer-bench/src/privacy.rs:61— crates/photonlayer-bench/src/privacy.rs:61-138 | crates/prime-radiant/src/simd/matrix.rs:315-325 | crates/ruvector-attn-mincut/src/gating.rs:11-24 | crates/ruvector-cnn/src/backbone/mobilenet.rs:353-481 | crates/ruvector-consciousness/src/rsvd_emergence.rs:49-153 | crates/ruvector-graph-condense/src/gnn_eval.rs:153-166 | crates/ruvllm-wasm/src/workers/mod.rs:337-351 | crates/ruvllm-wasm/src/workers/pool.rs:808-869 | crates/ruvllm/src/backends/gemma2.rs:523-538 | crates/ruvllm/src/backends/gemma2.rs:639-662 | crates/ruvllm/src/backends/phi3.rs:399-414 | crates/ruvllm/src/backends/phi3.rs:517-540 | crates/ruvllm/src/kernels/matmul.rs:845-855 | crates/ruvllm/src/kernels/matmul.rs:1165-1175 | crates/ruvllm/src/models/ruvltra.rs:643-667 | crates/ruvllm/src/models/ruvltra.rs:815-862 | crates/ruvllm/src/models/ruvltra_medium.rs:643-666 | crates/ruvllm/src/models/ruvltra_medium.rs:736-758 | crates/ruvllm/src/qat/lora_qat.rs:681-691 | crates/ruvllm/src/qat/lora_qat.rs:694-706 | crates/ruvllm/src/qat/lora_qat.rs:709-720 — These 21 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 21 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 21 times.
D4 · Code Duplication· Members sharing a duplicated core (16 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (16 members, 50+ identical tokens) crates/ruvector-attention-node/src/attention.rs:66— crates/ruvector-attention-node/src/attention.rs:66-79 | crates/ruvector-attention-node/src/attention.rs:95-108 | crates/ruvector-attention-node/src/attention.rs:158-171 | crates/ruvector-attention-node/src/attention.rs:257-270 | crates/ruvector-attention-node/src/attention.rs:316-329 | crates/ruvector-attention-node/src/attention.rs:375-388 | crates/ruvector-attention-node/src/attention.rs:441-454 | crates/ruvector-attention-node/src/attention.rs:536-549 | crates/ruvector-attention-node/src/graph.rs:82-95 | crates/ruvector-attention-node/src/graph.rs:111-128 | crates/ruvector-attention-node/src/graph.rs:207-220 | crates/ruvector-attention-node/src/graph.rs:238-258 | crates/ruvector-attention-node/src/graph.rs:366-379 | crates/ruvector-attention-node/src/graph.rs:387-398 | crates/ruvector-attention-node/src/training.rs:77-91 | crates/ruvector-attention-node/src/training.rs:152-166 — These 16 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 16 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 16 times.
D4 · Code Duplication· Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (15 members, 50+ identical tokens) crates/ruvector-cnn/src/kernels/int8_avx2.rs:96— crates/ruvector-cnn/src/kernels/int8_avx2.rs:96-230 | crates/ruvector-cnn/src/kernels/int8_avx2.rs:251-339 | crates/ruvector-cnn/src/kernels/int8_neon.rs:85-226 | crates/ruvector-cnn/src/kernels/int8_neon.rs:246-324 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:92-241 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:259-297 | crates/ruvector-cnn/src/simd/avx2.rs:211-351 | crates/ruvector-cnn/src/simd/avx2.rs:370-500 | crates/ruvector-cnn/src/simd/avx2.rs:517-624 | crates/ruvector-cnn/src/simd/neon.rs:219-290 | crates/ruvector-cnn/src/simd/neon.rs:308-373 | crates/ruvector-cnn/src/simd/scalar.rs:107-143 | crates/ruvector-cnn/src/simd/scalar.rs:156-190 | crates/ruvector-cnn/src/simd/wasm.rs:189-263 | crates/ruvector-cnn/src/simd/wasm.rs:283-352 — These 15 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 15 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 15 times.
Duplicated block (197 lines × 2) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1648— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1648-1844 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1849-2045 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (185 lines × 2) patches/hnsw_rs/src/datamap.rs:49— patches/hnsw_rs/src/datamap.rs:49-233 | scripts/patches/hnsw_rs/src/datamap.rs:49-233 — before extracting anything, compare `patches/hnsw_rs/src/datamap.rs` and `scripts/patches/hnsw_rs/src/datamap.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 231 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 (137 lines × 2) patches/hnsw_rs/src/hnsw.rs:1084— patches/hnsw_rs/src/hnsw.rs:1084-1220 | scripts/patches/hnsw_rs/src/hnsw.rs:1070-1206 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (118 lines × 2) patches/hnsw_rs/src/hnsw.rs:952— patches/hnsw_rs/src/hnsw.rs:952-1069 | scripts/patches/hnsw_rs/src/hnsw.rs:938-1055 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (112 lines × 2) patches/hnsw_rs/src/hnsw.rs:1412— patches/hnsw_rs/src/hnsw.rs:1412-1523 | scripts/patches/hnsw_rs/src/hnsw.rs:1298-1409 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (104 lines × 2) patches/hnsw_rs/src/hnswio.rs:939— patches/hnsw_rs/src/hnswio.rs:939-1042 | scripts/patches/hnsw_rs/src/hnswio.rs:939-1042 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (102 lines × 2) crates/ruvector-kge-ffi/src/pipeline.rs:151— crates/ruvector-kge-ffi/src/pipeline.rs:151-252 | crates/ruvector-kge-wasm/src/pipeline.rs:151-252 — before extracting anything, compare `crates/ruvector-kge-ffi/src/pipeline.rs` and `crates/ruvector-kge-wasm/src/pipeline.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 216 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 (100 lines × 2) crates/ruvector-kge-ffi/src/optimize.rs:63— crates/ruvector-kge-ffi/src/optimize.rs:63-162 | crates/ruvector-kge-wasm/src/optimize.rs:63-162 — before extracting anything, compare `crates/ruvector-kge-ffi/src/optimize.rs` and `crates/ruvector-kge-wasm/src/optimize.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 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 (96 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1258— crates/ruvector-postgres/src/graph/sparql/parser.rs:1258-1353 | crates/rvlite/src/sparql/parser.rs:1264-1359 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (92 lines × 2) crates/ruvector-kge-ffi/src/pipeline.rs:51— crates/ruvector-kge-ffi/src/pipeline.rs:51-142 | crates/ruvector-kge-wasm/src/pipeline.rs:51-142 — before extracting anything, compare `crates/ruvector-kge-ffi/src/pipeline.rs` and `crates/ruvector-kge-wasm/src/pipeline.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 216 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 (91 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1034— crates/ruvector-postgres/src/graph/sparql/parser.rs:1034-1124 | crates/rvlite/src/sparql/parser.rs:1040-1130 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (90 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:2036— crates/ruvector-postgres/src/graph/sparql/parser.rs:2036-2125 | crates/rvlite/src/sparql/parser.rs:2043-2132 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (88 lines × 2) patches/hnsw_rs/src/hnsw.rs:1597— patches/hnsw_rs/src/hnsw.rs:1597-1684 | scripts/patches/hnsw_rs/src/hnsw.rs:1483-1570 — before extracting anything, compare `patches/hnsw_rs/src/hnsw.rs` and `scripts/patches/hnsw_rs/src/hnsw.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 1027 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 (86 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:214— patches/candle-core-0.8.4/src/backprop.rs:214-299 | patches/candle-core-0.9.2/src/backprop.rs:216-301 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (81 lines × 2) patches/hnsw_rs/src/hnswio.rs:156— patches/hnsw_rs/src/hnswio.rs:156-236 | scripts/patches/hnsw_rs/src/hnswio.rs:156-236 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (79 lines × 2) patches/hnsw_rs/src/libext.rs:540— patches/hnsw_rs/src/libext.rs:540-618 | scripts/patches/hnsw_rs/src/libext.rs:540-618 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (77 lines × 2) crates/ruvector-graph/src/cypher/parser.rs:1098— crates/ruvector-graph/src/cypher/parser.rs:1098-1174 | crates/rvlite/src/cypher/parser.rs:1007-1083 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (76 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:638— patches/candle-core-0.8.4/src/backprop.rs:638-713 | patches/candle-core-0.9.2/src/backprop.rs:653-728 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (64–73 lines × 4) crates/ruvector-graph/src/cypher/parser.rs:188— crates/ruvector-graph/src/cypher/parser.rs:188-260 | crates/ruvector-graph/src/cypher/parser.rs:324-387 | crates/rvlite/src/cypher/parser.rs:188-260 | crates/rvlite/src/cypher/parser.rs:324-387 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (60–73 lines × 2) crates/ruvector-solver/src/backward_push.rs:197— crates/ruvector-solver/src/backward_push.rs:197-269 | crates/ruvector-solver/src/backward_push.rs:418-477 — 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 (71 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:368— crates/ruvector-postgres/src/graph/sparql/parser.rs:368-438 | crates/rvlite/src/sparql/parser.rs:367-437 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (3–69 lines × 4) patches/candle-core-0.8.4/src/backprop.rs:426— patches/candle-core-0.8.4/src/backprop.rs:426-494 | patches/candle-core-0.8.4/src/backprop.rs:500-502 | patches/candle-core-0.9.2/src/backprop.rs:441-509 | patches/candle-core-0.9.2/src/backprop.rs:515-517 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (68 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:138— crates/ruvector-postgres/src/graph/sparql/parser.rs:138-205 | crates/rvlite/src/sparql/parser.rs:137-204 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (67 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:249— crates/ruvector-postgres/src/graph/sparql/parser.rs:249-315 | crates/rvlite/src/sparql/parser.rs:248-314 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (66 lines × 2) patches/candle-core-0.8.4/src/pickle.rs:651— patches/candle-core-0.8.4/src/pickle.rs:651-716 | patches/candle-core-0.9.2/src/pickle.rs:675-740 — before extracting anything, compare `patches/candle-core-0.8.4/src/pickle.rs` and `patches/candle-core-0.9.2/src/pickle.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 506 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 (65 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:442— crates/ruvector-graph-node/src/cypher_exec.rs:442-506 | crates/ruvector-py/src/graph/cypher_exec.rs:156-220 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_exec.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 147 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 (64 lines × 2) patches/candle-core-0.8.4/src/backprop.rs:56— patches/candle-core-0.8.4/src/backprop.rs:56-119 | patches/candle-core-0.9.2/src/backprop.rs:57-120 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (59–63 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:954— crates/ruvector-graph-transformer-node/src/transformer.rs:954-1012 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:1017-1079 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (51–62 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:1043— crates/ruvector-graph-transformer-node/src/transformer.rs:1043-1093 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:1115-1176 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (62 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:792— crates/ruvector-postgres/src/graph/sparql/parser.rs:792-853 | crates/rvlite/src/sparql/parser.rs:798-859 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (61 lines × 2) patches/hnsw_rs/src/libext.rs:464— patches/hnsw_rs/src/libext.rs:464-524 | scripts/patches/hnsw_rs/src/libext.rs:464-524 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (56–59 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:714— crates/ruvector-graph-transformer-node/src/transformer.rs:714-769 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:760-818 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (48–52 lines × 2) crates/ruvector-postgres/src/quantization/scalar.rs:117— crates/ruvector-postgres/src/quantization/scalar.rs:117-164 | crates/ruvector-postgres/src/types/scalarvec.rs:245-296 — before extracting anything, compare `crates/ruvector-postgres/src/quantization/scalar.rs` and `crates/ruvector-postgres/src/types/scalarvec.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 94 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 (43–52 lines × 2) crates/ruvector-wasm/kernels/rope.rs:88— crates/ruvector-wasm/kernels/rope.rs:88-139 | crates/ruvector-wasm/kernels/rope.rs:165-207 — 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 (51 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:1534— crates/ruvector-postgres/src/graph/sparql/parser.rs:1534-1584 | crates/rvlite/src/sparql/parser.rs:1541-1591 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (49 lines × 2) crates/ruvector-postgres/src/graph/sparql/parser.rs:317— crates/ruvector-postgres/src/graph/sparql/parser.rs:317-365 | crates/rvlite/src/sparql/parser.rs:316-364 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (48 lines × 3) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:133— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:133-180 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:194-241 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:109-156 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 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 (45–48 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:595— crates/ruvector-graph-transformer-node/src/transformer.rs:595-639 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:636-683 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (48 lines × 2) patches/candle-core-0.8.4/src/metal_backend/mod.rs:422— patches/candle-core-0.8.4/src/metal_backend/mod.rs:422-469 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:536-583 — before extracting anything, compare `patches/candle-core-0.8.4/src/metal_backend/mod.rs` and `patches/candle-core-0.9.2/src/metal_backend/mod.rs` as WHOLE FILES: this scan already matched 75 separate duplicated blocks between them, totalling at least 1076 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 (47 lines × 2) patches/candle-core-0.8.4/src/tensor.rs:1413— patches/candle-core-0.8.4/src/tensor.rs:1413-1459 | patches/candle-core-0.9.2/src/tensor.rs:1737-1783 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (44–46 lines × 2) crates/ruvector-cnn/src/simd/avx2.rs:242— crates/ruvector-cnn/src/simd/avx2.rs:242-287 | crates/ruvector-cnn/src/simd/avx2.rs:397-440 — 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 (41–44 lines × 2) crates/ruvector-attention-unified-wasm/src/dag.rs:279— crates/ruvector-attention-unified-wasm/src/dag.rs:279-319 | crates/ruvector-dag/src/attention/critical_path.rs:44-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (43–44 lines × 2) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:307— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:307-350 | crates/ruvector-mincut/src/canonical/tree_packing/mod.rs:148-190 — `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-mincut/src/canonical/tree_packing/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (39–44 lines × 2) crates/ruvector-postgres/src/index/hnsw_am.rs:1811— crates/ruvector-postgres/src/index/hnsw_am.rs:1811-1854 | crates/ruvector-postgres/src/index/ivfflat_am.rs:1664-1702 — before extracting anything, compare `crates/ruvector-postgres/src/index/hnsw_am.rs` and `crates/ruvector-postgres/src/index/ivfflat_am.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 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 (41–43 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:905— crates/ruvector-graph-transformer-node/src/transformer.rs:905-945 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:963-1005 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (39–42 lines × 3) crates/ruvector-cnn/src/kernels/int8_avx2.rs:97— crates/ruvector-cnn/src/kernels/int8_avx2.rs:97-138 | crates/ruvector-cnn/src/kernels/int8_neon.rs:86-125 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:93-131 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (39–42 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:816— crates/ruvector-graph-transformer-node/src/transformer.rs:816-854 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:868-909 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (36–40 lines × 3) crates/ruvllm/src/quantize/turbo_quant.rs:373— crates/ruvllm/src/quantize/turbo_quant.rs:373-412 | crates/ruvllm/src/quantize/turbo_quant.rs:443-478 | crates/ruvllm/src/quantize/turbo_quant.rs:615-652 — 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.
Duplicated block (22–40 lines × 2) crates/ruvllm/src/lora/micro_lora.rs:382— crates/ruvllm/src/lora/micro_lora.rs:382-403 | crates/ruvllm/src/lora/micro_lora.rs:504-543 — 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 (34–39 lines × 2) crates/ruvector-hailo-cluster/src/bin/bench.rs:326— crates/ruvector-hailo-cluster/src/bin/bench.rs:326-359 | crates/ruvector-hailo-cluster/src/bin/embed.rs:317-355 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 (37–38 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2254— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2254-2291 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1406-1442 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2778-2815 | patches/candle-core-0.9.2/src/cuda_backend/mod.rs:1898-1934 — `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 74 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (37–38 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:515— crates/ruvector-graph-transformer-node/src/transformer.rs:515-551 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:531-568 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (35–38 lines × 2) crates/ruvllm/src/backends/coreml_backend.rs:730— crates/ruvllm/src/backends/coreml_backend.rs:730-764 | crates/ruvllm/src/backends/coreml_backend.rs:1150-1187 — 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 (24–37 lines × 3) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:56— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:56-92 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:146-169 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:57-91 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 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 (34–37 lines × 2) crates/mcp-brain/src/server.rs:118— crates/mcp-brain/src/server.rs:118-151 | crates/mcp-gate/src/server.rs:200-236 — before extracting anything, compare `crates/mcp-brain/src/server.rs` and `crates/mcp-gate/src/server.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (36–37 lines × 2) patches/candle-core-0.8.4/src/conv.rs:155— patches/candle-core-0.8.4/src/conv.rs:155-190 | patches/candle-core-0.9.2/src/conv.rs:169-205 — before extracting anything, compare `patches/candle-core-0.8.4/src/conv.rs` and `patches/candle-core-0.9.2/src/conv.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 191 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 (35–36 lines × 2) crates/ruvector-graph-node/src/cypher_exec.rs:518— crates/ruvector-graph-node/src/cypher_exec.rs:518-552 | crates/ruvector-py/src/graph/cypher_exec.rs:232-267 — before extracting anything, compare `crates/ruvector-graph-node/src/cypher_exec.rs` and `crates/ruvector-py/src/graph/cypher_exec.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 147 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 (2–36 lines × 4) patches/candle-core-0.8.4/src/backprop.rs:495— patches/candle-core-0.8.4/src/backprop.rs:495-496 | patches/candle-core-0.8.4/src/backprop.rs:503-538 | patches/candle-core-0.9.2/src/backprop.rs:510-511 | patches/candle-core-0.9.2/src/backprop.rs:518-553 — before extracting anything, compare `patches/candle-core-0.8.4/src/backprop.rs` and `patches/candle-core-0.9.2/src/backprop.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 671 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 (33–36 lines × 2) patches/candle-core-0.9.2/src/safetensors.rs:233— patches/candle-core-0.9.2/src/safetensors.rs:233-268 | patches/candle-core-0.9.2/src/safetensors.rs:333-365 — 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 (35 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1214— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1214-1248 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1411-1445 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1416-1450 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1677-1711 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (30–35 lines × 2) crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:315— crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:315-349 | crates/ruvector-mincut-gated-transformer/src/flash_attention.rs:433-462 — 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 (34 lines × 3) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1056— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1056-1089 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1164-1197 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1261-1294 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (31–34 lines × 2) crates/prime-radiant/src/cohomology/diffusion.rs:205— crates/prime-radiant/src/cohomology/diffusion.rs:205-238 | crates/prime-radiant/src/cohomology/diffusion.rs:293-323 — 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 (30–34 lines × 2) crates/ruvector-consciousness/src/pid.rs:158— crates/ruvector-consciousness/src/pid.rs:158-187 | crates/ruvector-consciousness/src/pid.rs:214-247 — 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 (32–33 lines × 3) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1662— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1662-1693 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2009-2040 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:2088-2120 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (26–33 lines × 2) crates/ruvllm/src/quantize/quip.rs:693— crates/ruvllm/src/quantize/quip.rs:693-718 | crates/ruvllm/src/quantize/ruvltra_quant.rs:856-888 — before extracting anything, compare `crates/ruvllm/src/quantize/quip.rs` and `crates/ruvllm/src/quantize/ruvltra_quant.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 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 (32 lines × 3) crates/ruvllm/src/backends/gemma2.rs:881— crates/ruvllm/src/backends/gemma2.rs:881-912 | crates/ruvllm/src/backends/phi3.rs:750-781 | crates/ruvllm/src/models/ruvltra.rs:1060-1091 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (26–32 lines × 2) crates/ruvector-wasm/kernels/rmsnorm.rs:83— crates/ruvector-wasm/kernels/rmsnorm.rs:83-108 | crates/ruvector-wasm/kernels/rmsnorm.rs:169-200 — 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 (28–31 lines × 3) crates/ruvector-hailo-cluster/src/bin/bench.rs:216— crates/ruvector-hailo-cluster/src/bin/bench.rs:216-243 | crates/ruvector-hailo-cluster/src/bin/embed.rs:217-247 | crates/ruvector-hailo-cluster/src/bin/stats.rs:167-194 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 (26–30 lines × 4) crates/ruvllm/src/backends/gemma2.rs:675— crates/ruvllm/src/backends/gemma2.rs:675-701 | crates/ruvllm/src/backends/phi3.rs:553-582 | crates/ruvllm/src/models/ruvltra.rs:680-709 | crates/ruvllm/src/models/ruvltra.rs:821-846 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (27–29 lines × 4) crates/ruvector-graph/src/cypher/parser.rs:291— crates/ruvector-graph/src/cypher/parser.rs:291-319 | crates/ruvector-graph/src/cypher/parser.rs:392-418 | crates/rvlite/src/cypher/parser.rs:291-319 | crates/rvlite/src/cypher/parser.rs:392-418 — before extracting anything, compare `crates/ruvector-graph/src/cypher/parser.rs` and `crates/rvlite/src/cypher/parser.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 856 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 (29 lines × 3) crates/ruvector-diverse-beam/src/bin/benchmark.rs:188— crates/ruvector-diverse-beam/src/bin/benchmark.rs:188-216 | crates/ruvector-diverse-beam/src/bin/benchmark.rs:234-262 | crates/ruvector-diverse-beam/src/bin/benchmark.rs:284-312 — 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.
Duplicated block (27–28 lines × 3) crates/ruvector-cnn/src/kernels/int8_avx2.rs:183— crates/ruvector-cnn/src/kernels/int8_avx2.rs:183-210 | crates/ruvector-cnn/src/kernels/int8_neon.rs:179-206 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:195-221 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (22–28 lines × 3) crates/rvm/crates/rvm-security/src/gate.rs:162— crates/rvm/crates/rvm-security/src/gate.rs:162-189 | crates/rvm/crates/rvm-security/src/gate.rs:275-299 | crates/rvm/crates/rvm-security/src/gate.rs:408-429 — 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.
Duplicated block (26–28 lines × 2) crates/ruvllm/src/speculative.rs:990— crates/ruvllm/src/speculative.rs:990-1017 | crates/ruvllm/src/speculative.rs:1167-1192 — 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 (25–27 lines × 3) crates/ruvector-entropy-ann/src/search.rs:251— crates/ruvector-entropy-ann/src/search.rs:251-277 | crates/ruvector-entropy-ann/src/search.rs:368-392 | crates/ruvector-entropy-ann/src/search.rs:417-441 — 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.
Duplicated block (23–27 lines × 2) crates/mcp-brain-server/src/gcs.rs:119— crates/mcp-brain-server/src/gcs.rs:119-141 | crates/mcp-brain-server/src/store.rs:217-243 — before extracting anything, compare `crates/mcp-brain-server/src/gcs.rs` and `crates/mcp-brain-server/src/store.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 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 (22–27 lines × 2) crates/rvf/rvf-runtime/src/store.rs:949— crates/rvf/rvf-runtime/src/store.rs:949-970 | crates/rvf/rvf-runtime/src/store.rs:1077-1103 — 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 (20–27 lines × 2) patches/candle-core-0.8.4/src/quantized/avx.rs:184— patches/candle-core-0.8.4/src/quantized/avx.rs:184-203 | patches/candle-core-0.8.4/src/quantized/avx.rs:393-419 — 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 (26 lines × 3) crates/ruvector-hailo-cluster/src/bin/bench.rs:86— crates/ruvector-hailo-cluster/src/bin/bench.rs:86-111 | crates/ruvector-hailo-cluster/src/bin/embed.rs:85-110 | crates/ruvector-hailo-cluster/src/bin/stats.rs:62-87 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 (21–26 lines × 3) crates/ruvector-temporal-tensor/src/quantizer.rs:320— crates/ruvector-temporal-tensor/src/quantizer.rs:320-340 | crates/ruvector-temporal-tensor/src/quantizer.rs:388-413 | crates/ruvector-temporal-tensor/src/quantizer.rs:480-505 — 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.
Duplicated block (23–26 lines × 2) crates/ruvector-delta-index/src/lib.rs:406— crates/ruvector-delta-index/src/lib.rs:406-431 | crates/ruvector-delta-index/src/lib.rs:696-718 — 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 (25 lines × 3) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1498— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1498-1522 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1764-1788 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1846-1870 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (22–25 lines × 2) crates/ruvector-graph-transformer-node/src/transformer.rs:472— crates/ruvector-graph-transformer-node/src/transformer.rs:472-496 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:488-509 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (23–25 lines × 2) crates/ruvector-postgres/src/solver/operators.rs:239— crates/ruvector-postgres/src/solver/operators.rs:239-263 | crates/ruvector-postgres/src/solver/operators.rs:440-462 — 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 (24 lines × 3) crates/ruvllm/src/backends/gemma2.rs:613— crates/ruvllm/src/backends/gemma2.rs:613-636 | crates/ruvllm/src/backends/phi3.rs:491-514 | crates/ruvllm/src/models/ruvltra.rs:789-812 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (21–24 lines × 2) crates/mcp-brain/src/tools.rs:364— crates/mcp-brain/src/tools.rs:364-387 | crates/mcp-brain/src/tools.rs:693-713 — 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 (19–23 lines × 3) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:263— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:263-281 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:303-321 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:212-234 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 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 (22–23 lines × 3) crates/ruvllm-wasm/src/workers/pool.rs:774— crates/ruvllm-wasm/src/workers/pool.rs:774-795 | crates/ruvllm-wasm/src/workers/pool.rs:944-966 | crates/ruvllm-wasm/src/workers/pool.rs:1056-1077 — 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.
Duplicated block (11–23 lines × 2) crates/prime-radiant/src/simd/energy.rs:182— crates/prime-radiant/src/simd/energy.rs:182-192 | crates/prime-radiant/src/simd/vectors.rs:310-332 — before extracting anything, compare `crates/prime-radiant/src/simd/energy.rs` and `crates/prime-radiant/src/simd/vectors.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (19–23 lines × 2) crates/ruvllm/src/memory_pool.rs:206— crates/ruvllm/src/memory_pool.rs:206-228 | crates/ruvllm/src/memory_pool.rs:255-273 — 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 (3–23 lines × 4) crates/ruvllm/src/quantize/pi_quant.rs:844— crates/ruvllm/src/quantize/pi_quant.rs:844-866 | crates/ruvllm/src/quantize/pi_quant.rs:1031-1033 | crates/ruvllm/src/quantize/pi_quant.rs:1041-1054 | crates/ruvllm/src/quantize/pi_quant.rs:1235-1237 — 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.
Duplicated block (20–23 lines × 2) crates/rvf/rvf-cli/src/cmd/verify_attestation.rs:31— crates/rvf/rvf-cli/src/cmd/verify_attestation.rs:31-53 | crates/rvf/rvf-cli/src/cmd/verify_witness.rs:39-58 — before extracting anything, compare `crates/rvf/rvf-cli/src/cmd/verify_attestation.rs` and `crates/rvf/rvf-cli/src/cmd/verify_witness.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 (19–22 lines × 5) crates/ruvllm/src/bitnet/backend.rs:3502— crates/ruvllm/src/bitnet/backend.rs:3502-3521 | crates/ruvllm/src/gguf/quantization.rs:1039-1060 | crates/ruvllm/src/kernels/quantized.rs:923-944 | crates/ruvllm/src/quantize/quip.rs:727-745 | crates/ruvllm/src/quantize/ruvltra_quant.rs:897-917 — before extracting anything, compare `crates/ruvllm/src/quantize/quip.rs` and `crates/ruvllm/src/quantize/ruvltra_quant.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 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 (20–22 lines × 4) patches/hnsw_rs/src/hnswio.rs:1132— patches/hnsw_rs/src/hnswio.rs:1132-1151 | patches/hnsw_rs/src/hnswio.rs:1183-1204 | scripts/patches/hnsw_rs/src/hnswio.rs:1132-1151 | scripts/patches/hnsw_rs/src/hnswio.rs:1183-1204 — before extracting anything, compare `patches/hnsw_rs/src/hnswio.rs` and `scripts/patches/hnsw_rs/src/hnswio.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 900 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 (16–22 lines × 2) patches/candle-core-0.8.4/src/quantized/neon.rs:456— patches/candle-core-0.8.4/src/quantized/neon.rs:456-471 | patches/candle-core-0.8.4/src/quantized/neon.rs:482-503 — 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 (21 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1344— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1344-1364 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1435-1455 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1461-1481 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1552-1572 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (21 lines × 3) crates/ruvector-bench/src/bin/comparison_benchmark.rs:98— crates/ruvector-bench/src/bin/comparison_benchmark.rs:98-118 | crates/ruvector-bench/src/bin/comparison_benchmark.rs:145-165 | crates/ruvector-bench/src/bin/latency_benchmark.rs:113-133 — before extracting anything, compare `crates/ruvector-bench/src/bin/comparison_benchmark.rs` and `crates/ruvector-bench/src/bin/latency_benchmark.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 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 (3–21 lines × 5) crates/ruvector-cnn/src/layers/conv.rs:318— crates/ruvector-cnn/src/layers/conv.rs:318-320 | crates/ruvector-cnn/src/layers/conv.rs:564-567 | crates/ruvector-cnn/src/layers/pooling.rs:50-53 | crates/ruvector-cnn/src/layers/pooling.rs:122-142 | crates/ruvector-cnn/src/layers/pooling.rs:224-244 — before extracting anything, compare `crates/ruvector-cnn/src/layers/conv.rs` and `crates/ruvector-cnn/src/layers/pooling.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 (1–21 lines × 3) crates/ruvector-graph-transformer-node/src/transformer.rs:684— crates/ruvector-graph-transformer-node/src/transformer.rs:684-704 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:728-748 | crates/ruvector-postgres/src/graph/sparql/functions.rs:496-496 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (14–21 lines × 2) crates/ruvector-postgres/src/distance/simd.rs:1511— crates/ruvector-postgres/src/distance/simd.rs:1511-1524 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:260-280 — before extracting anything, compare `crates/ruvector-postgres/src/distance/simd.rs` and `crates/ruvix/crates/vecgraph/src/simd_distance.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 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 (17–21 lines × 2) crates/ruvector-recall-bounded/src/lib.rs:304— crates/ruvector-recall-bounded/src/lib.rs:304-320 | crates/ruvector-recall-bounded/src/lib.rs:436-456 — 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 (1–21 lines × 12) patches/hnsw_rs/src/libext.rs:292— patches/hnsw_rs/src/libext.rs:292-312 | patches/hnsw_rs/src/libext.rs:318-318 | patches/hnsw_rs/src/libext.rs:324-324 | patches/hnsw_rs/src/libext.rs:330-330 | patches/hnsw_rs/src/libext.rs:336-336 | patches/hnsw_rs/src/libext.rs:342-342 | scripts/patches/hnsw_rs/src/libext.rs:292-312 | scripts/patches/hnsw_rs/src/libext.rs:318-318 | scripts/patches/hnsw_rs/src/libext.rs:324-324 | scripts/patches/hnsw_rs/src/libext.rs:330-330 | scripts/patches/hnsw_rs/src/libext.rs:336-336 | scripts/patches/hnsw_rs/src/libext.rs:342-342 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (15–20 lines × 8) crates/ruvector-postgres/src/attention/operators.rs:99— crates/ruvector-postgres/src/attention/operators.rs:99-113 | crates/ruvector-postgres/src/attention/operators.rs:194-208 | crates/ruvector-postgres/src/attention/operators.rs:347-361 | crates/ruvector-postgres/src/attention/operators.rs:433-447 | crates/ruvector-postgres/src/attention/operators.rs:520-539 | crates/ruvector-postgres/src/attention/operators.rs:572-586 | crates/ruvector-postgres/src/attention/operators.rs:657-671 | crates/ruvector-postgres/src/attention/operators.rs:768-782 — all 8 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.
Duplicated block (20 lines × 5) crates/sona/src/export/safetensors.rs:48— crates/sona/src/export/safetensors.rs:48-67 | crates/sona/src/export/safetensors.rs:79-98 | crates/sona/src/export/safetensors.rs:107-126 | crates/sona/src/export/safetensors.rs:135-154 | crates/sona/src/export/safetensors.rs:163-182 — all 5 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.
Duplicated block (18–20 lines × 4) crates/ruvector-entropy-ann/src/search.rs:117— crates/ruvector-entropy-ann/src/search.rs:117-136 | crates/ruvector-entropy-ann/src/search.rs:258-276 | crates/ruvector-entropy-ann/src/search.rs:374-391 | crates/ruvector-entropy-ann/src/search.rs:423-440 — 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.
Duplicated block (20 lines × 4) crates/rvf/rvf-runtime/src/store.rs:2256— crates/rvf/rvf-runtime/src/store.rs:2256-2275 | crates/rvf/rvf-runtime/src/store.rs:2377-2396 | crates/rvf/rvf-runtime/src/store.rs:2483-2502 | crates/rvf/rvf-runtime/src/store.rs:2591-2610 — 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.
Duplicated block (13–20 lines × 3) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:203— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:203-222 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:263-275 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:177-189 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 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 (20 lines × 3) crates/ruvllm/src/backends/gemma2.rs:90— crates/ruvllm/src/backends/gemma2.rs:90-109 | crates/ruvllm/src/backends/gemma2.rs:113-132 | crates/ruvllm/src/backends/gemma2.rs:136-155 — 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.
Duplicated block (19–20 lines × 2) crates/ruvector-nervous-system-wasm/src/btsp.rs:63— crates/ruvector-nervous-system-wasm/src/btsp.rs:63-81 | crates/ruvector-nervous-system/src/plasticity/btsp.rs:128-147 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (2–20 lines × 8) patches/candle-core-0.8.4/src/quantized/avx.rs:465— patches/candle-core-0.8.4/src/quantized/avx.rs:465-484 | patches/candle-core-0.8.4/src/quantized/avx.rs:551-570 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1212-1213 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1409-1410 | patches/candle-core-0.8.4/src/quantized/neon.rs:261-264 | patches/candle-core-0.8.4/src/quantized/simd128.rs:223-224 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1414-1415 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1675-1676 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.8.4/src/quantized/simd128.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 (18–19 lines × 3) crates/ruvector-cnn/src/layers/quantized_conv2d.rs:97— crates/ruvector-cnn/src/layers/quantized_conv2d.rs:97-115 | crates/ruvector-cnn/src/layers/quantized_depthwise.rs:88-105 | crates/ruvector-cnn/src/layers/quantized_linear.rs:72-89 — before extracting anything, compare `crates/ruvector-cnn/src/layers/quantized_conv2d.rs` and `crates/ruvector-cnn/src/layers/quantized_depthwise.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 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 (12–19 lines × 3) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:225— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:225-243 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:277-290 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:191-202 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 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 (16–19 lines × 2) crates/ruvector-hailo-cluster/src/bin/fakeworker.rs:110— crates/ruvector-hailo-cluster/src/bin/fakeworker.rs:110-125 | crates/ruvector-hailo-cluster/src/bin/worker.rs:343-361 — 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 (15–19 lines × 2) crates/ruvllm/src/gguf/loader.rs:747— crates/ruvllm/src/gguf/loader.rs:747-761 | crates/ruvllm/src/gguf/loader.rs:787-805 — 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 (3–19 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:315— patches/candle-core-0.8.4/src/quantized/k_quants.rs:315-317 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:512-530 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:338-340 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:544-562 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (18 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1380— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1380-1397 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:1498-1515 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1497-1514 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:1615-1632 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (16–18 lines × 3) crates/ruvector-consciousness/src/chebyshev_phi.rs:95— crates/ruvector-consciousness/src/chebyshev_phi.rs:95-110 | crates/ruvector-consciousness/src/phi.rs:352-369 | crates/ruvector-consciousness/src/sparse_accel.rs:215-230 — before extracting anything, compare `crates/ruvector-consciousness/src/chebyshev_phi.rs` and `crates/ruvector-consciousness/src/sparse_accel.rs` 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.
Duplicated block (18 lines × 3) crates/ruvix/crates/cli/src/commands/dtb.rs:912— crates/ruvix/crates/cli/src/commands/dtb.rs:912-929 | crates/ruvix/crates/cli/src/commands/dtb.rs:966-983 | crates/ruvix/crates/cli/src/commands/dtb.rs:1015-1032 — 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.
Duplicated block (17–18 lines × 2) crates/ruvllm/src/models/openmythos/mod.rs:428— crates/ruvllm/src/models/openmythos/mod.rs:428-445 | crates/ruvllm/src/models/openmythos/mod.rs:489-505 — 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 (17 lines × 4) crates/ruvllm_sparse_attention/src/attention.rs:311— crates/ruvllm_sparse_attention/src/attention.rs:311-327 | crates/ruvllm_sparse_attention/src/attention.rs:473-489 | crates/ruvllm_sparse_attention/src/attention.rs:1141-1157 | crates/ruvllm_sparse_attention/src/attention.rs:1483-1499 — 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.
Duplicated block (14–17 lines × 4) patches/hnsw_rs/src/libext.rs:188— patches/hnsw_rs/src/libext.rs:188-201 | patches/hnsw_rs/src/libext.rs:751-767 | scripts/patches/hnsw_rs/src/libext.rs:188-201 | scripts/patches/hnsw_rs/src/libext.rs:751-767 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (4–17 lines × 10) crates/prime-radiant/src/attention/adapter.rs:176— crates/prime-radiant/src/attention/adapter.rs:176-180 | crates/ruvector-attention/src/curvature/fused_attention.rs:306-310 | crates/ruvector-attention/src/hyperbolic/hyperbolic_attention.rs:60-76 | crates/ruvector-attention/src/hyperbolic/mixed_curvature.rs:52-68 | crates/ruvector-attention/src/info_geometry/natural_gradient.rs:88-92 | crates/ruvector-attention/src/pde_attention/diffusion.rs:204-208 | crates/ruvector-attention/src/topology/gated_attention.rs:268-272 | crates/ruvector-attention/src/transport/centroid_ot.rs:315-319 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:276-280 | crates/ruvector-graph-transformer/src/manifold.rs:1244-1247 — before extracting anything, compare `crates/prime-radiant/src/attention/adapter.rs` and `crates/ruvector-attention/src/curvature/fused_attention.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (11–17 lines × 2) crates/ruvector-py/src/rabitq.rs:144— crates/ruvector-py/src/rabitq.rs:144-160 | crates/ruvector-py/src/rabitq.rs:408-418 — 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 (13–16 lines × 4) crates/ruvector-core/src/simd_intrinsics.rs:208— crates/ruvector-core/src/simd_intrinsics.rs:208-222 | crates/ruvector-core/src/simd_intrinsics.rs:279-291 | crates/ruvector-core/src/simd_intrinsics.rs:340-355 | crates/ruvector-core/src/simd_intrinsics.rs:407-419 — 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.
Duplicated block (16 lines × 3) crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:120— crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:120-135 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:177-192 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:92-107 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs` and `crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 271 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 3) crates/ruvllm/src/policy_store.rs:251— crates/ruvllm/src/policy_store.rs:251-266 | crates/ruvllm/src/session_index.rs:202-217 | crates/ruvllm/src/witness_log.rs:529-543 — before extracting anything, compare `crates/ruvllm/src/policy_store.rs` and `crates/ruvllm/src/witness_log.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 5) crates/ruvllm/src/backends/gemma2.rs:648— crates/ruvllm/src/backends/gemma2.rs:648-662 | crates/ruvllm/src/backends/phi3.rs:526-540 | crates/ruvllm/src/models/ruvltra.rs:653-667 | crates/ruvllm/src/models/ruvltra.rs:848-862 | crates/ruvllm/src/models/ruvltra_medium.rs:652-666 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 (14–15 lines × 4) crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:106— crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:106-120 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:211-224 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:318-331 | crates/ruvector-bench/src/bin/agenticdb_benchmark.rs:419-432 — 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.
Duplicated block (12–15 lines × 2) crates/ruvector-cnn/src/kernels/int8_scalar.rs:155— crates/ruvector-cnn/src/kernels/int8_scalar.rs:155-169 | crates/ruvector-cnn/src/kernels/int8_scalar.rs:267-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (4–15 lines × 3) crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:450— crates/ruvector-mincut/src/canonical/source_anchored/mod.rs:450-460 | crates/ruvector-profiler/src/config_hash.rs:52-55 | crates/rvf/rvf-types/src/sha256.rs:130-144 — before extracting anything, compare `crates/ruvector-mincut/src/canonical/source_anchored/mod.rs` and `crates/ruvector-profiler/src/config_hash.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 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 (7–15 lines × 2) crates/rvf/rvf-runtime/src/store.rs:2105— crates/rvf/rvf-runtime/src/store.rs:2105-2111 | crates/rvf/rvf-runtime/src/store.rs:2196-2210 — 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 (2–15 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:960— patches/candle-core-0.8.4/src/quantized/k_quants.rs:960-974 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1104-1105 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1068-1082 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1307-1308 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (13–14 lines × 7) crates/ruvector-temporal-tensor/src/f16.rs:65— crates/ruvector-temporal-tensor/src/f16.rs:65-78 | crates/ruvllm/src/bitnet/backend.rs:3500-3512 | crates/ruvllm/src/bitnet/gguf_export.rs:69-82 | crates/ruvllm/src/gguf/quantization.rs:1037-1050 | crates/ruvllm/src/kernels/quantized.rs:921-934 | crates/ruvllm/src/quantize/quip.rs:725-737 | crates/ruvllm/src/quantize/ruvltra_quant.rs:895-908 — before extracting anything, compare `crates/ruvllm/src/quantize/quip.rs` and `crates/ruvllm/src/quantize/ruvltra_quant.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 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 (12–14 lines × 5) crates/ruvector-temporal-tensor/src/quantizer.rs:300— crates/ruvector-temporal-tensor/src/quantizer.rs:300-311 | crates/ruvector-temporal-tensor/src/quantizer.rs:334-345 | crates/ruvector-temporal-tensor/src/quantizer.rs:407-418 | crates/ruvector-temporal-tensor/src/quantizer.rs:499-510 | crates/ruvector-temporal-tensor/src/quantizer.rs:581-594 — all 5 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.
Duplicated block (12–14 lines × 4) crates/ruvector-cnn/src/simd/neon.rs:22— crates/ruvector-cnn/src/simd/neon.rs:22-35 | crates/ruvector-core/src/simd_intrinsics.rs:656-669 | crates/ruvector-core/src/simd_intrinsics.rs:736-747 | crates/ruvector-core/src/simd_intrinsics.rs:865-876 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (13–14 lines × 4) crates/ruvector-cnn/src/simd/neon.rs:33— crates/ruvector-cnn/src/simd/neon.rs:33-46 | crates/ruvector-core/src/simd_intrinsics.rs:745-758 | crates/ruvllm/src/kernels/attention.rs:1775-1787 | crates/ruvllm/src/kernels/matmul.rs:1202-1215 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (9–14 lines × 3) crates/ruvector-hailo-cluster/src/bin/bench.rs:283— crates/ruvector-hailo-cluster/src/bin/bench.rs:283-296 | crates/ruvector-hailo-cluster/src/bin/embed.rs:279-287 | crates/ruvector-hailo-cluster/src/bin/stats.rs:229-237 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 (3–14 lines × 3) crates/ruvector-acorn/src/search.rs:54— crates/ruvector-acorn/src/search.rs:54-56 | crates/ruvector-coherence-hnsw/src/search.rs:189-202 | crates/ruvector-coherence-hnsw/src/search.rs:293-306 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (4–13 lines × 11) crates/prime-radiant/src/attention/adapter.rs:147— crates/prime-radiant/src/attention/adapter.rs:147-158 | crates/ruvector-attention/src/curvature/fused_attention.rs:288-299 | crates/ruvector-attention/src/curvature/tangent_space.rs:177-188 | crates/ruvector-attention/src/info_geometry/fisher.rs:172-183 | crates/ruvector-attention/src/pde_attention/diffusion.rs:186-197 | crates/ruvector-attention/src/topology/gated_attention.rs:250-261 | crates/ruvector-attention/src/transport/cached_projections.rs:78-89 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:299-310 | crates/ruvector-diskann/src/distance.rs:349-352 | crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:131-143 | crates/ruvector-solver/src/cg.rs:120-131 — before extracting anything, compare `crates/prime-radiant/src/attention/adapter.rs` and `crates/ruvector-attention/src/curvature/fused_attention.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (13 lines × 7) crates/mcp-brain-server/src/routes.rs:6709— crates/mcp-brain-server/src/routes.rs:6709-6721 | crates/mcp-brain-server/src/routes.rs:6745-6757 | crates/mcp-brain-server/src/routes.rs:6800-6812 | crates/mcp-brain-server/src/routes.rs:6856-6868 | crates/mcp-brain-server/src/routes.rs:6903-6915 | crates/mcp-brain-server/src/routes.rs:7008-7020 | crates/mcp-brain-server/src/routes.rs:7191-7203 — all 7 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.
Duplicated block (13 lines × 6) crates/ruvector-hailo-cluster/src/bin/bench.rs:202— crates/ruvector-hailo-cluster/src/bin/bench.rs:202-214 | crates/ruvector-hailo-cluster/src/bin/embed.rs:202-214 | crates/ruvector-hailo-cluster/src/bin/mmwave-bridge.rs:171-183 | crates/ruvector-hailo-cluster/src/bin/ruview-csi-bridge.rs:232-244 | crates/ruvector-hailo-cluster/src/bin/ruvllm-bridge.rs:147-159 | crates/ruvector-hailo-cluster/src/bin/stats.rs:147-159 — before extracting anything, compare `crates/ruvector-hailo-cluster/src/bin/bench.rs` and `crates/ruvector-hailo-cluster/src/bin/embed.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 283 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 (9–13 lines × 5) crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs:294— crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs:294-302 | crates/ruvector-fpga-transformer/src/quant/lut.rs:148-160 | crates/ruvector-mincut-gated-transformer/src/attention/window.rs:169-181 | crates/ruvector-mincut-gated-transformer/src/attention/window.rs:333-343 | crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs:427-437 — before extracting anything, compare `crates/ruvector-mincut-gated-transformer/src/attention/window.rs` and `crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 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 (4–13 lines × 6) crates/ruvector-graph-transformer-node/src/transformer.rs:72— crates/ruvector-graph-transformer-node/src/transformer.rs:72-81 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:82-91 | crates/ruvector-verified/src/proof_store.rs:72-84 | crates/ruvix/crates/nucleus/src/witness_log.rs:216-219 | crates/rvf/rvf-crypto/src/attestation.rs:55-59 | crates/rvf/rvf-crypto/src/witness.rs:46-49 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (8–13 lines × 2) crates/photonlayer-bench/src/baselines.rs:76— crates/photonlayer-bench/src/baselines.rs:76-83 | crates/photonlayer-bench/src/baselines.rs:120-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 (4–13 lines × 3) crates/ruvector-entropy-ann/src/search.rs:81— crates/ruvector-entropy-ann/src/search.rs:81-84 | crates/ruvector-entropy-ann/src/search.rs:217-229 | crates/ruvector-entropy-ann/src/search.rs:342-354 — 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.
Duplicated block (10–12 lines × 8) crates/ruvector-postgres/src/graph/sparql/parser.rs:2131— crates/ruvector-postgres/src/graph/sparql/parser.rs:2131-2142 | crates/ruvector-postgres/src/graph/sparql/parser.rs:2163-2172 | crates/ruvector-postgres/src/graph/sparql/parser.rs:2185-2194 | crates/ruvector-postgres/src/graph/sparql/parser.rs:2210-2220 | crates/rvlite/src/sparql/parser.rs:2138-2149 | crates/rvlite/src/sparql/parser.rs:2170-2179 | crates/rvlite/src/sparql/parser.rs:2192-2201 | crates/rvlite/src/sparql/parser.rs:2217-2227 — before extracting anything, compare `crates/ruvector-postgres/src/graph/sparql/parser.rs` and `crates/rvlite/src/sparql/parser.rs` as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 2088 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 (10–12 lines × 7) crates/ruvector-cnn/src/simd/neon.rs:26— crates/ruvector-cnn/src/simd/neon.rs:26-36 | crates/ruvector-core/src/simd_intrinsics.rs:660-671 | crates/ruvector-core/src/simd_intrinsics.rs:739-748 | crates/ruvector-core/src/simd_intrinsics.rs:810-819 | crates/ruvector-core/src/simd_intrinsics.rs:868-878 | crates/ruvllm/src/kernels/matmul.rs:206-217 | crates/ruvllm/src/kernels/matmul.rs:1196-1205 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (12 lines × 6) patches/candle-core-0.8.4/src/quantized/k_quants.rs:921— patches/candle-core-0.8.4/src/quantized/k_quants.rs:921-932 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:934-945 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:947-958 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1029-1040 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1042-1053 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1055-1066 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (12 lines × 5) crates/rvf/rvf-runtime/src/store.rs:2261— crates/rvf/rvf-runtime/src/store.rs:2261-2272 | crates/rvf/rvf-runtime/src/store.rs:2382-2393 | crates/rvf/rvf-runtime/src/store.rs:2488-2499 | crates/rvf/rvf-runtime/src/store.rs:2596-2607 | crates/rvf/rvf-runtime/src/store.rs:2627-2638 — all 5 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.
Duplicated block (8–12 lines × 4) patches/hnsw_rs/src/libext.rs:138— patches/hnsw_rs/src/libext.rs:138-149 | patches/hnsw_rs/src/libext.rs:694-701 | scripts/patches/hnsw_rs/src/libext.rs:138-149 | scripts/patches/hnsw_rs/src/libext.rs:694-701 — before extracting anything, compare `patches/hnsw_rs/src/libext.rs` and `scripts/patches/hnsw_rs/src/libext.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 654 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 (4–12 lines × 4) crates/ruvector-cnn/src/simd/avx2.rs:547— crates/ruvector-cnn/src/simd/avx2.rs:547-550 | crates/ruvector-cnn/src/simd/avx2.rs:554-565 | crates/ruvector-cnn/src/simd/avx2.rs:571-582 | crates/ruvector-cnn/src/simd/avx2.rs:583-597 — 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.
Duplicated block (6–12 lines × 2) crates/ruvector-core/src/advanced_features/product_quantization.rs:165— crates/ruvector-core/src/advanced_features/product_quantization.rs:165-176 | crates/ruvector-core/src/quantization.rs:142-147 — before extracting anything, compare `crates/ruvector-core/src/advanced_features/product_quantization.rs` and `crates/ruvector-core/src/quantization.rs` 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. 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 (1–12 lines × 18) crates/prime-radiant/src/attention/adapter.rs:180— crates/prime-radiant/src/attention/adapter.rs:180-181 | crates/ruvector-attention/src/attention/flash.rs:508-509 | crates/ruvector-attention/src/curvature/fused_attention.rs:310-311 | crates/ruvector-attention/src/hyperbolic/lorentz_cascade.rs:127-128 | crates/ruvector-attention/src/info_geometry/natural_gradient.rs:92-93 | crates/ruvector-attention/src/pde_attention/diffusion.rs:208-209 | crates/ruvector-attention/src/sheaf/sparse.rs:427-429 | crates/ruvector-attention/src/topology/gated_attention.rs:272-273 | crates/ruvector-attention/src/transport/centroid_ot.rs:319-320 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:280-281 | crates/ruvector-decompiler/src/transformer.rs:400-401 | crates/ruvector-gnn/src/layer.rs:205-205 | crates/ruvector-graph-transformer/src/physics.rs:406-407 | crates/ruvector-graph-transformer/src/physics.rs:408-408 | crates/ruvllm/src/backends/coreml_backend.rs:696-707 | crates/ruvllm/src/backends/coreml_backend.rs:1116-1127 | crates/ruvllm/src/backends/gemma2.rs:490-491 | crates/ruvllm/src/qat/distillation.rs:341-342 — before extracting anything, compare `crates/prime-radiant/src/attention/adapter.rs` and `crates/ruvector-attention/src/curvature/fused_attention.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (11 lines × 21) crates/ruvector-postgres/src/attention/operators.rs:94— crates/ruvector-postgres/src/attention/operators.rs:94-104 | crates/ruvector-postgres/src/attention/operators.rs:108-118 | crates/ruvector-postgres/src/attention/operators.rs:189-199 | crates/ruvector-postgres/src/attention/operators.rs:203-213 | crates/ruvector-postgres/src/attention/operators.rs:293-303 | crates/ruvector-postgres/src/attention/operators.rs:342-352 | crates/ruvector-postgres/src/attention/operators.rs:356-366 | crates/ruvector-postgres/src/attention/operators.rs:428-438 | crates/ruvector-postgres/src/attention/operators.rs:442-452 | crates/ruvector-postgres/src/attention/operators.rs:520-530 | crates/ruvector-postgres/src/attention/operators.rs:534-544 | crates/ruvector-postgres/src/attention/operators.rs:567-577 | crates/ruvector-postgres/src/attention/operators.rs:581-591 | crates/ruvector-postgres/src/attention/operators.rs:652-662 | crates/ruvector-postgres/src/attention/operators.rs:666-676 | crates/ruvector-postgres/src/attention/operators.rs:763-773 | crates/ruvector-postgres/src/attention/operators.rs:777-787 | crates/ruvector-postgres/src/gnn/operators.rs:29-39 | crates/ruvector-postgres/src/gnn/operators.rs:77-87 | crates/ruvector-postgres/src/gnn/operators.rs:158-168 | crates/ruvector-postgres/src/gnn/operators.rs:215-225 — there are 21 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 21 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11 lines × 7) crates/ruvector-attention/src/curvature/component_quantizer.rs:148— crates/ruvector-attention/src/curvature/component_quantizer.rs:148-158 | crates/ruvector-attention/src/curvature/fused_attention.rs:279-289 | crates/ruvector-attention/src/curvature/tangent_space.rs:168-178 | crates/ruvector-attention/src/info_geometry/fisher.rs:163-173 | crates/ruvector-attention/src/pde_attention/diffusion.rs:177-187 | crates/ruvector-attention/src/topology/gated_attention.rs:241-251 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:290-300 — before extracting anything, compare `crates/ruvector-attention/src/curvature/fused_attention.rs` and `crates/ruvector-attention/src/curvature/tangent_space.rs` 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.
Duplicated block (7–11 lines × 6) crates/ruvector-fpga-transformer/src/backend/native_sim.rs:464— crates/ruvector-fpga-transformer/src/backend/native_sim.rs:464-470 | crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs:297-303 | crates/ruvector-fpga-transformer/src/quant/lut.rs:153-163 | crates/ruvector-mincut-gated-transformer/src/attention/window.rs:174-184 | crates/ruvector-mincut-gated-transformer/src/attention/window.rs:337-345 | crates/ruvector-mincut-gated-transformer/src/sparse_attention.rs:431-439 — before extracting anything, compare `crates/ruvector-fpga-transformer/src/backend/native_sim.rs` and `crates/ruvector-fpga-transformer/src/backend/wasm_sim.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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–11 lines × 7) crates/ruvllm/src/quantize/pi_quant_simd.rs:276— crates/ruvllm/src/quantize/pi_quant_simd.rs:276-286 | crates/ruvllm/src/quantize/pi_quant_simd.rs:289-299 | crates/ruvllm/src/quantize/pi_quant_simd.rs:302-312 | crates/ruvllm/src/quantize/pi_quant_simd.rs:315-325 | crates/ruvllm/src/quantize/pi_quant_simd.rs:328-338 | crates/ruvllm/src/quantize/pi_quant_simd.rs:341-351 | crates/ruvllm/src/quantize/pi_quant_simd.rs:352-361 — all 7 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.
Duplicated block (10–11 lines × 5) patches/candle-core-0.8.4/src/tensor.rs:2253— patches/candle-core-0.8.4/src/tensor.rs:2253-2262 | patches/candle-core-0.8.4/src/tensor.rs:2291-2301 | patches/candle-core-0.9.2/src/tensor.rs:2576-2585 | patches/candle-core-0.9.2/src/tensor.rs:2614-2624 | patches/candle-core-0.9.2/src/tensor.rs:2960-2970 — before extracting anything, compare `patches/candle-core-0.8.4/src/tensor.rs` and `patches/candle-core-0.9.2/src/tensor.rs` as WHOLE FILES: this scan already matched 91 separate duplicated blocks between them, totalling at least 1153 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 (9–11 lines × 4) crates/ruvllm/src/lora/micro_lora.rs:329— crates/ruvllm/src/lora/micro_lora.rs:329-337 | crates/ruvllm/src/lora/micro_lora.rs:373-383 | crates/ruvllm/src/lora/micro_lora.rs:425-433 | crates/ruvllm/src/lora/micro_lora.rs:495-505 — 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.
Duplicated block (10–11 lines × 4) patches/candle-core-0.8.4/src/quantized/k_quants.rs:1263— patches/candle-core-0.8.4/src/quantized/k_quants.rs:1263-1273 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1461-1470 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1465-1475 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1727-1736 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (2–11 lines × 4) crates/mcp-brain-server/src/routes.rs:7611— crates/mcp-brain-server/src/routes.rs:7611-7620 | crates/mcp-brain-server/src/routes.rs:7756-7766 | crates/mcp-brain-server/src/routes.rs:7832-7833 | crates/mcp-brain-server/src/routes.rs:8096-8097 — 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.
Duplicated block (1–11 lines × 16) crates/ruvector-attention-node/src/attention.rs:70— crates/ruvector-attention-node/src/attention.rs:70-70 | crates/ruvector-attention-node/src/attention.rs:99-99 | crates/ruvector-attention-node/src/attention.rs:162-162 | crates/ruvector-attention-node/src/attention.rs:261-261 | crates/ruvector-attention-node/src/attention.rs:320-320 | crates/ruvector-attention-node/src/attention.rs:379-379 | crates/ruvector-attention-node/src/attention.rs:445-445 | crates/ruvector-attention-node/src/attention.rs:540-540 | crates/ruvector-attention-node/src/graph.rs:86-86 | crates/ruvector-attention-node/src/graph.rs:116-118 | crates/ruvector-attention-node/src/graph.rs:211-211 | crates/ruvector-attention-node/src/graph.rs:242-242 | crates/ruvector-attention-node/src/graph.rs:370-370 | crates/ruvector-attention-node/src/graph.rs:390-390 | crates/ruvector-attention-node/src/training.rs:81-91 | crates/ruvector-attention-node/src/training.rs:156-166 — there are 16 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 16 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6–11 lines × 2) crates/ruvector-core/src/cache_optimized.rs:329— crates/ruvector-core/src/cache_optimized.rs:329-334 | crates/ruvector-core/src/simd_intrinsics.rs:94-104 — 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 (9–11 lines × 3) crates/ruvector-nervous-system/src/plasticity/eprop.rs:328— crates/ruvector-nervous-system/src/plasticity/eprop.rs:328-338 | crates/ruvector-nervous-system/src/plasticity/eprop.rs:342-352 | crates/ruvector-nervous-system/src/plasticity/eprop.rs:353-361 — 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.
Duplicated block (2–11 lines × 5) crates/ruvector-attention/src/training/mining.rs:174— crates/ruvector-attention/src/training/mining.rs:174-175 | crates/ruvllm/src/backends/candle_backend.rs:1337-1339 | crates/ruvllm/src/kernels/attention.rs:1433-1443 | crates/ruvllm/src/kv_cache.rs:977-987 | crates/ruvllm/src/paged_attention.rs:459-460 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
Duplicated block (4–11 lines × 4) crates/sonic-ct/src/phantom.rs:143— crates/sonic-ct/src/phantom.rs:143-146 | crates/sonic-ct/src/phantom.rs:155-165 | crates/sonic-ct/src/phantom.rs:169-179 | crates/sonic-ct/src/phantom.rs:185-188 — 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.
Duplicated block (10 lines × 9) crates/ruvector-attention/src/curvature/component_quantizer.rs:149— crates/ruvector-attention/src/curvature/component_quantizer.rs:149-158 | crates/ruvector-attention/src/curvature/fused_attention.rs:280-289 | crates/ruvector-attention/src/curvature/tangent_space.rs:169-178 | crates/ruvector-attention/src/info_geometry/fisher.rs:164-173 | crates/ruvector-attention/src/pde_attention/diffusion.rs:178-187 | crates/ruvector-attention/src/topology/gated_attention.rs:242-251 | crates/ruvector-attention/src/transport/cached_projections.rs:70-79 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:291-300 | crates/ruvector-math/src/optimal_transport/sliced_wasserstein.rs:122-132 — before extracting anything, compare `crates/ruvector-attention/src/curvature/fused_attention.rs` and `crates/ruvector-attention/src/curvature/tangent_space.rs` 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.
Duplicated block (7–10 lines × 9) crates/ruvector-core/src/simd_intrinsics.rs:89— crates/ruvector-core/src/simd_intrinsics.rs:89-98 | crates/ruvector-core/src/simd_intrinsics.rs:134-143 | crates/ruvector-core/src/simd_intrinsics.rs:976-982 | crates/ruvector-core/src/simd_intrinsics.rs:1080-1086 | crates/ruvector-core/src/simd_intrinsics.rs:1123-1131 | crates/ruvector-postgres/src/distance/simd.rs:982-988 | crates/ruvector-postgres/src/distance/simd.rs:1017-1023 | crates/ruvector-postgres/src/distance/simd.rs:1058-1064 | crates/ruvector-postgres/src/distance/simd.rs:1083-1089 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvector-postgres/src/distance/simd.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 (10 lines × 6) crates/ruvector-cnn/src/layers/conv.rs:228— crates/ruvector-cnn/src/layers/conv.rs:228-237 | crates/ruvector-cnn/src/layers/pooling.rs:35-44 | crates/ruvector-cnn/src/layers/pooling.rs:98-107 | crates/ruvector-cnn/src/layers/pooling.rs:120-129 | crates/ruvector-cnn/src/layers/pooling.rs:200-209 | crates/ruvector-cnn/src/layers/pooling.rs:222-231 — before extracting anything, compare `crates/ruvector-cnn/src/layers/conv.rs` and `crates/ruvector-cnn/src/layers/pooling.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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–10 lines × 4) crates/ruvector-coherence-hnsw/src/coherence.rs:21— crates/ruvector-coherence-hnsw/src/coherence.rs:21-28 | crates/ruvector-maxsim/src/score.rs:20-27 | crates/ruvector-maxsim/src/score.rs:93-100 | crates/ruvector-temporal-tensor/src/agentdb.rs:79-88 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (2–10 lines × 11) crates/prime-radiant/src/attention/adapter.rs:182— crates/prime-radiant/src/attention/adapter.rs:182-190 | crates/ruvector-attention/src/curvature/fused_attention.rs:311-312 | crates/ruvector-attention/src/hyperbolic/lorentz_cascade.rs:128-129 | crates/ruvector-attention/src/info_geometry/natural_gradient.rs:94-101 | crates/ruvector-attention/src/pde_attention/diffusion.rs:210-219 | crates/ruvector-attention/src/sheaf/sparse.rs:429-430 | crates/ruvector-attention/src/topology/gated_attention.rs:273-274 | crates/ruvector-attention/src/transport/centroid_ot.rs:320-321 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:281-282 | crates/ruvllm/src/backends/gemma2.rs:491-492 | crates/ruvllm/src/qat/distillation.rs:342-343 — before extracting anything, compare `crates/prime-radiant/src/attention/adapter.rs` and `crates/ruvector-attention/src/curvature/fused_attention.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (8–10 lines × 3) crates/ruvector-postgres/src/distance/simd.rs:168— crates/ruvector-postgres/src/distance/simd.rs:168-177 | crates/ruvector-postgres/src/distance/simd.rs:215-222 | crates/ruvector-postgres/src/distance/simd.rs:279-286 — 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.
Duplicated block (7–10 lines × 3) crates/ruvllm/src/kv_cache.rs:471— crates/ruvllm/src/kv_cache.rs:471-480 | crates/ruvllm/src/speculative.rs:1067-1074 | crates/ruvllm/src/speculative.rs:1204-1210 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5–10 lines × 3) crates/ruvllm/src/optimization/metrics.rs:649— crates/ruvllm/src/optimization/metrics.rs:649-658 | crates/ruvllm/src/optimization/metrics.rs:680-688 | crates/ruvllm/src/quality/scoring_engine.rs:790-794 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 11) crates/ruvix/crates/boot/src/manifest.rs:664— crates/ruvix/crates/boot/src/manifest.rs:664-672 | crates/ruvix/crates/boot/src/manifest.rs:675-683 | crates/rvf/rvf-cli/src/cmd/rebuild_refcounts.rs:48-56 | crates/rvf/rvf-runtime/src/cow_map.rs:106-114 | crates/rvf/rvf-runtime/src/read_path.rs:482-490 | crates/rvf/rvf-runtime/src/read_path.rs:492-500 | crates/rvf/rvf-runtime/src/store.rs:4439-4447 | crates/rvf/rvf-runtime/src/store.rs:4449-4457 | crates/rvf/rvf-wasm/src/segment.rs:37-45 | crates/rvf/rvf-wasm/src/segment.rs:47-55 | crates/rvm/crates/rvm-proof/src/lib.rs:188-196 — before extracting anything, compare `crates/ruvix/crates/boot/src/manifest.rs` and `crates/rvf/rvf-runtime/src/read_path.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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 (1–9 lines × 13) crates/ruvector-attention-node/src/attention.rs:71— crates/ruvector-attention-node/src/attention.rs:71-79 | crates/ruvector-attention-node/src/attention.rs:100-103 | crates/ruvector-attention-node/src/attention.rs:163-171 | crates/ruvector-attention-node/src/attention.rs:262-270 | crates/ruvector-attention-node/src/attention.rs:321-329 | crates/ruvector-attention-node/src/attention.rs:380-388 | crates/ruvector-attention-node/src/attention.rs:446-454 | crates/ruvector-attention-node/src/attention.rs:541-549 | crates/ruvector-attention-node/src/graph.rs:87-95 | crates/ruvector-attention-node/src/graph.rs:120-123 | crates/ruvector-attention-node/src/graph.rs:212-220 | crates/ruvector-attention-node/src/graph.rs:371-379 | crates/ruvector-crv/src/stage_ii.rs:124-124 — there are 13 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 13 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 7) crates/ruvix/crates/boot/src/manifest.rs:654— crates/ruvix/crates/boot/src/manifest.rs:654-663 | crates/ruvix/crates/boot/src/manifest.rs:665-674 | crates/rvf/rvf-quant/src/binary.rs:58-66 | crates/rvf/rvf-runtime/src/read_path.rs:473-481 | crates/rvf/rvf-runtime/src/read_path.rs:483-491 | crates/rvf/rvf-runtime/src/store.rs:4440-4448 | crates/rvf/rvf-wasm/src/segment.rs:38-46 — before extracting anything, compare `crates/ruvix/crates/boot/src/manifest.rs` and `crates/rvf/rvf-runtime/src/read_path.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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 (7–9 lines × 5) crates/ruvector-solver/src/simd.rs:121— crates/ruvector-solver/src/simd.rs:121-128 | crates/ruvix/crates/vecgraph/src/simd_distance.rs:489-497 | crates/rvf/rvf-index/src/distance.rs:84-90 | crates/rvf/rvf-index/src/distance.rs:128-134 | crates/rvf/rvf-index/src/distance.rs:178-184 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6–9 lines × 3) crates/ruvllm/src/kv_cache.rs:614— crates/ruvllm/src/kv_cache.rs:614-620 | crates/ruvllm/src/lora/micro_lora.rs:399-407 | crates/ruvllm/src/lora/micro_lora.rs:544-549 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (4–9 lines × 3) crates/ruvector-core/src/simd_intrinsics.rs:825— crates/ruvector-core/src/simd_intrinsics.rs:825-828 | crates/ruvllm/src/kernels/attention.rs:1231-1239 | crates/ruvllm/src/kernels/attention.rs:1260-1267 — before extracting anything, compare `crates/ruvector-core/src/simd_intrinsics.rs` and `crates/ruvllm/src/kernels/attention.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 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 (4–9 lines × 4) patches/candle-core-0.8.4/src/display.rs:262— patches/candle-core-0.8.4/src/display.rs:262-270 | patches/candle-core-0.8.4/src/display.rs:272-275 | patches/candle-core-0.9.2/src/display.rs:273-281 | patches/candle-core-0.9.2/src/display.rs:283-286 — before extracting anything, compare `patches/candle-core-0.8.4/src/display.rs` and `patches/candle-core-0.9.2/src/display.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 304 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 (8 lines × 21) crates/photonlayer-bench/src/privacy.rs:64— crates/photonlayer-bench/src/privacy.rs:64-71 | crates/photonlayer-bench/src/privacy.rs:77-84 | crates/prime-radiant/src/simd/matrix.rs:316-323 | crates/ruvector-cnn/src/backbone/mobilenet.rs:366-373 | crates/ruvector-consciousness/src/rsvd_emergence.rs:123-130 | crates/ruvector-graph-condense/src/gnn_eval.rs:156-163 | crates/ruvllm-wasm/src/workers/mod.rs:340-347 | crates/ruvllm-wasm/src/workers/pool.rs:858-865 | crates/ruvllm/src/backends/gemma2.rs:527-534 | crates/ruvllm/src/backends/gemma2.rs:650-657 | crates/ruvllm/src/backends/phi3.rs:403-410 | crates/ruvllm/src/backends/phi3.rs:528-535 | crates/ruvllm/src/kernels/matmul.rs:846-853 | crates/ruvllm/src/kernels/matmul.rs:1166-1173 | crates/ruvllm/src/models/ruvltra.rs:655-662 | crates/ruvllm/src/models/ruvltra.rs:850-857 | crates/ruvllm/src/models/ruvltra_medium.rs:654-661 | crates/ruvllm/src/models/ruvltra_medium.rs:747-754 | crates/ruvllm/src/qat/lora_qat.rs:682-689 | crates/ruvllm/src/qat/lora_qat.rs:697-704 | crates/ruvllm/src/qat/lora_qat.rs:711-718 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 × 13) crates/ruvix/crates/boot/src/manifest.rs:663— crates/ruvix/crates/boot/src/manifest.rs:663-670 | crates/ruvix/crates/boot/src/manifest.rs:674-681 | crates/rvf/rvf-cli/src/cmd/rebuild_refcounts.rs:47-54 | crates/rvf/rvf-cli/src/cmd/verify_attestation.rs:38-45 | crates/rvf/rvf-cli/src/cmd/verify_witness.rs:46-53 | crates/rvf/rvf-runtime/src/cow_map.rs:105-112 | crates/rvf/rvf-runtime/src/read_path.rs:481-488 | crates/rvf/rvf-runtime/src/read_path.rs:491-498 | crates/rvf/rvf-runtime/src/store.rs:4438-4445 | crates/rvf/rvf-runtime/src/store.rs:4448-4455 | crates/rvf/rvf-wasm/src/segment.rs:36-43 | crates/rvf/rvf-wasm/src/segment.rs:46-53 | crates/rvm/crates/rvm-proof/src/lib.rs:187-194 — before extracting anything, compare `crates/ruvix/crates/boot/src/manifest.rs` and `crates/rvf/rvf-runtime/src/read_path.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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 (7–8 lines × 11) crates/photonlayer-bench/src/privacy.rs:63— crates/photonlayer-bench/src/privacy.rs:63-69 | crates/photonlayer-bench/src/privacy.rs:76-82 | crates/ruvector-attn-mincut/src/gating.rs:13-19 | crates/ruvector-cnn/src/backbone/mobilenet.rs:364-371 | crates/ruvector-consciousness/src/rsvd_emergence.rs:122-128 | crates/ruvector-graph-condense/src/gnn_eval.rs:155-161 | crates/ruvllm-wasm/src/workers/mod.rs:338-345 | crates/ruvllm-wasm/src/workers/pool.rs:857-863 | crates/ruvllm/src/backends/gemma2.rs:525-532 | crates/ruvllm/src/backends/phi3.rs:401-408 | crates/ruvllm/src/models/ruvltra_medium.rs:745-752 — before extracting anything, compare `crates/ruvllm/src/backends/gemma2.rs` and `crates/ruvllm/src/backends/phi3.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 220 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 × 9) crates/ruvector-cnn/src/simd/neon.rs:28— crates/ruvector-cnn/src/simd/neon.rs:28-36 | crates/ruvector-core/src/simd_intrinsics.rs:662-671 | crates/ruvector-core/src/simd_intrinsics.rs:741-748 | crates/ruvector-core/src/simd_intrinsics.rs:812-819 | crates/ruvector-core/src/simd_intrinsics.rs:870-878 | crates/ruvllm/src/kernels/attention.rs:1208-1217 | crates/ruvllm/src/kernels/matmul.rs:208-217 | crates/ruvllm/src/kernels/matmul.rs:388-395 | crates/ruvllm/src/kernels/matmul.rs:1198-1205 — before extracting anything, compare `crates/ruvector-cnn/src/simd/neon.rs` and `crates/ruvector-core/src/simd_intrinsics.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 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 (8 lines × 8) crates/prime-radiant/src/attention/adapter.rs:200— crates/prime-radiant/src/attention/adapter.rs:200-207 | crates/ruvector-attention/src/curvature/fused_attention.rs:326-333 | crates/ruvector-attention/src/graph/rope.rs:184-191 | crates/ruvector-attention/src/pde_attention/diffusion.rs:230-237 | crates/ruvector-attention/src/sheaf/attention.rs:478-485 | crates/ruvector-attention/src/topology/gated_attention.rs:288-295 | crates/ruvector-attention/src/transport/centroid_ot.rs:335-342 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:324-331 — before extracting anything, compare `crates/prime-radiant/src/attention/adapter.rs` and `crates/ruvector-attention/src/curvature/fused_attention.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (6–8 lines × 5) crates/ruvix/crates/boot/src/attestation.rs:124— crates/ruvix/crates/boot/src/attestation.rs:124-131 | crates/rvf/rvf-crypto/src/lineage.rs:34-39 | crates/rvf/rvf-types/src/agi_container.rs:441-446 | crates/rvf/rvf-types/src/lineage.rs:114-119 | crates/rvm/crates/rvm-types/src/witness.rs:380-385 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
Duplicated block (6–8 lines × 4) patches/candle-core-0.8.4/src/quantized/avx.rs:159— patches/candle-core-0.8.4/src/quantized/avx.rs:159-164 | patches/candle-core-0.8.4/src/quantized/avx.rs:181-186 | patches/candle-core-0.8.4/src/quantized/avx.rs:263-270 | patches/candle-core-0.8.4/src/quantized/avx.rs:390-395 — 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.
Duplicated block (1–8 lines × 6) patches/candle-core-0.8.4/src/quantized/k_quants.rs:781— patches/candle-core-0.8.4/src/quantized/k_quants.rs:781-781 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1255-1262 | patches/candle-core-0.8.4/src/quantized/k_quants.rs:1453-1460 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:832-832 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1457-1464 | patches/candle-core-0.9.2/src/quantized/k_quants.rs:1719-1726 — before extracting anything, compare `patches/candle-core-0.8.4/src/quantized/k_quants.rs` and `patches/candle-core-0.9.2/src/quantized/k_quants.rs` as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1050 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 (7–8 lines × 3) crates/ruvector-rabitq/src/scan.rs:162— crates/ruvector-rabitq/src/scan.rs:162-169 | crates/ruvector-rabitq/src/scan.rs:195-201 | crates/ruvector-rabitq/src/scan.rs:230-236 — 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.
Duplicated block (5–8 lines × 3) crates/ruvllm/src/policy_store.rs:189— crates/ruvllm/src/policy_store.rs:189-196 | crates/ruvllm/src/session_index.rs:138-142 | crates/ruvllm/src/witness_log.rs:351-358 — before extracting anything, compare `crates/ruvllm/src/policy_store.rs` and `crates/ruvllm/src/witness_log.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 (3–8 lines × 4) crates/ruvllm-wasm/src/pi_quant_wasm.rs:466— crates/ruvllm-wasm/src/pi_quant_wasm.rs:466-468 | crates/ruvllm/src/quantize/pi_quant_simd.rs:498-505 | crates/ruvllm/src/quantize/pi_quant_simd.rs:515-522 | crates/ruvllm/src/quantize/pi_quant_simd.rs:771-778 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (3–8 lines × 3) crates/ruvector-acorn/src/search.rs:56— crates/ruvector-acorn/src/search.rs:56-58 | crates/ruvector-coherence-hnsw/src/search.rs:206-213 | crates/ruvector-coherence-hnsw/src/search.rs:308-315 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5–8 lines × 2) crates/ruvector-graph-transformer-node/src/lib.rs:335— crates/ruvector-graph-transformer-node/src/lib.rs:335-342 | crates/ruvector-graph-transformer-node/src/lib.rs:741-745 — 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 (1–8 lines × 3) crates/ruvector-graph-transformer-node/src/transformer.rs:676— crates/ruvector-graph-transformer-node/src/transformer.rs:676-683 | crates/ruvector-graph-transformer-wasm/src/transformer.rs:720-727 | crates/ruvector-postgres/src/graph/sparql/functions.rs:495-495 — before extracting anything, compare `crates/ruvector-graph-transformer-node/src/transformer.rs` and `crates/ruvector-graph-transformer-wasm/src/transformer.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 813 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 (4–8 lines × 3) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:566— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:566-569 | patches/candle-core-0.8.4/src/cpu_backend/mod.rs:627-634 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:817-824 — before extracting anything, compare `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.9.2/src/cpu_backend/mod.rs` as WHOLE FILES: this scan already matched 92 separate duplicated blocks between them, totalling at least 1724 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 (6–7 lines × 7) crates/ruvector-cnn/src/simd/avx2.rs:326— crates/ruvector-cnn/src/simd/avx2.rs:326-332 | crates/ruvector-cnn/src/simd/avx2.rs:478-483 | crates/ruvector-cnn/src/simd/avx2.rs:604-609 | crates/ruvector-cnn/src/simd/neon.rs:265-271 | crates/ruvector-cnn/src/simd/neon.rs:350-356 | crates/ruvector-cnn/src/simd/wasm.rs:241-246 | crates/ruvector-cnn/src/simd/wasm.rs:332-337 — before extracting anything, compare `crates/ruvector-cnn/src/simd/avx2.rs` and `crates/ruvector-cnn/src/simd/neon.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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–7 lines × 5) crates/ruvector-postgres/src/attention/flash.rs:83— crates/ruvector-postgres/src/attention/flash.rs:83-89 | crates/ruvector-postgres/src/attention/flash.rs:138-142 | crates/ruvector-postgres/src/attention/mod.rs:156-162 | crates/ruvector-postgres/src/attention/operators.rs:501-507 | crates/ruvector-postgres/src/attention/operators.rs:836-842 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5–7 lines × 4) crates/ruvector-cnn/src/layers/conv.rs:641— crates/ruvector-cnn/src/layers/conv.rs:641-647 | crates/ruvector-cnn/src/layers/quantized_depthwise.rs:213-217 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:70-74 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:165-169 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (3–7 lines × 4) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2321— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2321-2323 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1476-1482 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:1075-1081 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1127-1133 — `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 74 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (1–7 lines × 29) crates/mcp-brain/src/embed.rs:406— crates/mcp-brain/src/embed.rs:406-406 | crates/prime-radiant/src/attention/diffusion.rs:248-248 | crates/prime-radiant/src/attention/topology.rs:227-227 | crates/prime-radiant/src/ruvllm_integration/traits.rs:355-355 | crates/prime-radiant/src/storage/file.rs:560-560 | crates/prime-radiant/src/storage/memory.rs:201-201 | REDACTED:866-866 | crates/ruvector-attention-unified-wasm/src/lib.rs:265-271 | crates/ruvector-attention-wasm/src/utils.rs:23-23 | crates/ruvector-attention/src/training/loss.rs:43-43 | crates/ruvector-attention/src/training/mining.rs:65-65 | crates/ruvector-cli/src/cli/hooks.rs:661-661 | crates/ruvector-cluster-rag/src/lib.rs:61-61 | crates/ruvector-core/src/advanced/neural_hash.rs:348-348 | crates/ruvector-core/src/advanced_features/graph_rag.rs:494-494 | crates/ruvector-core/src/simd_intrinsics.rs:1192-1192 | crates/ruvector-dag/src/sona/reasoning_bank.rs:190-190 | crates/ruvector-diverse-beam/src/lib.rs:62-62 | crates/ruvector-gnn-wasm/src/lib.rs:350-356 | crates/ruvector-graph-transformer/src/biological.rs:91-91 | crates/ruvector-hybrid/src/main.rs:45-45 | crates/ruvector-mincut-gated-transformer/src/spectral.rs:767-767 | crates/ruvector-nervous-system/src/integration/ruvector.rs:393-393 | crates/ruvector-postgres/src/routing/router.rs:415-415 | crates/ruvector-spann/src/distance.rs:21-21 | crates/ruvllm-wasm/src/hnsw_router.rs:300-300 | crates/ruvllm/src/context/working_memory.rs:564-564 | crates/ruvllm/src/quality/coherence.rs:692-692 | crates/ruvllm/src/quality/diversity.rs:743-743 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 29 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 29 times.
Duplicated block (2–7 lines × 4) crates/ruvector-postgres/src/operators.rs:369— crates/ruvector-postgres/src/operators.rs:369-370 | crates/ruvllm/src/kernels/attention.rs:1425-1431 | crates/ruvllm/src/kv_cache.rs:968-975 | crates/ruvllm/src/paged_attention.rs:458-459 — 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 (6 lines × 10) crates/ruvector-cnn/src/kernels/int8_avx2.rs:211— crates/ruvector-cnn/src/kernels/int8_avx2.rs:211-217 | crates/ruvector-cnn/src/kernels/int8_neon.rs:207-213 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:222-228 | crates/ruvector-cnn/src/simd/avx2.rs:332-338 | crates/ruvector-cnn/src/simd/avx2.rs:483-488 | crates/ruvector-cnn/src/simd/neon.rs:235-241 | crates/ruvector-cnn/src/simd/neon.rs:271-277 | crates/ruvector-cnn/src/simd/scalar.rs:123-129 | crates/ruvector-cnn/src/simd/wasm.rs:206-212 | crates/ruvector-cnn/src/simd/wasm.rs:246-251 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (3–6 lines × 9) crates/prime-radiant/src/ruvllm_integration/traits.rs:357— crates/prime-radiant/src/ruvllm_integration/traits.rs:357-364 | crates/prime-radiant/src/storage/file.rs:562-567 | crates/prime-radiant/src/storage/memory.rs:203-210 | REDACTED:868-875 | crates/ruvector-attention-wasm/src/utils.rs:25-27 | crates/ruvector-core/src/advanced_features/graph_rag.rs:496-501 | crates/ruvector-postgres/src/routing/router.rs:417-421 | crates/ruvllm/src/quality/coherence.rs:694-701 | crates/ruvllm/src/quality/diversity.rs:745-752 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times.
Duplicated block (1–6 lines × 4) crates/prime-radiant/src/attention/adapter.rs:122— crates/prime-radiant/src/attention/adapter.rs:122-127 | crates/ruvector-attention/src/topology/gated_attention.rs:196-201 | crates/ruvector-gnn/src/search.rs:88-88 | crates/ruvllm/src/bitnet/backend.rs:2232-2232 — before extracting anything, compare `crates/prime-radiant/src/attention/adapter.rs` and `crates/ruvector-attention/src/topology/gated_attention.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 71 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 (1–6 lines × 3) crates/ruvector-cnn/src/layers/quantized_conv2d.rs:156— crates/ruvector-cnn/src/layers/quantized_conv2d.rs:156-161 | crates/ruvector-cnn/src/layers/quantized_depthwise.rs:142-147 | crates/ruvector-cnn/src/layers/quantized_pooling.rs:148-148 — before extracting anything, compare `crates/ruvector-cnn/src/layers/quantized_conv2d.rs` and `crates/ruvector-cnn/src/layers/quantized_depthwise.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 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 (3–6 lines × 4) patches/candle-core-0.8.4/src/quantized/neon.rs:186— patches/candle-core-0.8.4/src/quantized/neon.rs:186-188 | patches/candle-core-0.8.4/src/quantized/neon.rs:189-194 | patches/candle-core-0.8.4/src/quantized/neon.rs:215-217 | patches/candle-core-0.8.4/src/quantized/neon.rs:218-223 — 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.
Duplicated block (5 lines × 26) crates/ruvector-cnn/src/kernels/int8_avx2.rs:139— crates/ruvector-cnn/src/kernels/int8_avx2.rs:139-143 | crates/ruvector-cnn/src/kernels/int8_avx2.rs:211-215 | crates/ruvector-cnn/src/kernels/int8_avx2.rs:283-287 | crates/ruvector-cnn/src/kernels/int8_avx2.rs:323-327 | crates/ruvector-cnn/src/kernels/int8_neon.rs:126-130 | crates/ruvector-cnn/src/kernels/int8_neon.rs:207-211 | crates/ruvector-cnn/src/kernels/int8_neon.rs:277-281 | crates/ruvector-cnn/src/kernels/int8_neon.rs:308-312 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:132-136 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:222-226 | crates/ruvector-cnn/src/kernels/int8_wasm.rs:281-285 | crates/ruvector-cnn/src/simd/avx2.rs:240-244 | crates/ruvector-cnn/src/simd/avx2.rs:332-336 | crates/ruvector-cnn/src/simd/avx2.rs:395-399 | crates/ruvector-cnn/src/simd/avx2.rs:483-487 | crates/ruvector-cnn/src/simd/avx2.rs:609-613 | crates/ruvector-cnn/src/simd/neon.rs:235-239 | crates/ruvector-cnn/src/simd/neon.rs:271-275 | crates/ruvector-cnn/src/simd/neon.rs:324-328 | crates/ruvector-cnn/src/simd/neon.rs:356-360 | crates/ruvector-cnn/src/simd/scalar.rs:123-127 | crates/ruvector-cnn/src/simd/scalar.rs:172-176 | crates/ruvector-cnn/src/simd/wasm.rs:206-210 | crates/ruvector-cnn/src/simd/wasm.rs:246-250 | crates/ruvector-cnn/src/simd/wasm.rs:298-302 | crates/ruvector-cnn/src/simd/wasm.rs:337-341 — before extracting anything, compare `crates/ruvector-cnn/src/kernels/int8_avx2.rs` and `crates/ruvector-cnn/src/kernels/int8_neon.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 257 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 (4–5 lines × 7) patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2218— patches/candle-core-0.8.4/src/cpu_backend/mod.rs:2218-2222 | patches/candle-core-0.8.4/src/cuda_backend/mod.rs:1366-1370 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:888-892 | patches/candle-core-0.8.4/src/metal_backend/mod.rs:1083-1086 | patches/candle-core-0.9.2/src/cpu_backend/mod.rs:2742-2746 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:934-938 | patches/candle-core-0.9.2/src/metal_backend/mod.rs:1135-1138 — `patches/candle-core-0.8.4/src/cpu_backend/mod.rs` and `patches/candle-core-0.8.4/src/cuda_backend/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 74 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (4–5 lines × 5) crates/ruvector-attention/src/curvature/fused_attention.rs:354— crates/ruvector-attention/src/curvature/fused_attention.rs:354-358 | crates/ruvector-attention/src/pde_attention/diffusion.rs:257-261 | crates/ruvector-attention/src/topology/gated_attention.rs:317-321 | crates/ruvector-attention/src/transport/centroid_ot.rs:363-367 | crates/ruvector-attention/src/transport/sliced_wasserstein.rs:361-364 — before extracting anything, compare `crates/ruvector-attention/src/curvature/fused_attention.rs` and `crates/ruvector-attention/src/pde_attention/diffusion.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 105 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 (4–5 lines × 6) crates/ruvector-sota-bench/src/runners/hybrid.rs:59— crates/ruvector-sota-bench/src/runners/hybrid.rs:59-63 | crates/ruvector-sota-bench/src/runners/lsm_ann.rs:43-47 | crates/ruvector-sota-bench/src/runners/matryoshka.rs:73-77 | crates/ruvector-sota-bench/src/runners/mteb.rs:199-202 | crates/ruvector-sota-bench/src/runners/rabitq.rs:39-42 | crates/ruvector-sota-bench/src/runners/vdbbench.rs:98-101 — 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 6 call sites, so a change lands once.
Duplicated block (1–5 lines × 4) crates/ruvector-attention-node/src/training.rs:62— crates/ruvector-attention-node/src/training.rs:62-66 | crates/ruvector-attention-node/src/training.rs:139-143 | crates/ruvector-attention-node/src/training.rs:200-200 | crates/ruvector-attention-node/src/training.rs:859-861 — 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.
Duplicated block (4–5 lines × 4) crates/ruvector-nervous-system-wasm/src/wta.rs:242— crates/ruvector-nervous-system-wasm/src/wta.rs:242-246 | crates/ruvector-nervous-system-wasm/src/wta.rs:281-284 | crates/ruvector-nervous-system/src/compete/kwta.rs:99-103 | crates/ruvector-nervous-system/src/compete/kwta.rs:133-139 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (4–5 lines × 3) crates/ruvllm/src/quantize/turbo_quant.rs:361— crates/ruvllm/src/quantize/turbo_quant.rs:361-365 | crates/ruvllm/src/quantize/turbo_quant.rs:434-438 | crates/ruvllm/src/quantize/turbo_quant.rs:608-611 — 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.
Duplicated block (731 lines × 2) crates/ruvector-postgres/src/graph/sparql/ast.rs:21— crates/ruvector-postgres/src/graph/sparql/ast.rs:21-751 | crates/rvlite/src/sparql/ast.rs:21-751 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (259 lines × 2) patches/candle-core-0.8.4/src/dummy_cuda_backend.rs:20— patches/candle-core-0.8.4/src/dummy_cuda_backend.rs:20-278 | patches/candle-core-0.9.2/src/dummy_cuda_backend.rs:14-317 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (234 lines × 2) patches/candle-core-0.8.4/src/dummy_metal_backend.rs:18— patches/candle-core-0.8.4/src/dummy_metal_backend.rs:18-251 | patches/candle-core-0.9.2/src/dummy_metal_backend.rs:18-279 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 9) crates/prime-radiant/src/execution/action.rs:298— crates/prime-radiant/src/execution/action.rs:298-303 | crates/prime-radiant/src/execution/action.rs:515-520 | crates/prime-radiant/src/execution/ladder.rs:466-471 | crates/prime-radiant/src/learned_rho/training.rs:227-232 | crates/prime-radiant/src/neural_gate/decision.rs:215-220 | crates/prime-radiant/src/neural_gate/encoding.rs:327-332 | crates/prime-radiant/src/neural_gate/gate.rs:449-454 | crates/prime-radiant/src/sona_tuning/adjustment.rs:162-167 | crates/prime-radiant/src/sona_tuning/tuner.rs:422-427 — there are 9 copies across 8 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 12) crates/ruvector-attention-unified-wasm/src/neural.rs:106— crates/ruvector-attention-unified-wasm/src/neural.rs:106-111 | crates/ruvector-attention-unified-wasm/src/neural.rs:177-182 | crates/ruvector-attention-unified-wasm/src/neural.rs:229-234 | crates/ruvector-attention-unified-wasm/src/neural.rs:275-280 | crates/ruvector-attention-unified-wasm/src/neural.rs:322-327 | crates/ruvector-attention-unified-wasm/src/neural.rs:374-379 | crates/ruvector-attention-wasm/src/attention.rs:75-80 | crates/ruvector-attention-wasm/src/attention.rs:133-138 | crates/ruvector-attention-wasm/src/attention.rs:178-183 | crates/ruvector-attention-wasm/src/attention.rs:217-222 | crates/ruvector-attention-wasm/src/attention.rs:257-262 | crates/ruvector-attention-wasm/src/attention.rs:302-307 — before extracting anything, compare `crates/ruvector-attention-unified-wasm/src/neural.rs` and `crates/ruvector-attention-wasm/src/attention.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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 (3–5 lines × 3) scripts/training/run_sft.py:32— scripts/training/run_sft.py:32-36 | scripts/training/run_sft.py:38-43 | scripts/training/train-deobfuscator.py:361-363 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/training/run_sft.py:30` calls `add_argument` and `scripts/training/train-deobfuscator.py:360` 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.
CI formatting step cannot fail REDACTED:51— `cargo fmt -p ruvector-typesafe-core -p ruvector-typesafe-ffi \` invokes cargo fmt in the mode that REWRITES the files it reformats and exits 0 whatever it changed. The rewrite happens inside the runner's throwaway checkout and is then discarded, so the step passes on a badly-formatted change exactly as it passes on a clean one — it enforces nothing, and no other step in this file reads the result. `--check` is the flag that turns the same invocation into a gate: it leaves the files alone and exits non-zero when anything would have been reformatted.
Duplication concentrated across 31 sibling directories (99 clone groups) npm/packages/agentic-synth-examples/src/dspy/training-session.ts:15— 99 duplicated blocks under npm/packages/ have copies in at least two of the sibling directories agentic-integration, agentic-synth, agentic-synth-examples, burst-scaling, cli, cloud-run (+25 more sibling(s) not listed) — 56 of them are reported below, and 43 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 99 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 99 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 99 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 4 sibling directories (23 clone groups) npm/packages/ruvector/src/decompiler/statement-parser.js:191— 23 duplicated blocks under the repository root have copies in at least two of the sibling directories crates, npm, scripts, ui — 13 of them are reported below, and 10 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 23 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 5 sibling directories (7 clone groups) npm/packages/agentic-synth-examples/src/cicd/index.ts:184— 7 duplicated blocks under npm/packages/agentic-synth-examples/src/ have copies in at least two of the sibling directories cicd, security, self-learning, stock-market, swarm — 4 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 6 sibling directories (7 clone groups) REDACTED:48— 7 duplicated blocks under ui/ruvocal/src/lib/ have copies in at least two of the sibling directories components, server, stores, types, utils, wasm — 6 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 2 sibling directories (6 clone groups) ui/ruvocal/src/lib/server/conversation.ts:54— 6 duplicated blocks under ui/ruvocal/src/ have copies in at least two of the sibling directories lib, routes — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 5 sibling directories (6 clone groups) ui/ruvocal/src/routes/api/v2/user/settings/+REDACTED:79— 6 of the duplicated blocks reported below have copies in at least two of the sibling directories api, conversation, models, r, settings under ui/ruvocal/src/routes/. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 3 sibling directories (5 clone groups) npm/packages/ruvllm/bin/cli.js:607— 5 duplicated blocks under npm/packages/ruvllm/ have copies in at least two of the sibling directories bin, scripts, src — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Wholesale file copy (628 identical lines × 2 files) npm/packages/agentic-synth-examples/src/dspy/training-session.ts:15— npm/packages/agentic-synth-examples/src/dspy/training-session.ts:15 · npm/packages/agentic-synth/training/dspy-learning-session.ts:15 — these 2 files are line-for-line copies of one another — 628 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (114 matched lines × 2 locations) · ×1
Duplicated block with local edits (114 matched lines × 2 locations) scripts/adr-index.mjs:71— scripts/adr-index.mjs:71 · scripts/frozen-weights-check.mjs:298 — the two spans are one implementation copied and then locally edited — 693 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (113 matched lines × 2 locations) · ×1
Duplicated block with local edits (113 matched lines × 2 locations) npm/packages/agentic-synth/training/openrouter-learning-session.ts:116— npm/packages/agentic-synth/training/openrouter-learning-session.ts:116 · npm/packages/agentic-synth/training/openrouter-training-fixed.ts:115 — the two spans are one implementation copied and then locally edited — 829 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (112 matched lines × 2 locations) · ×1
Duplicated block with local edits (112 matched lines × 2 locations) npm/packages/kge/scripts/check-security.mjs:21— npm/packages/kge/scripts/check-security.mjs:21 · npm/packages/typesafe/scripts/check-security.mjs:21 — the two spans are one implementation copied and then locally edited — 1066 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (94 matched lines × 2 locations) · ×1
Duplicated block with local edits (94 matched lines × 2 locations) npm/packages/kge/src/serve.ts:19— npm/packages/kge/src/serve.ts:19 · npm/packages/typesafe/src/serve.ts:20 — the two spans are one implementation copied and then locally edited — 722 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (93 matched lines × 2 locations) · ×1
Duplicated block with local edits (93 matched lines × 2 locations) npm/packages/ruvbot/src/channels/adapters/DiscordAdapter.ts:97— npm/packages/ruvbot/src/channels/adapters/DiscordAdapter.ts:97 · npm/packages/ruvbot/src/channels/adapters/SlackAdapter.ts:96 — the two spans are one implementation copied and then locally edited — 510 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (84 matched lines × 2 locations) · ×1
Duplicated block with local edits (84 matched lines × 2 locations) npm/packages/graph-data-generator/src/generators/entity-relationships.ts:20— npm/packages/graph-data-generator/src/generators/entity-relationships.ts:20 · npm/packages/graph-data-generator/src/generators/social-network.ts:15 — the two spans are one implementation copied and then locally edited — 548 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (66 identical lines × 2 files) npm/wasm/src/browser.ts:5— npm/wasm/src/browser.ts:5 · npm/wasm/src/node.ts:5 — these 2 files are line-for-line copies of one another — 66 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (59 matched lines × 2 locations) · ×1
Duplicated block with local edits (59 matched lines × 2 locations) npm/packages/kge/src/cli/main.ts:24— npm/packages/kge/src/cli/main.ts:24 · npm/packages/typesafe/src/cli/main.ts:19 — the two spans are one implementation copied and then locally edited — 409 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (59 lines × 2 locations) ui/ruvocal/src/routes/+page.svelte:67— ui/ruvocal/src/routes/+page.svelte:67 · ui/ruvocal/src/routes/models/[...model]/+page.svelte:50 — the 2 copies are spread across 2 files, 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 (50 lines × 2 locations) ui/ruvocal/src/lib/utils/parseIncompleteMarkdown.ts:92— ui/ruvocal/src/lib/utils/parseIncompleteMarkdown.ts:92 · ui/ruvocal/src/lib/utils/parseIncompleteMarkdown.ts:144 — 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 (47 lines × 2 locations) npm/packages/kge/bin/cli.js:15— npm/packages/kge/bin/cli.js:15 · npm/packages/typesafe/bin/cli.js:15 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (40 lines × 2 locations) npm/packages/ruvbot/src/integration/providers/AnthropicProvider.ts:352— npm/packages/ruvbot/src/integration/providers/AnthropicProvider.ts:352 · npm/packages/ruvbot/src/integration/providers/OpenRouterProvider.ts:535 — the 2 copies are spread across 2 files, 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 (36 lines × 2 locations) npm/packages/ruvector/bin/cli.js:3403— npm/packages/ruvector/bin/cli.js:3403 · npm/packages/ruvector/bin/mcp-server.js:357 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication· Duplicated block with local edits (33 matched lines × 2 locations) · ×1
Duplicated block with local edits (33 matched lines × 2 locations) npm/packages/kge/scripts/hash-fixtures.mjs:19— npm/packages/kge/scripts/hash-fixtures.mjs:19 · npm/packages/typesafe/scripts/hash-fixtures.mjs:15 — the two spans are one implementation copied and then locally edited — 264 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (33 lines × 2 locations) REDACTED:137— REDACTED:137 · REDACTED:267 — the 2 copies are spread across 2 files, 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 (31 lines × 2 locations) crates/rvforge-reader/ui/dock.js:17— crates/rvforge-reader/ui/dock.js:17 · crates/rvforge-reader/ui/library.js:19 — the 2 copies are spread across 2 files, 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 (30 lines × 3 locations) REDACTED:78— REDACTED:78 · REDACTED:92 · REDACTED:153 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (29 lines × 3 locations) npm/packages/ruvector/bin/mcp-server.js:3743— npm/packages/ruvector/bin/mcp-server.js:3743 · npm/packages/ruvector/bin/mcp-server.js:3775 · npm/packages/ruvector/bin/mcp-server.js:3806 — all 3 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.
R10 · Code Duplication· Duplicated block with local edits (28 matched lines × 2 locations) · ×1
Duplicated block with local edits (28 matched lines × 2 locations) npm/packages/agentic-integration/regional-agent.ts:82— npm/packages/agentic-integration/regional-agent.ts:82 · npm/packages/agentic-integration/regional-agent.ts:531 — the two spans are one implementation copied and then locally edited — 177 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function (anonymous) (cyclomatic 502, cognitive 680) npm/packages/ruvector/bin/mcp-server.js:1911— (anonymous) has cyclomatic complexity 502 and cognitive complexity 680; 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 runMcpFlow (cyclomatic 182, cognitive 315) ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:40— runMcpFlow has cyclomatic complexity 182 and cognitive complexity 315; 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 generateTags (cyclomatic 163, cognitive 129) scripts/wet-filter-inject.js:130— generateTags has cyclomatic complexity 163 and cognitive complexity 129; 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 executeWasmTool (cyclomatic 97, cognitive 134) REDACTED:187— executeWasmTool has cyclomatic complexity 97 and cognitive complexity 134; 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 (anonymous) (cyclomatic 83, cognitive 109) npm/packages/ruvector/bin/cli.js:4053— (anonymous) has cyclomatic complexity 83 and cognitive complexity 109; 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 (anonymous) (cyclomatic 78, cognitive 98) ui/ruvocal/src/lib/server/textGeneration/mcp/wasmTools.test.ts:55— (anonymous) has cyclomatic complexity 78 and cognitive complexity 98; 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 (anonymous) (cyclomatic 76, cognitive 124) npm/packages/ruvector/bin/cli.js:6702— (anonymous) has cyclomatic complexity 76 and cognitive complexity 124; 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 writeMessage (cyclomatic 67, cognitive 110) ui/ruvocal/src/routes/conversation/[id]/+page.svelte:102— writeMessage has cyclomatic complexity 67 and cognitive complexity 110; 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 handle_message (cyclomatic 61, cognitive 91) REDACTED:481— handle_message has cyclomatic complexity 61 and cognitive complexity 91; 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 generate (cyclomatic 59, cognitive 104) ui/ruvocal/src/lib/server/textGeneration/generate.ts:16— generate has cyclomatic complexity 59 and cognitive complexity 104; 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 matchesFilter (cyclomatic 55, cognitive 111) ui/ruvocal/src/lib/server/database/rvf.ts:222— matchesFilter has cyclomatic complexity 55 and cognitive complexity 111; 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 stripComments (cyclomatic 54, cognitive 89) scripts/frozen-weights-check.mjs:214— stripComments has cyclomatic complexity 54 and cognitive complexity 89; 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 (anonymous) (cyclomatic 49, cognitive 52) ui/ruvocal/src/lib/server/hooks/handle.ts:35— (anonymous) has cyclomatic complexity 49 and cognitive complexity 52; 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 update (cyclomatic 48, cognitive 66) ui/ruvocal/src/routes/conversation/[id]/+REDACTED:400— update has cyclomatic complexity 48 and cognitive complexity 66; 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.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 48, cognitive 55) · ×1
Complex function main (cyclomatic 48, cognitive 55) npm/packages/ruvllm/bin/cli.js:884— main has cyclomatic complexity 48 and cognitive complexity 55; 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.
R2 · Cyclomatic Complexity· Complex function POST (cyclomatic 40, cognitive 49) · ×1
Complex function POST (cyclomatic 40, cognitive 49) ui/ruvocal/src/routes/api/mcp/health/+REDACTED:175— POST has cyclomatic complexity 40 and cognitive complexity 49; 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.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 39, cognitive 60) · ×1
Complex function main (cyclomatic 39, cognitive 60) npm/packages/rudag/bin/cli.js:127— main has cyclomatic complexity 39 and cognitive complexity 60; 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 (anonymous) (cyclomatic 38, cognitive 59) npm/packages/ruvector/bin/cli.js:10042— (anonymous) has cyclomatic complexity 38 and cognitive complexity 59; 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 openAIChatToTextGenerationStream (cyclomatic 37, cognitive 52) ui/ruvocal/src/lib/server/endpoints/openai/openAIChatToTextGenerationStream.ts:8— openAIChatToTextGenerationStream has cyclomatic complexity 37 and cognitive complexity 52; 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 splitMegaStatement (cyclomatic 37, cognitive 49) REDACTED:217— splitMegaStatement has cyclomatic complexity 37 and cognitive complexity 49; 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.
R3 · Large Files· npm/packages/ruvector/src/core/intelligence-engine.ts · ×1
npm/packages/ruvector/src/core/intelligence-engine.ts: 1274 lines of code npm/packages/ruvector/src/core/intelligence-engine.ts:1— npm/packages/ruvector/src/core/intelligence-engine.ts has 1274 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts · ×1
ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts: 1259 lines of code ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:1— ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts has 1259 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector/src/core/neural-embeddings.ts · ×1
npm/packages/ruvector/src/core/neural-embeddings.ts: 1185 lines of code npm/packages/ruvector/src/core/neural-embeddings.ts:1— npm/packages/ruvector/src/core/neural-embeddings.ts has 1185 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1140 lines of code REDACTED:1— REDACTED has 1140 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1137 lines of code REDACTED:1— REDACTED has 1137 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/rvf/src/backend.ts · ×1
npm/packages/rvf/src/backend.ts: 1120 lines of code npm/packages/rvf/src/backend.ts:1— npm/packages/rvf/src/backend.ts has 1120 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/postgres-cli/src/client.ts · ×1
npm/packages/postgres-cli/src/client.ts: 1099 lines of code npm/packages/postgres-cli/src/client.ts:1— npm/packages/postgres-cli/src/client.ts has 1099 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/agentic-synth/training/dspy-learning-session.ts · ×1
npm/packages/agentic-synth/training/dspy-learning-session.ts: 1045 lines of code npm/packages/agentic-synth/training/dspy-learning-session.ts:1— npm/packages/agentic-synth/training/dspy-learning-session.ts has 1045 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/agentic-synth-examples/src/dspy/training-session.ts · ×1
npm/packages/agentic-synth-examples/src/dspy/training-session.ts: 1038 lines of code npm/packages/agentic-synth-examples/src/dspy/training-session.ts:1— npm/packages/agentic-synth-examples/src/dspy/training-session.ts has 1038 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector-extensions/src/exporters.ts · ×1
npm/packages/ruvector-extensions/src/exporters.ts: 1035 lines of code npm/packages/ruvector-extensions/src/exporters.ts:1— npm/packages/ruvector-extensions/src/exporters.ts has 1035 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/cli/src/cli.ts · ×1
npm/packages/cli/src/cli.ts: 1023 lines of code npm/packages/cli/src/cli.ts:1— npm/packages/cli/src/cli.ts has 1023 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1013 lines of code REDACTED:1— REDACTED has 1013 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/postgres-cli/src/cli.ts · ×1
npm/packages/postgres-cli/src/cli.ts: 980 lines of code npm/packages/postgres-cli/src/cli.ts:1— npm/packages/postgres-cli/src/cli.ts has 980 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ui/ruvocal/src/lib/server/database/rvf.ts · ×1
ui/ruvocal/src/lib/server/database/rvf.ts: 964 lines of code ui/ruvocal/src/lib/server/database/rvf.ts:1— ui/ruvocal/src/lib/server/database/rvf.ts has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector-extensions/src/temporal.ts · ×1
npm/packages/ruvector-extensions/src/temporal.ts: 944 lines of code npm/packages/ruvector-extensions/src/temporal.ts:1— npm/packages/ruvector-extensions/src/temporal.ts has 944 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector/src/core/adaptive-embedder.ts · ×1
npm/packages/ruvector/src/core/adaptive-embedder.ts: 937 lines of code npm/packages/ruvector/src/core/adaptive-embedder.ts:1— npm/packages/ruvector/src/core/adaptive-embedder.ts has 937 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 909 lines of code REDACTED:1— REDACTED has 909 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/cognitum-gate-wasm/src/index.ts · ×1
npm/packages/cognitum-gate-wasm/src/index.ts: 880 lines of code npm/packages/cognitum-gate-wasm/src/index.ts:1— npm/packages/cognitum-gate-wasm/src/index.ts has 880 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ui/ruvocal/src/lib/components/chat/ChatWindow.svelte · ×1
ui/ruvocal/src/lib/components/chat/ChatWindow.svelte: 858 lines of code ui/ruvocal/src/lib/components/chat/ChatWindow.svelte:1— ui/ruvocal/src/lib/components/chat/ChatWindow.svelte has 858 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 839 lines of code REDACTED:1— REDACTED has 839 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/agentic-synth/training/dspy-real-integration.ts · ×1
npm/packages/agentic-synth/training/dspy-real-integration.ts: 822 lines of code npm/packages/agentic-synth/training/dspy-real-integration.ts:1— npm/packages/agentic-synth/training/dspy-real-integration.ts has 822 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/rvlite/src/index.ts · ×1
npm/packages/rvlite/src/index.ts: 802 lines of code npm/packages/rvlite/src/index.ts:1— npm/packages/rvlite/src/index.ts has 802 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector/src/core/parallel-workers.ts · ×1
npm/packages/ruvector/src/core/parallel-workers.ts: 798 lines of code npm/packages/ruvector/src/core/parallel-workers.ts:1— npm/packages/ruvector/src/core/parallel-workers.ts has 798 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector/src/core/attention-fallbacks.ts · ×1
npm/packages/ruvector/src/core/attention-fallbacks.ts: 749 lines of code npm/packages/ruvector/src/core/attention-fallbacks.ts:1— npm/packages/ruvector/src/core/attention-fallbacks.ts has 749 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector/src/core/neural-perf.ts · ×1
npm/packages/ruvector/src/core/neural-perf.ts: 740 lines of code npm/packages/ruvector/src/core/neural-perf.ts:1— npm/packages/ruvector/src/core/neural-perf.ts has 740 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvllm/src/types.ts · ×1
npm/packages/ruvllm/src/types.ts: 724 lines of code npm/packages/ruvllm/src/types.ts:1— npm/packages/ruvllm/src/types.ts has 724 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector/src/core/onnx-embedder.ts · ×1
npm/packages/ruvector/src/core/onnx-embedder.ts: 710 lines of code npm/packages/ruvector/src/core/onnx-embedder.ts:1— npm/packages/ruvector/src/core/onnx-embedder.ts has 710 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvllm/src/contrastive.ts · ×1
npm/packages/ruvllm/src/contrastive.ts: 708 lines of code npm/packages/ruvllm/src/contrastive.ts:1— npm/packages/ruvllm/src/contrastive.ts has 708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ui/ruvocal/src/routes/conversation/[id]/+REDACTED · ×1
ui/ruvocal/src/routes/conversation/[id]/+REDACTED: 681 lines of code ui/ruvocal/src/routes/conversation/[id]/+REDACTED:1— ui/ruvocal/src/routes/conversation/[id]/+REDACTED has 681 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/agentic-integration/integration-tests.ts · ×1
npm/packages/agentic-integration/integration-tests.ts: 680 lines of code npm/packages/agentic-integration/integration-tests.ts:1— npm/packages/agentic-integration/integration-tests.ts has 680 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvllm/src/training.ts · ×1
npm/packages/ruvllm/src/training.ts: 673 lines of code npm/packages/ruvllm/src/training.ts:1— npm/packages/ruvllm/src/training.ts has 673 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector/src/core/learning-engine.ts · ×1
npm/packages/ruvector/src/core/learning-engine.ts: 670 lines of code npm/packages/ruvector/src/core/learning-engine.ts:1— npm/packages/ruvector/src/core/learning-engine.ts has 670 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvbot/src/security/AIDefenceGuard.ts · ×1
npm/packages/ruvbot/src/security/AIDefenceGuard.ts: 668 lines of code npm/packages/ruvbot/src/security/AIDefenceGuard.ts:1— npm/packages/ruvbot/src/security/AIDefenceGuard.ts has 668 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 659 lines of code REDACTED:1— REDACTED has 659 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/cli/src/storage.ts · ×1
npm/packages/cli/src/storage.ts: 657 lines of code npm/packages/cli/src/storage.ts:1— npm/packages/cli/src/storage.ts has 657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/agentic-integration/coordination-protocol.ts · ×1
npm/packages/agentic-integration/coordination-protocol.ts: 655 lines of code npm/packages/agentic-integration/coordination-protocol.ts:1— npm/packages/agentic-integration/coordination-protocol.ts has 655 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 637 lines of code REDACTED:1— REDACTED has 637 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ui/ruvocal/src/lib/server/database/postgres.ts · ×1
ui/ruvocal/src/lib/server/database/postgres.ts: 630 lines of code ui/ruvocal/src/lib/server/database/postgres.ts:1— ui/ruvocal/src/lib/server/database/postgres.ts has 630 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/ruvector-wasm-unified/src/exotic.ts · ×1
npm/packages/ruvector-wasm-unified/src/exotic.ts: 622 lines of code npm/packages/ruvector-wasm-unified/src/exotic.ts:1— npm/packages/ruvector-wasm-unified/src/exotic.ts has 622 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· npm/packages/rudag/src/dag.ts · ×1
npm/packages/rudag/src/dag.ts: 612 lines of code npm/packages/rudag/src/dag.ts:1— npm/packages/rudag/src/dag.ts has 612 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~1243 LoC) npm/packages/postgres-cli/src/client.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~1242 LoC) npm/packages/agentic-synth/training/dspy-learning-session.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~1237 LoC) npm/packages/agentic-synth/training/dspy-benchmarks.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~1213 LoC) npm/packages/ruvector-extensions/src/exporters.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~1153 LoC) REDACTED— no import path from any entry point (392 application, 346 tooling, 243 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 (~1059 LoC) npm/packages/ruvector-extensions/src/temporal.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~1040 LoC) REDACTED— no import path from any entry point (392 application, 346 tooling, 243 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 (~971 LoC) REDACTED— no import path from any entry point (392 application, 346 tooling, 243 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 (~936 LoC) npm/packages/agentic-synth/training/dspy-real-integration.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~825 LoC) npm/packages/agentic-integration/integration-tests.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~749 LoC) npm/packages/cli/src/storage.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~699 LoC) npm/packages/rudag/src/dag.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~568 LoC) npm/packages/cloud-run/streaming-service.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~552 LoC) npm/packages/cloud-run/streaming-service-optimized.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~508 LoC) npm/packages/cloud-run/load-balancer.ts— no import path from any entry point (392 application, 346 tooling, 243 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (npm/packages/cloud-run/streaming-service-optimized.js, npm/packages/cloud-run/streaming-service-optimized.ts, npm/packages/cloud-run/streaming-service.js and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~485 LoC) npm/packages/cloud-run/vector-client.ts— no import path from any entry point (392 application, 346 tooling, 243 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (npm/packages/cloud-run/streaming-service-optimized.js, npm/packages/cloud-run/streaming-service-optimized.ts, npm/packages/cloud-run/streaming-service.js and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~453 LoC) REDACTED— no import path from any entry point (392 application, 346 tooling, 243 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 (~441 LoC) npm/packages/postgres-cli/src/commands/routing.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~435 LoC) npm/packages/raft/src/node.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~362 LoC) npm/packages/graph-data-generator/src/cypher-generator.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~348 LoC) npm/packages/ruvector/src/core/onnx/pkg/loader.js— no import path from any entry point (392 application, 346 tooling, 243 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 (~331 LoC) npm/packages/graph-data-generator/src/embedding-enrichment.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~288 LoC) npm/packages/graph-data-generator/src/generators/temporal-events.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~286 LoC) npm/packages/graph-data-generator/src/generators/entity-relationships.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~275 LoC) npm/packages/agentic-synth-examples/src/generators/stock-market.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~269 LoC) npm/packages/rudag/src/node.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~266 LoC) npm/packages/postgres-cli/src/commands/vector.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~262 LoC) npm/packages/postgres-cli/src/commands/benchmark.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~260 LoC) npm/packages/replication/src/sync-manager.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~254 LoC) npm/packages/replication/src/replica-set.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~248 LoC) npm/packages/graph-data-generator/src/generators/knowledge-graph.ts— no import path from any entry point (392 application, 346 tooling, 243 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 (~245 LoC) npm/packages/graph-data-generator/src/openrouter-client.ts— no import path from any entry point (392 application, 346 tooling, 243 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 '@claude-flow/memory' — Declared in the root 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 '@noble/hashes' — Declared in npm/packages/cognitum-gate-wasm/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 'inquirer' — Declared in npm/packages/postgres-cli/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.
Third-party script without Subresource Integrity npm/packages/ruvector-extensions/src/ui/index.html:8— `https://d3js.org/d3.v7.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository.
Swallowed exception (caught, then discarded) scripts/vote-boost.py:15— `except` 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.
Classify ADR enforcement: ADR-001: Ruvector Core Architecture docs/adr/ADR-001-ruvector-core-architecture.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-002: RuvLLM Integration with Ruvector docs/adr/ADR-002-ruvllm-integration.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-003: SIMD Optimization Strategy for Ruvector and RuvLLM docs/adr/ADR-003-simd-optimization-strategy.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-004: KV Cache Management Strategy for RuvLLM docs/adr/ADR-004-kv-cache-management.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-005: WASM Runtime Integration docs/adr/ADR-005-wasm-runtime-integration.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-006: Unified Memory Pool and Paging Strategy docs/adr/ADR-006-memory-management.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-007: Security Review & Technical Debt Remediation docs/adr/ADR-007-security-review-technical-debt.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-008: mistral-rs Integration for Production-Scale LLM Serving docs/adr/ADR-008-mistral-rs-integration.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-009: Structured Output / JSON Mode for Reliable Agentic Workflows docs/adr/ADR-009-structured-output.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-010: Function Calling / Tool Use in RuvLLM docs/adr/ADR-010-function-calling.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-011: Prefix Caching for 10x Faster RAG and Chat Applications docs/adr/ADR-011-prefix-caching.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-012: Security Remediation and Hardening docs/adr/ADR-012-security-remediation.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-013: HuggingFace Model Publishing Strategy docs/adr/ADR-013-huggingface-publishing.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-014: Coherence Engine Architecture docs/adr/ADR-014-coherence-engine.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-015: Coherence-Gated Transformer (Sheaf Attention) docs/adr/ADR-015-coherence-gated-transformer.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-016: Delta-Behavior System - Domain-Driven Design Architecture docs/adr/ADR-016-delta-behavior-ddd-architecture.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-017: Temporal Tensor Compression with Tiered Quantization docs/adr/ADR-017-temporal-tensor-compression.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-024: Craftsman Ultra 30b 1bit — BitNet Integration with RuvLLM docs/adr/ADR-024-craftsman-ultra-30b-1bit-bitnet-integration.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-025: EXO-AI Multi-Paradigm Integration Architecture docs/adr/ADR-025-exo-ai-multiparadigm-integration.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-026: Vector-Native COW Branching (RVCOW) and Real Cognitive Containers docs/adr/ADR-026-rvcow-branching-and-real-cognitive-containers.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-027: Fix HNSW Index Segmentation Fault with Parameterized Queries docs/adr/ADR-027-hnsw-parameterized-query-fix.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-028: eHealth Platform Architecture for 50M Patient Records docs/adr/ADR-028-ehealth-platform-architecture.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-029: RVF as Canonical Binary Format Across All RuVector Libraries docs/adr/ADR-029-rvf-canonical-format.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-030: RVF Cognitive Container -- Self-Booting Vector Files docs/adr/ADR-030-rvf-cognitive-container.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-031: RVF Example Repository — 24 Demonstrations Across Four Categories docs/adr/ADR-031-rvf-example-repository.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Orphaned file crates/rvm/crates/rvm-hal/src/aarch64/boot.rs: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 crates/rvm/crates/rvm-cap/src/manager.rs: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 crates/rvm/crates/rvm-wasm/src/quota.rs: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 crates/ruvllm-wasm/src/quant_bench_wasm.rs: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 crates/rvm/crates/rvm-coherence/src/mincut.rs: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 crates/ruvllm/src/qat/ste.rs: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 crates/rvm/crates/rvm-partition/src/device.rs: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 crates/ruvllm/src/qat/calibration.rs: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 crates/rvm/crates/rvm-witness/src/signer.rs: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 crates/mcp-brain-server/src/quantization.rs: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 crates/ruvector-cnn/src/kernels/int8_neon.rs: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 crates/ruvllm/src/qat/reasoning_loss.rs: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 crates/rvm/crates/rvm-sched/src/switch.rs: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 crates/rvm/crates/rvm-witness/src/log.rs: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 crates/ruvector-cnn/src/kernels/int8_wasm.rs: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 crates/rvm/crates/rvm-coherence/src/bridge.rs: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 crates/rvm/crates/rvm-cap/src/table.rs: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 crates/rvm/crates/rvm-hal/src/aarch64/mmu.rs: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 crates/ruvllm/src/qat/distillation.rs: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 crates/rvm/crates/rvm-proof/src/tee_signer.rs: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 crates/rvm/crates/rvm-sched/src/scheduler.rs: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 crates/ruvector-cnn/src/quantize/tensor.rs: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 crates/rvm/crates/rvm-cap/src/derivation.rs: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 crates/rvm/crates/rvm-sched/src/smp.rs: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 crates/rvm/crates/rvm-proof/src/tee_verifier.rs: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.
Interpolated log message defeats structured logging REDACTED:103— `debug` at line 103 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/routes/api/v2/user/billing-orgs/+REDACTED:27— `error` at line 27 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/routes/api/v2/user/billing-orgs/+REDACTED:51— `info` at line 51 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/routes/api/mcp/health/+REDACTED:256— `info` at line 256 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/routes/api/mcp/health/+REDACTED:263— `info` at line 263 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/routes/api/mcp/health/+REDACTED:331— `info` at line 331 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/server/adminToken.ts:58— `info` at line 58 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/server/metrics.ts:237— `info` at line 237 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/server/sendSlack.ts:21— `error` at line 21 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/server/textGeneration/generate.ts:248— `info` at line 248 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/server/database/postgres.ts:164— `warn` at line 164 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/migrations/migrations.ts:52— `debug` at line 52 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/migrations/migrations.ts:59— `debug` at line 59 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/migrations/migrations.ts:66— `debug` at line 66 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/migrations/migrations.ts:89— `error` at line 89 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ui/ruvocal/src/lib/migrations/routines/09-delete-empty-conversations.ts:73— `info` at line 73 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/hitl.rs:77— `info!` at line 77 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/hnsw.rs:813— `trace!` at line 813 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/memory.rs:153— `warn!` at line 153 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/memory.rs:167— `warn!` at line 167 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/memory.rs:174— `warn!` at line 174 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/patch_tool_calls.rs:73— `warn!` at line 73 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/skills.rs:200— `warn!` at line 200 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/skills.rs:219— `warn!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/rvAgent/rvagent-middleware/src/skills.rs:250— `warn!` at line 250 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Silent fallback default on Err crates/mcp-brain-server/src/bin/local.rs:156— `store_mode` turns every `Err` into `"rvf".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/mcp-brain-server/src/midstream.rs:114— `strange_loop_score` turns every `Err` into `0.0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/neural-trader-strategies/src/attention_scalper.rs:218— `sdpa_imbalance` turns every `Err` into `0.0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/photonlayer-wasm/src/lib.rs:310— `default_config_json` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-attn-mincut/src/witness.rs:19— `witness_log` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-bet4-ivf-bench/src/data.rs:24— `load_feat_csv` turns every `Err` into `0.0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-cli/src/config.rs:110— `default_data_dir` turns every `Err` into `".".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-dag/src/mincut/bottleneck.rs:87— `compute_critical_path_cost` turns every `Err` into `0.0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-dag-wasm/src/lib.rs:224— `to_json` turns every `Err` into `String::from("{}")` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-decompiler/src/training.rs:65— `builtin` turns every `Err` into `Self::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-economy-wasm/src/reputation.rs:227— `to_json` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-economy-wasm/src/stake.rs:384— `export_json` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-edge-authz/src/error.rs:70— `to_json` turns every `Err` into `String::from(r#"{"error":"server_error"}"#)` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-edge-index/src/hnsw/mod.rs:245— `growth_bytes` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-edge-tenancy/src/problem.rs:126— `to_json` turns every `Err` into `String::from(r#"{"type":"about:blank","status":500,"code":"server_error","title":"server_error"}"#)` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-hailo-cluster/src/bin/ruvllm-pi-worker.rs:66— `read_optional_env` turns every `Err` into `"<unset>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-matryoshka/src/bin/benchmark.rs:329— `rustc_version` turns every `Err` into `"unknown".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-postgres/src/sparse/types.rs:97— `get` turns every `Err` into `0.0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-postgres/src/types/sparsevec.rs:162— `get` turns every `Err` into `0.0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-postgres/src/graph/sparql/results.rs:188— `format_json` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-py/src/rabitq.rs:66— `describe` turns every `Err` into `"an unknown object".into()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvector-robotics/src/bridge/pipeline.rs:161— `detect_obstacles` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvllm/src/models/rdt.rs:372— `report_json` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvllm-wasm/src/quant_bench_wasm.rs:169— `run_bench` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ruvllm-wasm/src/quant_bench_wasm.rs:196— `compare_formats` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
+ 15 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×39
Console output used as the logging channel REDACTED:83— `REDACTED` reports through `console.*` at line 83 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:177— `REDACTED` reports through `console.*` at line 177 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:182— `REDACTED` reports through `console.*` at line 182 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:11— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 11 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:12— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 12 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:13— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 13 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:22— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 22 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:23— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 23 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:24— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:25— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 25 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:26— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:27— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 27 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:30— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 30 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:41— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 41 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:55— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 55 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:73— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 73 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:81— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 81 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:92— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 92 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:100— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 100 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:108— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 108 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:110— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 110 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:113— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 113 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:121— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 121 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:128— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 128 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel crates/micro-hnsw-wasm/benchmark.js:136— `crates/micro-hnsw-wasm/benchmark.js` reports through `console.*` at line 136 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
README/code drift crates/agentic-robotics-core/README.md:744— crates/agentic-robotics-core/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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 crates/agentic-robotics-core/README.md:764— crates/agentic-robotics-core/README.md links to `../../PERFORMANCE_REPORT.md`, but `PERFORMANCE_REPORT.md` 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 crates/agentic-robotics-core/README.md:765— crates/agentic-robotics-core/README.md links to `../../OPTIMIZATIONS.md`, but `OPTIMIZATIONS.md` 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 crates/agentic-robotics-rt/README.md:390— crates/agentic-robotics-rt/README.md links to `../../PERFORMANCE_REPORT.md`, but `PERFORMANCE_REPORT.md` 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 crates/cognitum-gate-tilezero/README.md:532— crates/cognitum-gate-tilezero/README.md links to `../ruQu/README.md`, but `crates/ruQu/README.md` 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 crates/ruvector-attention/README.md:833— crates/ruvector-attention/README.md links to `CONTRIBUTING.md`, but `crates/ruvector-attention/CONTRIBUTING.md` 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 crates/ruvector-bench/README.md:556— crates/ruvector-bench/README.md links to `../../benchmarks/LOAD_TEST_SCENARIOS.md`, but `benchmarks/LOAD_TEST_SCENARIOS.md` 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 crates/ruvector-bench/README.md:558— crates/ruvector-bench/README.md links to `../../docs/IMPLEMENTATION_SUMMARY.md`, but `docs/IMPLEMENTATION_SUMMARY.md` 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 crates/ruvector-cli/README.md:652— crates/ruvector-cli/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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 crates/ruvector-core/README.md:441— crates/ruvector-core/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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 crates/ruvector-core/README.md:443— crates/ruvector-core/README.md links to `../../docs/guide/ADVANCED_FEATURES.md`, but `docs/guide/ADVANCED_FEATURES.md` 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 crates/ruvector-fpga-transformer/README.md:301— crates/ruvector-fpga-transformer/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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 crates/ruvector-math/README.md:414— crates/ruvector-math/README.md links to `CONTRIBUTING.md`, but `crates/ruvector-math/CONTRIBUTING.md` 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 crates/ruvector-mincut/README.md:104— crates/ruvector-mincut/README.md links to `src/agentic/compact.rs`, but `crates/ruvector-mincut/src/agentic/compact.rs` 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 crates/ruvector-mincut/README.md:818— crates/ruvector-mincut/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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 crates/ruvector-nervous-system/README.md:412— crates/ruvector-nervous-system/README.md links to `docs/nervous-system/architecture.md`, but `crates/ruvector-nervous-system/docs/nervous-system/architecture.md` 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 crates/ruvector-nervous-system/README.md:413— crates/ruvector-nervous-system/README.md links to `docs/nervous-system/deployment.md`, but `crates/ruvector-nervous-system/docs/nervous-system/deployment.md` 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 crates/ruvector-nervous-system/README.md:414— crates/ruvector-nervous-system/README.md links to `docs/nervous-system/test-plan.md`, but `crates/ruvector-nervous-system/docs/nervous-system/test-plan.md` 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 crates/ruvector-node/README.md:7— crates/ruvector-node/README.md links to `../../docs/TECHNICAL_PLAN.md`, but `docs/TECHNICAL_PLAN.md` 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 crates/ruvector-node/README.md:1035— crates/ruvector-node/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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 crates/ruvector-postgres/README.md:1021— crates/ruvector-postgres/README.md links to `../../CONTRIBUTING.md`, but `CONTRIBUTING.md` 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 crates/ruvector-router-cli/README.md:565— crates/ruvector-router-cli/README.md links to `../router-core/README.md`, but `crates/router-core/README.md` 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 crates/ruvector-router-cli/README.md:570— crates/ruvector-router-cli/README.md links to `../../docs/guide/GETTING_STARTED.md`, but `docs/guide/GETTING_STARTED.md` 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 crates/ruvector-router-cli/README.md:571— crates/ruvector-router-cli/README.md links to `../../docs/guide/INSTALLATION.md`, but `docs/guide/INSTALLATION.md` 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 crates/ruvector-router-cli/README.md:572— crates/ruvector-router-cli/README.md links to `../../docs/guide/BASIC_TUTORIAL.md`, but `docs/guide/BASIC_TUTORIAL.md` 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.
ADR declares no status docs/adr/ADR-026-rvcow-branching-and-real-cognitive-containers.md:1— `docs/adr/ADR-026-rvcow-branching-and-real-cognitive-containers.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-037-publishable-rvf-acceptance-test.md:1— `docs/adr/ADR-037-publishable-rvf-acceptance-test.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-038-npx-ruvector-rvlite-witness-integration.md:1— `docs/adr/ADR-038-npx-ruvector-rvlite-witness-integration.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-039-rvf-solver-wasm-agi-integration.md:1— `docs/adr/ADR-039-rvf-solver-wasm-agi-integration.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-043-external-intelligence-providers.md:1— `docs/adr/ADR-043-external-intelligence-providers.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-093-deepagents-rust-conversion-overview.md:1— `docs/adr/ADR-093-deepagents-rust-conversion-overview.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-094-deepagents-backend-protocol-traits.md:1— `docs/adr/ADR-094-deepagents-backend-protocol-traits.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-095-deepagents-middleware-pipeline.md:1— `docs/adr/ADR-095-deepagents-middleware-pipeline.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-096-deepagents-tool-system.md:1— `docs/adr/ADR-096-deepagents-tool-system.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-097-deepagents-subagent-orchestration.md:1— `docs/adr/ADR-097-deepagents-subagent-orchestration.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-098-deepagents-memory-skills-summarization.md:1— `docs/adr/ADR-098-deepagents-memory-skills-summarization.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-099-deepagents-cli-acp-server.md:1— `docs/adr/ADR-099-deepagents-cli-acp-server.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-100-deepagents-rvf-integration-crate-structure.md:1— `docs/adr/ADR-100-deepagents-rvf-integration-crate-structure.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-102-deepagents-implementation-roadmap.md:1— `docs/adr/ADR-102-deepagents-implementation-roadmap.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-103-deepagents-review-amendments.md:1— `docs/adr/ADR-103-deepagents-review-amendments.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-104-rvagent-mcp-skills-topology.md:1— `docs/adr/ADR-104-rvagent-mcp-skills-topology.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-105-rvagent-mcp-implementation-details.md:1— `docs/adr/ADR-105-rvagent-mcp-implementation-details.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-106-ruvix-kernel-rvf-integration.md:1— `docs/adr/ADR-106-ruvix-kernel-rvf-integration.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-107-rvagent-native-swarm-wasm.md:1— `docs/adr/ADR-107-rvagent-native-swarm-wasm.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-108-rvagent-ruvbot-integration.md:1— `docs/adr/ADR-108-rvagent-ruvbot-integration.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-111-ruvocal-ui-rvagent-integration.md:1— `docs/adr/ADR-111-ruvocal-ui-rvagent-integration.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/adr/ADR-113-rvf-app-gallery-ruvix-applications.md:1— `docs/adr/ADR-113-rvf-app-gallery-ruvix-applications.md` declares no status, while 305 of the 331 other records in `docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status crates/ruvector-mincut/docs/adr/APPENDIX-applications-spectrum.md:1— `crates/ruvector-mincut/docs/adr/APPENDIX-applications-spectrum.md` declares no status, while 4 of the 6 other records in `crates/ruvector-mincut/docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status crates/ruvector-mincut/docs/adr/DDC-001-coherence-gate-design-criteria.md:1— `crates/ruvector-mincut/docs/adr/DDC-001-coherence-gate-design-criteria.md` declares no status, while 4 of the 6 other records in `crates/ruvector-mincut/docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status docs/research/sublinear-time-solver/adr/ADR-STS-003-memory-management-strategy.md:1— `docs/research/sublinear-time-solver/adr/ADR-STS-003-memory-management-strategy.md` declares no status, while 9 of the 11 other records in `docs/research/sublinear-time-solver/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
Duplicated predicate docs/research/claude-code-rvsource/versions/v2.1.x/tree/react_memo_cache_sentinel/react_memo_cache_sentinel/___SensitiveInformation___.js:12— `!!_.getKeySchema().getMergedTraits().sensitive||!!_.getValueSchema().getMergedTraits().sensitive` appears character-identically in 7 files — docs/research/claude-code-rvsource/versions/v2.1.x/tree/react_memo_cache_sentinel/react_memo_cache_sentinel/___SensitiveInformation___.js, docs/research/claude-code-rvsource/versions/v2.1.x/tree/react_memo_cache_sentinel/react_memo_cache_sentinel/getKeySchema.js, docs/research/claude-code-rvsource/versions/v2.1.x/tree/react_memo_cache_sentinel/react_memo_cache_sentinel/getMergedTraits.js, docs/research/claude-code-rvsource/versions/v2.1.x/tree/react_memo_cache_sentinel/react_memo_cache_sentinel/isMapSchema.js. 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 npm/packages/rudag/src/dag.js:135— `!('cost' in candidate) || typeof candidate.cost !== 'number'` appears character-identically in 2 files — npm/packages/rudag/src/dag.js, npm/packages/rudag/src/dag.ts. 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 npm/packages/rudag/src/dag.js:131— `!('path' in candidate) || !Array.isArray(candidate.path)` appears character-identically in 2 files — npm/packages/rudag/src/dag.js, npm/packages/rudag/src/dag.ts. 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 ui/ruvocal/src/routes/api/conversation/[id]/message/[messageId]/+REDACTED:26— `!(message.id === messageId) && message.ancestors && !message.ancestors.includes(messageId)` appears character-identically in 2 files — ui/ruvocal/src/routes/api/conversation/[id]/message/[messageId]/+REDACTED, ui/ruvocal/src/routes/api/v2/conversations/[id]/message/[messageId]/+REDACTED. 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 npm/packages/cloud-run/streaming-service.js:417— `!Array.isArray(queries) || queries.length === 0` appears character-identically in 2 files — npm/packages/cloud-run/streaming-service.js, npm/packages/cloud-run/streaming-service.ts. 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 npm/packages/rudag/src/dag.js:367— `!Number.isInteger(mechanism) || mechanism < 0 || mechanism > 2` appears character-identically in 2 files — npm/packages/rudag/src/dag.js, npm/packages/rudag/src/dag.ts. 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 npm/packages/rudag/src/dag.js:263— `!Number.isInteger(operator) || operator < 0 || operator > 255` appears character-identically in 2 files — npm/packages/rudag/src/dag.js, npm/packages/rudag/src/dag.ts. 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 REDACTED:309— `!body || typeof body.agentId !== 'string'` appears character-identically in 2 files — REDACTED, REDACTED. 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 REDACTED:346— `!body || typeof body.message !== 'string'` appears character-identically in 2 files — REDACTED, REDACTED. 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 npm/packages/cloud-run/vector-client.js:147— `!conn.inUse && now - conn.lastUsed > this.config.idleTimeout && this.connections.length > this.config.minConnections` appears character-identically in 2 files — npm/packages/cloud-run/vector-client.js, npm/packages/cloud-run/vector-client.ts. 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 npm/packages/ruvbot/src/integration/providers/GoogleAIProvider.js:142— `!data.candidates || data.candidates.length === 0` appears character-identically in 2 files — npm/packages/ruvbot/src/integration/providers/GoogleAIProvider.js, npm/packages/ruvbot/src/integration/providers/GoogleAIProvider.ts. 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 npm/packages/ruvllm/src/export.js:146— `!entry || typeof entry === 'object' && 'dtype' in entry === false` appears character-identically in 2 files — npm/packages/ruvllm/src/export.js, npm/packages/ruvllm/src/export.ts. 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 npm/packages/ruvector-extensions/src/exporters.js:880— `!graph.edges || !Array.isArray(graph.edges)` appears character-identically in 2 files — npm/packages/ruvector-extensions/src/exporters.js, npm/packages/ruvector-extensions/src/exporters.ts. 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 npm/packages/ruvector-extensions/src/exporters.js:877— `!graph.nodes || !Array.isArray(graph.nodes)` appears character-identically in 2 files — npm/packages/ruvector-extensions/src/exporters.js, npm/packages/ruvector-extensions/src/exporters.ts. 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 npm/packages/postgres-cli/src/client.js:136— `!isRetryableError(lastError) || attempt === this.retryConfig.maxRetries` appears character-identically in 2 files — npm/packages/postgres-cli/src/client.js, npm/packages/postgres-cli/src/client.ts. 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 npm/packages/agentic-integration/integration-tests.js:638— `!networkPartitioned && message.to === 'node-2'` appears character-identically in 2 files — npm/packages/agentic-integration/integration-tests.js, npm/packages/agentic-integration/integration-tests.ts. 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 npm/packages/ruvllm/src/models.js:204— `!options.force && this.isDownloaded(model.id)` appears character-identically in 2 files — npm/packages/ruvllm/src/models.js, npm/packages/ruvllm/src/models.ts. 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 npm/packages/agentic-integration/coordination-protocol.js:298— `!proposal || proposal.status !== 'pending'` appears character-identically in 2 files — npm/packages/agentic-integration/coordination-protocol.js, npm/packages/agentic-integration/coordination-protocol.ts. 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 npm/packages/agentic-integration/regional-agent.js:177— `!request.vector || request.vector.length !== this.config.vectorDimensions` appears character-identically in 2 files — npm/packages/agentic-integration/regional-agent.js, npm/packages/agentic-integration/regional-agent.ts. 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 npm/packages/rudag/src/node.js:45— `!resolvedTarget.startsWith(resolvedBase + '/') && resolvedTarget !== resolvedBase` appears character-identically in 2 files — npm/packages/rudag/src/node.js, npm/packages/rudag/src/node.ts. 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 REDACTED:484— `!sessionId || !this.sessions.has(sessionId)` appears character-identically in 2 files — REDACTED, REDACTED. 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 npm/packages/graph-data-generator/src/cypher-generator.js:234— `!stmt.parameters || Object.keys(stmt.parameters).length === 0` appears character-identically in 2 files — npm/packages/graph-data-generator/src/cypher-generator.js, npm/packages/graph-data-generator/src/cypher-generator.ts. 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 npm/packages/postgres-cli/src/commands/install.js:466— `!sys.pgrx || sys.pgrxVersion !== PGRX_VERSION` appears character-identically in 2 files — npm/packages/postgres-cli/src/commands/install.js, REDACTED. 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 npm/packages/agentic-integration/agent-coordinator.js:198— `!task.region || a.region === task.region` appears character-identically in 2 files — npm/packages/agentic-integration/agent-coordinator.js, npm/packages/agentic-integration/agent-coordinator.ts. 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 npm/packages/agentic-synth-examples/src/generators/stock-market.js:36— `!this.config.includeWeekends && this.isWeekend(currentDate)` appears character-identically in 2 files — npm/packages/agentic-synth-examples/src/generators/stock-market.js, npm/packages/agentic-synth-examples/src/generators/stock-market.ts. 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.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/versions/v2.1.x/tree/react_memo_cache_sentinel/react_memo_cache_sentinel/acquired.js:365— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/uncategorized/uncategorized.js:3945— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/uncategorized/uncategorized.js:4212— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/uncategorized/uncategorized.js:4921— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/ui/commands.js:88— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/tools/tool-dispatch.js:771— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/tools/tool-dispatch.js:7147— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/telemetry/telemetry.js:216— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/telemetry/telemetry.js:1506— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/permissions/permission-system.js:36— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/permissions/permission-system.js:562— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/core/agent-loop.js:33— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/core/agent-loop.js:42— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/core/context-manager.js:49— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/core/session.js:831— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/core/session.js:833— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/config/config.js:759— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex docs/research/claude-code-rvsource/extracted/source/config/config.js:1269— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
No direct assertions: Multi-Head Attention can be instantiated examples/meta-cognition-spiking-neural-network/verification/functional-test.js:31— No conventional assertion call was detected, and 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: Hyperbolic Attention can be instantiated examples/meta-cognition-spiking-neural-network/verification/functional-test.js:40— No conventional assertion call was detected, and 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: Flash Attention can be instantiated examples/meta-cognition-spiking-neural-network/verification/functional-test.js:49— No conventional assertion call was detected, and 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: Linear Attention can be instantiated examples/meta-cognition-spiking-neural-network/verification/functional-test.js:58— No conventional assertion call was detected, and 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: MoE Attention can be instantiated examples/meta-cognition-spiking-neural-network/verification/functional-test.js:67— No conventional assertion call was detected, and 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: VectorDB can be instantiated examples/meta-cognition-spiking-neural-network/verification/functional-test.js:77— No conventional assertion call was detected, and 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: VectorDB can add and search vectors examples/meta-cognition-spiking-neural-network/verification/functional-test.js:86— No conventional assertion call was detected, and 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: Multi-Head Attention forward pass examples/meta-cognition-spiking-neural-network/verification/functional-test.js:108— No conventional assertion call was detected, and 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
D20 · ADR Quality· ADR superseded but its status says otherwise · ×7
ADR superseded but its status says otherwise docs/adr/ADR-001-ruvector-core-architecture.md:3— docs/adr/ADR-001-ruvector-core-architecture.md:3 says "Proposed", but docs/adr/ADR-029-rvf-canonical-format.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise docs/adr/ADR-029-rvf-canonical-format.md:3— docs/adr/ADR-029-rvf-canonical-format.md:3 says "Accepted", but docs/adr/ADR-033-progressive-indexing-hardening.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise docs/adr/ADR-030-rvf-cognitive-container.md:3— docs/adr/ADR-030-rvf-cognitive-container.md:3 says "Proposed", but docs/adr/ADR-033-progressive-indexing-hardening.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise docs/adr/ADR-135-mincut-decompiler-with-witness-chains.md:5— docs/adr/ADR-135-mincut-decompiler-with-witness-chains.md:5 says "Deployed (2026-04-03) — 8-phase pipeline implemented. Louvain partitioning (35x optimized), 210 training patterns, pure Rust transformer inference, 95.7% name accuracy beating JSNice SOTA (63%). Code reconstruction + operational validation added.", but docs/adr/ADR-142-tee-backed-cryptographic-verification.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise docs/adr/ADR-259-ruvllm-darwin-mode-local-mutator.md:1— docs/adr/ADR-259-ruvllm-darwin-mode-local-mutator.md:1 says "Implemented (code + unit tests + CLI; the download-path bugs that blocked the live-serve e2e are fixed — see Implementation status)", but docs/adr/ADR-260-darwin-mode-metaharness-integration.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise ui/ruvocal/docs/adr/ADR-033-RUVECTOR-RUFLO-MCP-INTEGRATION.md:1— ui/ruvocal/docs/adr/ADR-033-RUVECTOR-RUFLO-MCP-INTEGRATION.md:1 says "Accepted", but ui/ruvocal/docs/adr/ADR-035-MCP-TOOL-GROUPS.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise ui/ruvocal/docs/adr/ADR-034-OPTIONAL-MCP-BACKENDS.md:1— ui/ruvocal/docs/adr/ADR-034-OPTIONAL-MCP-BACKENDS.md:1 says "Accepted", but ui/ruvocal/docs/adr/ADR-035-MCP-TOOL-GROUPS.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×7
Diagnostic log message is built whether or not it is wanted ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:80— `debug` at line 80 is called with an argument built by `servers.map((s) => ({ name : s.name, url : s.url }))` (line 81), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:109— `debug` at line 109 is called with an argument built by `servers.map((s) => ({ name : s.name, url : s.url, hasAuth : !!s.headers?.Authorization, }))` (line 112), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:131— `debug` at line 131 is called with an argument built by `servers.map((s) => s.name)` (line 132), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:257— `debug` at line 257 is called with an argument built by `servers.map((s) => s.name)` (line 258), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:1145— `debug` at line 1145 is called with an argument built by `calls.map(c => ({ id : c.id, name : c.name, argsLen : c.arguments.length }))` (line 1145), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ui/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:1157— `debug` at line 1157 is called with an argument built by `calls.map(c => ({ id : c.id, name : c.name, argsLen : c.arguments.length }))` (line 1157), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ui/ruvocal/src/lib/server/mcp/tools.ts:86— `debug` at line 86 is called with an argument built by `tools.map((t) => t?.name)` (line 91), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
D20 · ADR Quality· ADR has no Context section · ×5
ADR has no Context section docs/adr/ADR-275-rvagent-subagent-topology.md:12— docs/adr/ADR-275-rvagent-subagent-topology.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section docs/adr/ADR-276-rvagent-learning-loop-gating.md:12— docs/adr/ADR-276-rvagent-learning-loop-gating.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section docs/adr/ADR-277-rvagent-positioning-and-claims.md:12— docs/adr/ADR-277-rvagent-positioning-and-claims.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section docs/adr/ADR-278-rvagent-flywheel-adoption.md:13— docs/adr/ADR-278-rvagent-flywheel-adoption.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section docs/adr/ADR-279-no-c-and-the-sota-program.md:13— docs/adr/ADR-279-no-c-and-the-sota-program.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
Subsumed condition operand examples/ruvLLM/esp32/examples/rag_smart_home.rs:35— `text.contains("temperature")` can never decide this `||` — every value satisfying `text.contains("temperature")` also satisfies `text.contains("temp")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/ruvllm/src/tests/gguf_tests.rs:588— `formatted.contains("Q4_K")` can never decide this `||` — every value satisfying `formatted.contains("Q4_K")` also satisfies `formatted.contains("4")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/ruvllm/src/reflection/confidence.rs:528— `output.contains("async fn ")` can never decide this `||` — every value satisfying `output.contains("async fn ")` also satisfies `output.contains("fn ")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/ruvllm/src/bitnet/backend.rs:2495— `t.name.contains("self_attn")` can never decide this `||` — every value satisfying `t.name.contains("self_attn")` also satisfies `t.name.contains("attn")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/ruvllm/src/backends/coreml_backend.rs:523— `lower.contains("last_hidden")` can never decide this `||` — every value satisfying `lower.contains("last_hidden")` also satisfies `lower.contains("hidden")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
D20 · ADR Quality· ADR has no Consequences section · ×2
ADR has no Consequences section docs/adr/quantum-engine/ADR-QE-013-deutsch-theorem-proof-verification.md:1— docs/adr/quantum-engine/ADR-QE-013-deutsch-theorem-proof-verification.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Consequences section docs/adr/quantum-engine/ADR-QE-014-exotic-discoveries.md:1— docs/adr/quantum-engine/ADR-QE-014-exotic-discoveries.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D20 · ADR Quality· ADR links a record that does not exist · ×2
ADR links a record that does not exist docs/adr/ADR-029-rvf-canonical-format.md:8— docs/adr/ADR-029-rvf-canonical-format.md:8 names `ADR 18` as the record it supersedes, and no such record is in the decision log. Fix the link, or restore the record, so a reader can follow the decision's history.
ADR links a record that does not exist docs/adr/ADR-316-adr-numbering-hygiene.md:6— docs/adr/ADR-316-adr-numbering-hygiene.md:6 names `ADR 845` as the record it supersedes, and no such record is in the decision log. Fix the link, or restore the record, so a reader can follow the decision's history.
D20 · ADR Quality· ADR decides a question another record already decided · ×2
ADR decides a question another record already decided docs/adr/ADR-146-diskann-vamana-implementation.md:1— docs/adr/ADR-146-diskann-vamana-implementation.md and docs/adr/ADR-144-diskann-vamana-implementation.md are both in force and decide the same question ("ADR-144: DiskANN/Vamana Implementation"), and neither names the other. If this record replaces the earlier one, say so ("Supersedes …") and mark the earlier one superseded; if both hold, state how they relate.
ADR decides a question another record already decided docs/adr/ADR-266-metaharness-darwin-integration.md:1— docs/adr/ADR-266-metaharness-darwin-integration.md and docs/adr/ADR-266-metaharness-darwin-ann-optimization.md are both in force and decide the same question ("ADR-266: MetaHarness Integration for Autonomous ANN Optimization (Darwin Mode)"), and neither names the other. If this record replaces the earlier one, say so ("Supersedes …") and mark the earlier one superseded; if both hold, state how they relate.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 92 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.
Partial audit-trail evidence — An audit mechanism is present, but the trail is not yet complete — missing: a write-side hook every change flows through (a SeaORM ActiveModelBehavior hook or a database trigger recording each change, or an event-sourced store), per-entity coverage (an event-sourced aggregate, or a hook on each entity that needs a who-changed-what trail).
D10 · Test Quality· Test project verifies nothing · ×1
Test project verifies nothing: examples/meta-cognition-spiking-neural-network examples/meta-cognition-spiking-neural-network/verification/functional-test.js:31— No conventional assertion call was detected in 8 of 8 tests in `examples/meta-cognition-spiking-neural-network` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 16 of 280 project(s) overshoot their size bounds, lowering Project Cohesion to 8.9/10. The most over is `crates/ruvllm` (130213 LoC, 1062 module-visible types across 29 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.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 80 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: crates/rvm/crates/rvm-hal/src/aarch64/boot.rs, crates/rvm/crates/rvm-cap/src/manager.rs, crates/rvm/crates/rvm-wasm/src/quota.rs, crates/ruvllm-wasm/src/quant_bench_wasm.rs, crates/rvm/crates/rvm-coherence/src/mincut.rs, crates/ruvllm/src/qat/ste.rs, crates/rvm/crates/rvm-partition/src/device.rs, crates/ruvllm/src/qat/calibration.rs (and 72 more) (110 orphaned of 3000 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 3000 of the 3876 production source files in this repository met that bar). 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.
P10 · Library API & versioning· Large public API surface · ×1
Large public API surface — 7466/8516 types (88%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
Logging is not universal — Only 47/115 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/agentic-robotics-mcp`, `crates/photonlayer-bench`, `crates/photonlayer-cli`, `crates/ruos-thermal` and 63 more.
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 21/90 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types· Strict null checking is not enabled everywhere the repository type-checks · ×1
Strict null checking is not enabled everywhere the repository type-checks — 56/57 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
Null assertions (`!`) reduce the strict null checking score — ~1.3 `!` null assertions per 1k TypeScript source lines — 162 assertion(s) across the 124771 source line(s) of the 576 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: npm/packages/ruvector/src/core/graph-algorithms.ts (21), npm/packages/ruvector/src/core/intelligence-engine.ts (12), npm/packages/agentic-synth/training/dspy-real-integration.ts (10). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Outdated: arbitrary — `arbitrary` is locked at 1.4.2 but 1.5.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/ruvector-core/fuzz/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arbitrary` and commit the updated REDACTED.
Outdated: arrayvec — `arrayvec` is locked at 0.7.7 but 0.7.8 is the current stable release on crates.io, and it already satisfies the `"0.7"` requirement declared in crates/ruvector-delta-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arrayvec` and commit the updated REDACTED.
Outdated: async-trait — `async-trait` is locked at 0.1.89 but 0.1.92 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in crates/mcp-gate/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-trait` and commit the updated REDACTED.
Outdated: bitflags — `bitflags` is locked at 2.13.0 but 2.13.2 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/rvm/crates/rvm-types/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bitflags` and commit the updated REDACTED.
Outdated: blake3 — `blake3` is locked at 1.8.5 but 1.8.7 is the current stable release on crates.io, and it already satisfies the `"1.5"` requirement declared in crates/cognitum-gate-tilezero/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p blake3` and commit the updated REDACTED.
Outdated: bytemuck — `bytemuck` is locked at 1.25.0 but 1.25.2 is the current stable release on crates.io, and it already satisfies the `"1.19"` requirement declared in crates/prime-radiant/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytemuck` and commit the updated REDACTED.
Outdated: bytes — `bytes` is locked at 1.12.0 but 1.12.1 is the current stable release on crates.io, and it already satisfies the `"1.5"` requirement declared in crates/ruvix/qemu-swarm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytes` and commit the updated REDACTED.
Outdated: cfg-if — `cfg-if` is locked at 1.0.4 but 1.0.5 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in patches/hnsw_rs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cfg-if` and commit the updated REDACTED.
Outdated: clap — `clap` is locked at 4.5.60 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4"` requirement declared in crates/ruvector-attention-cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
Outdated: clap_complete — `clap_complete` is locked at 4.6.5 but 4.6.11 is the current stable release on crates.io, and it already satisfies the `"4.5"` requirement declared in examples/scipix/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap_complete` and commit the updated REDACTED.
Outdated: crc32fast — `crc32fast` is locked at 1.5.0 but 1.5.3 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/ruvector-edge-registry/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crc32fast` and commit the updated REDACTED.
Outdated: crossbeam — `crossbeam` is locked at 0.8.4 but 0.8.5 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in crates/agentic-robotics-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crossbeam` and commit the updated REDACTED.
Outdated: crossbeam-channel — `crossbeam-channel` is locked at 0.5.15 but 0.5.17 is the current stable release on crates.io, and it already satisfies the `"0.5"` requirement declared in crates/ruvix/qemu-swarm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crossbeam-channel` and commit the updated REDACTED.
Outdated: cudarc — `cudarc` is locked at 0.19.8 but 0.19.10 is the current stable release on crates.io, and it already satisfies the `"0.19"` requirement declared in crates/ruvllm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cudarc` and commit the updated REDACTED.
Outdated: data-encoding — `data-encoding` is locked at 2.11.0 but 2.11.1 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/ruvector-edge-registry/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p data-encoding` and commit the updated REDACTED.
Outdated: deadpool-postgres — `deadpool-postgres` is locked at 0.14.1 but 0.14.2 is the current stable release on crates.io, and it already satisfies the `"0.14"` requirement declared in crates/ruvector-cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p deadpool-postgres` and commit the updated REDACTED.
Outdated: env_logger — `env_logger` is locked at 0.11.10 but 0.11.11 is the current stable release on crates.io, and it already satisfies the `"0.11"` requirement declared in patches/hnsw_rs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p env_logger` and commit the updated REDACTED.
Outdated: flate2 — `flate2` is locked at 1.1.9 but 1.1.10 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in crates/ruvector-cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: futures — `futures` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/mcp-gate/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures` and commit the updated REDACTED.
Outdated: futures-core — `futures-core` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/ruvector-hailo-cluster/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures-core` and commit the updated REDACTED.
Outdated: futures-util — `futures-util` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/ruvector-kalshi/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures-util` and commit the updated REDACTED.
Outdated: glob — `glob` is locked at 0.3.3 but 0.3.4 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in examples/scipix/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p glob` and commit the updated REDACTED.
Outdated: grep-searcher — `grep-searcher` is locked at 0.1.16 but 0.1.17 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in crates/rvAgent/rvagent-backends/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p grep-searcher` and commit the updated REDACTED.
Outdated: hdrhistogram — `hdrhistogram` is locked at 7.5.4 but 7.6.0 is the current stable release on crates.io, and it already satisfies the `"7.5"` requirement declared in crates/ruvector-bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p hdrhistogram` and commit the updated REDACTED.
Outdated: http-body-util — `http-body-util` is locked at 0.1.3 but 0.1.5 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in crates/ruvector-cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p http-body-util` and commit the updated REDACTED.
Skipped (documented): integrates with the default native/WASM binding when one is present npm/packages/typesafe/test/api.test.mjs:156— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): should produce a 384-dim, L2-normalized embedding when the wasm package and its model weights are available npm/packages/ruvector-extensions/tests/embeddings.test.ts:260— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): gate 1: stats().embedderKind is onnx-minilm when loaded, hash-fallback otherwise, hash when disabled npm/packages/ruvector/tests/adr-210-acceptance.test.mjs:72— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): gate 4: provenance-stamped .db sidecar refuses mismatched inserts (dimension + prefixPolicy) npm/packages/ruvector/tests/adr-210-acceptance.test.mjs:261— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): gates 5+7: normalized minilm embeddings (norm in [0.999,1.001]); no prefix on either entry point npm/packages/ruvector/tests/adr-210-acceptance.test.mjs:313— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): gate 8: recall@10 >= 0.9 on the text corpus through the default search path npm/packages/ruvector/tests/adr-210-recall-benchmark.test.mjs:45— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): mcp D0: hooks_remember on a fresh store succeeds and stamps provenance npm/packages/ruvector/tests/adr-210-wave2.test.mjs:170— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): mcp D0: a legacy store (vectors, no provenance) refuses hooks_remember writes npm/packages/ruvector/tests/adr-210-wave2.test.mjs:191— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): mcp D0: mismatched provenance refused naming both sides; reads still warn once npm/packages/ruvector/tests/adr-210-wave2.test.mjs:213— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): mcp D0: hooks_import of vector memories is gated by store provenance npm/packages/ruvector/tests/adr-210-wave2.test.mjs:242— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): security: malformed sidecar provenance is ignored (insert neither crashes nor bogus-refuses) npm/packages/ruvector/tests/adr-210-wave2.test.mjs:322— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): #1/#2/#3 model-dependent contract (skipped if model unavailable) npm/packages/ruvector/tests/onnx-api-contract.test.mjs:92— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): worker pool is cosine-equivalent to single-thread (skipped offline) npm/packages/ruvector/tests/onnx-pool.test.mjs:19— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): empty batch returns empty array without starting workers issues npm/packages/ruvector/tests/onnx-pool.test.mjs:57— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
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 373 file(s) — `REDACTED`, `docs/explorer/capability-lab.js`, `docs/explorer/experience-labs.js`, `docs/research/claude-code-rvsource/extracted/source/config/model-provider.js`, `docs/research/claude-code-rvsource/extracted/source/core/agent-loop.js`, … (+368 more) — 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 — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a182b1-8428-70d0-ad6f-b82360af23d7 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 474 · Warnings: 6614 · Recommendations: 889 · Info: 75 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 28-10-2026 @ 13:27 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.