Public report of cocoindex-io/cocoindex, published 14 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey β†’ Signed and filed in the standard's public register, 14 November 2026, 16:12 UTC Β· Survey ID cd_8a29415d28934caf982416b3ba90397f

cocoindex-io/cocoindex

Measured 14 November 2026, 16:10 UTC, at code version e60bf50

CAI score 65out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Up 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 large codebase: 157,245 lines of product code in 12 projects, tests not counted Β· Estimated rebuild effort: about 2.1 person-years Β· Weakest lens: Code Health, 49

Findings by how serious they are

81 critical 1190 serious 113 minor

24 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 16:10 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology β–Έ

59of 59 dimensions measured by tools.
1345of 1384 findings point to an exact file and line, so you can open each one in the code. The other 39 concern the repository as a whole, such as missing documentation.
59dimensions across 7 lenses, read from 157,245 lines of product code in 12 projects.
Chapters

Executive summary

cocoindex-io/cocoindex falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 65 out of 100 and is rated Adequate, and 76 of its 81 critical findings are security problems.

Code Health, at 49, is the weakest lens and counts most in the score. The best first step is turning on missing-value checks, worth about 8 points. Writing log messages as searchable templates comes next, worth about 6 points. Raising Code Health to 70 would lift the score to about 74.

Sixty-five pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Three secrets can leak from the build pipeline, and three weaknesses in the code could be used by an attacker. Pinning each tool to an exact version, limiting each secret to its own step and fixing the weaknesses the scanner points to would close these risks. Updating the vulnerable packages would fix the two packages with a known security hole, and setting a waiting period for automatic updates would deal with the automatic dependency update that takes a new release at once. The two sets of files in separate parts that keep changing together need that dependency made explicit.

The product code is 157,245 lines, about €310,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 for The 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.
Code Health 49 Β· counts for 46%Production Readiness 74 Β· counts for 25%Accessibility 75 Β· counts for 14%Security and Compliance 77 Β· counts for 8%Architecture 93 Β· counts for 4%Performance 94 Β· counts for 2%Maturity 95 Β· counts for 1%

If Code Health rose from 49 to 70, the lowest score rated Strong, the score would rise from 65 to about 74.

Code composition: what the lines of code are
Product code 59%Tests 41%
New since the last survey: 791 findings

These 791 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity Β· cocoindex_cli::child::run (cyclomatic 32) rust/cli/src/child.rs
  • Cyclomatic Complexity Β· cocoindex_cli::commands::update (cyclomatic 28) rust/cli/src/commands.rs
  • Cyclomatic Complexity Β· cocoindex::resources::fs::apply_fs_actions (cyclomatic 27) rust/sdk/cocoindex/src/resources/fs.rs
  • Cyclomatic Complexity Β· ChildArgs::parse (cyclomatic 26) rust/sdk/cocoindex/src/cli/mod.rs
  • Cyclomatic Complexity Β· cocoindex::resources::fs::walk_files (cyclomatic 23) rust/sdk/cocoindex/src/resources/fs.rs
  • Cyclomatic Complexity Β· collect_changes.main (cyclomatic 21) dev/agent-skills/create-release/scripts/collect_changes.py
  • Cyclomatic Complexity Β· cocoindex::connectors::lancedb::build_record_batch (cyclomatic 20) rust/sdk/cocoindex/src/connectors/lancedb.rs
  • Cyclomatic Complexity Β· remark-link-checker.remarkLinkChecker.<returned closure> (cyclomatic 20) docs/scripts/remark-link-checker.mjs
  • Cyclomatic Complexity Β· llms.llmsTxt (cyclomatic 20) docs/src/lib/llms.ts
  • Cyclomatic Complexity Β· cocoindex_cli::commands::ls (cyclomatic 18) rust/cli/src/commands.rs
  • Cyclomatic Complexity Β· LiveDirWalker::apply_changes (cyclomatic 18) rust/sdk/cocoindex/src/resources/fs.rs
  • Cyclomatic Complexity Β· cocoindex::connectors::postgres::sql_text (cyclomatic 18) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Cyclomatic Complexity Β· cocoindex::connectors::sqlite::sqlite_value (cyclomatic 17) rust/sdk/cocoindex/src/connectors/sqlite.rs
  • Cyclomatic Complexity Β· cocoindex_macros::function (cyclomatic 17) rust/sdk/cocoindex_macros/src/lib.rs
  • Cyclomatic Complexity Β· _ApiContext._get_paced (cyclomatic 17) python/cocoindex/connectors/discord/_source.py
  • Cyclomatic Complexity Β· llms.llmsFullTxt (cyclomatic 17) docs/src/lib/llms.ts
  • Cyclomatic Complexity Β· remark-example-images.remarkExampleImages.<returned closure> (cyclomatic 16) docs/scripts/remark-example-images.mjs
  • Cyclomatic Complexity Β· search-accessibility.installSearchAccessibility::sync (cyclomatic 16) docs/src/scripts/search-accessibility.ts
  • Cognitive Complexity Β· cocoindex_cli::child::run (cognitive 69) rust/cli/src/child.rs
  • Cognitive Complexity Β· cocoindex::resources::fs::walk_files (cognitive 52) rust/sdk/cocoindex/src/resources/fs.rs
  • Cognitive Complexity Β· _ApiContext._get_paced (cognitive 37) python/cocoindex/connectors/discord/_source.py
  • Cognitive Complexity Β· llms.llmsTxt (cognitive 36) docs/src/lib/llms.ts
  • Cognitive Complexity Β· cocoindex::resources::fs::apply_fs_actions (cognitive 33) rust/sdk/cocoindex/src/resources/fs.rs
  • Cognitive Complexity Β· collect_changes.main (cognitive 31) dev/agent-skills/create-release/scripts/collect_changes.py
  • Cognitive Complexity Β· search-accessibility.installSearchAccessibility::sync (cognitive 29) docs/src/scripts/search-accessibility.ts
  • Cognitive Complexity Β· cocoindex_cli::commands::update (cognitive 28) rust/cli/src/commands.rs
  • Cognitive Complexity Β· LiveDirWalker::watch (cognitive 28) rust/sdk/cocoindex/src/resources/fs.rs
  • Cognitive Complexity Β· LiveDirWalker::apply_changes (cognitive 27) rust/sdk/cocoindex/src/resources/fs.rs
  • Cognitive Complexity Β· Point::to_qdrant_vectors (cognitive 25) rust/sdk/cocoindex/src/connectors/qdrant.rs
  • Cognitive Complexity Β· remark-link-checker.remarkLinkChecker.<returned closure> (cognitive 23) docs/scripts/remark-link-checker.mjs
  • Cognitive Complexity Β· cocoindex_cli::commands::ls (cognitive 22) rust/cli/src/commands.rs
  • Cognitive Complexity Β· cocoindex_core::engine::progress_display::render_plain (cognitive 22) rust/core/src/engine/progress_display.rs
  • Cognitive Complexity Β· update_stats.readable_path (cognitive 22) python/cocoindex/_internal/update_stats.py
  • Cognitive Complexity Β· AzureBlobWalker::list (cognitive 21) rust/sdk/cocoindex/src/connectors/azure_blob.rs
  • Cognitive Complexity Β· cocoindex::connectors::gdrive::await_redirect (cognitive 21) rust/sdk/cocoindex/src/connectors/gdrive.rs
  • Cognitive Complexity Β· cocoindex::connectors::surrealdb::define_table_statements (cognitive 21) rust/sdk/cocoindex/src/connectors/surrealdb.rs
  • Cognitive Complexity Β· cocoindex_cli::inspect::parse_stable_path (cognitive 20) rust/cli/src/inspect.rs
  • Cognitive Complexity Β· cocoindex_core::engine::progress_display::status_line (cognitive 20) rust/core/src/engine/progress_display.rs
  • Cognitive Complexity Β· cocoindex::connectors::sqlite::sqlite_value (cognitive 20) rust/sdk/cocoindex/src/connectors/sqlite.rs
  • Cognitive Complexity Β· cocoindex::connectors::postgres::sql_text (cognitive 19) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Cognitive Complexity Β· cocoindex::connectors::sqlite::apply_rows (cognitive 19) rust/sdk/cocoindex/src/connectors/sqlite.rs
  • Cognitive Complexity Β· cocoindex_core::engine::execution::finalize_tracking_info (cognitive 18) rust/core/src/engine/execution.rs
  • Cognitive Complexity Β· cocoindex_core::state_store::txn::for_each_prefix_through (cognitive 18) rust/core/src/state_store/txn.rs
  • Cognitive Complexity Β· Endpoint::send_with_retry (cognitive 18) rust/sdk/cocoindex/src/ops/api.rs
  • Cognitive Complexity Β· cocoindex_core::engine::execution::validate_open_descendants (cognitive 17) rust/core/src/engine/execution.rs
  • Cognitive Complexity Β· cocoindex_core::engine::progress_display::block_lines (cognitive 17) rust/core/src/engine/progress_display.rs
  • Cognitive Complexity Β· ChildArgs::parse (cognitive 17) rust/sdk/cocoindex/src/cli/mod.rs
  • Cognitive Complexity Β· TableHandler::reconcile (cognitive 17) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Cognitive Complexity Β· TableHandler::reconcile (cognitive 17) rust/sdk/cocoindex/src/connectors/snowflake.rs
  • Cognitive Complexity Β· cocoindex::connectors::postgres::table_sink (cognitive 17) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Cognitive Complexity Β· RecordHandler::reconcile (cognitive 16) rust/sdk/cocoindex/src/connectors/surrealdb.rs
  • Cognitive Complexity Β· cocoindex::connectors::snowflake::delete_statement (cognitive 16) rust/sdk/cocoindex/src/connectors/snowflake.rs
  • Cognitive Complexity Β· banner._nearest_256 (cognitive 16) python/cocoindex/_internal/banner.py
  • God Classes Β· FileTooLong: connectors/gdrive.rs rust/sdk/cocoindex/src/connectors/gdrive.rs
  • God Classes Β· FileTooLong: connectors/bigquery.rs rust/sdk/cocoindex/src/connectors/bigquery.rs
  • God Classes Β· FileTooLong: connectors/snowflake.rs rust/sdk/cocoindex/src/connectors/snowflake.rs
  • God Classes Β· FileTooLong: connectors/zvec.rs rust/sdk/cocoindex/src/connectors/zvec.rs
  • God Classes Β· FileTooLong: discord/_source.py python/cocoindex/connectors/discord/_source.py
  • God Classes Β· FileTooLong: connectors/iggy.rs rust/sdk/cocoindex/src/connectors/iggy.rs
  • God Classes Β· FileTooLong: connectors/kafka.rs rust/sdk/cocoindex/src/connectors/kafka.rs
  • God Classes Β· FileTooLong: connectors/azure_blob.rs rust/sdk/cocoindex/src/connectors/azure_blob.rs
  • God Classes Β· FileTooLong: resources/fs.rs rust/sdk/cocoindex/src/resources/fs.rs
  • God Classes Β· FileTooLong: split/recursive.rs rust/ops_text/src/split/recursive.rs
  • God Classes Β· FunctionTooLong: cocoindex::connectors::lancedb::build_record_batch rust/sdk/cocoindex/src/connectors/lancedb.rs
  • God Classes Β· FunctionTooLong: cocoindex_cli::child::run rust/cli/src/child.rs
  • God Classes Β· FileTooLong: google_drive/_oauth.py python/cocoindex/connectors/google_drive/_oauth.py
  • God Classes Β· FileTooLong: ops/api.rs rust/sdk/cocoindex/src/ops/api.rs
  • God Classes Β· FunctionTooLong: cocoindex_macros::memo_input_enum_bodies rust/sdk/cocoindex_macros/src/lib.rs
  • God Classes Β· FunctionTooLong: cocoindex_code_ast::view::lang::classify rust/code_ast/src/view/lang.rs
  • God Classes Β· FileTooLong: src/app.rs rust/sdk/cocoindex/src/app.rs
  • God Classes Β· MethodTooLong: FunctionArgs.parse rust/sdk/cocoindex_macros/src/lib.rs
  • Code Duplication Β· Near-duplicate member family (5 members, 18 shared lines) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Near-duplicate member pair (39 shared lines) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Edited copy of a member (38 corresponding lines) python/cocoindex/connectors/falkordb/_target.py
  • Code Duplication Β· Members sharing a duplicated core (9 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Members sharing a duplicated core (9 members, 50+ identical tokens) python/cocoindex/connectors/bigquery/_target.py
  • Code Duplication Β· Members sharing a duplicated core (8 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Members sharing a duplicated core (7 members, 50+ identical tokens) python/cocoindex/connectors/doris/_target.py
  • Code Duplication Β· Members sharing a duplicated core (6 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Members sharing a duplicated core (6 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Members sharing a duplicated core (6 members, 50+ identical tokens) python/cocoindex/connectors/bigquery/_target.py
  • Code Duplication Β· Members sharing a duplicated core (5 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Members sharing a duplicated core (5 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/lancedb.rs
  • Code Duplication Β· Members sharing a duplicated core (5 members, 50+ identical tokens) python/cocoindex/connectors/bigquery/_target.py
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Edited copy of a member (66 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Edited copy of a member (60 corresponding lines) rust/sdk/cocoindex/src/connectors/qdrant.rs
  • Code Duplication Β· Edited copy of a member (52 corresponding lines) rust/ops_text/src/pattern_matcher.rs
  • Code Duplication Β· Edited copy of a member (65 corresponding lines) rust/core/src/engine/component.rs
  • Code Duplication Β· Edited copy of a member (39 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Edited copy of a member (43 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Edited copy of a member (41 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Edited copy of a member (45 corresponding lines) python/cocoindex/connectors/bigquery/_target.py
  • Code Duplication Β· Edited copy of a member (47 corresponding lines) python/cocoindex/connectors/falkordb/_target.py
  • Code Duplication Β· Edited copy of a member (25 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs
  • Code Duplication Β· Edited copy of a member (37 corresponding lines) rust/sdk/cocoindex_macros/src/lib.rs
  • Code Duplication Β· Edited copy of a member (43 corresponding lines) rust/code_match/src/matcher.rs
  • Code Duplication Β· Edited copy of a member (23 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 115 findings

These 115 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity Β· cocoindex_core::engine::progress_display::show_progress_pty (cyclomatic 20) rust/core/src/engine/progress_display.rs
  • Cyclomatic Complexity Β· remark-link-checker.remarkLinkChecker (cyclomatic 20) docs/scripts/remark-link-checker.mjs
  • Cyclomatic Complexity Β· cocoindex::connectors::postgres::sql_literal (cyclomatic 19) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Cyclomatic Complexity Β· cocoindex::connectors::sqlite::sql_literal (cyclomatic 18) rust/sdk/cocoindex/src/connectors/sqlite.rs
  • Cognitive Complexity Β· llms.txt.GET (cognitive 31) docs/src/pages/llms.txt.ts
  • Cognitive Complexity Β· cocoindex::connectors::sqlite::sql_literal (cognitive 24) rust/sdk/cocoindex/src/connectors/sqlite.rs
  • Cognitive Complexity Β· remark-link-checker.remarkLinkChecker (cognitive 23) docs/scripts/remark-link-checker.mjs
  • Cognitive Complexity Β· KafkaTopicMap::watch (cognitive 22) rust/sdk/cocoindex/src/connectors/kafka.rs
  • Cognitive Complexity Β· Committer::build_commit_writes (cognitive 21) rust/core/src/engine/execution.rs
  • Cognitive Complexity Β· cocoindex::connectors::postgres::sql_literal (cognitive 20) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Cognitive Complexity Β· KafkaTopicMap::scan (cognitive 19) rust/sdk/cocoindex/src/connectors/kafka.rs
  • Cognitive Complexity Β· cocoindex::connectors::surrealdb::define_table (cognitive 19) rust/sdk/cocoindex/src/connectors/surrealdb.rs
  • Cognitive Complexity Β· KafkaTopicStream::watch (cognitive 18) rust/sdk/cocoindex/src/connectors/kafka.rs
  • God Classes Β· FunctionTooLong: cocoindex_core::engine::progress_display::show_progress_pty rust/core/src/engine/progress_display.rs
  • God Classes Β· MethodTooLong: InternalRecursiveChunker.merge_atom_chunks rust/ops_text/src/split/recursive.rs
  • Code Duplication Β· Near-duplicate member pair (27 shared lines) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Edited copy of a member (38 corresponding lines) python/cocoindex/connectors/falkordb/_target.py
  • Code Duplication Β· Members sharing a duplicated core (9 members, 50+ identical tokens) python/cocoindex/connectors/bigquery/_target.py
  • Code Duplication Β· Members sharing a duplicated core (8 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Members sharing a duplicated core (7 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Members sharing a duplicated core (7 members, 50+ identical tokens) python/cocoindex/connectors/doris/_target.py
  • Code Duplication Β· Members sharing a duplicated core (6 members, 50+ identical tokens) python/cocoindex/connectors/bigquery/_target.py
  • Code Duplication Β· Members sharing a duplicated core (5 members, 50+ identical tokens) python/cocoindex/connectors/bigquery/_target.py
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/lancedb.rs
  • Code Duplication Β· Duplicated block (37–40 lines × 2) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (24–27 lines × 2) rust/sdk/cocoindex/src/connectors/kafka.rs
  • Code Duplication Β· Duplicated block (19 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (18 lines × 2) rust/code_match/src/matcher.rs
  • Code Duplication Β· Duplicated block (16 lines × 2) rust/sdk/cocoindex/src/connectors/kafka.rs
  • Code Duplication Β· Duplicated block (14 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (14 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (10–13 lines × 6) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (13 lines × 4) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (12–13 lines × 2) rust/sdk/cocoindex/src/connectors/qdrant.rs
  • Code Duplication Β· Duplicated block (13 lines × 2) rust/sdk/cocoindex/src/connectors/qdrant.rs
  • Code Duplication Β· Duplicated block (12 lines × 6) rust/code_ast/src/elements/lang/cfamily.rs
  • Code Duplication Β· Duplicated block (10–12 lines × 3) rust/sdk/cocoindex/src/connectors/qdrant.rs
  • Code Duplication Β· Duplicated block (12 lines × 2) rust/code_ast/src/elements/lang/cfamily.rs
  • Code Duplication Β· Duplicated block (11 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (11 lines × 2) rust/sdk/cocoindex/src/connectors/kafka.rs
  • Code Duplication Β· Duplicated block (11 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (10 lines × 3) rust/core/src/state_store/app_store.rs
  • Code Duplication Β· Duplicated block (10 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (10 lines × 2) rust/sdk/cocoindex/src/ctx.rs
  • Code Duplication Β· Duplicated block (9 lines × 8) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (9 lines × 2) rust/py/src/code.rs
  • Code Duplication Β· Duplicated block (9 lines × 2) rust/sdk/cocoindex/src/connectors/kafka.rs
  • Code Duplication Β· Duplicated block (8 lines × 3) rust/py/src/inspect.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) rust/core/src/engine/execution.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/kafka.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (7 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (7 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (7 lines × 2) rust/sdk/cocoindex/src/connectors/qdrant.rs
  • Code Duplication Β· Duplicated block (6–7 lines × 2) rust/sdk/cocoindex/src/ctx.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) rust/code_match/src/lang/html.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) rust/core/src/engine/live_component.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) rust/core/src/state_store/submit_session.rs
  • Code Duplication Β· Duplicated block (5 lines × 4) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (5 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (6 lines × 4) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (17 lines × 2) rust/sdk/cocoindex/src/connectors/surrealdb.rs
  • Code Duplication Β· Duplicated block (14 lines × 2) rust/core/src/engine/execution.rs
  • Code Duplication Β· Duplicated block (15 lines × 2) rust/sdk/cocoindex/src/connectors/iggy.rs
  • Code Duplication Β· Duplicated block (13 lines × 2) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (12 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (11 lines × 2) rust/sdk/cocoindex/src/ops/api.rs
  • Code Duplication Β· Duplicated block (10 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/ops/image.rs
  • Code Duplication Β· Duplicated block (9 lines × 2) rust/sdk/cocoindex/src/connectors/qdrant.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/qdrant.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/amazon_s3.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/turbopuffer.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (7 lines × 2) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (7 lines × 2) rust/sdk/cocoindex/src/resources/id.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (6 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs
  • Code Duplication Β· Duplicated block (6 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/iggy.rs
  • Code Duplication Β· Duplicated block (57–78 lines × 2) REDACTED
  • Code Duplication Β· Duplicated block (39–42 lines × 2) REDACTED
  • Code Duplication Β· Duplicated block (22–24 lines × 2) python/cocoindex/connectors/falkordb/_target.py
  • Code Duplication Β· Edited copy of a member (26 corresponding lines) examples/image_search_colpali/pipeline.py
  • Code Duplication Β· Members sharing a duplicated core (8 members, 50+ identical tokens) examples/amazon_s3_embedding/main.py
  • Code Duplication Β· Members sharing a duplicated core (8 members, 50+ identical tokens) examples/amazon_s3_embedding/main.py
  • Code Duplication Β· Duplicated block (25 lines × 3) examples/meeting_notes_graph_falkordb/main.py
  • Cohesion (LCOM4) Β· Low cohesion: DorisConfig (LCOM4 8) rust/sdk/cocoindex/src/connectors/doris.rs
  • Churn × Complexity Hotspots Β· Hotspot: rust/core/src/engine/live_component.rs rust/core/src/engine/live_component.rs
  • Churn × Complexity Hotspots Β· Repeated repair: rust/core/src/state_store/storage.rs rust/core/src/state_store/storage.rs
  • Churn × Complexity Hotspots Β· Repeated repair: rust/sdk/cocoindex/src/cypher_graph.rs rust/sdk/cocoindex/src/cypher_graph.rs
  • Churn × Complexity Hotspots Β· Repeated repair: rust/sdk/cocoindex/src/resources/fs.rs rust/sdk/cocoindex/src/resources/fs.rs
  • Explicit Debt Β· TodoComment REDACTED
  • Explicit Debt Β· TodoComment REDACTED
  • Explicit Debt Β· TodoComment REDACTED
Rebuild cost: about €310,000 Β· Estimate
Cost to rebuild€100,000 to €520,000, for 1,720 to 5,458 hours of work, about 2.1 person-years for 1 to 5 engineers
Difficulty of the problemStandard, 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.9 at a score of 65. 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.
SizeLarge: 157,245 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
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 `?`).
Raises the score by about 8 points Β· Medium effort Β· Nullable reference types
2
Interpolated log message defeats structured logging
Raises the score by about 6 points Β· Medium effort Β· Structured logging
3
Bring the 2 bodies over 60 down to 60 or less in Cognitive Complexity β€” start with cocoindex_core::engine::execution::pre_commit (cognitive 134), cocoindex_cli::child::run (cognitive 69).
Raises the score by about 1.0 points Β· Medium effort Β· Cognitive Complexity

Diagnosis: what the measurements show together

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 €310,000 to build again, about 2.1 person-years of work. Its weakest lens is Code Health, at 49 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first Β· First action
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Of all the actions in this report, it raises the score most for the work it takes: about 8 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year Β· Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 206,836 lines over the last 90 days, which is about 838,835 lines a year. At that pace, the extra work comes to an estimated 43.6 to 279.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture β€” 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.

arch cocoindex cocoindex cocoindex_code_ast cocoindex_code_ast cocoindex->cocoindex_code_ast cocoindex_code_match cocoindex_code_match cocoindex->cocoindex_code_match cocoindex_core cocoindex_core cocoindex->cocoindex_core cocoindex_macros cocoindex_macros cocoindex->cocoindex_macros cocoindex_ops_text cocoindex_ops_text cocoindex->cocoindex_ops_text cocoindex_utils cocoindex_utils cocoindex->cocoindex_utils cocoindex-docs-astro cocoindex-docs-astro cocoindex_cli cocoindex_cli cocoindex_cli->cocoindex cocoindex_cli->cocoindex_core cocoindex_code_match->cocoindex_code_ast cocoindex_code_match->cocoindex_utils cocoindex_core->cocoindex_utils cocoindex_ops_text->cocoindex_code_ast cocoindex_py cocoindex_py cocoindex_py->cocoindex_code_ast cocoindex_py->cocoindex_code_match cocoindex_py->cocoindex_core cocoindex_py->cocoindex_ops_text cocoindex_py_utils cocoindex_py_utils cocoindex_py->cocoindex_py_utils cocoindex_py->cocoindex_utils cocoindex_py_utils->cocoindex_utils

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.

308 modules, with 687 dependencies between them. 5 loops run through 27 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 268 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.
uses β†’1 cocoindex.error2 cocoindex.statediff3 cocoindex_code_ast.elements.config4 cocoindex_code_ast.elements.hooks5 cocoindex_code_ast.positions6 cocoindex_code_match.config7 cocoindex_core.state.stable_path8 cocoindex_utils.fingerprint9 python.cocoindex._internal10 python.cocoindex._internal.context_keys11 python.cocoindex._internal.pending_marker12 python.cocoindex.connectorkits.target13 python.cocoindex.resources.file14 cocoindex_code_ast.source15 cocoindex_core.engine.stats16 cocoindex_core.engine.target_state17 cocoindex_core.state.db_schema18 python.cocoindex._internal.target_state19 cocoindex.target_state20 cocoindex_core.state_store.app_store21 cocoindex_core.engine.live_component22 cocoindex_core.engine.component23 cocoindex_core.engine.context24 cocoindex.memo25 cocoindex_core.engine.app26 cocoindex_py.component27 cocoindex.profile28 cocoindex.ctx29 cocoindex.row_schema30 cocoindex.app31 cocoindex.connectors.bigquery32 cocoindex.connectors.doris33 cocoindex.connectors.lancedb34 cocoindex.live_component35 cocoindex.connectors.postgres36 cocoindex.connectors.surrealdb37 cocoindex.connectors.zvec38 cocoindex.connectors.sqlite39 cocoindex.cypher_graph40 cocoindex.connectors.neo4j
1 cocoindex.error
2 cocoindex.statediff
3 cocoindex_code_ast.elements.config
4 cocoindex_code_ast.elements.hooks
5 cocoindex_code_ast.positions
6 cocoindex_code_match.config
7 cocoindex_core.state.stable_path
8 cocoindex_utils.fingerprint
9 python.cocoindex._internal
10 python.cocoindex._internal.context_keys
11 python.cocoindex._internal.pending_marker
12 python.cocoindex.connectorkits.target
13 python.cocoindex.resources.file
14 cocoindex_code_ast.source1
15 cocoindex_core.engine.stats1
16 cocoindex_core.engine.target_state41
17 cocoindex_core.state.db_schema33
18 python.cocoindex._internal.target_state71
19 cocoindex.target_state14253
20 cocoindex_core.state_store.app_store525
21 cocoindex_core.engine.live_component32273
22 cocoindex_core.engine.component5421229
23 cocoindex_core.engine.context54121414
24 cocoindex.memo10525
25 cocoindex_core.engine.app2111
26 cocoindex_py.component152
27 cocoindex.profile21122321
28 cocoindex.ctx321734
29 cocoindex.row_schema11
30 cocoindex.app2234
31 cocoindex.connectors.bigquery441841
32 cocoindex.connectors.doris134184112
33 cocoindex.connectors.lancedb861134112
34 cocoindex.live_component12222
35 cocoindex.connectors.postgres15611441134
36 cocoindex.connectors.surrealdb14811115184
37 cocoindex.connectors.zvec133184111
38 cocoindex.connectors.sqlite134184113112
39 cocoindex.cypher_graph37114516243
40 cocoindex.connectors.neo4j11114311
Uses a module listed above itPart of a loopThe module itself
1 cocoindex.error2 cocoindex.statediff3 cocoindex_code_ast.elements.config4 cocoindex_code_ast.elements.hooks5 cocoindex_code_ast.positions6 cocoindex_code_match.config7 cocoindex_core.state.stable_path8 cocoindex_utils.fingerprint9 python.cocoindex._internal10 python.cocoindex._internal.context_keys11 python.cocoindex._internal.pending_marker12 python.cocoindex.connectorkits.target13 python.cocoindex.resources.file14 cocoindex_code_ast.source15 cocoindex_core.engine.stats16 cocoindex_core.engine.target_state17 cocoindex_core.state.db_schema18 python.cocoindex._internal.target_state19 cocoindex.target_state20 cocoindex_core.state_store.app_store21 cocoindex_core.engine.live_component22 cocoindex_core.engine.component23 cocoindex_core.engine.context24 cocoindex.memo25 cocoindex_core.engine.app26 cocoindex_py.component27 cocoindex.profile28 cocoindex.ctx29 cocoindex.row_schema30 cocoindex.app31 cocoindex.connectors.bigquery32 cocoindex.connectors.doris33 cocoindex.connectors.lancedb34 cocoindex.live_component35 cocoindex.connectors.postgres36 cocoindex.connectors.surrealdb37 cocoindex.connectors.zvec38 cocoindex.connectors.sqlite39 cocoindex.cypher_graph40 cocoindex.connectors.neo4jcocoindex.error1cocoindex.statediff2cocoindex_code_ast.elements.config3cocoindex_code_ast.elements.hooks4cocoindex_code_ast.positions5cocoindex_code_match.config6cocoindex_core.state.stable_path7cocoindex_utils.fingerprint8python.cocoindex._internal9python.cocoindex._internal.context_keys10python.cocoindex._internal.pending_marker11python.cocoindex.connectorkits.target12python.cocoindex.resources.file13cocoindex_code_ast.source14cocoindex_core.engine.stats15cocoindex_core.engine.target_state16cocoindex_core.state.db_schema17python.cocoindex._internal.target_state18cocoindex.target_state19cocoindex_core.state_store.app_store20cocoindex_core.engine.live_component21cocoindex_core.engine.component22cocoindex_core.engine.context23cocoindex.memo24cocoindex_core.engine.app25cocoindex_py.component26cocoindex.profile27cocoindex.ctx28cocoindex.row_schema29cocoindex.app30cocoindex.connectors.bigquery31cocoindex.connectors.doris32cocoindex.connectors.lancedb33cocoindex.live_component34cocoindex.connectors.postgres35cocoindex.connectors.surrealdb36cocoindex.connectors.zvec37cocoindex.connectors.sqlite38cocoindex.cypher_graph39cocoindex.connectors.neo4j40114133711425352532273542122954121414105252111152211223213217341122344418411341841128611341121222215611441134148111151841331841111341841131123711451624311114311+268 more modules (most-connected shown)

At a glance β€” Code Health Β· 49% Β· Weak Β· gated by X4, X5 Β·

At a glance β€” Architecture Β· 93% Β· Exemplary Β·

At a glance β€” Maturity Β· 95% Β· Exemplary Β·

At a glance β€” Readiness Β· 74% Β· Strong Β·

At a glance β€” Security Β· 77% Β· Adequate Β· gated by D29 Β·

At a glance β€” Accessibility Β· 75% Β· Strong Β·

At a glance β€” Performance Β· 94% Β· Exemplary Β·

Security & Compliance β€” OWASP Top-10 mapping

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 categoryFindingsSeverity
A03:2025 β€” Software Supply Chain Failures391High / Critical
A05:2025 β€” Injection98High / Critical

Roadmap

Top priorities: 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 `?`); Interpolated log message defeats structured logging; Task from `asyncio.ensure_future` is not kept.

Ranked by impact Γ· effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
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 `?`).+8.3 ptsMediumNullable reference types
Interpolated log message defeats structured logging+5.9 ptsMediumStructured logging
Bring the 2 bodies over 60 down to 60 or less in Cognitive Complexity β€” start with cocoindex_core::engine::execution::pre_commit (cognitive 134), cocoindex_cli::child::run (cognitive 69).+1.0 ptsMediumCognitive Complexity
Task from `asyncio.ensure_future` is not kept+1.3 ptsMediumAsync correctness
Resolve the 42 FileTooLong finding(s) in God Classes β€” start with _target.py (7), REDACTED, surrealdb.rs.+1.1 ptsHighGod Classes
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+1.1 ptsMediumRelease Hygiene
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.+1.1 ptsMediumVisual & motion safety
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+0.9 ptsMediumObservability

File quality

Per-file score 0–10 β€” a quality signature. Of 222 files carrying findings, judged against the Production bar: 0% slop Β· 77% mixed Β· 23% near-clean.

FileScoreBandWorst signal
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedDependency Vulnerabilities: High CVE: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
rust/py/src/app.rs5.7MixedCode Duplication: Edited copies of one member (3 members, 11+ corresponding lines)
python/cocoindex/_internal/api.py5.8MixedChange Coupling: Boundary-crossing change coupling: REDACTED ↔ context.rs
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedDependency Vulnerabilities: Medium vulnerability: REDACTED

How the grades work

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 β€” 81

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 β€” 1190

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 β€” 113

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved β€” 24

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository β€” a backup job that nothing shows was ever restored from proves nothing about restores β€” or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment β€” run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 59 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: βœ“ Measured β€” a deterministic fact (LoC, complexity, coverage); ~ Modeled β€” an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): βœ“ Tool-verified means the property itself was measured across the surface; β—‹ Nothing flagged means the probes came back clean β€” a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence β€” absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked β€” 59 dimensions across the health lenses
D1D2D3D4D5D6D7D10D12D13D14D15D16D17D19D20D24D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC5AC6AX10AX3AX4AX8AX9M1M2M3M4P1P10P2P3P4P6PF1PF3S1X1X21X27X28X29X30X4X5

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
  1. 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, 1345 of 1384 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0βœ“ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0βœ“ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0βœ“ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400βœ“ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400βœ“ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 Β· 0.31.0βœ“ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 Β· 0.69.3 Β· 3.2.533βœ“ deterministic

Every finding is locatable in findings.md. Run 01a1dad3-745e-748f-92bb-21ace0112cd6.

The exact command behind every deep-scan dimension β€” tool, version, invocation and retained raw output β€” is in Appendix B β€” Reproduction & audit trail.

Run transparency β€” what happened this run

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 β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Rust half could not be measured β€” the Cargo suite in repository root did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D10 Test Quality β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 4 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 312 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 β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and did not finish re-running within its tier budget β€” so reliability was not measured for the repository as a whole. The Python (2 distributions): 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.
  • D14 License Compliance β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python REDACTED/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its 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.
  • D19 Documentation Quality β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated 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 β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • D32 Data Compliance (PII/GDPR) β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. `docs/astro.config.mjs` 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.
  • AX1 Captive dependencies β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in python/cocoindex/_internal/context_keys.py, 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 β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • AXB2 Runtime readiness β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • AXR1 Runtime accessibility β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • C1 Data Protection β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β€” not a finding that the repository lacks personal data controls.
  • C2 Access Controls β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β€” not a finding that the repository lacks authorization controls.
  • C3 Audit Trail β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β€” not a finding that the repository lacks audit controls.
  • C4 Data Retention β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β€” not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β€” not a finding that the repository lacks data-subject rights controls.
  • GD1 Unfinished & placeholder code β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust 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 β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust 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 β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P8 Schema migrations β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • X12 Unreachable branch β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X16 Unfloored truncation loop β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X17 Uncapped recursion over a caller-supplied document β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X23 Unguarded diagnostic materialisation β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X25 Inert configuration knob β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X26 Unsynchronised callback handoff β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X29 Per-element action decided by a fixed element β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X3 Exception handling β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X4 Structured logging β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 10 further occurrence(s) are not listed individually; the score already reflects all 50.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared β€” every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap β€” a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see β€” the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically β€” it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type β€” a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module β€” one class/IIFE β€” earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity β€” an in-process token-stream comparison over sliding windows, with type-aware normalization β€” so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED β€” its repetition is the tool's, not the team's β€” so the score reflects hand-written duplication only.
  • 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.
  • 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 Secret Scanning: Secret detection is signature- and entropy-based on the current tree β€” a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy β€” mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history β€” a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension β€” pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual β€” undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded β€” it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project β€” a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns β€” a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) β€” it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases β€” a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules β€” it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension β€” code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS β€” files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen β€” a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen β€” a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally β€” the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup β€” a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively β€” flagged only when it carries NO label/aria-label/aria-labelledby/id/name β€” but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree β€” landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape β€” roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES β€” Vue v-if/v-else/v-show and Alpine x-if/x-show β€” so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction β€” literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics β€” a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see β€” only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) β€” controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 Β· Cyclomatic Complexity6.7 / 10Adequateβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.7 / 10 Β· rule-coverage 100% Β· ceiling Prevented

47 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was cocoindex_core::engine::execution::pre_commit at 51. A further 7 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 cocoindex_code_match::lang::by_name at 33 β€” they are counted neither in the figure above nor in this dimension's score. 3 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: rust/code_match/src/lang/mod.rs (cocoindex_code_match::lang::by_name at 33), rust/sdk/cocoindex/src/connectors/zvec.rs (cocoindex::connectors::zvec::scalar_value at 22), rust/code_ast/src/elements/types.rs (DeclarationKind::as_str at 16). 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.

cocoindex::resources::fs::apply_fs_actions (cyclomatic 27) Β· Γ—7rust/sdk/cocoindex/src/resources/fs.rs:1270
cocoindex_core::engine::execution::pre_commit (cyclomatic 51) Β· Γ—3rust/core/src/engine/execution.rs:1161
cocoindex_cli::child::run (cyclomatic 32) Β· Γ—3rust/cli/src/child.rs:126
cocoindex_macros::parse_schema_field_attr (cyclomatic 18) Β· Γ—2rust/sdk/cocoindex_macros/src/lib.rs:1819
Component::execute_once (cyclomatic 32)rust/core/src/engine/component.rs:1291

+ 31 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 3 bodies over 30 down to 30 or less in Cyclomatic Complexity β€” start with cocoindex_core::engine::execution::pre_commit (cyclomatic 51), cocoindex_cli::child::run (cyclomatic 32), Component::execute_once (cyclomatic 32). β€” This score is capped by its worst body, so a finding fixed alone moves it by almost nothing β€” the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 6.7 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D2 Β· Cognitive Complexity5.7 / 10Adequateβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 5.7 / 10 Β· rule-coverage 100% Β· ceiling Prevented

138 method(s) exceeded the cognitive complexity threshold of 15; the worst was cocoindex_core::engine::execution::pre_commit at 134.

cocoindex::resources::fs::walk_files (cognitive 52) Β· Γ—13rust/sdk/cocoindex/src/resources/fs.rs:722
cocoindex_core::engine::execution::pre_commit (cognitive 134) Β· Γ—12rust/core/src/engine/execution.rs:1161
TableHandler::reconcile (cognitive 44) Β· Γ—6rust/sdk/cocoindex/src/connectors/surrealdb.rs:1541
cocoindex_cli::child::run (cognitive 69) Β· Γ—4rust/cli/src/child.rs:126
cocoindex_code_ast::view::lang::classify (cognitive 49) Β· Γ—3rust/code_ast/src/view/lang.rs:729

+ 84 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cognitive Complexity β€” start with cocoindex_core::engine::execution::pre_commit (cognitive 134), cocoindex_cli::child::run (cognitive 69). β€” 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 2 together lifts Cognitive Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D3 Β· God Classes8.6 / 10Strongβœ“ 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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.6 / 10 Β· rule-coverage 100% Β· ceiling Prevented

60 god class(es) detected.

FileTooLong: REDACTED Β· Γ—42REDACTED
FunctionTooLong: cocoindex_core::engine::execution::pre_commit Β· Γ—10rust/core/src/engine/execution.rs:1161
ClassTooLong: Ctx Β· Γ—3rust/sdk/cocoindex/src/ctx.rs:330
TooManyMethods: AppStore Β· Γ—3rust/core/src/state_store/app_store.rs:52
MethodTooLong: Component.execute_once Β· Γ—2rust/core/src/engine/component.rs:1291

What to do

  1. Resolve the 42 FileTooLong finding(s) in God Classes β€” start with _target.py (7), REDACTED, surrealdb.rs. β€” One of this dimension's main actionable groups (42 warning-level).
  2. Resolve the 10 FunctionTooLong finding(s) in God Classes β€” start with lib.rs (4), execution.rs (2), lancedb.rs. β€” One of this dimension's main actionable groups (10 warning-level).
  3. Resolve the 3 ClassTooLong finding(s) in God Classes β€” start with ctx.rs, app_store.rs, component.rs. β€” One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d3_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D4 Β· Code Duplication6.4 / 10Adequateβœ“ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.4 / 10 Β· rule-coverage 100% Β· ceiling Verified

248 duplicated block group(s) detected. 9.0 % of the production lines (14,164 of 157,245) are in a reported copy. A further 251 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 65 of the 499 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.

Edited copy of a member (8 corresponding lines) Β· Γ—16rust/sdk/cocoindex/src/memo.rs:339
Duplicated block (8 lines × 2) Β· Γ—16rust/code_match/src/lang/html.rs:21
Edited copy of a member (9 corresponding lines) Β· Γ—15rust/sdk/cocoindex/src/connectors/surrealdb.rs:2371
Duplicated block (6 lines × 2) Β· Γ—15rust/code_ast/src/elements/lang/csharp.rs:17
Edited copy of a member (12 corresponding lines) Β· Γ—14rust/sdk/cocoindex/src/connectors/azure_blob.rs:1024

+ 184 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 16 Edited copy of a member (8 corresponding lines) finding(s) in Code Duplication β€” start with _target.py (3), bigquery.rs (2), main.py (2). β€” One of this dimension's main actionable groups (16 warning-level).
  2. Resolve the 16 Duplicated block (8 lines × 2) finding(s) in Code Duplication β€” start with bigquery.rs (2), postgres.rs (2), azure_blob.rs (2). β€” One of this dimension's main actionable groups (16 warning-level).
  3. Resolve the 15 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication β€” start with iggy.rs (3), lancedb.rs (2), surrealdb.rs. β€” One of this dimension's main actionable groups (15 warning-level).

Detailed fixes: d4_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D5 Β· Coupling7.8 / 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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 7.8 / 10 Β· rule-coverage 100% Β· ceiling Prevented

11 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence, with abstractness counted on 10 of the 11 (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: cocoindex_code_ast Β· Γ—3

What to do

  1. Resolve the 3 Off the main sequence finding(s) in Coupling. β€” One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d5_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D6 Β· Cohesion (LCOM4)9.9 / 10Stronggated by 3 serious findingsβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.9 / 10 Β· rule-coverage 100% Β· ceiling Verified

3 of 270 classes have LCOM4 above 3.

Low cohesion: ManagedConnection (LCOM4 5) Β· Γ—3rust/sdk/cocoindex/src/connectors/zvec.rs:121

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) β€” start with zvec.rs, admission.rs, app.rs. β€” One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d6_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D7 Β· Architectural Integrity6.0 / 10Adequateβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

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).

Detailed fixes: d7_recommendation.md.

D10 Β· Test Quality10.0 / 10Exemplaryβœ“ 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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 4 tests. Measured on the JavaScript/TypeScript suite only β€” at least 312 test source file(s) (.rs, .py) went unread, so its test quality is unmeasured and is not in these counts.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d10_recommendation.md.

D12 Β· Dependency Hygiene8.7 8.5 / 10Strongβœ“ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.5 / 10 Β· rule-coverage 98% Β· ceiling Verified

27 outdated, 0 yanked direct Cargo dependencies. 122 of 124 direct crates were graded against crates.io (0 not published there, 2 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.

Outdated: aws-config Β· Γ—27

Detailed fixes: d12_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D13 Β· Secret Scanning10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

Secret scan ran and found no leaked secrets.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d13_recommendation.md.

D14 Β· License Compliance10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

0 of 1140 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 Apache-2.0, 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 a Python REDACTED/requirements.txt (pip/uv/Poetry) and package.json, and the licences of those dependency graphs 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.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d14_recommendation.md.

D15 Β· Churn × Complexity Hotspots9.8 / 10Stronggated by 20 serious findingsβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.8 / 10 Β· rule-coverage 100% Β· ceiling Documented

Top hotspots: rust/core/src/engine/execution.rs (25×51=1275); rust/core/src/engine/component.rs (23×32=736); rust/sdk/cocoindex_macros/src/lib.rs (9×27=243) Repeated repair below the complexity floor: rust/sdk/cocoindex/src/connectors/doris.rs (6 of 11 changes were fixes); python/cocoindex/ops/litellm.py (5 of 7 changes were fixes); python/cocoindex/connectors/valkey/_target.py (4 of 7 changes were fixes)

Hotspot: rust/core/src/engine/execution.rs Β· Γ—10rust/core/src/engine/execution.rs:1161
Repeated repair: rust/sdk/cocoindex/src/connectors/doris.rs Β· Γ—10rust/sdk/cocoindex/src/connectors/doris.rs:474

What to do

  1. Resolve the 10 Hotspot finding(s) in Churn × Complexity Hotspots β€” start with execution.rs, component.rs, lib.rs. β€” One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 10 Repeated repair finding(s) in Churn × Complexity Hotspots β€” start with _cypher.py (2), doris.rs, litellm.py. β€” One of this dimension's main actionable groups (10 warning-level).

Detailed fixes: d15_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D16 Β· Bus Factor8.0 / 10Strongβœ“ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

48 source file(s) have their living knowledge concentrated in one author (β‰₯90% of recent, decayed contribution). The largest is rust/sdk/cocoindex/src/connectors/oci_object_storage.rs. Counted over 237 of the 335 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 Β· Γ—2

What to do

  1. Resolve the 2 Off-boarding risk finding(s) in Bus Factor. β€” One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d16_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D17 Β· Explicit Debt10.0 / 10Stronggated by 5 serious findingsβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

5 deducted task-comment markers across 157245 LoC (0.0/KLoC) β†’ score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment Β· Γ—5rust/core/src/state/db_schema.rs:579

What to do

  1. Resolve the 5 TodoComment finding(s) in Explicit Debt β€” start with component.rs (2), db_schema.rs, app.rs. β€” One of this dimension's main actionable groups (5 warning-level).

Detailed fixes: d17_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D19 Β· Documentation Quality10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

1 of 1 documentation facets pass in full. 112 document(s) read across 2 unit(s).

βœ“ On the Gold path β€” maintain.

Detailed fixes: d19_recommendation.md.

D20 Β· ADR Quality10.0 / 10Exemplaryβ—‹ Nothing flagged

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

0 of 2 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.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d20_recommendation.md.

D24 Β· Comment Value10.0 9.6 / 10Exemplaryβ—‹ Nothing flagged

What it measures: Whether comments are worth it β€” explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.6 / 10 Β· rule-coverage 96% Β· ceiling Documented

0 of 101 judged comments only repeat the code they sit on (0.0 %). 6 comment(s) in another language or script were not judged.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d24_recommendation.md.

D26 Β· Project Cohesion6.7 / 10Adequateβœ“ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.7 / 10 Β· rule-coverage 100% Β· ceiling Documented

2 of 12 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. 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.

D28 Β· Secrets (history)10.0 / 10Exemplaryβ—‹ Nothing flagged

What it measures: Whether any secrets were ever committed β€” scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout β€” the full git history, then a second --no-git pass over the working tree as it stands β€” merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side β€” unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d28_recommendation.md.

D29 Β· Static Analysis (SAST)0.1 / 10Criticalβœ“ Tool-verified

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).

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.1 / 10 Β· rule-coverage 100% Β· ceiling Documented

98 finding(s): 0 critical, 74 high, 22 medium, 2 low. 54 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 18 file(s) β€” `docs/astro.config.mjs` (line 6), `docs/scripts/remark-example-images.mjs` (line 4), `examples/rust/amazon_s3_embedding/src/main.rs` (line 94), `examples/rust/code_embedding/src/main.rs` (line 107), `examples/rust/code_embedding_lancedb/src/main.rs` (line 97), … (+13 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 1 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

+ 8 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 7 REDACTED finding(s) charged to Static Analysis (SAST) β€” the other 54 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. β€” One of this dimension's main actionable groups (61 issue-level, 7 of them charged here).
  2. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED (4). β€” One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED (3). β€” One of this dimension's main actionable groups (3 issue-level).

Detailed fixes: d29_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D30 Β· Dependency Vulnerabilities2.1 / 10Criticalβœ“ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares β€” Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 2.1 / 10 Β· rule-coverage 100% Β· ceiling Documented

389 finding(s): 0 critical, 2 high, 387 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 100 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities β€” start with REDACTED (100). β€” One of this dimension's main actionable groups (100 warning-level).
  2. Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED (2). β€” One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 98 Medium vulnerability finding(s) in Dependency Vulnerabilities β€” start with REDACTED (98). β€” One of this dimension's main actionable groups (98 warning-level).

Detailed fixes: d30_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D31 Β· IaC & Container Security10.0 / 10Exemplaryβ—‹ Nothing flagged

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

trivy and checkov found no infrastructure-as-code or container misconfigurations.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d31_recommendation.md.

D34 Β· Knowledge Freshness10.0 / 10Adequategated by 1 critical findingβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

1 of 237 significant source file(s) are orphaned β€” their living knowledge has decayed to nothing, so no one currently understands them. The largest is benchmarks/entity_resolution/benchmark.py. Counted over 237 of the 335 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgebenchmarks/entity_resolution/benchmark.py:1

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness β€” start with benchmark.py. β€” One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d34_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D35 Β· Change Coupling9.9 / 10Adequategated by 2 critical findingsβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.9 / 10 Β· rule-coverage 100% Β· ceiling Documented

Strongest change-coupling: REDACTED↔context.rs 70%; component_ctx.py↔context.rs 50%; environment.rs↔execution.rs 50%

Boundary-crossing change coupling: REDACTED ↔ context.rs Β· Γ—2python/cocoindex/_internal/api.py:1
Change coupling: environment.rs ↔ execution.rsrust/core/src/engine/environment.rs:1

What to do

  1. Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling β€” start with REDACTED, component_ctx.py. β€” One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Change coupling finding(s) in Change Coupling β€” start with environment.rs. β€” One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d35_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D36 Β· Supply-chain Provenance & Signing5.0 / 10Adequateβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 5.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

2/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. β€” One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. β€” One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md Β· top locations in Appendix A, every location in findings.md.

D37 Β· Vulnerability-disclosure Policy10.0 / 10Exemplaryβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

A vulnerability-disclosure policy (.github/SECURITY.md) is published with a reporting contact.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d37_recommendation.md.

D43 Β· Malicious Dependencies10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable β€” a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it β€” a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d43_recommendation.md.

D44 Β· Platform End-of-Life10.0 / 10Exemplaryβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 8 dependency declaration(s). This dimension reads what the repository says about ITSELF β€” a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS Β· M = Maturity Β· P = Readiness.

AC1 Β· Text alternatives10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Accessibility β€” Whether non-text content carries a text alternative β€” img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements β€” img, area, input[type=image], svg, video, object, embed, canvas β€” across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script β€” tagged-template (html`…`) UIs and hyperscript DOM factories β€” is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 Β· Forms & labels10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Accessibility β€” Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script β€” tagged-template (html`…`) UIs and hyperscript DOM factories β€” is not read at all.

AC3 Β· Page structure6.3 / 10Adequateβœ“ Tool-verified

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.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). β€” REDACTED:1
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. β€” REDACTED:1

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.
AC5 Β· ARIA correctness10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

AC6 Β· Visual & motion safety5.2 / 10Adequateβœ“ Tool-verified

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.

  • `body.ex-listing .ex-results: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. β€” docs/src/styles/examples.css:273
  • `:root #main-content: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. β€” docs/src/styles/site.css:690

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.
AX10 Β· Code composition9.8 / 10Exemplaryβœ“ Tool-verified

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.

AX3 Β· Project dependency cycles10.0 / 10Exemplaryβœ“ Tool-verified

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.

AX4 Β· Dependency direction10.0 / 10Exemplaryβœ“ Tool-verified

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.

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.

AX9 Β· CQS / query purity10.0 / 10Exemplaryβœ“ Tool-verified

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.

M1 Β· Documentation (README)9.1 / 10Exemplaryβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 Β· Architecture documentation10.0 / 10Exemplaryβœ“ Tool-verified

Maturity Β· Maturity β€” Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

M3 Β· Folder & project structure10.0 / 10Exemplaryβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 Β· Documentation accuracy10.0 / 10Exemplaryβ—‹ Nothing flagged

Maturity Β· Maturity β€” Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 Β· CI/CD gates10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

P10 Β· Library API & versioning10.0 / 10Exemplaryβ—‹ Nothing flagged

Readiness Β· Readiness β€” For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 Β· Observability6.0 / 10Adequateβœ“ Tool-verified

Readiness Β· Readiness β€” Whether the code is diagnosable in production β€” structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 6/9 runnable modules use logging (modules with no entry point or server are excluded β€” they are libraries a runnable module hosts). Silent: `rust/cli`, `rust/ops_text`, `rust/sdk/cocoindex_macros`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
P3 Β· Security & performance tooling8.0 / 10Strongβœ“ Tool-verified

Readiness Β· Readiness β€” Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step β€” in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 Β· Deployment & Rollback10.0 / 10Exemplaryβœ“ Tool-verified

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.

P6 Β· Release Hygiene5.0 / 10Adequateβœ“ Tool-verified

Readiness Β· Readiness β€” Whether releases are traceable β€” a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file β€” what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF1 Β· Benchmark discipline9.0 / 10Exemplaryβœ“ Tool-verified

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.

PF3 Β· Async & latency hygiene10.0 / 10Exemplaryβœ“ Tool-verified

Readiness Β· Performance β€” Whether asynchronous code stays responsive β€” it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere β€” .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect β€” and, for a .NET library with β‰₯5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

S1 Β· Web-Security Posture8.0 / 10Strongβœ“ Tool-verified

Other Β· Security β€” Only what this repository's own non-C# files could be read for was assessed β€” 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. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `https://cocoindex.io/playground/playground.js?v=e678d1e` 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. β€” docs/src/components/PipelinePlayground.astro:10

What to do

  • 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.
X1 Β· Async correctness8.0 / 10Strongβœ“ Tool-verified

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.

  • The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled β€” it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception. (×2) β€” python/cocoindex/connectors/kafka/_source.py:134, python/cocoindex/connectors/iggy/_source.py:131

What to do

  • Task from `asyncio.ensure_future` is not kept
X21 Β· Side-effecting pattern guard10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

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.

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.

X29 Β· Per-element action decided by a fixed element10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a decision taken once per element is taken ABOUT that element β€” a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move β€” written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

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.

X4 Β· Structured logging3.5 / 10Weakβœ“ Tool-verified

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.

  • `warning` at line 1383 is handed an f-string as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. β€” python/cocoindex/connectors/postgres/_target.py:1383
  • `error!` at line 277 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`. β€” rust/utils/src/batching.rs:277
  • `debug!` at line 346 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`. (×2) β€” rust/utils/src/error.rs:346, rust/sdk/cocoindex/src/connectors/gdrive.rs:346
  • `debug!` at line 589 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`. β€” rust/utils/src/error.rs:589
  • `trace!` at line 142 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`. β€” rust/utils/src/retryable.rs:142
  • `warn!` at line 29 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`. β€” rust/utils/src/slow_warn.rs:29
  • `warn!` at line 31 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`. β€” rust/utils/src/slow_warn.rs:31
  • `error!` at line 1098 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`. β€” rust/sdk/cocoindex/src/ctx.rs:1098
  • `warn!` at line 235 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`. β€” rust/sdk/cocoindex/src/deps.rs:235
  • `warn!` at line 336 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`. β€” rust/sdk/cocoindex/src/deps.rs:336
  • `warn!` 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: `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`. β€” rust/sdk/cocoindex/src/deps.rs:345
  • `warn!` at line 113 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`. β€” rust/sdk/cocoindex/src/logic.rs:113
  • `error!` 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: `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`. β€” rust/sdk/cocoindex/src/runner.rs:172
  • `debug!` at line 259 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`. β€” rust/sdk/cocoindex/src/resources/fs.rs:259
  • `warn!` at line 358 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`. β€” rust/sdk/cocoindex/src/resources/fs.rs:358
  • `debug!` at line 1352 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`. β€” rust/sdk/cocoindex/src/connectors/doris.rs:1352
  • `warn!` at line 1482 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`. β€” rust/sdk/cocoindex/src/connectors/doris.rs:1482
  • `warn!` at line 1858 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`. β€” rust/sdk/cocoindex/src/connectors/gdrive.rs:1858
  • `warn!` at line 991 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`. β€” rust/sdk/cocoindex/src/connectors/iggy.rs:991
  • `warn!` at line 1576 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`. β€” rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1576
  • `debug!` at line 323 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`. β€” rust/sdk/cocoindex/src/connectors/snowflake.rs:323
  • `warn!` at line 1004 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`. β€” rust/sdk/cocoindex/src/connectors/sqlite.rs:1004
  • `error!` at line 60 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`. β€” rust/py_utils/src/future.rs:60
  • `error!` at line 216 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`. β€” rust/py/src/runtime.rs:216
  • `error!` at line 141 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`. β€” rust/py/src/value.rs:141
  • `error!` at line 146 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`. β€” rust/py/src/value.rs:146
  • `info!` at line 127 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`. β€” rust/core/src/telemetry/mod.rs:127
  • `warn!` at line 63 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`. β€” rust/core/src/state_store/storage.rs:63
  • `debug!` at line 218 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`. β€” rust/core/src/state_store/storage.rs:218
  • `warn!` at line 298 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`. β€” rust/core/src/state_store/storage.rs:298
  • `debug!` at line 360 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`. β€” rust/core/src/state_store/storage.rs:360
  • `info!` at line 392 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`. β€” rust/core/src/state_store/storage.rs:392
  • `info!` at line 447 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`. β€” rust/core/src/state_store/storage.rs:447
  • `warn!` at line 586 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`. β€” rust/core/src/state_store/storage.rs:586
  • `error!` at line 635 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`. β€” rust/core/src/engine/component.rs:635
  • `error!` at line 771 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`. β€” rust/core/src/engine/component.rs:771
  • `debug!` at line 827 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`. β€” rust/core/src/engine/component.rs:827
  • `error!` at line 1197 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`. β€” rust/core/src/engine/component.rs:1197
  • `trace!` at line 1241 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`. β€” rust/core/src/engine/component.rs:1241

What to do

  • Interpolated log message defeats structured logging
X5 Β· Nullable reference types2.0 / 10Criticalβœ“ Tool-verified

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.

  • 0/1 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.
  • ~0.4 `!` null assertions per 1k TypeScript source lines β€” 1 assertion(s) across the 2404 source line(s) of the 21 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: docs/src/scripts/search-hit.ts (1). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

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 `?`).

WCAG coverage β€” what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; β‰ˆ26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 Β· Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 Β· Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 Β· Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC5 Β· ARIA correctness4.1.2Partial signal
AC6 Β· Visual & motion safety1.4.3, 2.4.7Partial β€” literal CSS only

Not statically assessed β€” these 42 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference β€” by lens

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.

LensScoreRatingImpact
Code Health49%Weak β€” gated by X4, X5Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Architecture93%ExemplarySolid.
Maturity95%ExemplaryStrongest area.
Readiness74%StrongSolid.
Security77%Adequate β€” gated by D29Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Accessibility75%StrongSolid.
Performance94%ExemplarySolid.
Unscored β€” 2 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 β€” 31 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score.
  • X7 Silent fallback defaults β€” 5 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score.
Not evidenced β€” 4 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.

  • C3 Audit Trail β€” Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β€” because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention β€” Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β€” because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights β€” Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β€” because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup β€” not evidenced β€” repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included β€” 53 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.

  • AC4 Keyboard semantics β€” No interactive element found in the parsed markup β€” AC4 not applicable here.
  • 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. 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. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure β€” not assessed β€” architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation β€” AX6 reached only 2% of this repository's production lines β€” rust (102,833 lines), python (52,136 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 β€” the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection β€” Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β€” because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls β€” Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β€” because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability β€” Test reliability not scored β€” polyglot repository, one half's runner produced no measurement
  • 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 β€” D21 withholds its case and prefix conventions rows: 1 candidate(s) found and not reported.
  • D22 Internal API Consistency β€” API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling β€” No bounded-context organisation was detected either β€” neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (β‰₯2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it β€” e.g. `architecture:` β†’ `contexts:` β†’ `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance β€” None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • 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) β€” 1 file(s) were not parsed by semgrep β€” the PII/GDPR ruleset never ran over them
  • D40 Network Egress Confinement β€” No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement β€” No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement β€” No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D8 Code Coverage β€” Coverage not measured β€” Rust suite
  • DM1 Domain Modelling β€” not scored β€” this repository shows only 1 of the 3 signals this lens looks for (437 value object(s))
  • 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
  • ES1 Event Sourcing β€” not scored β€” this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code β€” no source files were read β€” this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs β€” not analysed β€” these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty β€” Reported, not scored β€” and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience β€” not applicable β€” no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
  • 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 not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here β€” Test coverage (D8) says why
  • PF2 Allocation hygiene β€” Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • SC1 Supply-chain hygiene β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X12 Unreachable branch β€” X12 reached only 35% of this repository's production lines β€” rust (102,833 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop β€” X16 reached only 2% of this repository's production lines β€” rust (102,833 lines), python (52,136 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document β€” X17 reached only 35% of this repository's production lines β€” rust (102,833 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X18 Disposal-pattern correctness β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation β€” no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller β€” a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • 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.
  • X22 Contradicted release guard β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation β€” X23 reached only 35% of this repository's production lines β€” rust (102,833 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X24 Document value interpolated into markup unescaped β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob β€” X25 reached only 35% of this repository's production lines β€” rust (102,833 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X26 Unsynchronised callback handoff β€” X26 reached only 33% of this repository's production lines β€” rust (102,833 lines), typescript (2,276 lines), javascript (1,009 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X3 Exception handling β€” X3 reached only 35% of this repository's production lines β€” rust (102,833 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly β€” This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A β€” Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical β€” 81 finding(s)
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 36 more in this group β€” see findings.md.
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· High CVE Β· Γ—2
  • REDACTED
  • REDACTED
D35 Β· Change Coupling Β· Boundary-crossing change coupling Β· Γ—2
  • Boundary-crossing change coupling: REDACTED ↔ context.rs python/cocoindex/_internal/api.py:1 β€” `python/cocoindex/_internal/api.py` (context python) and `rust/py/src/context.rs` (context rust) sit in DIFFERENT parts of the tree yet change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β€” a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) β€” the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e0e57405` feat(engine): data dependencies for memoized functions and components…; `a7a51cb9` feat(engine): coco.logic_tracked β€” track a callback's logic through l…; `2fc761d6` perf(engine): minimize serialization related to UserStateCache (#2127) β€” run `git show` on any of them.
  • Boundary-crossing change coupling: component_ctx.py ↔ context.rs python/cocoindex/_internal/component_ctx.py:1 β€” `python/cocoindex/_internal/component_ctx.py` (context python) and `rust/py/src/context.rs` (context rust) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β€” a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) β€” the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `98a9c23e` feat: introduce coco.use_state() for persistent per-component user de…; `cf2159b4` feat(engine): let report_to_stdout configure the refresh interval (#2…; `5398d7bc` feat(engine): add coco.stats_group() for scoped stats reports (#2042) β€” run `git show` on any of them.
AC3 Β· Page structure Β· <html> without a lang Β· Γ—1
  • <html> without a lang REDACTED:1 β€” The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 Β· Page structure Β· Document without a <title> Β· Γ—1
  • Document without a <title> REDACTED:1 β€” A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D34 Β· Knowledge Freshness Β· Orphaned knowledge Β· Γ—1
  • Orphaned knowledge benchmarks/entity_resolution/benchmark.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.
Serious β€” 1190 finding(s)
D30 Β· Dependency Vulnerabilities Β· Medium advisory (unmaintained) Β· Γ—100
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 75 more in this group β€” see findings.md.
D30 Β· Dependency Vulnerabilities Β· Medium vulnerability Β· Γ—98
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 73 more in this group β€” see findings.md.
D30 Β· Dependency Vulnerabilities Β· Medium CVE Β· Γ—97
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 72 more in this group β€” see findings.md.
D30 Β· Dependency Vulnerabilities Β· Medium advisory (unsound) Β· Γ—92
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 67 more in this group β€” see findings.md.
D3 Β· God Classes Β· FileTooLong Β· Γ—42
  • FileTooLong: REDACTED REDACTED β€” FileTooLong β€” 1699 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1199 over it, 3.40× 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: connectors/surrealdb.rs rust/sdk/cocoindex/src/connectors/surrealdb.rs β€” FileTooLong β€” 1574 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 60 free functions. The bar is 500 significant lines; this is 1074 over it, 3.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/cypher_graph.rs rust/sdk/cocoindex/src/cypher_graph.rs β€” FileTooLong β€” 1572 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 42 free functions. The bar is 500 significant lines; this is 1072 over it, 3.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.
  • FileTooLong: connectors/lancedb.rs rust/sdk/cocoindex/src/connectors/lancedb.rs β€” FileTooLong β€” 1490 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 990 over it, 2.98× 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/lib.rs rust/sdk/cocoindex_macros/src/lib.rs β€” FileTooLong β€” 1424 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 54 free functions. The bar is 500 significant lines; this is 924 over it, 2.85× 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: connectors/postgres.rs rust/sdk/cocoindex/src/connectors/postgres.rs β€” FileTooLong β€” 1400 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 61 free functions. The bar is 500 significant lines; this is 900 over it, 2.80× 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: engine/execution.rs rust/core/src/engine/execution.rs β€” FileTooLong β€” 1324 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 824 over it, 2.65× 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: connectors/gdrive.rs rust/sdk/cocoindex/src/connectors/gdrive.rs β€” FileTooLong β€” 1270 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 41 free functions. The bar is 500 significant lines; this is 770 over it, 2.54× 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: connectors/doris.rs rust/sdk/cocoindex/src/connectors/doris.rs β€” FileTooLong β€” 1211 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 41 free functions. The bar is 500 significant lines; this is 711 over it, 2.42× 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: connectors/bigquery.rs rust/sdk/cocoindex/src/connectors/bigquery.rs β€” FileTooLong β€” 1204 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 704 over it, 2.41× 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/ctx.rs rust/sdk/cocoindex/src/ctx.rs β€” FileTooLong β€” 1107 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: Ctx (3 blocks, 330-1946). The bar is 500 significant lines; this is 607 over it, 2.21× 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: postgres/_target.py python/cocoindex/connectors/postgres/_target.py β€” FileTooLong β€” 1090 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 590 over it, 2.18× 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: doris/_target.py python/cocoindex/connectors/doris/_target.py β€” FileTooLong β€” 1062 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 562 over it, 2.12× 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: connectors/qdrant.rs rust/sdk/cocoindex/src/connectors/qdrant.rs β€” FileTooLong β€” 1046 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 546 over it, 2.09× 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: connectors/oci_object_storage.rs rust/sdk/cocoindex/src/connectors/oci_object_storage.rs β€” FileTooLong β€” 1041 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 541 over it, 2.08× 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: connectors/snowflake.rs rust/sdk/cocoindex/src/connectors/snowflake.rs β€” FileTooLong β€” 1020 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 34 free functions. The bar is 500 significant lines; this is 520 over it, 2.04× 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: connectors/zvec.rs rust/sdk/cocoindex/src/connectors/zvec.rs β€” FileTooLong β€” 1013 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 513 over it, 2.03× 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: lancedb/_target.py python/cocoindex/connectors/lancedb/_target.py β€” FileTooLong β€” 1001 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 501 over it, 2.00× 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: connectors/sqlite.rs rust/sdk/cocoindex/src/connectors/sqlite.rs β€” FileTooLong β€” 966 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 41 free functions. The bar is 500 significant lines; this is 466 over it, 1.93× 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: engine/component.rs rust/core/src/engine/component.rs β€” FileTooLong β€” 943 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 443 over it, 1.89× 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: discord/_source.py python/cocoindex/connectors/discord/_source.py β€” FileTooLong β€” 886 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 386 over it, 1.77× 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: connectors/iggy.rs rust/sdk/cocoindex/src/connectors/iggy.rs β€” FileTooLong β€” 843 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 343 over it, 1.69× 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: connectors/kafka.rs rust/sdk/cocoindex/src/connectors/kafka.rs β€” FileTooLong β€” 840 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 340 over it, 1.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: sqlite/_target.py python/cocoindex/connectors/sqlite/_target.py β€” FileTooLong β€” 790 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 290 over it, 1.58× 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: connectors/azure_blob.rs rust/sdk/cocoindex/src/connectors/azure_blob.rs β€” FileTooLong β€” 787 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 287 over it, 1.57× 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.
  • + 17 more in this group β€” see findings.md.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—16
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Edited copy of a member (8 corresponding lines) Β· Γ—16
  • Edited copy of a member (8 corresponding lines) rust/sdk/cocoindex/src/memo.rs:339 β€” rust/sdk/cocoindex/src/memo.rs:339-353 | rust/sdk/cocoindex/src/memo.rs:430-437 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/core/src/state_store/storage.rs:597 β€” rust/core/src/state_store/storage.rs:597-604 | rust/core/src/state_store/storage.rs:608-619 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:750 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:750-757 | rust/sdk/cocoindex/src/connectors/snowflake.rs:567-574 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:969 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:969-979 | rust/sdk/cocoindex/src/connectors/iggy.rs:315-322 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/sdk/cocoindex/src/ctx.rs:1656 β€” rust/sdk/cocoindex/src/ctx.rs:1656-1669 | rust/sdk/cocoindex/src/ctx.rs:1804-1811 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/core/src/state_store/txn.rs:334 β€” rust/core/src/state_store/txn.rs:334-341 | rust/core/src/state_store/txn.rs:350-357 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/py/src/gpu_pool.rs:48 β€” rust/py/src/gpu_pool.rs:48-55 | rust/py/src/gpu_pool.rs:57-70 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) python/cocoindex/connectors/snowflake/_target.py:806 β€” python/cocoindex/connectors/snowflake/_target.py:806-813 | python/cocoindex/connectors/bigquery/_target.py:902-909 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:337 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:337-344 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:955-967 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/sdk/cocoindex/src/connectors/valkey.rs:428 β€” rust/sdk/cocoindex/src/connectors/valkey.rs:428-435 | rust/sdk/cocoindex/src/connectors/lancedb.rs:935-943 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) python/cocoindex/connectors/sqlite/_target.py:879 β€” python/cocoindex/connectors/sqlite/_target.py:879-887 | python/cocoindex/connectors/doris/_target.py:1186-1193 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) python/cocoindex/connectors/doris/_target.py:1350 β€” python/cocoindex/connectors/doris/_target.py:1350-1357 | python/cocoindex/connectors/lancedb/_target.py:1489-1509 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:1262 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:1262-1272 | rust/sdk/cocoindex/src/connectors/kafka.rs:1358-1365 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs:932 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:932-939 | rust/sdk/cocoindex/src/connectors/sqlite.rs:784-791 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) examples/discord_text_embedding/main.py:134 β€” examples/discord_text_embedding/main.py:134-142 | examples/gdrive_text_embedding/main.py:87-94 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) examples/patient_intake_extraction_baml/main.py:21 β€” examples/patient_intake_extraction_baml/main.py:21-28 | examples/patient_intake_extraction_dspy/main.py:60-67 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 2) Β· Γ—16
  • Duplicated block (8 lines × 2) rust/code_match/src/lang/html.rs:21 β€” rust/code_match/src/lang/html.rs:21-28 | rust/code_match/src/lang/xml.rs:13-20 β€” 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 `rust/code_match/src/lang/html.rs:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) rust/py/src/code.rs:333 β€” rust/py/src/code.rs:333-340 | rust/py/src/code.rs:392-399 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) rust/py/src/ops.rs:43 β€” rust/py/src/ops.rs:43-50 | rust/py/src/ops.rs:350-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 (8 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1722 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1722-1729 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1496-1503 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/lancedb.rs:872 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:872-879 | rust/sdk/cocoindex/src/cypher_graph.rs:1069-1076 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/lancedb.rs:872` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:1377 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1377-1384 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1066-1073 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 218 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) rust/sdk/cocoindex/src/ctx.rs:1060 β€” rust/sdk/cocoindex/src/ctx.rs:1060-1067 | rust/sdk/cocoindex/src/ctx.rs:1232-1239 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/ctx.rs:1060` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/azure_blob.rs:1065 β€” rust/sdk/cocoindex/src/connectors/azure_blob.rs:1065-1072 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1125-1132 β€” 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 lines × 2) rust/sdk/cocoindex/src/connectors/azure_blob.rs:816 β€” rust/sdk/cocoindex/src/connectors/azure_blob.rs:816-823 | rust/sdk/cocoindex/src/connectors/snowflake.rs:338-345 β€” 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 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:1866 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1866-1873 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1555-1562 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 13 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/postgres.rs:1866` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:199 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:199-206 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:386-393 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/amazon_s3.rs` and `rust/sdk/cocoindex/src/connectors/oci_object_storage.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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/amazon_s3.rs:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) rust/code_ast/src/elements/lang/csharp.rs:200 β€” rust/code_ast/src/elements/lang/csharp.rs:200-207 | rust/code_ast/src/elements/lang/python.rs:97-104 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/csharp.rs` and `rust/code_ast/src/elements/lang/python.rs` as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/csharp.rs:200` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1590 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1590-1597 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1379-1386 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1590` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) python/cocoindex/connectors/bigquery/_target.py:776 β€” python/cocoindex/connectors/bigquery/_target.py:776-783 | python/cocoindex/connectors/snowflake/_target.py:671-678 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `python/cocoindex/connectors/snowflake/_target.py:679` calls `cursor` and `python/cocoindex/connectors/bigquery/_target.py:784` 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 (8 lines × 2) python/cocoindex/connectors/falkordb/_target.py:412 β€” python/cocoindex/connectors/falkordb/_target.py:412-419 | python/cocoindex/connectors/neo4j/_target.py:476-483 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) examples/paper_metadata/main.py:165 β€” examples/paper_metadata/main.py:165-172 | examples/pdf_embedding/main.py:87-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.
D4 Β· Code Duplication Β· Edited copy of a member (9 corresponding lines) Β· Γ—15
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/surrealdb.rs:2371 β€” rust/sdk/cocoindex/src/connectors/surrealdb.rs:2371-2379 | rust/sdk/cocoindex/src/row_schema.rs:233-241 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) python/cocoindex/connectors/iggy/_source.py:84 β€” python/cocoindex/connectors/iggy/_source.py:84-93 | python/cocoindex/connectors/kafka/_source.py:83-91 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/core/src/inspect/db_inspect.rs:521 β€” rust/core/src/inspect/db_inspect.rs:521-529 | rust/core/src/inspect/db_inspect.rs:759-767 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/kafka.rs:383 β€” rust/sdk/cocoindex/src/connectors/kafka.rs:383-391 | rust/sdk/cocoindex/src/connectors/kafka.rs:400-408 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) python/cocoindex/_internal/data_dep.py:330 β€” python/cocoindex/_internal/data_dep.py:330-338 | REDACTED:264-272 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/py/src/component.rs:66 β€” rust/py/src/component.rs:66-74 | rust/py/src/component.rs:84-92 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/lancedb.rs:1753 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:1753-1761 | rust/sdk/cocoindex/src/cypher_graph.rs:1893-1901 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/resources/id.rs:92 β€” rust/sdk/cocoindex/src/resources/id.rs:92-100 | rust/sdk/cocoindex/src/resources/id.rs:151-159 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:1721 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1721-1729 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1495-1503 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/lancedb.rs:273 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:273-281 | rust/sdk/cocoindex/src/connectors/postgres.rs:183-191 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:477 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:477-485 | rust/sdk/cocoindex/src/connectors/kafka.rs:620-628 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/app.rs:427 β€” rust/sdk/cocoindex/src/app.rs:427-436 | rust/cli/src/inspect.rs:29-37 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs:1639 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1639-1650 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1406-1414 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:808 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:808-818 | rust/sdk/cocoindex/src/connectors/kafka.rs:1148-1156 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:259 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:259-267 | rust/sdk/cocoindex/src/connectors/kafka.rs:421-431 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 2) Β· Γ—15
  • Duplicated block (6 lines × 2) rust/code_ast/src/elements/lang/csharp.rs:17 β€” rust/code_ast/src/elements/lang/csharp.rs:17-22 | rust/code_ast/src/elements/lang/csharp.rs:216-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 (6 lines × 2) rust/sdk/cocoindex/src/connectors/surrealdb.rs:2372 β€” rust/sdk/cocoindex/src/connectors/surrealdb.rs:2372-2377 | rust/sdk/cocoindex/src/row_schema.rs:234-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 (6 lines × 2) rust/sdk/cocoindex_macros/src/lib.rs:1594 β€” rust/sdk/cocoindex_macros/src/lib.rs:1594-1599 | rust/sdk/cocoindex_macros/src/lib.rs:1713-1718 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex_macros/src/lib.rs:1594` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/azure_blob.rs:1025 β€” rust/sdk/cocoindex/src/connectors/azure_blob.rs:1025-1030 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1164-1169 β€” 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 `rust/sdk/cocoindex/src/connectors/azure_blob.rs:1025` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1170` calls `push` and `rust/sdk/cocoindex/src/connectors/azure_blob.rs:1031` does not β€” after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/iggy.rs:1126 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:1126-1131 | rust/sdk/cocoindex/src/connectors/kafka.rs:1280-1285 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/iggy.rs` and `rust/sdk/cocoindex/src/connectors/kafka.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. 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:165 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:165-170 | rust/sdk/cocoindex/src/connectors/azure_blob.rs:221-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 both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/lancedb.rs:768 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:768-773 | rust/sdk/cocoindex/src/connectors/sqlite.rs:639-644 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/lancedb.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/cypher_graph.rs:148 β€” rust/sdk/cocoindex/src/cypher_graph.rs:148-155 | rust/sdk/cocoindex/src/cypher_graph.rs:170-175 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/cypher_graph.rs:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (6 lines × 2) rust/code_ast/src/elements/lang/rust.rs:86 β€” rust/code_ast/src/elements/lang/rust.rs:86-91 | rust/code_ast/src/elements/lang/typescript.rs:67-72 β€” 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 `rust/code_ast/src/elements/lang/rust.rs:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) rust/sdk/cocoindex/src/connectors/doris.rs:1410 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1410-1415 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1455-1460 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 19 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/doris.rs:1410` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) python/cocoindex/connectors/iggy/_source.py:86 β€” python/cocoindex/connectors/iggy/_source.py:86-91 | python/cocoindex/connectors/kafka/_source.py:84-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 (6 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1426 β€” python/cocoindex/connectors/falkordb/_target.py:1426-1431 | python/cocoindex/connectors/neo4j/_target.py:1468-1473 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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 × 2) python/cocoindex/connectors/falkordb/_target.py:1631 β€” python/cocoindex/connectors/falkordb/_target.py:1631-1636 | python/cocoindex/connectors/neo4j/_target.py:1673-1678 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction β€” check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (6 lines × 2) python/cocoindex/connectors/iggy/_source.py:147 β€” python/cocoindex/connectors/iggy/_source.py:147-152 | python/cocoindex/connectors/kafka/_source.py:152-157 β€” 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) examples/patient_intake_extraction_baml/main.py:33 β€” examples/patient_intake_extraction_baml/main.py:33-38 | examples/patient_intake_extraction_dspy/main.py:72-77 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/patient_intake_extraction_dspy/main.py:80` calls `LM`, `configure` and `examples/patient_intake_extraction_baml/main.py:41` 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.
D4 Β· Code Duplication Β· Edited copy of a member (12 corresponding lines) Β· Γ—14
  • Edited copy of a member (12 corresponding lines) rust/sdk/cocoindex/src/connectors/azure_blob.rs:1024 β€” rust/sdk/cocoindex/src/connectors/azure_blob.rs:1024-1035 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1163-1175 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) rust/core/src/inspect/db_inspect.rs:493 β€” rust/core/src/inspect/db_inspect.rs:493-505 | rust/core/src/inspect/db_inspect.rs:731-742 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) rust/sdk/cocoindex/src/connectors/qdrant.rs:1087 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1087-1098 | rust/sdk/cocoindex/src/connectors/qdrant.rs:1109-1120 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) rust/py/src/live_component.rs:103 β€” rust/py/src/live_component.rs:103-114 | rust/py/src/live_component.rs:164-181 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:1785 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1785-1796 | rust/sdk/cocoindex/src/connectors/zvec.rs:65-78 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) python/cocoindex/connectors/iggy/_source.py:456 β€” python/cocoindex/connectors/iggy/_source.py:456-467 | python/cocoindex/connectors/kafka/_source.py:424-438 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) rust/sdk/cocoindex/src/cypher_graph.rs:102 β€” rust/sdk/cocoindex/src/cypher_graph.rs:102-123 | rust/sdk/cocoindex/src/cypher_graph.rs:127-138 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) rust/sdk/cocoindex/src/connectors/qdrant.rs:657 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:657-668 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:509-523 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:276 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:276-287 | rust/sdk/cocoindex/src/connectors/kafka.rs:442-453 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) python/cocoindex/connectors/neo4j/_cypher.py:313 β€” python/cocoindex/connectors/neo4j/_cypher.py:313-327 | python/cocoindex/connectors/falkordb/_cypher.py:222-233 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) rust/code_ast/src/elements/types.rs:73 β€” rust/code_ast/src/elements/types.rs:73-84 | rust/code_ast/src/view/lang.rs:515-529 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) examples/docs_to_knowledge_graph/main.py:66 β€” examples/docs_to_knowledge_graph/main.py:66-79 | examples/product_recommendation/main.py:56-67 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) examples/code_embedding_lancedb/main.py:150 β€” examples/code_embedding_lancedb/main.py:150-164 | examples/text_embedding_lancedb/main.py:136-147 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) examples/bigquery_target/main.py:98 β€” examples/bigquery_target/main.py:98-109 | examples/snowflake_target/main.py:97-108 β€” 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 Β· Duplicated block (12 lines × 2) Β· Γ—14
  • Duplicated block (12 lines × 2) rust/code_ast/src/elements/lang/cfamily.rs:107 β€” rust/code_ast/src/elements/lang/cfamily.rs:107-118 | rust/code_ast/src/elements/lang/rust.rs:49-60 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/cfamily.rs` and `rust/code_ast/src/elements/lang/rust.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/cfamily.rs:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) rust/py/src/app.rs:272 β€” rust/py/src/app.rs:272-283 | rust/py/src/app.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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `rust/py/src/app.rs:319` calls `detach`, `get_runtime`, `block_on` and `rust/py/src/app.rs:284` 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 lines × 2) rust/sdk/cocoindex/src/connectors/iggy.rs:404 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:404-415 | rust/sdk/cocoindex/src/connectors/kafka.rs:555-566 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/iggy.rs` and `rust/sdk/cocoindex/src/connectors/kafka.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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/iggy.rs:404` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:1779 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1779-1790 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1537-1548 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/postgres.rs:1779` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:1851 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1851-1862 | rust/sdk/cocoindex/src/sql_ident.rs:11-22 β€” 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) rust/sdk/cocoindex_macros/src/lib.rs:191 β€” rust/sdk/cocoindex_macros/src/lib.rs:191-202 | rust/sdk/cocoindex_macros/src/lib.rs:238-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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex_macros/src/lib.rs:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1612 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1612-1623 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1396-1407 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1612` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) REDACTED:918 β€” REDACTED:918-929 | REDACTED:1464-1475 β€” both copies are in the same file, so extract the block into 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) python/cocoindex/connectors/falkordb/_target.py:546 β€” python/cocoindex/connectors/falkordb/_target.py:546-557 | python/cocoindex/connectors/neo4j/_target.py:669-680 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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 (12 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1004 β€” python/cocoindex/connectors/falkordb/_target.py:1004-1015 | python/cocoindex/connectors/neo4j/_target.py:1123-1134 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/falkordb/_target.py:1004` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1439 β€” python/cocoindex/connectors/falkordb/_target.py:1439-1450 | python/cocoindex/connectors/neo4j/_target.py:1481-1492 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) python/cocoindex/connectors/bigquery/_target.py:958 β€” python/cocoindex/connectors/bigquery/_target.py:958-969 | python/cocoindex/connectors/snowflake/_target.py:863-874 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) python/cocoindex/connectors/bigquery/_target.py:981 β€” python/cocoindex/connectors/bigquery/_target.py:981-992 | python/cocoindex/connectors/snowflake/_target.py:886-897 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) examples/code_embedding_lancedb/main.py:168 β€” examples/code_embedding_lancedb/main.py:168-179 | examples/text_embedding_lancedb/main.py:151-162 β€” 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. 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.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 2) Β· Γ—14
  • Duplicated block (7 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:751 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:751-757 | rust/sdk/cocoindex/src/connectors/snowflake.rs:568-574 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) rust/sdk/cocoindex/src/connectors/doris.rs:1291 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1291-1297 | rust/sdk/cocoindex/src/connectors/sqlite.rs:981-987 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/doris.rs:1291` 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 (7 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:1749 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1749-1755 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1505-1511 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/postgres.rs:1749` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) rust/sdk/cocoindex_macros/src/lib.rs:1374 β€” rust/sdk/cocoindex_macros/src/lib.rs:1374-1380 | rust/sdk/cocoindex_macros/src/lib.rs:1426-1432 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex_macros/src/lib.rs:1374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1330 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1330-1336 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1167-1173 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1330` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:189 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:189-195 | rust/sdk/cocoindex/src/connectors/azure_blob.rs:248-254 β€” 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) rust/sdk/cocoindex/src/connectors/iggy.rs:364 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:364-370 | rust/sdk/cocoindex/src/connectors/kafka.rs:519-525 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/iggy.rs` and `rust/sdk/cocoindex/src/connectors/kafka.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. 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 × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:1558 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1558-1564 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1331-1337 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 218 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 × 2) rust/ops_text/src/pattern_matcher.rs:176 β€” rust/ops_text/src/pattern_matcher.rs:176-189 | rust/sdk/cocoindex/src/resources/file.rs:474-480 β€” 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) rust/sdk/cocoindex_macros/src/lib.rs:838 β€” rust/sdk/cocoindex_macros/src/lib.rs:838-845 | rust/sdk/cocoindex_macros/src/lib.rs:1878-1884 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex_macros/src/lib.rs:838` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The 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 (7 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:388 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:388-394 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:634-640 β€” 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 `rust/sdk/cocoindex/src/connectors/bigquery.rs:388` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) python/cocoindex/connectors/doris/_target.py:1201 β€” python/cocoindex/connectors/doris/_target.py:1201-1207 | python/cocoindex/connectors/sqlite/_target.py:895-902 β€” 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) python/cocoindex/connectors/falkordb/_target.py:809 β€” python/cocoindex/connectors/falkordb/_target.py:809-815 | python/cocoindex/connectors/neo4j/_target.py:928-934 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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 (7 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1779 β€” python/cocoindex/connectors/falkordb/_target.py:1779-1785 | python/cocoindex/connectors/neo4j/_target.py:1822-1828 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D2 Β· Cognitive Complexity Β· cocoindex Β· Γ—13
  • cocoindex::resources::fs::walk_files (cognitive 52) rust/sdk/cocoindex/src/resources/fs.rs:722 β€” cocoindex::resources::fs::walk_files has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (31 pts), match/switch 7 (17 pts), loops 2 (3 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.
  • cocoindex::resources::fs::apply_fs_actions (cognitive 33) rust/sdk/cocoindex/src/resources/fs.rs:1270 β€” cocoindex::resources::fs::apply_fs_actions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 9, loops 5, 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.
  • cocoindex::connectors::doris::apply_column_actions (cognitive 24) rust/sdk/cocoindex/src/connectors/doris.rs:1281 β€” cocoindex::connectors::doris::apply_column_actions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 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.
  • cocoindex::resources::file::brace_expand (cognitive 23) rust/sdk/cocoindex/src/resources/file.rs:521 β€” cocoindex::resources::file::brace_expand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), match/switch 2 (6 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.
  • cocoindex::connectors::gdrive::await_redirect (cognitive 21) rust/sdk/cocoindex/src/connectors/gdrive.rs:1571 β€” cocoindex::connectors::gdrive::await_redirect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (5 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.
  • cocoindex::connectors::surrealdb::define_table_statements (cognitive 21) rust/sdk/cocoindex/src/connectors/surrealdb.rs:1996 β€” cocoindex::connectors::surrealdb::define_table_statements has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 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.
  • cocoindex::connectors::doris::create_table_sql (cognitive 20) rust/sdk/cocoindex/src/connectors/doris.rs:1634 β€” cocoindex::connectors::doris::create_table_sql has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4, 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.
  • cocoindex::connectors::sqlite::sqlite_value (cognitive 20) rust/sdk/cocoindex/src/connectors/sqlite.rs:1442 β€” cocoindex::connectors::sqlite::sqlite_value has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 3 (5 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.
  • cocoindex::connectors::postgres::sql_text (cognitive 19) rust/sdk/cocoindex/src/connectors/postgres.rs:1670 β€” cocoindex::connectors::postgres::sql_text has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), match/switch 2 (4 pts), boolean chains 3 (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.
  • cocoindex::connectors::sqlite::apply_rows (cognitive 19) rust/sdk/cocoindex/src/connectors/sqlite.rs:1061 β€” cocoindex::connectors::sqlite::apply_rows has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 2, match/switch 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.
  • cocoindex::connectors::postgres::table_sink (cognitive 17) rust/sdk/cocoindex/src/connectors/postgres.rs:816 β€” cocoindex::connectors::postgres::table_sink has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 2, match/switch 1 (2 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.
  • cocoindex::connectors::sqlite::apply_column_actions (cognitive 17) rust/sdk/cocoindex/src/connectors/sqlite.rs:971 β€” cocoindex::connectors::sqlite::apply_column_actions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 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.
  • cocoindex::connectors::snowflake::delete_statement (cognitive 16) rust/sdk/cocoindex/src/connectors/snowflake.rs:1432 β€” cocoindex::connectors::snowflake::delete_statement has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 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.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 2) Β· Γ—13
  • Duplicated block (11 lines × 2) rust/code_ast/src/elements/lang/kotlin.rs:139 β€” rust/code_ast/src/elements/lang/kotlin.rs:139-149 | rust/code_ast/src/elements/lang/swift.rs:86-96 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/kotlin.rs` and `rust/code_ast/src/elements/lang/swift.rs` as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/kotlin.rs:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) rust/py/src/code.rs:313 β€” rust/py/src/code.rs:313-323 | rust/py/src/code.rs:368-378 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/py/src/code.rs:313` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) rust/sdk/cocoindex/src/connectors/iggy.rs:94 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:94-104 | rust/sdk/cocoindex/src/connectors/iggy.rs:660-670 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) rust/sdk/cocoindex/src/connectors/iggy.rs:352 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:352-362 | rust/sdk/cocoindex/src/connectors/kafka.rs:507-517 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/iggy.rs` and `rust/sdk/cocoindex/src/connectors/kafka.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. 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:1472 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1472-1482 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1218-1228 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 218 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) rust/sdk/cocoindex/src/cli/protocol.rs:139 β€” rust/sdk/cocoindex/src/cli/protocol.rs:139-149 | rust/sdk/cocoindex/src/stats.rs:39-49 β€” 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut std::fmt::Formatter<'_>` in one and `&mut fmt::Formatter<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1223 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1223-1233 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1063-1073 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1223` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) python/cocoindex/connectors/bigquery/_target.py:668 β€” python/cocoindex/connectors/bigquery/_target.py:668-678 | python/cocoindex/connectors/snowflake/_target.py:571-581 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/bigquery/_target.py:668` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1044 β€” python/cocoindex/connectors/falkordb/_target.py:1044-1054 | python/cocoindex/connectors/neo4j/_target.py:1163-1173 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1758 β€” python/cocoindex/connectors/falkordb/_target.py:1758-1768 | python/cocoindex/connectors/neo4j/_target.py:1801-1811 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) python/cocoindex/connectors/lancedb/_target.py:1365 β€” python/cocoindex/connectors/lancedb/_target.py:1365-1375 | python/cocoindex/connectors/postgres/_target.py:1544-1554 β€” 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) examples/code_embedding/main.py:96 β€” examples/code_embedding/main.py:96-106 | examples/code_embedding_lancedb/main.py:90-100 β€” 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `table` to `postgres.TableTarget[CodeEmbedding]` in one and `lancedb.TableTarget[CodeEmbedding]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) examples/discord_support_faq/seed_server.py:178 β€” examples/discord_support_faq/seed_server.py:178-188 | examples/discord_text_embedding/seed_server.py:231-241 β€” 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. 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.
D2 Β· Cognitive Complexity Β· cocoindex_core Β· Γ—12
  • cocoindex_core::engine::execution::pre_commit (cognitive 134) rust/core/src/engine/execution.rs:1161 β€” cocoindex_core::engine::execution::pre_commit has cognitive complexity 134 (threshold 15). Drivers by points: if/else 38 (78 pts), match/switch 8 (30 pts), loops 8 (20 pts), boolean chains 6 (nesting depth added 74). 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.
  • cocoindex_core::state_store::submit_session::reconcile_child_existence (cognitive 47) rust/core/src/state_store/submit_session.rs:593 β€” cocoindex_core::state_store::submit_session::reconcile_child_existence has cognitive complexity 47 (threshold 15). Drivers by points: if/else 7 (28 pts), loops 5 (11 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • cocoindex_core::engine::execution::submit (cognitive 46) rust/core/src/engine/execution.rs:1724 β€” cocoindex_core::engine::execution::submit has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 6 (12 pts), loops 6 (10 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.
  • cocoindex_core::engine::live_component::drain_task_body (cognitive 40) rust/core/src/engine/live_component.rs:1069 β€” cocoindex_core::engine::live_component::drain_task_body has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 3 (8 pts), loops 2 (3 pts), boolean chains 2 (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.
  • cocoindex_core::engine::execution::finalize_fn_call_memoization (cognitive 25) rust/core/src/engine/execution.rs:2296 β€” cocoindex_core::engine::execution::finalize_fn_call_memoization has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (8 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.
  • cocoindex_core::engine::progress_display::render_plain (cognitive 22) rust/core/src/engine/progress_display.rs:1205 β€” cocoindex_core::engine::progress_display::render_plain has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, 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.
  • cocoindex_core::engine::progress_display::status_line (cognitive 20) rust/core/src/engine/progress_display.rs:526 β€” cocoindex_core::engine::progress_display::status_line has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 3 (4 pts), 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.
  • cocoindex_core::engine::progress_display::show_progress_pty (cognitive 20) rust/core/src/engine/progress_display.rs:998 β€” cocoindex_core::engine::progress_display::show_progress_pty has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3, match/switch 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.
  • cocoindex_core::engine::execution::finalize_tracking_info (cognitive 18) rust/core/src/engine/execution.rs:577 β€” cocoindex_core::engine::execution::finalize_tracking_info has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 5 (6 pts), boolean chains 3 (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.
  • cocoindex_core::state_store::txn::for_each_prefix_through (cognitive 18) rust/core/src/state_store/txn.rs:150 β€” cocoindex_core::state_store::txn::for_each_prefix_through has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 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.
  • cocoindex_core::engine::execution::validate_open_descendants (cognitive 17) rust/core/src/engine/execution.rs:299 β€” cocoindex_core::engine::execution::validate_open_descendants has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 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.
  • cocoindex_core::engine::progress_display::block_lines (cognitive 17) rust/core/src/engine/progress_display.rs:623 β€” cocoindex_core::engine::progress_display::block_lines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 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.
D4 Β· Code Duplication Β· Edited copy of a member (11 corresponding lines) Β· Γ—11
  • Edited copy of a member (11 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:211 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:211-221 | rust/sdk/cocoindex/src/connectors/iggy.rs:231-241 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) rust/core/src/state_store/app_store.rs:575 β€” rust/core/src/state_store/app_store.rs:575-585 | rust/core/src/state_store/app_store.rs:616-626 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) rust/sdk/cocoindex/src/resources/file.rs:284 β€” rust/sdk/cocoindex/src/resources/file.rs:284-294 | rust/sdk/cocoindex/src/resources/file.rs:298-308 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) python/cocoindex/connectors/iggy/_source.py:121 β€” python/cocoindex/connectors/iggy/_source.py:121-131 | python/cocoindex/connectors/kafka/_source.py:123-134 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) rust/code_ast/src/elements/lang/csharp.rs:15 β€” rust/code_ast/src/elements/lang/csharp.rs:15-26 | rust/code_ast/src/elements/lang/kotlin.rs:182-192 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) rust/code_ast/src/view/lang.rs:128 β€” rust/code_ast/src/view/lang.rs:128-141 | rust/code_ast/src/view/lang.rs:172-182 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) rust/sdk/cocoindex/src/connectors/doris.rs:1251 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1251-1261 | rust/sdk/cocoindex/src/connectors/sqlite.rs:936-949 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) rust/sdk/cocoindex/src/connectors/turbopuffer.rs:791 β€” rust/sdk/cocoindex/src/connectors/turbopuffer.rs:791-803 | rust/sdk/cocoindex/src/connectors/gdrive.rs:419-429 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) rust/sdk/cocoindex/src/live_component.rs:221 β€” rust/sdk/cocoindex/src/live_component.rs:221-231 | rust/sdk/cocoindex/src/live_component.rs:235-245 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) rust/core/src/engine/function.rs:121 β€” rust/core/src/engine/function.rs:121-131 | rust/core/src/engine/function.rs:138-148 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) python/cocoindex/connectors/falkordb/_cypher.py:72 β€” python/cocoindex/connectors/falkordb/_cypher.py:72-83 | python/cocoindex/connectors/neo4j/_cypher.py:118-128 β€” 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 Β· Duplicated block (14 lines × 2) Β· Γ—11
  • Duplicated block (14 lines × 2) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:519 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:519-532 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1356-1369 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/amazon_s3.rs` and `rust/sdk/cocoindex/src/connectors/oci_object_storage.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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) rust/sdk/cocoindex/src/connectors/iggy.rs:1236 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:1236-1249 | rust/sdk/cocoindex/src/connectors/kafka.rs:1374-1387 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/iggy.rs` and `rust/sdk/cocoindex/src/connectors/kafka.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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/iggy.rs:1236` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) rust/code_ast/src/elements/lang/csharp.rs:267 β€” rust/code_ast/src/elements/lang/csharp.rs:267-281 | rust/code_ast/src/elements/lang/java.rs:196-209 β€” 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 `rust/code_ast/src/elements/lang/csharp.rs:267` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) rust/code_ast/src/elements/lang/kotlin.rs:222 β€” rust/code_ast/src/elements/lang/kotlin.rs:222-235 | rust/code_ast/src/elements/lang/swift.rs:175-188 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/kotlin.rs` and `rust/code_ast/src/elements/lang/swift.rs` as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/kotlin.rs:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) python/cocoindex/_internal/api.py:267 β€” python/cocoindex/_internal/api.py:267-280 | python/cocoindex/_internal/api.py:387-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 (14 lines × 2) python/cocoindex/connectors/bigquery/_target.py:161 β€” python/cocoindex/connectors/bigquery/_target.py:161-174 | python/cocoindex/connectors/snowflake/_target.py:154-167 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/bigquery/_target.py:161` 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 first that the copies are not typed on the same thing: the declarations holding them bind `column_overrides` to `dict[str, BigQueryType] | None` in one and `dict[str, SnowflakeType] | None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) python/cocoindex/connectors/doris/_target.py:385 β€” python/cocoindex/connectors/doris/_target.py:385-398 | python/cocoindex/connectors/lancedb/_target.py:294-307 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/doris/_target.py:385` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) python/cocoindex/connectors/falkordb/_target.py:327 β€” python/cocoindex/connectors/falkordb/_target.py:327-340 | python/cocoindex/connectors/neo4j/_target.py:390-403 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/falkordb/_target.py:327` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1849 β€” python/cocoindex/connectors/falkordb/_target.py:1849-1862 | python/cocoindex/connectors/neo4j/_target.py:1893-1906 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1929 β€” python/cocoindex/connectors/falkordb/_target.py:1929-1942 | python/cocoindex/connectors/neo4j/_target.py:1973-1986 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) python/cocoindex/connectors/qdrant/_target.py:590 β€” python/cocoindex/connectors/qdrant/_target.py:590-607 | python/cocoindex/connectors/turbopuffer/_target.py:527-540 β€” 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 2) Β· Γ—11
  • Duplicated block (10 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1075 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1075-1084 | rust/sdk/cocoindex/src/connectors/snowflake.rs:885-894 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1075` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) rust/sdk/cocoindex/src/live_component.rs:257 β€” rust/sdk/cocoindex/src/live_component.rs:257-266 | rust/sdk/cocoindex/src/live_component.rs:296-305 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/live_component.rs:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1454 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1454-1463 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1283-1292 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/sdk/cocoindex/src/connectors/snowflake.rs:1280` calls `is_empty`, `Ok` and `rust/sdk/cocoindex/src/connectors/bigquery.rs:1453` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1625 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1625-1634 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1409-1418 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1625` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:854 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:854-863 | rust/sdk/cocoindex/src/connectors/sqlite.rs:768-777 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/postgres.rs:854` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:1170 β€” REDACTED:1170-1179 | REDACTED:1975-1984 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1170` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) python/cocoindex/connectors/falkordb/_target.py:825 β€” python/cocoindex/connectors/falkordb/_target.py:825-834 | python/cocoindex/connectors/neo4j/_target.py:944-953 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) python/cocoindex/connectors/falkordb/_target.py:387 β€” python/cocoindex/connectors/falkordb/_target.py:387-396 | python/cocoindex/connectors/neo4j/_target.py:451-460 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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 (10 lines × 2) python/cocoindex/connectors/postgres/_target.py:83 β€” python/cocoindex/connectors/postgres/_target.py:83-92 | python/cocoindex/connectors/sqlite/_target.py:153-162 β€” 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) examples/bigquery_target/main.py:100 β€” examples/bigquery_target/main.py:100-109 | examples/snowflake_target/main.py:99-108 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples/bigquery_target/main.py:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/image_search/pipeline.py:112 β€” examples/image_search/pipeline.py:112-123 | examples/pdf_elements_embedding/main.py:242-251 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples/image_search/pipeline.py:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 2) Β· Γ—11
  • Duplicated block (9 lines × 2) rust/py/src/code.rs:201 β€” rust/py/src/code.rs:201-209 | rust/py/src/code.rs:386-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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/py/src/code.rs:201` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) rust/sdk/cocoindex/src/connectors/doris.rs:931 β€” rust/sdk/cocoindex/src/connectors/doris.rs:931-939 | rust/sdk/cocoindex/src/connectors/sqlite.rs:583-591 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/doris.rs:931` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) rust/sdk/cocoindex/src/connectors/lancedb.rs:2167 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:2167-2175 | rust/sdk/cocoindex/src/connectors/lancedb.rs:2180-2188 β€” both copies are in the same file, so extract the block into 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) rust/code_ast/src/elements/lang/java.rs:81 β€” rust/code_ast/src/elements/lang/java.rs:81-89 | rust/code_ast/src/elements/lang/kotlin.rs:27-35 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/java.rs:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:740 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:740-748 | rust/sdk/cocoindex/src/connectors/snowflake.rs:557-565 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1636 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1636-1644 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1420-1428 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1636` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) python/cocoindex/connectors/bigquery/_target.py:333 β€” python/cocoindex/connectors/bigquery/_target.py:333-341 | python/cocoindex/connectors/snowflake/_target.py:315-323 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1889 β€” python/cocoindex/connectors/falkordb/_target.py:1889-1897 | python/cocoindex/connectors/neo4j/_target.py:1933-1941 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1908 β€” python/cocoindex/connectors/falkordb/_target.py:1908-1916 | python/cocoindex/connectors/neo4j/_target.py:1952-1960 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) examples/code_embedding_lancedb/main.py:150 β€” examples/code_embedding_lancedb/main.py:150-161 | examples/text_embedding_lancedb/main.py:136-144 β€” 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) examples/image_search/pipeline.py:93 β€” examples/image_search/pipeline.py:93-101 | examples/image_search_colpali/pipeline.py:108-116 β€” 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.
D15 Β· Churn × Complexity Hotspots Β· Hotspot Β· Γ—10
  • Hotspot: rust/core/src/engine/execution.rs rust/core/src/engine/execution.rs:1161 β€” rust/core/src/engine/execution.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in cocoindex_core::engine::execution::pre_commit at line 1161. 10 of those changes were fix/bug commits, and the other 15 changed it for other reasons β€” this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β€” a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/core/src/engine/execution.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: rust/core/src/engine/component.rs rust/core/src/engine/component.rs:1291 β€” rust/core/src/engine/component.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in Component::execute_once at line 1291. 11 of those changes were fix/bug commits, and the other 12 changed it for other reasons β€” this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β€” a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/core/src/engine/component.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: rust/sdk/cocoindex_macros/src/lib.rs rust/sdk/cocoindex_macros/src/lib.rs:461 β€” rust/sdk/cocoindex_macros/src/lib.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in FunctionArgs::parse at line 461. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/sdk/cocoindex_macros/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.
  • Hotspot: REDACTED REDACTED:1563 β€” REDACTED changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in AsyncFunction.__call__ at line 1563. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons β€” this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β€” a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- REDACTED`: 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: rust/sdk/cocoindex/src/connectors/lancedb.rs rust/sdk/cocoindex/src/connectors/lancedb.rs:1408 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in cocoindex::connectors::lancedb::build_record_batch at line 1408. 4 of those changes were fix/bug commits, and the other 7 changed it for other reasons β€” this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β€” a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/sdk/cocoindex/src/connectors/lancedb.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: rust/sdk/cocoindex/src/resources/fs.rs rust/sdk/cocoindex/src/resources/fs.rs:1270 β€” rust/sdk/cocoindex/src/resources/fs.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in cocoindex::resources::fs::apply_fs_actions at line 1270. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/sdk/cocoindex/src/resources/fs.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: rust/sdk/cocoindex/src/connectors/surrealdb.rs rust/sdk/cocoindex/src/connectors/surrealdb.rs:1541 β€” rust/sdk/cocoindex/src/connectors/surrealdb.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in TableHandler::reconcile at line 1541. 4 of those changes were fix/bug commits, and the other 6 changed it for other reasons β€” this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β€” a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/sdk/cocoindex/src/connectors/surrealdb.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: rust/sdk/cocoindex/src/connectors/postgres.rs rust/sdk/cocoindex/src/connectors/postgres.rs:1670 β€” rust/sdk/cocoindex/src/connectors/postgres.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in cocoindex::connectors::postgres::sql_text at line 1670. 3 of those changes were fix/bug commits, and the other 6 changed it for other reasons β€” this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β€” a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/sdk/cocoindex/src/connectors/postgres.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: rust/sdk/cocoindex/src/connectors/sqlite.rs rust/sdk/cocoindex/src/connectors/sqlite.rs:1442 β€” rust/sdk/cocoindex/src/connectors/sqlite.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in cocoindex::connectors::sqlite::sqlite_value at line 1442. 3 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/sdk/cocoindex/src/connectors/sqlite.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: examples/cocoindex_agents/cocoindex_agents/session.py examples/cocoindex_agents/cocoindex_agents/session.py:175 β€” examples/cocoindex_agents/cocoindex_agents/session.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in _ReplayState.align at line 175. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- examples/cocoindex_agents/cocoindex_agents/session.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
D15 Β· Churn × Complexity Hotspots Β· Repeated repair Β· Γ—10
  • Repeated repair: rust/sdk/cocoindex/src/connectors/doris.rs rust/sdk/cocoindex/src/connectors/doris.rs:474 β€” rust/sdk/cocoindex/src/connectors/doris.rs changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is cocoindex::connectors::doris::doris_column_def at line 474), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(rust-sdk): batched callers check their deadline; reject empty entity embeddings (#2789)”; β€œfix(rust-sdk): redact secrets in Debug output; Debug on connector handles (#2777)”; β€œfix(rust-sdk): local-files entries change kind; Doris validates its database name (#2775)”; β€œfix(rust-sdk): no panics on server responses and out-of-range settings (#2766)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/sdk/cocoindex/src/connectors/doris.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: python/cocoindex/ops/litellm.py python/cocoindex/ops/litellm.py:388 β€” python/cocoindex/ops/litellm.py changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is LiteLLMEmbedder.__init__ at line 388), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(litellm): do not retry an import error litellm wraps as a connection error (#2685)”; β€œfix(litellm): support encoding_format="base64" (#2455)”; β€œfix(ops): LiteLLMEmbedder sends media-like text as text and stops retrying requests litellm refuses to build”; β€œfix(litellm): make embedding timeouts terminal, add timeout param (#2394)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- python/cocoindex/ops/litellm.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: python/cocoindex/connectors/valkey/_target.py python/cocoindex/connectors/valkey/_target.py:338 β€” python/cocoindex/connectors/valkey/_target.py changed 7 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 _DocumentHandler.reconcile at line 338), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(valkey): reject the reserved field name `vector` (#2606)”; β€œci: gate `ruff check` and clippy in pre-commit, and fix their findings (#2540)”; β€œfix(valkey): inject CocoIndex library name into server's CLIENT LIST (#2443)”; β€œfix(valkey): purge document hashes when an index is deleted (#2419)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- python/cocoindex/connectors/valkey/_target.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: python/cocoindex/_internal/component_ctx.py python/cocoindex/_internal/component_ctx.py:367 β€” python/cocoindex/_internal/component_ctx.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is component_ctx._enter_component_context at line 367), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(progress): keep a record of every failure, and report it honestly (#2744)”; β€œfix(progress): fix the Rust CLI build; review fixes for #2717 (#2731)”; β€œfix(core): scoped exception handlers see LiveMap mount_each items (#2478)”; β€œfix: preserve typed Python exceptions in component exception handlers (#2383)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- python/cocoindex/_internal/component_ctx.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: python/cocoindex/_internal/live_component.py python/cocoindex/_internal/live_component.py:322 β€” python/cocoindex/_internal/live_component.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is LiveComponentOperator.update at line 322), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œrevert: sliced execution (#2738) (#2741)”; β€œfix(core): scoped exception handlers see LiveMap mount_each items (#2478)”; β€œfix: preserve typed Python exceptions in component exception handlers (#2383)”; β€œfix(core): track component activity explicitly instead of by reference count (#2385)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- python/cocoindex/_internal/live_component.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: rust/sdk/cocoindex/src/connectors/falkordb.rs rust/sdk/cocoindex/src/connectors/falkordb.rs:80 β€” rust/sdk/cocoindex/src/connectors/falkordb.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is Graph::execute_with_params at line 80), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(rust-sdk): redact secrets in Debug output; Debug on connector handles (#2777)”; β€œfix(sdk): App::drop_state reverts root-provider targets via static root providers (#2512)”; β€œfix(graph): destroy Neo4j/FalkorDB tables with their contents on drop and rebuild (#2498)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- rust/sdk/cocoindex/src/connectors/falkordb.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: python/cocoindex/_internal/environment.py python/cocoindex/_internal/environment.py:554 β€” python/cocoindex/_internal/environment.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is environment._shutdown_background_loop_at_exit at line 554), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(runtime): release retained app resources at stop (#2425)”; β€œfix(env): start background-loop executor workers in an empty context (#2499)”; β€œfix(env): wait for the background loop to run before handing it out (#2490)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- python/cocoindex/_internal/environment.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: python/cocoindex/connectors/falkordb/_cypher.py python/cocoindex/connectors/falkordb/_cypher.py:110 β€” python/cocoindex/connectors/falkordb/_cypher.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is _cypher.build_relationship_upsert at line 110), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(graph): drop a node table's vector indexes with the table (#2618)”; β€œfix(graph): move an edge whose endpoints change, keep a renamed vector index (#2611)”; β€œfix(graph): destroy Neo4j/FalkorDB tables with their contents on drop and rebuild (#2498)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- python/cocoindex/connectors/falkordb/_cypher.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: python/cocoindex/connectors/neo4j/_cypher.py python/cocoindex/connectors/neo4j/_cypher.py:156 β€” python/cocoindex/connectors/neo4j/_cypher.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is _cypher.build_relationship_upsert at line 156), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(graph): drop a node table's vector indexes with the table (#2618)”; β€œfix(graph): move an edge whose endpoints change, keep a renamed vector index (#2611)”; β€œfix(graph): destroy Neo4j/FalkorDB tables with their contents on drop and rebuild (#2498)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- python/cocoindex/connectors/neo4j/_cypher.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: python/cocoindex/connectorkits/async_adapters.py python/cocoindex/connectorkits/async_adapters.py:36 β€” python/cocoindex/connectorkits/async_adapters.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is async_adapters.sync_to_async_iter at line 36), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(connectorkits): prevent iterator cancellation from hanging shutdown (#2619)”; β€œfix(ci): repair checks broken by #2374 (#2377)”; β€œfix: avoid blocking event loop during iterator cleanup (#2374)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:31:26 +00:00' --until='2026-11-14 00:31:26 +00:00' --full-history --no-merges -- python/cocoindex/connectorkits/async_adapters.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β€” a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 Β· God Classes Β· FunctionTooLong Β· Γ—10
  • FunctionTooLong: cocoindex_core::engine::execution::pre_commit rust/core/src/engine/execution.rs:1161 β€” FunctionTooLong β€” cocoindex_core::engine::execution::pre_commit runs 313 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 213 over it, 3.13× 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: cocoindex_core::engine::execution::submit rust/core/src/engine/execution.rs:1724 β€” FunctionTooLong β€” cocoindex_core::engine::execution::submit runs 234 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 134 over it, 2.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.
  • FunctionTooLong: cocoindex_macros::function rust/sdk/cocoindex_macros/src/lib.rs:1255 β€” FunctionTooLong β€” cocoindex_macros::function runs 141 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 41 over it, 1.41× 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: cocoindex_py::core_module rust/py/src/lib.rs:28 β€” FunctionTooLong β€” cocoindex_py::core_module runs 131 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 31 over it, 1.31× 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: cocoindex::connectors::lancedb::build_record_batch rust/sdk/cocoindex/src/connectors/lancedb.rs:1408 β€” FunctionTooLong β€” cocoindex::connectors::lancedb::build_record_batch runs 131 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 31 over it, 1.31× 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: cocoindex_core::state_store::submit_session::reconcile_child_existence rust/core/src/state_store/submit_session.rs:593 β€” FunctionTooLong β€” cocoindex_core::state_store::submit_session::reconcile_child_existence runs 130 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 30 over it, 1.30× 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: cocoindex_cli::child::run rust/cli/src/child.rs:126 β€” FunctionTooLong β€” cocoindex_cli::child::run runs 128 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 28 over it, 1.28× 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: cocoindex_macros::expand_batching_function rust/sdk/cocoindex_macros/src/lib.rs:1024 β€” FunctionTooLong β€” cocoindex_macros::expand_batching_function runs 113 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 13 over it, 1.13× 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: cocoindex_macros::memo_input_enum_bodies rust/sdk/cocoindex_macros/src/lib.rs:156 β€” FunctionTooLong β€” cocoindex_macros::memo_input_enum_bodies runs 112 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 12 over it, 1.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: cocoindex_code_ast::view::lang::classify rust/code_ast/src/view/lang.rs:729 β€” FunctionTooLong β€” cocoindex_code_ast::view::lang::classify runs 109 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 9 over it, 1.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.
D4 Β· Code Duplication Β· Edited copy of a member (16 corresponding lines) Β· Γ—10
  • Edited copy of a member (16 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs:1775 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1775-1790 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1533-1548 β€” 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) rust/code_ast/src/elements/lang/java.rs:76 β€” rust/code_ast/src/elements/lang/java.rs:76-91 | rust/code_ast/src/elements/lang/kotlin.rs:22-40 β€” 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) rust/core/src/engine/target_state.rs:777 β€” rust/core/src/engine/target_state.rs:777-794 | rust/core/src/engine/target_state.rs:800-815 β€” 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) rust/sdk/cocoindex/src/connectors/qdrant.rs:1135 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1135-1151 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:773-788 β€” 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) rust/core/src/engine/progress_display.rs:218 β€” rust/core/src/engine/progress_display.rs:218-234 | rust/core/src/engine/progress_display.rs:238-253 β€” 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) rust/py/src/target_state.rs:156 β€” rust/py/src/target_state.rs:156-171 | rust/py/src/target_state.rs:179-194 β€” 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) rust/sdk/cocoindex/src/resources/live_map.rs:348 β€” rust/sdk/cocoindex/src/resources/live_map.rs:348-363 | rust/sdk/cocoindex/src/resources/live_map.rs:396-418 β€” 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) python/cocoindex/connectors/oci_object_storage/_source.py:185 β€” python/cocoindex/connectors/oci_object_storage/_source.py:185-200 | python/cocoindex/connectors/oci_object_storage/_source.py:619-643 β€” 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) rust/core/src/engine/component.rs:966 β€” rust/core/src/engine/component.rs:966-981 | rust/core/src/engine/component.rs:990-1005 β€” 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) examples/bigquery_target/main.py:114 β€” examples/bigquery_target/main.py:114-129 | examples/snowflake_target/main.py:113-128 β€” 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.
D1 Β· Cyclomatic Complexity Β· cocoindex Β· Γ—7
  • cocoindex::resources::fs::apply_fs_actions (cyclomatic 27) rust/sdk/cocoindex/src/resources/fs.rs:1270 β€” cocoindex::resources::fs::apply_fs_actions 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.
  • cocoindex::resources::fs::walk_files (cyclomatic 23) rust/sdk/cocoindex/src/resources/fs.rs:722 β€” cocoindex::resources::fs::walk_files 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.
  • cocoindex::connectors::lancedb::build_record_batch (cyclomatic 20) rust/sdk/cocoindex/src/connectors/lancedb.rs:1408 β€” cocoindex::connectors::lancedb::build_record_batch 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.
  • cocoindex::connectors::postgres::postgres_column_def (cyclomatic 20) rust/sdk/cocoindex/src/connectors/postgres.rs:255 β€” cocoindex::connectors::postgres::postgres_column_def 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.
  • cocoindex::connectors::postgres::sql_text (cyclomatic 18) rust/sdk/cocoindex/src/connectors/postgres.rs:1670 β€” cocoindex::connectors::postgres::sql_text 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.
  • cocoindex::connectors::sqlite::sqlite_value (cyclomatic 17) rust/sdk/cocoindex/src/connectors/sqlite.rs:1442 β€” cocoindex::connectors::sqlite::sqlite_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.
  • cocoindex::resources::file::brace_expand (cyclomatic 16) rust/sdk/cocoindex/src/resources/file.rs:521 β€” cocoindex::resources::file::brace_expand 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.
D4 Β· Code Duplication Β· Edited copy of a member (7 corresponding lines) Β· Γ—7
  • Edited copy of a member (7 corresponding lines) rust/sdk/cocoindex/src/cypher_graph.rs:841 β€” rust/sdk/cocoindex/src/cypher_graph.rs:841-847 | rust/sdk/cocoindex/src/cypher_graph.rs:855-861 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:1125 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:1125-1131 | rust/sdk/cocoindex/src/connectors/kafka.rs:1279-1285 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) rust/code_match/src/matcher.rs:184 β€” rust/code_match/src/matcher.rs:184-190 | rust/code_match/src/prefilter.rs:218-224 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) rust/py/src/target_state.rs:574 β€” rust/py/src/target_state.rs:574-580 | rust/sdk/cocoindex/src/target_state.rs:145-151 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) rust/py/src/code.rs:107 β€” rust/py/src/code.rs:107-113 | rust/sdk/cocoindex/src/ops/text.rs:143-149 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) rust/sdk/cocoindex/src/connectors/gdrive.rs:1995 β€” rust/sdk/cocoindex/src/connectors/gdrive.rs:1995-2002 | rust/sdk/cocoindex/src/resources/fs.rs:51-57 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:177 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:177-183 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:361-370 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (10 corresponding lines) Β· Γ—7
  • Edited copy of a member (10 corresponding lines) rust/py/src/rwlock.rs:75 β€” rust/py/src/rwlock.rs:75-84 | rust/py/src/rwlock.rs:128-137 β€” These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) rust/sdk/cocoindex/src/connectors/lancedb.rs:248 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:248-257 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:148-160 β€” These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) rust/core/src/engine/live_component.rs:387 β€” rust/core/src/engine/live_component.rs:387-396 | rust/core/src/engine/live_component.rs:401-410 β€” These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) python/cocoindex/connectors/iggy/_source.py:100 β€” python/cocoindex/connectors/iggy/_source.py:100-109 | python/cocoindex/connectors/kafka/_source.py:98-111 β€” These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) python/cocoindex/connectors/bigquery/_target.py:759 β€” python/cocoindex/connectors/bigquery/_target.py:759-768 | python/cocoindex/connectors/snowflake/_target.py:654-663 β€” These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) rust/cli/src/progress.rs:32 β€” rust/cli/src/progress.rs:32-41 | rust/sdk/cocoindex/src/cli/protocol.rs:91-100 β€” These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) examples/discord_support_faq/seed_server.py:218 β€” examples/discord_support_faq/seed_server.py:218-228 | examples/discord_text_embedding/seed_server.py:245-254 β€” 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 (5 corresponding lines) Β· Γ—7
  • Edited copy of a member (5 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:1213 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:1213-1217 | rust/sdk/cocoindex/src/connectors/kafka.rs:1340-1344 β€” These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) python/cocoindex/connectors/falkordb/_cypher.py:185 β€” python/cocoindex/connectors/falkordb/_cypher.py:185-189 | python/cocoindex/connectors/neo4j/_cypher.py:233-243 β€” These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) REDACTED:45 β€” REDACTED:45-50 | REDACTED:69-73 β€” These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) python/cocoindex/connectors/amazon_s3/_source.py:286 β€” python/cocoindex/connectors/amazon_s3/_source.py:286-290 | python/cocoindex/connectors/azure_blob/_source.py:264-268 β€” These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) rust/sdk/cocoindex/src/connectors/doris.rs:406 β€” rust/sdk/cocoindex/src/connectors/doris.rs:406-410 | rust/sdk/cocoindex/src/connectors/sqlite.rs:251-255 β€” These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) examples/image_search/pipeline.py:62 β€” examples/image_search/pipeline.py:62-66 | examples/pdf_elements_embedding/main.py:145-149 β€” These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) examples/image_search_colpali/pipeline.py:56 β€” examples/image_search_colpali/pipeline.py:56-61 | examples/multi_format_indexing/main.py:67-71 β€” These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 Β· Cognitive Complexity Β· TableHandler Β· Γ—6
  • TableHandler::reconcile (cognitive 44) rust/sdk/cocoindex/src/connectors/surrealdb.rs:1541 β€” TableHandler::reconcile has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 2 (8 pts), boolean chains 6, match/switch 1 (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.
  • TableHandler::reconcile (cognitive 30) rust/sdk/cocoindex/src/connectors/postgres.rs:705 β€” TableHandler::reconcile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 1 (4 pts), boolean chains 2, 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.
  • TableHandler::reconcile (cognitive 18) rust/sdk/cocoindex/src/connectors/doris.rs:1027 β€” TableHandler::reconcile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (3 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.
  • TableHandler::reconcile (cognitive 17) rust/sdk/cocoindex/src/connectors/bigquery.rs:1138 β€” TableHandler::reconcile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), boolean chains 1, 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.
  • TableHandler::reconcile (cognitive 17) rust/sdk/cocoindex/src/connectors/snowflake.rs:948 β€” TableHandler::reconcile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), boolean chains 1, 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.
  • TableHandler::reconcile (cognitive 17) rust/sdk/cocoindex/src/connectors/sqlite.rs:673 β€” TableHandler::reconcile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), boolean chains 1, 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.
D4 Β· Code Duplication Β· Edited copy of a member (21 corresponding lines) Β· Γ—6
  • Edited copy of a member (21 corresponding lines) rust/code_ast/src/view/lang.rs:533 β€” rust/code_ast/src/view/lang.rs:533-553 | rust/code_ast/src/view/lang.rs:557-578 β€” 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) python/cocoindex/connectors/qdrant/_target.py:303 β€” python/cocoindex/connectors/qdrant/_target.py:303-323 | python/cocoindex/connectors/zvec/_target.py:686-708 β€” 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) python/cocoindex/connectors/bigquery/_target.py:219 β€” python/cocoindex/connectors/bigquery/_target.py:219-239 | python/cocoindex/connectors/snowflake/_target.py:212-232 β€” 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) python/cocoindex/connectors/postgres/_target.py:870 β€” python/cocoindex/connectors/postgres/_target.py:870-890 | python/cocoindex/connectors/sqlite/_target.py:453-474 β€” 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) examples/cocoindex_agents/cocoindex_agents/tools/agents.py:180 β€” examples/cocoindex_agents/cocoindex_agents/tools/agents.py:180-200 | examples/cocoindex_agents/cocoindex_agents/tools/agents.py:251-275 β€” 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) examples/conversation_to_knowledge/conv_knowledge/app.py:87 β€” examples/conversation_to_knowledge/conv_knowledge/app.py:87-110 | examples/meeting_notes_graph_surrealdb/main.py:76-96 β€” 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 (15 corresponding lines) Β· Γ—6
  • Edited copy of a member (15 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:450 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:450-464 | rust/sdk/cocoindex/src/connectors/snowflake.rs:415-433 β€” 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) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:197 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:197-211 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:384-403 β€” 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) python/cocoindex/connectors/doris/_target.py:524 β€” python/cocoindex/connectors/doris/_target.py:524-538 | python/cocoindex/connectors/doris/_target.py:542-557 β€” 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) rust/code_match/src/config.rs:333 β€” rust/code_match/src/config.rs:333-347 | rust/code_match/src/config.rs:404-419 β€” 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) rust/py/src/code.rs:153 β€” rust/py/src/code.rs:153-167 | rust/sdk/cocoindex/src/ops/code.rs:141-155 β€” 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) rust/sdk/cocoindex/src/connectors/azure_blob.rs:155 β€” rust/sdk/cocoindex/src/connectors/azure_blob.rs:155-174 | rust/sdk/cocoindex/src/connectors/amazon_s3.rs:108-122 β€” 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 Β· Edited copy of a member (13 corresponding lines) Β· Γ—6
  • Edited copy of a member (13 corresponding lines) rust/sdk/cocoindex/src/connectors/zvec.rs:1534 β€” rust/sdk/cocoindex/src/connectors/zvec.rs:1534-1546 | rust/sdk/cocoindex/src/connectors/zvec.rs:1574-1586 β€” 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) rust/sdk/cocoindex/src/connectors/iggy.rs:185 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:185-200 | rust/sdk/cocoindex/src/connectors/kafka.rs:361-373 β€” 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) rust/sdk/cocoindex_macros/src/lib.rs:2167 β€” rust/sdk/cocoindex_macros/src/lib.rs:2167-2182 | rust/sdk/cocoindex_macros/src/lib.rs:2241-2253 β€” 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) rust/utils/src/error.rs:98 β€” rust/utils/src/error.rs:98-111 | rust/utils/src/error.rs:114-126 β€” 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) rust/sdk/cocoindex/src/ctx.rs:947 β€” rust/sdk/cocoindex/src/ctx.rs:947-959 | rust/sdk/cocoindex/src/ctx.rs:966-978 β€” 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) examples/discord_support_faq/seed_server.py:176 β€” examples/discord_support_faq/seed_server.py:176-188 | examples/discord_text_embedding/seed_server.py:225-241 β€” 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.
D17 Β· Explicit Debt Β· TodoComment Β· Γ—5
  • TodoComment rust/core/src/state/db_schema.rs:579 β€” // TODO: Add a generation, to avoid race conditions during deletion, β€” 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 rust/core/src/engine/app.rs:99 β€” // TODO: This database initialization logic should happen lazily on first call to `update()`. β€” 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 rust/core/src/engine/component.rs:66 β€” // TODO: Add method to expose function info and arguments, for tracing purpose & no-change detection. β€” 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 rust/core/src/engine/target_state.rs:128 β€” // TODO: Add method to expose function info and arguments, for tracing purpose & no-change detection. β€” 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 rust/core/src/engine/component.rs:1154 β€” // TODO: Skip building and reuse cached result if the component is already built and up to date. β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 Β· Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) Β· Γ—5
  • Members sharing a duplicated core (4 members, 50+ identical tokens) rust/code_ast/src/elements/lang/csharp.rs:235 β€” rust/code_ast/src/elements/lang/csharp.rs:235-310 | rust/code_ast/src/elements/lang/java.rs:167-227 | rust/code_ast/src/elements/lang/python.rs:171-223 | rust/code_ast/src/elements/lang/swift.rs:147-197 β€” 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) rust/code_ast/src/elements/lang/go.rs:92 β€” rust/code_ast/src/elements/lang/go.rs:92-145 | rust/code_ast/src/elements/lang/java.rs:102-163 | rust/code_ast/src/elements/lang/kotlin.rs:138-178 | rust/code_ast/src/elements/lang/swift.rs:85-133 β€” 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) rust/sdk/cocoindex/src/connectors/bigquery.rs:1144 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1144-1208 | rust/sdk/cocoindex/src/connectors/doris.rs:1033-1104 | rust/sdk/cocoindex/src/connectors/snowflake.rs:954-1018 | rust/sdk/cocoindex/src/connectors/sqlite.rs:679-751 β€” 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) rust/sdk/cocoindex/src/connectors/bigquery.rs:1702 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1702-1719 | rust/sdk/cocoindex/src/connectors/postgres.rs:1584-1601 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1476-1493 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1350-1368 β€” 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) rust/sdk/cocoindex/src/connectors/doris.rs:1033 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1033-1104 | rust/sdk/cocoindex/src/connectors/postgres.rs:711-813 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1547-1648 | rust/sdk/cocoindex/src/connectors/valkey.rs:773-829 β€” These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below β€” it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain β€” factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 Β· Code Duplication Β· Edited copy of a member (23 corresponding lines) Β· Γ—5
  • Edited copy of a member (23 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:1453 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1453-1475 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1279-1310 β€” 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.
  • Edited copy of a member (23 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:605 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:605-633 | rust/sdk/cocoindex/src/connectors/kafka.rs:894-916 β€” 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.
  • Edited copy of a member (23 corresponding lines) rust/sdk/cocoindex/src/connectors/surrealdb.rs:2385 β€” rust/sdk/cocoindex/src/connectors/surrealdb.rs:2385-2408 | rust/sdk/cocoindex/src/cypher_graph.rs:1843-1865 β€” 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.
  • Edited copy of a member (23 corresponding lines) examples/image_search/pipeline.py:106 β€” examples/image_search/pipeline.py:106-128 | examples/pdf_elements_embedding/main.py:231-255 β€” 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.
  • Edited copy of a member (23 corresponding lines) examples/discord_text_embedding/main.py:155 β€” examples/discord_text_embedding/main.py:155-183 | examples/gdrive_text_embedding/main.py:99-121 β€” 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 (20 corresponding lines) Β· Γ—5
  • Edited copy of a member (20 corresponding lines) python/cocoindex/connectors/bigquery/_target.py:665 β€” python/cocoindex/connectors/bigquery/_target.py:665-684 | python/cocoindex/connectors/snowflake/_target.py:565-584 β€” 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.
  • Edited copy of a member (20 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs:1748 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1748-1772 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1504-1523 β€” 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.
  • Edited copy of a member (20 corresponding lines) REDACTED:129 β€” REDACTED:129-156 | REDACTED:164-183 β€” 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.
  • Edited copy of a member (20 corresponding lines) rust/py/src/code.rs:69 β€” rust/py/src/code.rs:69-89 | rust/sdk/cocoindex/src/ops/code.rs:81-100 β€” 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.
  • Edited copy of a member (20 corresponding lines) REDACTED:794 β€” REDACTED:794-813 | REDACTED:1268-1287 β€” 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 (22 corresponding lines) Β· Γ—5
  • Edited copy of a member (22 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:834 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:834-855 | rust/sdk/cocoindex/src/connectors/snowflake.rs:648-670 β€” 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) REDACTED:281 β€” REDACTED:281-318 | REDACTED:327-348 β€” 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) rust/sdk/cocoindex/src/connectors/iggy.rs:497 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:497-518 | rust/sdk/cocoindex/src/connectors/kafka.rs:640-662 β€” 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) examples/entire_session_search/main.py:337 β€” examples/entire_session_search/main.py:337-363 | examples/paper_metadata/main.py:299-320 β€” 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) examples/image_search/pipeline.py:148 β€” examples/image_search/pipeline.py:148-171 | examples/text_embedding_qdrant/main.py:159-180 β€” 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 (17 corresponding lines) Β· Γ—5
  • Edited copy of a member (17 corresponding lines) python/cocoindex/connectors/falkordb/_target.py:999 β€” python/cocoindex/connectors/falkordb/_target.py:999-1015 | python/cocoindex/connectors/neo4j/_target.py:1118-1134 β€” 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) rust/sdk/cocoindex/src/cypher_graph.rs:142 β€” rust/sdk/cocoindex/src/cypher_graph.rs:142-166 | rust/sdk/cocoindex/src/cypher_graph.rs:169-185 β€” 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) rust/sdk/cocoindex/src/connectors/iggy.rs:397 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:397-415 | rust/sdk/cocoindex/src/connectors/kafka.rs:550-566 β€” 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) rust/sdk/cocoindex/src/connectors/snowflake.rs:799 β€” rust/sdk/cocoindex/src/connectors/snowflake.rs:799-818 | rust/sdk/cocoindex/src/cypher_graph.rs:1148-1164 β€” 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) examples/discord_support_faq/main.py:139 β€” examples/discord_support_faq/main.py:139-155 | examples/discord_support_faq/main.py:257-274 β€” 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 Β· Duplicated block (16 lines × 2) Β· Γ—5
  • Duplicated block (16 lines × 2) rust/code_match/src/matcher.rs:951 β€” rust/code_match/src/matcher.rs:951-966 | rust/code_match/src/matcher.rs:996-1011 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_match/src/matcher.rs:951` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) rust/core/src/engine/component.rs:1205 β€” rust/core/src/engine/component.rs:1205-1220 | rust/core/src/engine/component.rs:1274-1289 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/core/src/engine/component.rs:1205` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/core/src/engine/component.rs:1204` calls `drop` and `rust/core/src/engine/component.rs:1273` does not β€” after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) rust/sdk/cocoindex/src/connectors/lancedb.rs:2146 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:2146-2161 | rust/sdk/cocoindex/src/connectors/lancedb.rs:2222-2237 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `action` to `VectorIndexAction` in one and `FtsIndexAction` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) rust/code_ast/src/elements/lang/cfamily.rs:280 β€” rust/code_ast/src/elements/lang/cfamily.rs:280-295 | rust/code_ast/src/elements/lang/rust.rs:137-152 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/cfamily.rs` and `rust/code_ast/src/elements/lang/rust.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/cfamily.rs:280` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1645 β€” python/cocoindex/connectors/falkordb/_target.py:1645-1660 | python/cocoindex/connectors/neo4j/_target.py:1687-1702 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 3) Β· Γ—5
  • Duplicated block (10 lines × 3) rust/py/src/inspect.rs:74 β€” rust/py/src/inspect.rs:74-83 | rust/py/src/inspect.rs:300-309 | rust/py/src/inspect.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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/py/src/inspect.rs:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) rust/py/src/code.rs:314 β€” rust/py/src/code.rs:314-323 | rust/py/src/code.rs:369-378 | rust/py/src/ops.rs:223-233 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/py/src/code.rs:314` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) python/cocoindex/connectors/lancedb/_target.py:1378 β€” python/cocoindex/connectors/lancedb/_target.py:1378-1387 | python/cocoindex/connectors/postgres/_target.py:1557-1566 | python/cocoindex/connectors/sqlite/_target.py:1099-1108 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `python/cocoindex/connectors/postgres/_target.py:1573` calls `_sanitize_nul` and `python/cocoindex/connectors/lancedb/_target.py:1391` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) examples/amazon_s3_embedding/main.py:88 β€” examples/amazon_s3_embedding/main.py:88-97 | examples/azure_blob_embedding/main.py:95-104 | examples/oci_object_storage_embedding/main.py:142-151 β€” `examples/amazon_s3_embedding/main.py` and `examples/azure_blob_embedding/main.py` 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 4 separate duplicated blocks between them, totalling at least 49 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 (10 lines × 3) examples/meeting_notes_graph_falkordb/main.py:314 β€” examples/meeting_notes_graph_falkordb/main.py:314-323 | examples/meeting_notes_graph_neo4j/main.py:323-332 | examples/meeting_notes_graph_surrealdb/main.py:346-355 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 3) Β· Γ—5
  • Duplicated block (9 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs:1231 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1231-1239 | rust/sdk/cocoindex/src/connectors/postgres.rs:955-963 | rust/sdk/cocoindex/src/connectors/sqlite.rs:904-912 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/postgres.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 125 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) rust/sdk/cocoindex/src/connectors/lancedb.rs:2015 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:2015-2023 | rust/sdk/cocoindex/src/connectors/lancedb.rs:2090-2098 | rust/sdk/cocoindex/src/connectors/postgres.rs:1147-1155 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/lancedb.rs` and `rust/sdk/cocoindex/src/connectors/postgres.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/lancedb.rs:2015` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/sdk/cocoindex/src/connectors/lancedb.rs:2014` calls `clone` and `rust/sdk/cocoindex/src/connectors/postgres.rs:1146` 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 (9 lines × 3) rust/sdk/cocoindex/src/connectors/bigquery.rs:1218 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1218-1226 | rust/sdk/cocoindex/src/connectors/doris.rs:1114-1122 | rust/sdk/cocoindex/src/connectors/sqlite.rs:761-769 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1218` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `rust/sdk/cocoindex/src/connectors/doris.rs:1125` calls `clone` and `rust/sdk/cocoindex/src/connectors/bigquery.rs:1229` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 3) rust/py/src/app.rs:92 β€” rust/py/src/app.rs:92-100 | rust/py/src/app.rs:167-175 | rust/py/src/app.rs:225-233 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/py/src/app.rs:92` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) python/cocoindex/connectors/falkordb/_target.py:1515 β€” python/cocoindex/connectors/falkordb/_target.py:1515-1523 | python/cocoindex/connectors/neo4j/_target.py:1557-1565 | python/cocoindex/connectors/surrealdb/_target.py:1484-1492 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/falkordb/_target.py:1515` 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.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 2) Β· Γ—5
  • Duplicated block (5 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:885 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:885-889 | rust/sdk/cocoindex/src/connectors/postgres.rs:396-400 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/postgres.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 126 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1212 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1212-1216 | rust/sdk/cocoindex/src/connectors/doris.rs:1108-1112 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1212` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) rust/sdk/cocoindex/src/connectors/lancedb.rs:902 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:902-906 | rust/sdk/cocoindex/src/connectors/valkey.rs:835-839 β€” 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 `rust/sdk/cocoindex/src/connectors/lancedb.rs:902` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) rust/sdk/cocoindex/src/connectors/gdrive.rs:553 β€” rust/sdk/cocoindex/src/connectors/gdrive.rs:553-557 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:764-769 β€” 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 `rust/sdk/cocoindex/src/connectors/gdrive.rs:553` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:920 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:920-924 | rust/sdk/cocoindex/src/connectors/postgres.rs:431-435 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/postgres.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 126 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 Β· Code Duplication Β· Duplicated block (21 lines × 2) Β· Γ—5
  • Duplicated block (21 lines × 2) python/cocoindex/connectors/falkordb/_target.py:514 β€” python/cocoindex/connectors/falkordb/_target.py:514-534 | python/cocoindex/connectors/neo4j/_target.py:581-601 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) python/cocoindex/connectors/lancedb/_target.py:882 β€” python/cocoindex/connectors/lancedb/_target.py:882-902 | python/cocoindex/connectors/postgres/_target.py:596-616 β€” 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) python/cocoindex/connectors/postgres/_target.py:364 β€” python/cocoindex/connectors/postgres/_target.py:364-384 | python/cocoindex/connectors/sqlite/_target.py:315-335 β€” 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) examples/image_search_colpali/pipeline.py:121 β€” examples/image_search_colpali/pipeline.py:121-141 | examples/multi_format_indexing/main.py:169-189 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples/image_search_colpali/pipeline.py:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) REDACTED:74 β€” REDACTED:74-94 | REDACTED:74-94 β€” `REDACTED` and `REDACTED` 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 2 separate duplicated blocks between them, totalling at least 40 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. 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.
D2 Β· Cognitive Complexity Β· cocoindex_cli Β· Γ—4
  • cocoindex_cli::child::run (cognitive 69) rust/cli/src/child.rs:126 β€” cocoindex_cli::child::run has cognitive complexity 69 (threshold 15). Drivers by points: if/else 20 (51 pts), match/switch 5 (13 pts), loops 3, boolean chains 2 (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.
  • cocoindex_cli::commands::update (cognitive 28) rust/cli/src/commands.rs:270 β€” cocoindex_cli::commands::update has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 3 (5 pts), boolean chains 4, match/switch 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.
  • cocoindex_cli::commands::ls (cognitive 22) rust/cli/src/commands.rs:109 β€” cocoindex_cli::commands::ls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (5 pts), loops 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.
  • cocoindex_cli::inspect::parse_stable_path (cognitive 20) rust/cli/src/inspect.rs:205 β€” cocoindex_cli::inspect::parse_stable_path has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 pts), match/switch 1 (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.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Members sharing a duplicated core (9 members, 50+ identical tokens) Β· Γ—4
  • Members sharing a duplicated core (9 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/doris.rs:1001 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1001-1013 | rust/sdk/cocoindex/src/connectors/kafka.rs:485-497 | rust/sdk/cocoindex/src/connectors/lancedb.rs:775-787 | rust/sdk/cocoindex/src/connectors/qdrant.rs:1212-1224 | rust/sdk/cocoindex/src/connectors/sqlite.rs:646-658 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1515-1527 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:864-876 | rust/sdk/cocoindex/src/connectors/valkey.rs:736-748 | rust/sdk/cocoindex/src/connectors/zvec.rs:1286-1298 β€” These 9 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 9 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 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) python/cocoindex/connectors/bigquery/_target.py:823 β€” python/cocoindex/connectors/bigquery/_target.py:823-872 | python/cocoindex/connectors/doris/_target.py:1271-1328 | python/cocoindex/connectors/falkordb/_target.py:1067-1141 | python/cocoindex/connectors/lancedb/_target.py:1272-1332 | python/cocoindex/connectors/neo4j/_target.py:1186-1260 | python/cocoindex/connectors/postgres/_target.py:1407-1460 | python/cocoindex/connectors/snowflake/_target.py:727-776 | python/cocoindex/connectors/sqlite/_target.py:991-1043 | python/cocoindex/connectors/surrealdb/_target.py:1112-1171 β€” These 9 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 9 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 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) examples/amazon_s3_embedding/main.py:148 β€” examples/amazon_s3_embedding/main.py:148-168 | examples/azure_blob_embedding/main.py:154-174 | examples/code_embedding/main.py:159-181 | examples/discord_text_embedding/main.py:199-222 | examples/gdrive_text_embedding/main.py:137-157 | examples/oci_object_storage_embedding/main.py:218-238 | examples/pdf_embedding/main.py:169-189 | examples/postgres_source/main.py:139-164 | examples/text_embedding/main.py:145-165 β€” These 9 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 9 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 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) examples/amazon_s3_embedding/main.py:172 β€” examples/amazon_s3_embedding/main.py:172-182 | examples/azure_blob_embedding/main.py:178-188 | examples/code_embedding/main.py:185-195 | examples/discord_text_embedding/main.py:226-236 | examples/entire_session_search/main.py:367-377 | examples/gdrive_text_embedding/main.py:161-171 | examples/oci_object_storage_embedding/main.py:242-252 | examples/postgres_source/main.py:168-178 | examples/text_embedding/main.py:169-179 β€” These 9 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 9 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 9 times.
D4 Β· Code Duplication Β· Edited copy of a member (25 corresponding lines) Β· Γ—4
  • Edited copy of a member (25 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:593 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:593-618 | rust/sdk/cocoindex/src/connectors/gdrive.rs:493-517 β€” 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) python/cocoindex/connectors/postgres/_target.py:1763 β€” python/cocoindex/connectors/postgres/_target.py:1763-1788 | python/cocoindex/connectors/sqlite/_target.py:1254-1278 β€” 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) python/cocoindex/connectors/postgres/_target.py:1728 β€” python/cocoindex/connectors/postgres/_target.py:1728-1752 | python/cocoindex/connectors/sqlite/_target.py:1207-1243 β€” 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) examples/conversation_to_knowledge/conv_knowledge/extract.py:86 β€” examples/conversation_to_knowledge/conv_knowledge/extract.py:86-115 | examples/conversation_to_knowledge/conv_knowledge/extract.py:177-201 β€” 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 (14 corresponding lines) Β· Γ—4
  • Edited copy of a member (14 corresponding lines) rust/code_match/src/lang/html.rs:20 β€” rust/code_match/src/lang/html.rs:20-33 | rust/code_match/src/lang/xml.rs:12-25 β€” These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) rust/sdk/cocoindex/src/cypher_graph.rs:1993 β€” rust/sdk/cocoindex/src/cypher_graph.rs:1993-2006 | rust/utils/src/db.rs:22-41 β€” These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) rust/sdk/cocoindex/src/connectors/turbopuffer.rs:89 β€” rust/sdk/cocoindex/src/connectors/turbopuffer.rs:89-102 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:126-142 β€” These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) examples/face_recognition/main.py:165 β€” examples/face_recognition/main.py:165-184 | examples/text_embedding_qdrant/main.py:93-106 β€” 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 (18 corresponding lines) Β· Γ—4
  • Edited copy of a member (18 corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:418 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:418-439 | rust/sdk/cocoindex/src/connectors/kafka.rs:569-586 β€” 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) rust/sdk/cocoindex/src/connectors/iggy.rs:1230 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:1230-1249 | rust/sdk/cocoindex/src/connectors/kafka.rs:1370-1387 β€” 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) rust/sdk/cocoindex/src/connectors/qdrant.rs:533 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:533-550 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:337-357 β€” 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) python/cocoindex/connectors/iggy/_target.py:271 β€” python/cocoindex/connectors/iggy/_target.py:271-292 | python/cocoindex/connectors/kafka/_target.py:274-291 β€” These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (4 corresponding lines) Β· Γ—4
  • Edited copy of a member (4 corresponding lines) python/cocoindex/connectors/falkordb/_target.py:562 β€” python/cocoindex/connectors/falkordb/_target.py:562-565 | python/cocoindex/connectors/neo4j/_target.py:685-688 β€” These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) python/cocoindex/connectors/falkordb/_target.py:596 β€” python/cocoindex/connectors/falkordb/_target.py:596-599 | python/cocoindex/connectors/neo4j/_target.py:719-722 β€” These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) examples/image_search_colpali/pipeline.py:75 β€” examples/image_search_colpali/pipeline.py:75-80 | examples/multi_format_indexing/main.py:93-96 β€” These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) examples/image_search/pipeline.py:82 β€” examples/image_search/pipeline.py:82-85 | examples/image_search_colpali/pipeline.py:97-100 β€” These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (18 lines × 2) Β· Γ—4
  • Duplicated block (18 lines × 2) rust/code_ast/src/elements/lang/go.rs:51 β€” rust/code_ast/src/elements/lang/go.rs:51-68 | rust/code_ast/src/elements/lang/java.rs:33-50 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/go.rs` and `rust/code_ast/src/elements/lang/java.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/go.rs:51` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) rust/code_match/src/matcher.rs:755 β€” rust/code_match/src/matcher.rs:755-772 | rust/code_match/src/matcher.rs:1081-1098 β€” both copies are in the same file, so extract the block into 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) python/cocoindex/connectors/falkordb/_target.py:1955 β€” python/cocoindex/connectors/falkordb/_target.py:1955-1972 | python/cocoindex/connectors/neo4j/_target.py:1999-2016 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (18 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1985 β€” python/cocoindex/connectors/falkordb/_target.py:1985-2002 | python/cocoindex/connectors/neo4j/_target.py:2029-2046 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 3) Β· Γ—4
  • Duplicated block (8 lines × 3) rust/sdk/cocoindex/src/connectors/lancedb.rs:1218 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:1218-1225 | rust/sdk/cocoindex/src/connectors/postgres.rs:947-954 | rust/sdk/cocoindex/src/connectors/sqlite.rs:896-903 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/lancedb.rs` and `rust/sdk/cocoindex/src/connectors/postgres.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/lancedb.rs:1218` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:506 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:506-513 | rust/sdk/cocoindex/src/connectors/azure_blob.rs:1256-1263 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1343-1350 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/amazon_s3.rs` and `rust/sdk/cocoindex/src/connectors/oci_object_storage.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 × 3) python/cocoindex/connectors/bigquery/_target.py:122 β€” python/cocoindex/connectors/bigquery/_target.py:122-130 | python/cocoindex/connectors/doris/_target.py:355-362 | python/cocoindex/connectors/snowflake/_target.py:115-123 β€” 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 × 3) examples/pdf_embedding/main.py:106 β€” examples/pdf_embedding/main.py:106-113 | examples/text_embedding/main.py:81-88 | examples/text_embedding_lancedb/main.py:75-82 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/pdf_embedding/main.py:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 3) Β· Γ—4
  • Duplicated block (6 lines × 3) rust/code_ast/src/elements/lang/go.rs:116 β€” rust/code_ast/src/elements/lang/go.rs:116-121 | rust/code_ast/src/elements/lang/java.rs:109-114 | rust/code_ast/src/elements/lang/rust.rs:45-50 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/go.rs` and `rust/code_ast/src/elements/lang/java.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/go.rs:116` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:222 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:222-227 | rust/sdk/cocoindex/src/connectors/azure_blob.rs:277-282 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:414-419 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/amazon_s3.rs` and `rust/sdk/cocoindex/src/connectors/oci_object_storage.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 × 3) rust/sdk/cocoindex/src/connectors/doris.rs:784 β€” rust/sdk/cocoindex/src/connectors/doris.rs:784-789 | rust/sdk/cocoindex/src/connectors/snowflake.rs:696-701 | rust/sdk/cocoindex/src/connectors/sqlite.rs:437-442 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 19 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/doris.rs:784` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) examples/amazon_s3_embedding/main.py:105 β€” examples/amazon_s3_embedding/main.py:105-110 | examples/azure_blob_embedding/main.py:112-117 | examples/oci_object_storage_embedding/main.py:159-164 β€” `examples/amazon_s3_embedding/main.py` and `examples/azure_blob_embedding/main.py` 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 4 separate duplicated blocks between them, totalling at least 49 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `file` to `amazon_s3.S3File` in one and `azure_blob.AzureBlobFile` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D1 Β· Cyclomatic Complexity Β· cocoindex_core Β· Γ—3
  • cocoindex_core::engine::execution::pre_commit (cyclomatic 51) rust/core/src/engine/execution.rs:1161 β€” cocoindex_core::engine::execution::pre_commit has cyclomatic complexity 51 (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.
  • cocoindex_core::engine::execution::submit (cyclomatic 28) rust/core/src/engine/execution.rs:1724 β€” cocoindex_core::engine::execution::submit 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.
  • cocoindex_core::state_store::submit_session::reconcile_child_existence (cyclomatic 19) rust/core/src/state_store/submit_session.rs:593 β€” cocoindex_core::state_store::submit_session::reconcile_child_existence 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.
D1 Β· Cyclomatic Complexity Β· cocoindex_cli Β· Γ—3
  • cocoindex_cli::child::run (cyclomatic 32) rust/cli/src/child.rs:126 β€” cocoindex_cli::child::run 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.
  • cocoindex_cli::commands::update (cyclomatic 28) rust/cli/src/commands.rs:270 β€” cocoindex_cli::commands::update 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.
  • cocoindex_cli::commands::ls (cyclomatic 18) rust/cli/src/commands.rs:109 β€” cocoindex_cli::commands::ls 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.
D2 Β· Cognitive Complexity Β· cocoindex_code_ast Β· Γ—3
  • cocoindex_code_ast::view::lang::classify (cognitive 49) rust/code_ast/src/view/lang.rs:729 β€” cocoindex_code_ast::view::lang::classify has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (36 pts), loops 3 (7 pts), boolean chains 6 (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.
  • cocoindex_code_ast::hazards::scan_tree_hazards (cognitive 20) rust/code_ast/src/hazards.rs:37 β€” cocoindex_code_ast::hazards::scan_tree_hazards has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, 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.
  • cocoindex_code_ast::view::frames::find_cut_on_path (cognitive 18) rust/code_ast/src/view/frames.rs:159 β€” cocoindex_code_ast::view::frames::find_cut_on_path has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, 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.
D2 Β· Cognitive Complexity Β· Ctx Β· Γ—3
  • Ctx::match_optional (cognitive 22) rust/code_match/src/matcher.rs:1069 β€” Ctx::match_optional has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (4 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.
  • Ctx::dp (cognitive 20) rust/code_match/src/matcher.rs:604 β€” Ctx::dp has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, match/switch 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.
  • Ctx::match_single (cognitive 18) rust/code_match/src/matcher.rs:739 β€” Ctx::match_single has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (4 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.
D3 Β· God Classes Β· ClassTooLong Β· Γ—3
  • ClassTooLong: Ctx rust/sdk/cocoindex/src/ctx.rs:330 β€” ClassTooLong β€” 817 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 54 methods, 3 blocks, lines 330-1946. The bar is 400 significant lines; this is 417 over it, 2.04× 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: AppStore rust/core/src/state_store/app_store.rs:52 β€” ClassTooLong β€” 542 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 55 methods, 13 blocks, lines 52-1018. The bar is 400 significant lines; this is 142 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.
  • ClassTooLong: Component rust/core/src/engine/component.rs:274 β€” ClassTooLong β€” 519 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 274-1728. The bar is 400 significant lines; this is 119 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 Β· God Classes Β· TooManyMethods Β· Γ—3
  • TooManyMethods: AppStore rust/core/src/state_store/app_store.rs:52 β€” TooManyMethods β€” 55 methods, declared across 2 files: state_store/app_store.rs (52), state_store/submit_session.rs (3). The bar is 30 methods; this is 25 over it, 1.83× 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: Ctx rust/sdk/cocoindex/src/ctx.rs:330 β€” TooManyMethods β€” 54 methods. The bar is 30 methods; this is 24 over it, 1.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.
  • TooManyMethods: ComponentProcessorContext rust/core/src/engine/context.rs:880 β€” TooManyMethods β€” 36 methods, declared across 2 files: engine/context.rs (34), engine/component.rs (2). The bar is 30 methods; this is 6 over it, 1.20× 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.
D4 Β· Code Duplication Β· Members sharing a duplicated core (6 members, 50+ identical tokens) Β· Γ—3
  • Members sharing a duplicated core (6 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs:1731 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1731-1744 | rust/sdk/cocoindex/src/connectors/doris.rs:1802-1815 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1718-1731 | rust/sdk/cocoindex/src/connectors/postgres.rs:1603-1616 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1505-1518 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1370-1383 β€” 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) rust/sdk/cocoindex/src/connectors/bigquery.rs:1764 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1764-1777 | rust/sdk/cocoindex/src/connectors/doris.rs:1835-1848 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1733-1744 | rust/sdk/cocoindex/src/connectors/postgres.rs:1652-1665 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1538-1551 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1416-1429 β€” 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) python/cocoindex/connectors/bigquery/_target.py:544 β€” python/cocoindex/connectors/bigquery/_target.py:544-564 | python/cocoindex/connectors/doris/_target.py:961-981 | python/cocoindex/connectors/lancedb/_target.py:757-791 | python/cocoindex/connectors/postgres/_target.py:1067-1090 | python/cocoindex/connectors/snowflake/_target.py:444-464 | python/cocoindex/connectors/sqlite/_target.py:566-589 β€” 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.
D4 Β· Code Duplication Β· Members sharing a duplicated core (5 members, 50+ identical tokens) Β· Γ—3
  • Members sharing a duplicated core (5 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs:1753 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1753-1762 | rust/sdk/cocoindex/src/connectors/doris.rs:1824-1833 | rust/sdk/cocoindex/src/connectors/postgres.rs:1625-1634 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1527-1536 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1392-1401 β€” 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) rust/sdk/cocoindex/src/connectors/lancedb.rs:1976 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:1976-2005 | rust/sdk/cocoindex/src/connectors/lancedb.rs:2051-2080 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1886-1919 | rust/sdk/cocoindex/src/cypher_graph.rs:1220-1256 | rust/sdk/cocoindex/src/cypher_graph.rs:1451-1483 β€” 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) python/cocoindex/connectors/bigquery/_target.py:616 β€” python/cocoindex/connectors/bigquery/_target.py:616-629 | python/cocoindex/connectors/doris/_target.py:1041-1070 | python/cocoindex/connectors/postgres/_target.py:1146-1161 | python/cocoindex/connectors/snowflake/_target.py:516-529 | python/cocoindex/connectors/sqlite/_target.py:647-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.
D4 Β· Code Duplication Β· Edited copy of a member (34 corresponding lines) Β· Γ—3
  • Edited copy of a member (34 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:415 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:415-448 | rust/sdk/cocoindex/src/connectors/snowflake.rs:379-413 β€” These two members are one piece of code written twice and then edited apart: 34 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 (34 corresponding lines) rust/code_match/src/lang/cmake.rs:20 β€” rust/code_match/src/lang/cmake.rs:20-53 | rust/code_match/src/lang/rust.rs:26-66 β€” These two members are one piece of code written twice and then edited apart: 34 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 (34 corresponding lines) python/cocoindex/connectors/bigquery/_target.py:161 β€” python/cocoindex/connectors/bigquery/_target.py:161-194 | python/cocoindex/connectors/snowflake/_target.py:154-187 β€” These two members are one piece of code written twice and then edited apart: 34 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) Β· Γ—3
  • Edited copy of a member (28 corresponding lines) rust/sdk/cocoindex/src/live_component.rs:255 β€” rust/sdk/cocoindex/src/live_component.rs:255-282 | rust/sdk/cocoindex/src/live_component.rs:294-325 β€” 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.
  • Edited copy of a member (28 corresponding lines) python/cocoindex/connectors/qdrant/_target.py:395 β€” python/cocoindex/connectors/qdrant/_target.py:395-422 | python/cocoindex/connectors/valkey/_target.py:426-458 β€” 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.
  • Edited copy of a member (28 corresponding lines) rust/py/src/ops.rs:337 β€” rust/py/src/ops.rs:337-372 | rust/sdk/cocoindex/src/ops/code.rs:422-449 β€” 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 (35 corresponding lines) Β· Γ—3
  • Edited copy of a member (35 corresponding lines) python/cocoindex/connectors/bigquery/_target.py:500 β€” python/cocoindex/connectors/bigquery/_target.py:500-534 | python/cocoindex/connectors/snowflake/_target.py:397-434 β€” These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) python/cocoindex/connectors/lancedb/_target.py:1407 β€” python/cocoindex/connectors/lancedb/_target.py:1407-1441 | python/cocoindex/connectors/postgres/_target.py:1588-1623 β€” These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) examples/entire_session_search/main.py:281 β€” examples/entire_session_search/main.py:281-315 | examples/paper_metadata/main.py:241-277 β€” These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 10+ corresponding lines) Β· Γ—3
  • Edited copies of one member (4 members, 10+ corresponding lines) rust/core/src/engine/execution.rs:180 β€” rust/core/src/engine/execution.rs:180-191 | rust/core/src/state_store/app_store.rs:318-329 | rust/core/src/state_store/app_store.rs:373-388 | rust/core/src/state_store/app_store.rs:396-405 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:726 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:726-735 | rust/sdk/cocoindex/src/connectors/doris.rs:419-430 | rust/sdk/cocoindex/src/connectors/postgres.rs:200-210 | rust/sdk/cocoindex/src/connectors/snowflake.rs:543-552 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) examples/entire_session_search/main.py:166 β€” examples/entire_session_search/main.py:166-176 | examples/pdf_embedding/main.py:104-113 | examples/text_embedding/main.py:79-88 | examples/text_embedding_lancedb/main.py:73-82 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (6 corresponding lines) Β· Γ—3
  • Edited copy of a member (6 corresponding lines) rust/sdk/cocoindex/src/ops/image.rs:87 β€” rust/sdk/cocoindex/src/ops/image.rs:87-92 | rust/sdk/cocoindex/src/ops/sentence_transformers.rs:191-196 β€” These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs:666 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:666-672 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1508-1513 β€” These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) rust/sdk/cocoindex/src/connectors/valkey.rs:729 β€” rust/sdk/cocoindex/src/connectors/valkey.rs:729-734 | rust/sdk/cocoindex/src/connectors/zvec.rs:1279-1284 β€” These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (27 lines × 2) Β· Γ—3
  • Duplicated block (27 lines × 2) rust/sdk/cocoindex/src/connectors/qdrant.rs:1272 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1272-1298 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:922-948 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/qdrant.rs` and `rust/sdk/cocoindex/src/connectors/turbopuffer.rs` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/qdrant.rs:1272` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (27 lines × 2) python/cocoindex/connectors/bigquery/_target.py:784 β€” python/cocoindex/connectors/bigquery/_target.py:784-810 | python/cocoindex/connectors/snowflake/_target.py:681-707 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `python/cocoindex/connectors/snowflake/_target.py:679` calls `cursor` and `python/cocoindex/connectors/bigquery/_target.py:783` 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 (27 lines × 2) examples/meeting_notes_graph_falkordb/main.py:254 β€” examples/meeting_notes_graph_falkordb/main.py:254-280 | examples/meeting_notes_graph_neo4j/main.py:263-289 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D4 Β· Code Duplication Β· Duplicated block (22 lines × 2) Β· Γ—3
  • Duplicated block (22 lines × 2) rust/sdk/cocoindex/src/connectors/qdrant.rs:1590 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1590-1611 | rust/sdk/cocoindex/src/connectors/qdrant.rs:1647-1668 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/qdrant.rs:1590` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) python/cocoindex/connectors/bigquery/_target.py:286 β€” python/cocoindex/connectors/bigquery/_target.py:286-307 | python/cocoindex/connectors/snowflake/_target.py:272-293 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (22 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1712 β€” python/cocoindex/connectors/falkordb/_target.py:1712-1733 | python/cocoindex/connectors/neo4j/_target.py:1754-1775 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D4 Β· Code Duplication Β· Duplicated block (13 lines × 3) Β· Γ—3
  • Duplicated block (13 lines × 3) python/cocoindex/connectors/bigquery/_target.py:616 β€” python/cocoindex/connectors/bigquery/_target.py:616-628 | python/cocoindex/connectors/postgres/_target.py:1146-1158 | python/cocoindex/connectors/snowflake/_target.py:516-528 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/postgres/_target.py` 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 8 separate duplicated blocks between them, totalling at least 153 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `python/cocoindex/connectors/postgres/_target.py:1159` calls `_schema_uses_pgvector` and `python/cocoindex/connectors/bigquery/_target.py:629` 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 (13 lines × 3) examples/meeting_notes_graph_falkordb/main.py:71 β€” examples/meeting_notes_graph_falkordb/main.py:71-83 | examples/meeting_notes_graph_neo4j/main.py:80-92 | examples/meeting_notes_graph_surrealdb/main.py:84-96 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/meeting_notes_graph_falkordb/main.py:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) examples/meeting_notes_graph_falkordb/main.py:325 β€” examples/meeting_notes_graph_falkordb/main.py:325-337 | examples/meeting_notes_graph_neo4j/main.py:334-346 | examples/meeting_notes_graph_surrealdb/main.py:357-369 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/meeting_notes_graph_falkordb/main.py:325` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The 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.
D4 Β· Code Duplication Β· Duplicated block (13 lines × 2) Β· Γ—3
  • Duplicated block (13 lines × 2) python/cocoindex/connectors/doris/_target.py:524 β€” python/cocoindex/connectors/doris/_target.py:524-536 | python/cocoindex/connectors/doris/_target.py:542-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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `python/cocoindex/connectors/doris/_target.py:555` calls `list`, `fetchall` and `python/cocoindex/connectors/doris/_target.py:537` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) python/cocoindex/connectors/iggy/_target.py:202 β€” python/cocoindex/connectors/iggy/_target.py:202-214 | python/cocoindex/connectors/kafka/_target.py:205-217 β€” 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1824 β€” python/cocoindex/connectors/falkordb/_target.py:1824-1836 | python/cocoindex/connectors/neo4j/_target.py:1868-1880 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D5 Β· Coupling Β· Off the main sequence Β· Γ—3
  • Off the main sequence: cocoindex_code_ast β€” cocoindex_code_ast: abstractness 0.02, instability 0.00, distance 0.98 β€” zone of pain β€” concrete and depended on by 4 project(s), so it's rigid to change.
  • Off the main sequence: cocoindex_utils β€” cocoindex_utils: abstractness 0.16, instability 0.00, distance 0.84 β€” zone of pain β€” concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: cocoindex_core β€” cocoindex_core: abstractness 0.04, instability 0.25, distance 0.71 β€” zone of pain β€” concrete and depended on by 3 project(s), so it's rigid to change.
D6 Β· Cohesion (LCOM4) Β· Low cohesion Β· Γ—3
  • Low cohesion: ManagedConnection (LCOM4 5) rust/sdk/cocoindex/src/connectors/zvec.rs:121 β€” ManagedConnection'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: PoolState (LCOM4 4) rust/core/src/engine/admission.rs:157 β€” PoolState'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: PyUpdateHandle (LCOM4 4) rust/py/src/app.rs:51 β€” PyUpdateHandle'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.
AC6 Β· Visual & motion safety Β· Focus outline removed in CSS without a Β· Γ—2
  • Focus outline removed in CSS without a :focus replacement docs/src/styles/examples.css:273 β€” `body.ex-listing .ex-results: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 docs/src/styles/site.css:690 β€” `:root #main-content: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.
D1 Β· Cyclomatic Complexity Β· cocoindex_macros Β· Γ—2
  • cocoindex_macros::parse_schema_field_attr (cyclomatic 18) rust/sdk/cocoindex_macros/src/lib.rs:1819 β€” cocoindex_macros::parse_schema_field_attr 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: cocoindex_macros::logical_type_tokens (cyclomatic 20) 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.
  • cocoindex_macros::function (cyclomatic 17) rust/sdk/cocoindex_macros/src/lib.rs:1255 β€” cocoindex_macros::function 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: cocoindex_macros::logical_type_tokens (cyclomatic 20) 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.
D2 Β· Cognitive Complexity Β· cocoindex_code_match Β· Γ—2
  • cocoindex_code_match::lexer::lex (cognitive 50) rust/code_match/src/lexer.rs:105 β€” cocoindex_code_match::lexer::lex has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (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.
  • cocoindex_code_match::lexer::resolve_brackets (cognitive 16) rust/code_match/src/lexer.rs:242 β€” cocoindex_code_match::lexer::resolve_brackets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 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.
D2 Β· Cognitive Complexity Β· InternalRecursiveChunker Β· Γ—2
  • InternalRecursiveChunker::merge_atom_chunks (cognitive 46) rust/ops_text/src/split/recursive.rs:774 β€” InternalRecursiveChunker::merge_atom_chunks has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 5 (10 pts) (nesting depth added 26). Of this number, 43 points are the body's own statements and 3 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.
  • InternalRecursiveChunker::collect_atom_chunks (cognitive 34) rust/ops_text/src/split/recursive.rs:656 β€” InternalRecursiveChunker::collect_atom_chunks has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (27 pts), match/switch 3 (6 pts), loops 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.
D2 Β· Cognitive Complexity Β· _target._relationship_state (cognitive 31) Β· Γ—2
  • _target._relationship_state (cognitive 31) python/cocoindex/connectors/falkordb/_target.py:1494 β€” _target._relationship_state has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 1 (3 pts), ternaries 1 (3 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.
  • _target._relationship_state (cognitive 31) python/cocoindex/connectors/neo4j/_target.py:1536 β€” _target._relationship_state has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 1 (3 pts), ternaries 1 (3 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.
D2 Β· Cognitive Complexity Β· LiveDirWalker Β· Γ—2
  • LiveDirWalker::watch (cognitive 28) rust/sdk/cocoindex/src/resources/fs.rs:387 β€” LiveDirWalker::watch has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 5 (7 pts), loops 3 (7 pts) (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • LiveDirWalker::apply_changes (cognitive 27) rust/sdk/cocoindex/src/resources/fs.rs:213 β€” LiveDirWalker::apply_changes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (8 pts), match/switch 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.
D2 Β· Cognitive Complexity Β· cocoindex_macros Β· Γ—2
  • cocoindex_macros::function (cognitive 28) rust/sdk/cocoindex_macros/src/lib.rs:1255 β€” cocoindex_macros::function has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 6 (10 pts), boolean chains 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.
  • cocoindex_macros::parse_schema_field_attr (cognitive 26) rust/sdk/cocoindex_macros/src/lib.rs:1819 β€” cocoindex_macros::parse_schema_field_attr has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· _TableHandler._apply_actions (cognitive 24) Β· Γ—2
  • _TableHandler._apply_actions (cognitive 24) python/cocoindex/connectors/falkordb/_target.py:1143 β€” _TableHandler._apply_actions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 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.
  • _TableHandler._apply_actions (cognitive 24) python/cocoindex/connectors/neo4j/_target.py:1262 β€” _TableHandler._apply_actions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 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.
D2 Β· Cognitive Complexity Β· cocoindex_ops_text Β· Γ—2
  • cocoindex_ops_text::pattern_matcher::brace_expand (cognitive 23) rust/ops_text/src/pattern_matcher.rs:27 β€” cocoindex_ops_text::pattern_matcher::brace_expand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), match/switch 2 (6 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.
  • cocoindex_ops_text::split::recursive::line_break_level (cognitive 18) rust/ops_text/src/split/recursive.rs:275 β€” cocoindex_ops_text::split::recursive::line_break_level has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 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.
D2 Β· Cognitive Complexity Β· Prefilter Β· Γ—2
  • Prefilter::build (cognitive 22) rust/code_match/src/prefilter.rs:71 β€” Prefilter::build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (2 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.
  • Prefilter::might_match (cognitive 18) rust/code_match/src/prefilter.rs:167 β€” Prefilter::might_match has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), 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.
D2 Β· Cognitive Complexity Β· JavaHooks Β· Γ—2
  • JavaHooks::extract_declaration_names (cognitive 20) rust/code_ast/src/elements/lang/java.rs:17 β€” JavaHooks::extract_declaration_names has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (3 pts), boolean chains 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.
  • JavaHooks::extract_path (cognitive 16) rust/code_ast/src/elements/lang/java.rs:98 β€” JavaHooks::extract_path has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (10 pts), if/else 4 (6 pts) (nesting depth added 6). 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.
D2 Β· Cognitive Complexity Β· _TableHandler._apply_actions (cognitive 20) Β· Γ—2
  • _TableHandler._apply_actions (cognitive 20) python/cocoindex/connectors/bigquery/_target.py:770 β€” _TableHandler._apply_actions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (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.
  • _TableHandler._apply_actions (cognitive 20) python/cocoindex/connectors/postgres/_target.py:1204 β€” _TableHandler._apply_actions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (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.
D2 Β· Cognitive Complexity Β· CSharpHooks Β· Γ—2
  • CSharpHooks::extract_declaration_names (cognitive 19) rust/code_ast/src/elements/lang/csharp.rs:35 β€” CSharpHooks::extract_declaration_names has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (3 pts) (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.
  • CSharpHooks::extract_path (cognitive 16) rust/code_ast/src/elements/lang/csharp.rs:143 β€” CSharpHooks::extract_path has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (10 pts), if/else 4 (6 pts) (nesting depth added 6). 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.
D2 Β· Cognitive Complexity Β· GoHooks Β· Γ—2
  • GoHooks::extract_declaration_names (cognitive 19) rust/code_ast/src/elements/lang/go.rs:36 β€” GoHooks::extract_declaration_names has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (3 pts) (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.
  • GoHooks::extract_path (cognitive 17) rust/code_ast/src/elements/lang/go.rs:88 β€” GoHooks::extract_path has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 4 (6 pts) (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.
D2 Β· Cognitive Complexity Β· _VectorIndexApplier.__call__ (cognitive 17) Β· Γ—2
  • _VectorIndexApplier.__call__ (cognitive 17) python/cocoindex/connectors/falkordb/_target.py:655 β€” _VectorIndexApplier.__call__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (5 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.
  • _VectorIndexApplier.__call__ (cognitive 17) python/cocoindex/connectors/neo4j/_target.py:779 β€” _VectorIndexApplier.__call__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (5 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.
D2 Β· Cognitive Complexity Β· _target._apply_column_actions (cognitive 16) Β· Γ—2
  • _target._apply_column_actions (cognitive 16) python/cocoindex/connectors/bigquery/_target.py:687 β€” _target._apply_column_actions 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.
  • _target._apply_column_actions (cognitive 16) python/cocoindex/connectors/snowflake/_target.py:587 β€” _target._apply_column_actions 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.
D3 Β· God Classes Β· MethodTooLong Β· Γ—2
  • MethodTooLong: Component.execute_once rust/core/src/engine/component.rs:1291 β€” MethodTooLong β€” execute_once runs 204 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 104 over it, 2.04× 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: FunctionArgs.parse rust/sdk/cocoindex_macros/src/lib.rs:461 β€” MethodTooLong β€” parse runs 103 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 3 over it, 1.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.
D4 Β· Code Duplication Β· Edited copy of a member (43 corresponding lines) Β· Γ—2
  • Edited copy of a member (43 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs:1471 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:1471-1516 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1217-1259 β€” These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (43 corresponding lines) rust/code_match/src/matcher.rs:747 β€” rust/code_match/src/matcher.rs:747-795 | rust/code_match/src/matcher.rs:1077-1119 β€” These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (33 corresponding lines) Β· Γ—2
  • Edited copy of a member (33 corresponding lines) rust/sdk/cocoindex/src/connectors/lancedb.rs:594 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:594-634 | rust/sdk/cocoindex/src/connectors/lancedb.rs:643-675 β€” These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) examples/meeting_notes_graph_falkordb/main.py:248 β€” examples/meeting_notes_graph_falkordb/main.py:248-280 | examples/meeting_notes_graph_neo4j/main.py:257-289 β€” 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 (19 corresponding lines) Β· Γ—2
  • Edited copy of a member (19 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:762 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:762-781 | rust/sdk/cocoindex/src/connectors/snowflake.rs:579-597 β€” 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) rust/core/src/state/db_schema.rs:130 β€” rust/core/src/state/db_schema.rs:130-154 | rust/core/src/state/db_schema.rs:231-249 β€” 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 (32 corresponding lines) Β· Γ—2
  • Edited copy of a member (32 corresponding lines) rust/sdk/cocoindex/src/connectors/lancedb.rs:899 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:899-933 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:965-996 β€” 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.
  • Edited copy of a member (32 corresponding lines) rust/core/src/engine/execution.rs:416 β€” rust/core/src/engine/execution.rs:416-447 | rust/core/src/engine/execution.rs:508-545 β€” 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 (24 corresponding lines) Β· Γ—2
  • Edited copy of a member (24 corresponding lines) rust/sdk/cocoindex/src/connectors/doris.rs:1107 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1107-1130 | rust/sdk/cocoindex/src/connectors/sqlite.rs:754-777 β€” 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) python/cocoindex/connectors/falkordb/_target.py:514 β€” python/cocoindex/connectors/falkordb/_target.py:514-542 | python/cocoindex/connectors/neo4j/_target.py:581-604 β€” These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (27 corresponding lines) Β· Γ—2
  • Edited copy of a member (27 corresponding lines) python/cocoindex/connectors/postgres/_target.py:1284 β€” python/cocoindex/connectors/postgres/_target.py:1284-1312 | python/cocoindex/connectors/sqlite/_target.py:764-790 β€” These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) python/cocoindex/connectors/iggy/_target.py:122 β€” python/cocoindex/connectors/iggy/_target.py:122-154 | python/cocoindex/connectors/kafka/_target.py:133-159 β€” These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (26 corresponding lines) Β· Γ—2
  • Edited copy of a member (26 corresponding lines) rust/sdk/cocoindex/src/connectors/qdrant.rs:1586 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1586-1611 | rust/sdk/cocoindex/src/connectors/qdrant.rs:1643-1668 β€” 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) examples/image_search_colpali/pipeline.py:121 β€” examples/image_search_colpali/pipeline.py:121-146 | examples/multi_format_indexing/main.py:169-194 β€” 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 copies of one member (3 members, 25+ corresponding lines) Β· Γ—2
  • Edited copies of one member (3 members, 25+ corresponding lines) rust/code_ast/src/elements/lang/csharp.rs:40 β€” rust/code_ast/src/elements/lang/csharp.rs:40-70 | rust/code_ast/src/elements/lang/java.rs:22-50 | rust/code_ast/src/elements/lang/javascript.rs:60-84 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 25+ corresponding lines) python/cocoindex/connectors/falkordb/_target.py:736 β€” python/cocoindex/connectors/falkordb/_target.py:736-775 | python/cocoindex/connectors/postgres/_target.py:682-707 | python/cocoindex/connectors/surrealdb/_target.py:788-812 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 17+ corresponding lines) Β· Γ—2
  • Edited copies of one member (3 members, 17+ corresponding lines) rust/py/src/inspect.rs:73 β€” rust/py/src/inspect.rs:73-96 | rust/py/src/inspect.rs:299-316 | rust/py/src/inspect.rs:396-412 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) examples/amazon_s3_embedding/main.py:115 β€” examples/amazon_s3_embedding/main.py:115-132 | examples/azure_blob_embedding/main.py:122-138 | examples/text_embedding/main.py:106-123 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 23+ corresponding lines) Β· Γ—2
  • Edited copies of one member (3 members, 23+ corresponding lines) rust/sdk/cocoindex/src/connectors/doris.rs:736 β€” rust/sdk/cocoindex/src/connectors/doris.rs:736-758 | rust/sdk/cocoindex/src/connectors/postgres.rs:340-364 | rust/sdk/cocoindex/src/connectors/sqlite.rs:387-411 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 23+ corresponding lines) python/cocoindex/connectors/bigquery/_target.py:924 β€” python/cocoindex/connectors/bigquery/_target.py:924-946 | python/cocoindex/connectors/postgres/_target.py:1685-1717 | python/cocoindex/connectors/snowflake/_target.py:828-851 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (6 members, 12+ corresponding lines) Β· Γ—2
  • Edited copies of one member (6 members, 12+ corresponding lines) rust/sdk/cocoindex/src/connectors/qdrant.rs:978 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:978-989 | rust/sdk/cocoindex/src/connectors/qdrant.rs:1062-1073 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:639-650 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:724-735 | rust/sdk/cocoindex/src/connectors/valkey.rs:588-599 | rust/sdk/cocoindex/src/connectors/valkey.rs:624-635 β€” These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 12+ corresponding lines) rust/py/src/inspect.rs:113 β€” rust/py/src/inspect.rs:113-124 | rust/py/src/inspect.rs:253-264 | rust/py/src/inspect.rs:272-284 | rust/py/src/inspect.rs:345-356 | rust/py/src/inspect.rs:440-451 | rust/py/src/inspect.rs:461-479 β€” These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 11+ corresponding lines) Β· Γ—2
  • Edited copies of one member (3 members, 11+ corresponding lines) rust/sdk/cocoindex_macros/src/lib.rs:835 β€” rust/sdk/cocoindex_macros/src/lib.rs:835-850 | rust/sdk/cocoindex_macros/src/lib.rs:1876-1889 | rust/sdk/cocoindex_macros/src/lib.rs:1898-1908 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) rust/py/src/app.rs:90 β€” rust/py/src/app.rs:90-100 | rust/py/src/app.rs:165-175 | rust/py/src/app.rs:223-233 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 12+ corresponding lines) Β· Γ—2
  • Edited copies of one member (3 members, 12+ corresponding lines) rust/py/src/component.rs:238 β€” rust/py/src/component.rs:238-255 | rust/py/src/live_component.rs:42-53 | rust/py/src/live_component.rs:60-71 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) rust/py/src/app.rs:103 β€” rust/py/src/app.rs:103-114 | rust/py/src/app.rs:178-189 | rust/py/src/app.rs:398-414 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (5 members, 6+ corresponding lines) Β· Γ—2
  • Edited copies of one member (5 members, 6+ corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:919 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:919-924 | rust/sdk/cocoindex/src/connectors/doris.rs:816-821 | rust/sdk/cocoindex/src/connectors/postgres.rs:430-435 | rust/sdk/cocoindex/src/connectors/snowflake.rs:728-733 | rust/sdk/cocoindex/src/connectors/sqlite.rs:469-474 β€” These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 6+ corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:884 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:884-889 | rust/sdk/cocoindex/src/connectors/postgres.rs:395-400 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:982-987 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1020-1033 | rust/sdk/cocoindex/src/cypher_graph.rs:894-907 β€” These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (3 corresponding lines) Β· Γ—2
  • Edited copy of a member (3 corresponding lines) python/cocoindex/connectors/falkordb/_cypher.py:58 β€” python/cocoindex/connectors/falkordb/_cypher.py:58-64 | python/cocoindex/connectors/neo4j/_cypher.py:86-88 β€” These two members are one piece of code written twice and then edited apart: 3 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 (3 corresponding lines) python/cocoindex/connectors/iggy/_source.py:174 β€” python/cocoindex/connectors/iggy/_source.py:174-177 | python/cocoindex/connectors/kafka/_source.py:179-181 β€” These two members are one piece of code written twice and then edited apart: 3 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 (2 corresponding lines) Β· Γ—2
  • Edited copy of a member (2 corresponding lines) python/cocoindex/connectors/bigquery/_target.py:649 β€” python/cocoindex/connectors/bigquery/_target.py:649-650 | python/cocoindex/connectors/snowflake/_target.py:549-550 β€” These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) examples/manuals_llm_extraction/main.py:64 β€” examples/manuals_llm_extraction/main.py:64-65 | examples/pdf_embedding/main.py:69-70 β€” These two members are one piece of code written twice and then edited apart: 2 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 Β· Duplicated block (38 lines × 2) Β· Γ—2
  • Duplicated block (38 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1171 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1171-1208 | rust/sdk/cocoindex/src/connectors/snowflake.rs:981-1018 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1171` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (38 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:761 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:761-798 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1599-1636 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/surrealdb.rs` as WHOLE FILES: this scan already matched 3 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/postgres.rs:761` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 Β· Code Duplication Β· Duplicated block (20 lines × 2) Β· Γ—2
  • Duplicated block (20 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1425 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1425-1444 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1250-1269 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) python/cocoindex/connectors/iggy/_target.py:135 β€” python/cocoindex/connectors/iggy/_target.py:135-154 | python/cocoindex/connectors/kafka/_target.py:140-159 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/iggy/_target.py:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The 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.
D4 Β· Code Duplication Β· Duplicated block (17–18 lines × 2) Β· Γ—2
  • Duplicated block (17–18 lines × 2) rust/code_match/src/lang/cmake.rs:31 β€” rust/code_match/src/lang/cmake.rs:31-47 | rust/code_match/src/lang/rust.rs:43-60 β€” 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 `rust/code_match/src/lang/cmake.rs:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17–18 lines × 2) python/cocoindex/connectors/falkordb/_target.py:736 β€” python/cocoindex/connectors/falkordb/_target.py:736-753 | python/cocoindex/connectors/neo4j/_target.py:854-870 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/falkordb/_target.py:736` 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.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 2) Β· Γ—2
  • Duplicated block (15 lines × 2) rust/sdk/cocoindex/src/connectors/lancedb.rs:1980 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:1980-1994 | rust/sdk/cocoindex/src/connectors/lancedb.rs:2055-2069 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/lancedb.rs:1980` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) examples/paper_metadata/main.py:324 β€” examples/paper_metadata/main.py:324-338 | examples/pdf_embedding/main.py:193-207 β€” 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. 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.
D4 Β· Code Duplication Β· Duplicated block (12–13 lines × 2) Β· Γ—2
  • Duplicated block (12–13 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:419 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:419-431 | rust/sdk/cocoindex/src/connectors/snowflake.rs:382-393 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:419` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/sdk/cocoindex/src/connectors/bigquery.rs:418` calls `and_then`, `get` and `rust/sdk/cocoindex/src/connectors/snowflake.rs:381` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12–13 lines × 2) rust/sdk/cocoindex/src/connectors/qdrant.rs:1253 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1253-1265 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:905-916 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/qdrant.rs` and `rust/sdk/cocoindex/src/connectors/turbopuffer.rs` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/qdrant.rs:1253` 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.
D4 Β· Code Duplication Β· Duplicated block (10–12 lines × 3) Β· Γ—2
  • Duplicated block (10–12 lines × 3) rust/sdk/cocoindex/src/connectors/qdrant.rs:1253 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1253-1264 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:905-915 | rust/sdk/cocoindex/src/cypher_graph.rs:1024-1033 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/qdrant.rs` and `rust/sdk/cocoindex/src/connectors/turbopuffer.rs` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/qdrant.rs:1253` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–12 lines × 3) examples/docs_to_knowledge_graph/main.py:66 β€” examples/docs_to_knowledge_graph/main.py:66-77 | examples/meeting_notes_graph_neo4j/main.py:73-82 | examples/product_recommendation/main.py:56-65 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 8) Β· Γ—2
  • Duplicated block (9 lines × 8) rust/code_ast/src/elements/lang/cfamily.rs:87 β€” rust/code_ast/src/elements/lang/cfamily.rs:87-95 | rust/code_ast/src/elements/lang/cfamily.rs:106-114 | rust/code_ast/src/elements/lang/go.rs:100-108 | rust/code_ast/src/elements/lang/java.rs:112-120 | rust/code_ast/src/elements/lang/java.rs:131-139 | rust/code_ast/src/elements/lang/rust.rs:48-56 | rust/code_ast/src/elements/lang/rust.rs:67-75 | rust/code_ast/src/elements/lang/swift.rs:107-115 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/cfamily.rs` and `rust/code_ast/src/elements/lang/go.rs` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/cfamily.rs:87` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 8) rust/sdk/cocoindex/src/connectors/bigquery.rs:1405 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1405-1413 | rust/sdk/cocoindex/src/connectors/doris.rs:1203-1211 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1149-1157 | rust/sdk/cocoindex/src/connectors/postgres.rs:912-920 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1230-1238 | rust/sdk/cocoindex/src/connectors/sqlite.rs:872-880 | rust/sdk/cocoindex/src/cypher_graph.rs:1371-1379 | rust/sdk/cocoindex/src/resources/fs.rs:1192-1200 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 5) Β· Γ—2
  • Duplicated block (9 lines × 5) rust/sdk/cocoindex/src/connectors/lancedb.rs:1977 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:1977-1985 | rust/sdk/cocoindex/src/connectors/lancedb.rs:2052-2060 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1895-1903 | rust/sdk/cocoindex/src/cypher_graph.rs:1221-1229 | rust/sdk/cocoindex/src/cypher_graph.rs:1457-1465 β€” 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 5) rust/sdk/cocoindex/src/connectors/bigquery.rs:1754 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1754-1762 | rust/sdk/cocoindex/src/connectors/doris.rs:1825-1833 | rust/sdk/cocoindex/src/connectors/postgres.rs:1626-1634 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1528-1536 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1393-1401 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 Β· Code Duplication Β· Duplicated block (6–7 lines × 2) Β· Γ—2
  • Duplicated block (6–7 lines × 2) rust/sdk/cocoindex/src/connectors/lancedb.rs:900 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:900-905 | rust/sdk/cocoindex/src/connectors/postgres.rs:817-823 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/lancedb.rs` and `rust/sdk/cocoindex/src/connectors/postgres.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/lancedb.rs:900` 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 (6–7 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:726 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:726-731 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1562-1568 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/surrealdb.rs` as WHOLE FILES: this scan already matched 3 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. 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.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 6) Β· Γ—2
  • Duplicated block (6 lines × 6) rust/sdk/cocoindex/src/connectors/bigquery.rs:1765 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1765-1770 | rust/sdk/cocoindex/src/connectors/doris.rs:1836-1841 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1734-1739 | rust/sdk/cocoindex/src/connectors/postgres.rs:1653-1658 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1539-1544 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1417-1422 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1765` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `rust/sdk/cocoindex/src/connectors/bigquery.rs:1771` calls `Bool`, `Ok`, `Str` and `rust/sdk/cocoindex/src/connectors/lancedb.rs:1740` 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 (6 lines × 6) rust/sdk/cocoindex/src/connectors/bigquery.rs:1746 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1746-1751 | rust/sdk/cocoindex/src/connectors/doris.rs:1817-1822 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1746-1751 | rust/sdk/cocoindex/src/connectors/postgres.rs:1618-1623 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1520-1525 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1385-1390 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 3) Β· Γ—2
  • Duplicated block (5 lines × 3) rust/sdk/cocoindex/src/connectors/doris.rs:817 β€” rust/sdk/cocoindex/src/connectors/doris.rs:817-821 | rust/sdk/cocoindex/src/connectors/snowflake.rs:729-733 | rust/sdk/cocoindex/src/connectors/sqlite.rs:470-474 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 19 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. 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 3) examples/meeting_notes_graph_falkordb/main.py:290 β€” examples/meeting_notes_graph_falkordb/main.py:290-294 | examples/meeting_notes_graph_neo4j/main.py:299-303 | examples/meeting_notes_graph_surrealdb/main.py:309-313 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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. 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.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 4) Β· Γ—2
  • Duplicated block (6 lines × 4) rust/sdk/cocoindex/src/connectors/bigquery.rs:715 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:715-720 | rust/sdk/cocoindex/src/connectors/doris.rs:390-395 | rust/sdk/cocoindex/src/connectors/snowflake.rs:532-537 | rust/sdk/cocoindex/src/connectors/sqlite.rs:235-240 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:715` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) examples/text_embedding/main.py:96 β€” examples/text_embedding/main.py:96-101 | examples/text_embedding_lancedb/main.py:90-95 | examples/text_embedding_qdrant/main.py:83-88 | examples/text_embedding_turbopuffer/main.py:84-89 β€” 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `table` to `postgres.TableTarget[DocEmbedding]` in one and `lancedb.TableTarget[DocEmbedding]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 Β· Code Duplication Β· Duplicated block (48 lines × 2) Β· Γ—2
  • Duplicated block (48 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1094 β€” python/cocoindex/connectors/falkordb/_target.py:1094-1141 | python/cocoindex/connectors/neo4j/_target.py:1213-1260 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. 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 (48 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1504 β€” python/cocoindex/connectors/falkordb/_target.py:1504-1551 | python/cocoindex/connectors/neo4j/_target.py:1546-1593 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. 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.
D4 Β· Code Duplication Β· Duplicated block (19 lines × 2) Β· Γ—2
  • Duplicated block (19 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1679 β€” python/cocoindex/connectors/falkordb/_target.py:1679-1697 | python/cocoindex/connectors/neo4j/_target.py:1721-1739 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (19 lines × 2) REDACTED:34 β€” REDACTED:34-52 | REDACTED:34-52 β€” `REDACTED` and `REDACTED` 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 2 separate duplicated blocks between them, totalling at least 40 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. 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.
D4 Β· Code Duplication Β· Duplicated block (18 lines × 3) Β· Γ—2
  • Duplicated block (18 lines × 3) python/cocoindex/connectors/qdrant/_target.py:488 β€” python/cocoindex/connectors/qdrant/_target.py:488-505 | python/cocoindex/connectors/turbopuffer/_target.py:442-459 | python/cocoindex/connectors/valkey/_target.py:585-602 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/qdrant/_target.py:488` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (18 lines × 3) examples/meeting_notes_graph_falkordb/main.py:248 β€” examples/meeting_notes_graph_falkordb/main.py:248-265 | examples/meeting_notes_graph_neo4j/main.py:257-274 | examples/meeting_notes_graph_surrealdb/main.py:267-284 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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.
D4 Β· Code Duplication Β· Duplicated block (17 lines × 2) Β· Γ—2
  • Duplicated block (17 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1460 β€” python/cocoindex/connectors/falkordb/_target.py:1460-1476 | python/cocoindex/connectors/neo4j/_target.py:1502-1518 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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 (17 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1587 β€” python/cocoindex/connectors/falkordb/_target.py:1587-1603 | python/cocoindex/connectors/neo4j/_target.py:1629-1645 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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.
X1 Β· Async correctness Β· Task from `asyncio.ensure_future` is not kept Β· Γ—2
  • Task from `asyncio.ensure_future` is not kept python/cocoindex/connectors/kafka/_source.py:134 β€” The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled β€” it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.ensure_future` is not kept python/cocoindex/connectors/iggy/_source.py:131 β€” The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled β€” it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
D1 Β· Cyclomatic Complexity Β· Component Β· Γ—1
  • Component::execute_once (cyclomatic 32) rust/core/src/engine/component.rs:1291 β€” Component::execute_once 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.
D1 Β· Cyclomatic Complexity Β· AsyncFunction.__call__ (cyclomatic 28) Β· Γ—1
  • AsyncFunction.__call__ (cyclomatic 28) REDACTED:1563 β€” AsyncFunction.__call__ 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.
D1 Β· Cyclomatic Complexity Β· FunctionArgs Β· Γ—1
  • FunctionArgs::parse (cyclomatic 27) rust/sdk/cocoindex_macros/src/lib.rs:461 β€” FunctionArgs::parse 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.
D1 Β· Cyclomatic Complexity Β· cocoindex_code_ast Β· Γ—1
  • cocoindex_code_ast::view::lang::classify (cyclomatic 26) rust/code_ast/src/view/lang.rs:729 β€” cocoindex_code_ast::view::lang::classify 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.
D1 Β· Cyclomatic Complexity Β· ChildArgs Β· Γ—1
  • ChildArgs::parse (cyclomatic 26) rust/sdk/cocoindex/src/cli/mod.rs:129 β€” ChildArgs::parse 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.
D1 Β· Cyclomatic Complexity Β· datatype.analyze_type_info (cyclomatic 25) Β· Γ—1
  • datatype.analyze_type_info (cyclomatic 25) python/cocoindex/_internal/datatype.py:205 β€” datatype.analyze_type_info 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.
D1 Β· Cyclomatic Complexity Β· SyncFunction.__call__ (cyclomatic 24) Β· Γ—1
  • SyncFunction.__call__ (cyclomatic 24) REDACTED:987 β€” SyncFunction.__call__ 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.
D1 Β· Cyclomatic Complexity Β· deadline.retry_transient (cyclomatic 22) Β· Γ—1
  • deadline.retry_transient (cyclomatic 22) python/cocoindex/_internal/deadline.py:134 β€” deadline.retry_transient 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.
D1 Β· Cyclomatic Complexity Β· Ctx Β· Γ—1
  • Ctx::dp (cyclomatic 21) rust/code_match/src/matcher.rs:604 β€” Ctx::dp has cyclomatic complexity 21 (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.
D1 Β· Cyclomatic Complexity Β· cocoindex_code_match Β· Γ—1
  • cocoindex_code_match::lexer::lex (cyclomatic 21) rust/code_match/src/lexer.rs:105 β€” cocoindex_code_match::lexer::lex 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.
D1 Β· Cyclomatic Complexity Β· collect_changes.main (cyclomatic 21) Β· Γ—1
  • collect_changes.main (cyclomatic 21) dev/agent-skills/create-release/scripts/collect_changes.py:186 β€” collect_changes.main 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.
D1 Β· Cyclomatic Complexity Β· TableHandler Β· Γ—1
  • TableHandler::reconcile (cyclomatic 20) rust/sdk/cocoindex/src/connectors/surrealdb.rs:1541 β€” TableHandler::reconcile 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.
D1 Β· Cyclomatic Complexity Β· memo_fingerprint._canonicalize (cyclomatic 20) Β· Γ—1
  • memo_fingerprint._canonicalize (cyclomatic 20) REDACTED:284 β€” memo_fingerprint._canonicalize 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.
D1 Β· Cyclomatic Complexity Β· _LiveDirItems._watch (cyclomatic 20) Β· Γ—1
  • _LiveDirItems._watch (cyclomatic 20) python/cocoindex/connectors/localfs/_source.py:228 β€” _LiveDirItems._watch 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.
D1 Β· Cyclomatic Complexity Β· remark-link-checker.remarkLinkChecker.<returned closure> (cyclomatic 20) Β· Γ—1
  • remark-link-checker.remarkLinkChecker.<returned closure> (cyclomatic 20) docs/scripts/remark-link-checker.mjs:171 β€” remark-link-checker.remarkLinkChecker.<returned closure> has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 177, 266). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 Β· Cyclomatic Complexity Β· llms.llmsTxt (cyclomatic 20) Β· Γ—1
  • llms.llmsTxt (cyclomatic 20) docs/src/lib/llms.ts:14 β€” llms.llmsTxt has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 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.
D1 Β· Cyclomatic Complexity Β· LiveDirWalker Β· Γ—1
  • LiveDirWalker::apply_changes (cyclomatic 18) rust/sdk/cocoindex/src/resources/fs.rs:213 β€” LiveDirWalker::apply_changes 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.
D1 Β· Cyclomatic Complexity Β· cocoindex_py Β· Γ—1
  • cocoindex_py::memo_fingerprint::write_py_memo_key (cyclomatic 17) rust/py/src/memo_fingerprint.rs:66 β€” cocoindex_py::memo_fingerprint::write_py_memo_key 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.
D1 Β· Cyclomatic Complexity Β· generate_cli_docs.format_options_section (cyclomatic 17) Β· Γ—1
  • generate_cli_docs.format_options_section (cyclomatic 17) dev/generate_cli_docs.py:61 β€” generate_cli_docs.format_options_section 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.
D1 Β· Cyclomatic Complexity Β· _ApiContext._get_paced (cyclomatic 17) Β· Γ—1
  • _ApiContext._get_paced (cyclomatic 17) python/cocoindex/connectors/discord/_source.py:485 β€” _ApiContext._get_paced 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.
D1 Β· Cyclomatic Complexity Β· _target._apply_column_actions (cyclomatic 17) Β· Γ—1
  • _target._apply_column_actions (cyclomatic 17) python/cocoindex/connectors/sqlite/_target.py:793 β€” _target._apply_column_actions 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.
D1 Β· Cyclomatic Complexity Β· RelationTarget.declare_relation (cyclomatic 17) Β· Γ—1
  • RelationTarget.declare_relation (cyclomatic 17) python/cocoindex/connectors/surrealdb/_target.py:1446 β€” RelationTarget.declare_relation 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.
D1 Β· Cyclomatic Complexity Β· _target._resolve_column (cyclomatic 17) Β· Γ—1
  • _target._resolve_column (cyclomatic 17) python/cocoindex/connectors/zvec/_target.py:342 β€” _target._resolve_column 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.
D1 Β· Cyclomatic Complexity Β· llms.llmsFullTxt (cyclomatic 17) Β· Γ—1
  • llms.llmsFullTxt (cyclomatic 17) docs/src/lib/llms.ts:113 β€” llms.llmsFullTxt has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· SwiftRawString Β· Γ—1
  • SwiftRawString::match_len (cyclomatic 16) rust/code_match/src/lang/swift.rs:27 β€” SwiftRawString::match_len 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.
D1 Β· Cyclomatic Complexity Β· InternalRecursiveChunker Β· Γ—1
  • InternalRecursiveChunker::merge_atom_chunks (cyclomatic 16) rust/ops_text/src/split/recursive.rs:774 β€” InternalRecursiveChunker::merge_atom_chunks has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs 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.
D1 Β· Cyclomatic Complexity Β· cocoindex_ops_text Β· Γ—1
  • cocoindex_ops_text::pattern_matcher::brace_expand (cyclomatic 16) rust/ops_text/src/pattern_matcher.rs:27 β€” cocoindex_ops_text::pattern_matcher::brace_expand 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.
D1 Β· Cyclomatic Complexity Β· function._apply_memo_key (cyclomatic 16) Β· Γ—1
  • function._apply_memo_key (cyclomatic 16) REDACTED:641 β€” function._apply_memo_key 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.
D1 Β· Cyclomatic Complexity Β· cli.show (cyclomatic 16) Β· Γ—1
  • cli.show (cyclomatic 16) python/cocoindex/cli.py:751 β€” cli.show 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.
D1 Β· Cyclomatic Complexity Β· engine_object.dump_engine_object (cyclomatic 16) Β· Γ—1
  • engine_object.dump_engine_object (cyclomatic 16) python/cocoindex/engine_object.py:16 β€” engine_object.dump_engine_object 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.
D1 Β· Cyclomatic Complexity Β· remark-example-images.remarkExampleImages.<returned closure> (cyclomatic 16) Β· Γ—1
  • remark-example-images.remarkExampleImages.<returned closure> (cyclomatic 16) docs/scripts/remark-example-images.mjs:9 β€” remark-example-images.remarkExampleImages.<returned closure> has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 35, 21, 36, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 Β· Cyclomatic Complexity Β· search-accessibility.installSearchAccessibility Β· Γ—1
  • search-accessibility.installSearchAccessibility::sync (cyclomatic 16) docs/src/scripts/search-accessibility.ts:18 β€” search-accessibility.installSearchAccessibility::sync 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.
D2 Β· Cognitive Complexity Β· Component Β· Γ—1
  • Component::execute_once (cognitive 59) rust/core/src/engine/component.rs:1291 β€” Component::execute_once has cognitive complexity 59 (threshold 15). Drivers by points: if/else 21 (43 pts), match/switch 6 (9 pts), boolean chains 6, 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.
D2 Β· Cognitive Complexity Β· _LiveDirItems._watch (cognitive 52) Β· Γ—1
  • _LiveDirItems._watch (cognitive 52) python/cocoindex/connectors/localfs/_source.py:228 β€” _LiveDirItems._watch has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (29 pts), error handling 5 (14 pts), loops 3 (7 pts), boolean chains 1, ternaries 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.
D2 Β· Cognitive Complexity Β· AsyncFunction.__call__ (cognitive 45) Β· Γ—1
  • AsyncFunction.__call__ (cognitive 45) REDACTED:1563 β€” AsyncFunction.__call__ has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 9, ternaries 1 (3 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.
D2 Β· Cognitive Complexity Β· _target._apply_column_actions (cognitive 42) Β· Γ—1
  • _target._apply_column_actions (cognitive 42) python/cocoindex/connectors/sqlite/_target.py:793 β€” _target._apply_column_actions has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (23 pts), error handling 4 (12 pts), ternaries 2 (6 pts), loops 1 (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.
D2 Β· Cognitive Complexity Β· FunctionArgs Β· Γ—1
  • FunctionArgs::parse (cognitive 40) rust/sdk/cocoindex_macros/src/lib.rs:461 β€” FunctionArgs::parse has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (29 pts), match/switch 2 (5 pts), loops 2 (4 pts), boolean chains 2 (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.
D2 Β· Cognitive Complexity Β· SyncFunction.__call__ (cognitive 40) Β· Γ—1
  • SyncFunction.__call__ (cognitive 40) REDACTED:987 β€” SyncFunction.__call__ has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 7, ternaries 1 (3 pts) (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.
D2 Β· Cognitive Complexity Β· deadline.retry_transient (cognitive 37) Β· Γ—1
  • deadline.retry_transient (cognitive 37) python/cocoindex/_internal/deadline.py:134 β€” deadline.retry_transient has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 6, error handling 2 (5 pts), ternaries 2 (3 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.
D2 Β· Cognitive Complexity Β· _ApiContext._get_paced (cognitive 37) Β· Γ—1
  • _ApiContext._get_paced (cognitive 37) python/cocoindex/connectors/discord/_source.py:485 β€” _ApiContext._get_paced has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (27 pts), error handling 2 (5 pts), loops 2 (3 pts), ternaries 1 (2 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.
D2 Β· Cognitive Complexity Β· _VectorIndexHandler._apply_actions (cognitive 36) Β· Γ—1
  • _VectorIndexHandler._apply_actions (cognitive 36) python/cocoindex/connectors/lancedb/_target.py:832 β€” _VectorIndexHandler._apply_actions has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 1 (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.
D2 Β· Cognitive Complexity Β· RelationTarget.declare_relation (cognitive 36) Β· Γ—1
  • RelationTarget.declare_relation (cognitive 36) python/cocoindex/connectors/surrealdb/_target.py:1446 β€” RelationTarget.declare_relation has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 1 (3 pts), ternaries 1 (3 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.
D2 Β· Cognitive Complexity Β· llms.llmsTxt (cognitive 36) Β· Γ—1
  • llms.llmsTxt (cognitive 36) docs/src/lib/llms.ts:14 β€” llms.llmsTxt has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (12 pts), ternaries 5 (7 pts), boolean chains 1 (nesting depth added 16). Of this number, 32 points are the body's own statements and 4 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.
D2 Β· Cognitive Complexity Β· DirWalker._walk_sync (cognitive 35) Β· Γ—1
  • DirWalker._walk_sync (cognitive 35) python/cocoindex/connectors/localfs/_source.py:105 β€” DirWalker._walk_sync has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (17 pts), error handling 4 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· collect_changes.main (cognitive 31) Β· Γ—1
  • collect_changes.main (cognitive 31) dev/agent-skills/create-release/scripts/collect_changes.py:186 β€” collect_changes.main has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 4 (7 pts), loops 4, 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.
D2 Β· Cognitive Complexity Β· datatype.analyze_type_info (cognitive 31) Β· Γ—1
  • datatype.analyze_type_info (cognitive 31) python/cocoindex/_internal/datatype.py:205 β€” datatype.analyze_type_info has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (9 pts), boolean chains 6, 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.
D2 Β· Cognitive Complexity Β· _target._apply_table_actions (cognitive 30) Β· Γ—1
  • _target._apply_table_actions (cognitive 30) python/cocoindex/connectors/sqlite/_target.py:890 β€” _target._apply_table_actions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (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.
D2 Β· Cognitive Complexity Β· search-accessibility.installSearchAccessibility Β· Γ—1
  • search-accessibility.installSearchAccessibility::sync (cognitive 29) docs/src/scripts/search-accessibility.ts:18 β€” search-accessibility.installSearchAccessibility::sync has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (5 pts), boolean chains 3, ternaries 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.
D2 Β· Cognitive Complexity Β· function._apply_memo_key (cognitive 28) Β· Γ—1
  • function._apply_memo_key (cognitive 28) REDACTED:641 β€” function._apply_memo_key has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 2, ternaries 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.
D2 Β· Cognitive Complexity Β· cli._print_target_states (cognitive 28) Β· Γ—1
  • cli._print_target_states (cognitive 28) python/cocoindex/cli.py:982 β€” cli._print_target_states has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (12 pts), loops 4 (10 pts), boolean chains 3, if/else 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.
D2 Β· Cognitive Complexity Β· _TableHandler._apply_actions (cognitive 28) Β· Γ—1
  • _TableHandler._apply_actions (cognitive 28) python/cocoindex/connectors/surrealdb/_target.py:1173 β€” _TableHandler._apply_actions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4 (6 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.
D2 Β· Cognitive Complexity Β· _TableHandler._apply_column_actions (cognitive 27) Β· Γ—1
  • _TableHandler._apply_column_actions (cognitive 27) python/cocoindex/connectors/postgres/_target.py:1314 β€” _TableHandler._apply_column_actions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 1 (3 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· Point Β· Γ—1
  • Point::to_qdrant_vectors (cognitive 25) rust/sdk/cocoindex/src/connectors/qdrant.rs:828 β€” Point::to_qdrant_vectors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 3 (9 pts), loops 1 (2 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.
D2 Β· Cognitive Complexity Β· generate_cli_docs.format_options_section (cognitive 25) Β· Γ—1
  • generate_cli_docs.format_options_section (cognitive 25) dev/generate_cli_docs.py:61 β€” generate_cli_docs.format_options_section has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (5 pts), boolean chains 2, 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.
D2 Β· Cognitive Complexity Β· _target._apply_column_actions (cognitive 25) Β· Γ—1
  • _target._apply_column_actions (cognitive 25) python/cocoindex/connectors/doris/_target.py:1129 β€” _target._apply_column_actions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 2 (6 pts), ternaries 1 (3 pts), boolean chains 1, 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.
D2 Β· Cognitive Complexity Β· SwiftRawString Β· Γ—1
  • SwiftRawString::match_len (cognitive 24) rust/code_match/src/lang/swift.rs:27 β€” SwiftRawString::match_len has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 5 (9 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.
D2 Β· Cognitive Complexity Β· cocoindex_py Β· Γ—1
  • cocoindex_py::memo_fingerprint::write_py_memo_key (cognitive 24) rust/py/src/memo_fingerprint.rs:66 β€” cocoindex_py::memo_fingerprint::write_py_memo_key has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 4 (10 pts) (nesting depth added 7). 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.
D2 Β· Cognitive Complexity Β· _target._apply_table_actions (cognitive 24) Β· Γ—1
  • _target._apply_table_actions (cognitive 24) python/cocoindex/connectors/doris/_target.py:1196 β€” _target._apply_table_actions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), error handling 1 (4 pts), loops 3 (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.
D2 Β· Cognitive Complexity Β· _IndexHandler._delete_prefix_keys (cognitive 24) Β· Γ—1
  • _IndexHandler._delete_prefix_keys (cognitive 24) python/cocoindex/connectors/valkey/_target.py:460 β€” _IndexHandler._delete_prefix_keys has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (22 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.
D2 Β· Cognitive Complexity Β· Pattern Β· Γ—1
  • Pattern::matches_in_tree (cognitive 23) rust/code_match/src/matcher.rs:310 β€” Pattern::matches_in_tree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 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.
D2 Β· Cognitive Complexity Β· _target._generate_create_table_ddl (cognitive 23) Β· Γ—1
  • _target._generate_create_table_ddl (cognitive 23) python/cocoindex/connectors/doris/_target.py:779 β€” _target._generate_create_table_ddl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), loops 3, 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.
D2 Β· Cognitive Complexity Β· remark-link-checker.remarkLinkChecker.<returned closure> (cognitive 23) Β· Γ—1
  • remark-link-checker.remarkLinkChecker.<returned closure> (cognitive 23) docs/scripts/remark-link-checker.mjs:171 β€” remark-link-checker.remarkLinkChecker.<returned closure> has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 177, 266). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 Β· Cognitive Complexity Β· memo_fingerprint._canonicalize (cognitive 22) Β· Γ—1
  • memo_fingerprint._canonicalize (cognitive 22) REDACTED:284 β€” memo_fingerprint._canonicalize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· update_stats.readable_path (cognitive 22) Β· Γ—1
  • update_stats.readable_path (cognitive 22) python/cocoindex/_internal/update_stats.py:56 β€” update_stats.readable_path has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, ternaries 1 (3 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.
D2 Β· Cognitive Complexity Β· _VectorIndexHandler._apply_actions (cognitive 22) Β· Γ—1
  • _VectorIndexHandler._apply_actions (cognitive 22) python/cocoindex/connectors/postgres/_target.py:541 β€” _VectorIndexHandler._apply_actions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· _TableHandler._apply_actions (cognitive 22) Β· Γ—1
  • _TableHandler._apply_actions (cognitive 22) python/cocoindex/connectors/snowflake/_target.py:665 β€” _TableHandler._apply_actions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (4 pts), error handling 1 (2 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.
D2 Β· Cognitive Complexity Β· S3Walker Β· Γ—1
  • S3Walker::list (cognitive 21) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:447 β€” S3Walker::list has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 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.
D2 Β· Cognitive Complexity Β· AzureBlobWalker Β· Γ—1
  • AzureBlobWalker::list (cognitive 21) rust/sdk/cocoindex/src/connectors/azure_blob.rs:1188 β€” AzureBlobWalker::list has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 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.
D2 Β· Cognitive Complexity Β· function._normalize_memo_key (cognitive 21) Β· Γ—1
  • function._normalize_memo_key (cognitive 21) REDACTED:725 β€” function._normalize_memo_key has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 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.
D2 Β· Cognitive Complexity Β· _RowHandler._apply_actions (cognitive 21) Β· Γ—1
  • _RowHandler._apply_actions (cognitive 21) python/cocoindex/connectors/doris/_target.py:887 β€” _RowHandler._apply_actions has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 5 (6 pts), error handling 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.
D2 Β· Cognitive Complexity Β· user_app_loader.load_user_app (cognitive 21) Β· Γ—1
  • user_app_loader.load_user_app (cognitive 21) python/cocoindex/user_app_loader.py:49 β€” user_app_loader.load_user_app has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 3 (4 pts), boolean chains 3 (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.
D2 Β· Cognitive Complexity Β· _target._resolve_column (cognitive 20) Β· Γ—1
  • _target._resolve_column (cognitive 20) python/cocoindex/connectors/zvec/_target.py:342 β€” _target._resolve_column has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, loops 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.
D2 Β· Cognitive Complexity Β· middleware.onRequest (cognitive 20) Β· Γ—1
  • middleware.onRequest (cognitive 20) docs/src/middleware.ts:15 β€” middleware.onRequest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 4 (8 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.
D2 Β· Cognitive Complexity Β· SeparatorSplitter Β· Γ—1
  • SeparatorSplitter::split (cognitive 19) rust/ops_text/src/split/by_separators.rs:71 β€” SeparatorSplitter::split has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (6 pts), match/switch 2 (6 pts), if/else 4, boolean chains 3 (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.
D2 Β· Cognitive Complexity Β· GoogleDriveSource Β· Γ—1
  • GoogleDriveSource::list_files (cognitive 19) rust/sdk/cocoindex/src/connectors/gdrive.rs:1952 β€” GoogleDriveSource::list_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 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.
D2 Β· Cognitive Complexity Β· AsyncFunction.__init__ (cognitive 19) Β· Γ—1
  • AsyncFunction.__init__ (cognitive 19) REDACTED:1420 β€” AsyncFunction.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· RustHooks Β· Γ—1
  • RustHooks::extract_path (cognitive 18) rust/code_ast/src/elements/lang/rust.rs:34 β€” RustHooks::extract_path has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (12 pts), if/else 4 (6 pts) (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.
D2 Β· Cognitive Complexity Β· Endpoint Β· Γ—1
  • Endpoint::send_with_retry (cognitive 18) rust/sdk/cocoindex/src/ops/api.rs:144 β€” Endpoint::send_with_retry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (4 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.
D2 Β· Cognitive Complexity Β· target_state_codec._is_row (cognitive 18) Β· Γ—1
  • target_state_codec._is_row (cognitive 18) REDACTED:198 β€” target_state_codec._is_row has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 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.
D2 Β· Cognitive Complexity Β· _source.list_files (cognitive 18) Β· Γ—1
  • _source.list_files (cognitive 18) python/cocoindex/connectors/google_drive/_source.py:279 β€” _source.list_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), ternaries 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.
D2 Β· Cognitive Complexity Β· _target._track_root_dirs (cognitive 18) Β· Γ—1
  • _target._track_root_dirs (cognitive 18) python/cocoindex/connectors/localfs/_target.py:188 β€” _target._track_root_dirs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, 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.
D2 Β· Cognitive Complexity Β· CFamilyHooks Β· Γ—1
  • CFamilyHooks::extract_path (cognitive 17) rust/code_ast/src/elements/lang/cfamily.rs:71 β€” CFamilyHooks::extract_path has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 4 (6 pts) (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.
D2 Β· Cognitive Complexity Β· ChildArgs Β· Γ—1
  • ChildArgs::parse (cognitive 17) rust/sdk/cocoindex/src/cli/mod.rs:129 β€” ChildArgs::parse has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 3, match/switch 2 (3 pts), loops 1 (nesting depth added 1). 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.
D2 Β· Cognitive Complexity Β· BatcherData Β· Γ—1
  • BatcherData::run_pump (cognitive 17) rust/utils/src/batching.rs:296 β€” BatcherData::run_pump has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 2 (3 pts), boolean chains 1, loops 1 (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.
D2 Β· Cognitive Complexity Β· cli._load_app (cognitive 17) Β· Γ—1
  • cli._load_app (cognitive 17) python/cocoindex/cli.py:406 β€” cli._load_app has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, error handling 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.
D2 Β· Cognitive Complexity Β· cli.show (cognitive 17) Β· Γ—1
  • cli.show (cognitive 17) python/cocoindex/cli.py:751 β€” cli.show has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7 (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.
D2 Β· Cognitive Complexity Β· _TableHandler._apply_actions (cognitive 17) Β· Γ—1
  • _TableHandler._apply_actions (cognitive 17) python/cocoindex/connectors/lancedb/_target.py:1106 β€” _TableHandler._apply_actions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (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.
D2 Β· Cognitive Complexity Β· _OCIStreamSubscriber.send (cognitive 17) Β· Γ—1
  • _OCIStreamSubscriber.send (cognitive 17) python/cocoindex/connectors/oci_object_storage/_source.py:507 β€” _OCIStreamSubscriber.send has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 3 (4 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.
D2 Β· Cognitive Complexity Β· _CollectionHandler._apply_actions (cognitive 17) Β· Γ—1
  • _CollectionHandler._apply_actions (cognitive 17) python/cocoindex/connectors/qdrant/_target.py:389 β€” _CollectionHandler._apply_actions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 1 (4 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.
D2 Β· Cognitive Complexity Β· _IndexHandler._apply_actions (cognitive 17) Β· Γ—1
  • _IndexHandler._apply_actions (cognitive 17) python/cocoindex/connectors/valkey/_target.py:420 β€” _IndexHandler._apply_actions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 1 (4 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.
D2 Β· Cognitive Complexity Β· CollectionTarget.declare_row (cognitive 17) Β· Γ—1
  • CollectionTarget.declare_row (cognitive 17) python/cocoindex/connectors/zvec/_target.py:947 β€” CollectionTarget.declare_row has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 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.
D2 Β· Cognitive Complexity Β· _target._build_zvec_schema (cognitive 17) Β· Γ—1
  • _target._build_zvec_schema (cognitive 17) python/cocoindex/connectors/zvec/_target.py:543 β€” _target._build_zvec_schema has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 1 (3 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.
D2 Β· Cognitive Complexity Β· RecordHandler Β· Γ—1
  • RecordHandler::reconcile (cognitive 16) rust/sdk/cocoindex/src/connectors/surrealdb.rs:1769 β€” RecordHandler::reconcile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (3 pts), boolean chains 2 (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.
D2 Β· Cognitive Complexity Β· cocoindex_utils Β· Γ—1
  • cocoindex_utils::retryable::run (cognitive 16) rust/utils/src/retryable.rs:112 β€” cocoindex_utils::retryable::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 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.
D2 Β· Cognitive Complexity Β· banner._nearest_256 (cognitive 16) Β· Γ—1
  • banner._nearest_256 (cognitive 16) python/cocoindex/_internal/banner.py:61 β€” banner._nearest_256 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (7 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.
D2 Β· Cognitive Complexity Β· AsyncFunction._create_batch_runner_fn (cognitive 16) Β· Γ—1
  • AsyncFunction._create_batch_runner_fn (cognitive 16) REDACTED:1771 β€” AsyncFunction._create_batch_runner_fn has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 1 (2 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.
D2 Β· Cognitive Complexity Β· _RowHandler._evaluate_optimize (cognitive 16) Β· Γ—1
  • _RowHandler._evaluate_optimize (cognitive 16) python/cocoindex/connectors/lancedb/_target.py:624 β€” _RowHandler._evaluate_optimize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· OCIWalker._walk_sync (cognitive 16) Β· Γ—1
  • OCIWalker._walk_sync (cognitive 16) python/cocoindex/connectors/oci_object_storage/_source.py:315 β€” OCIWalker._walk_sync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 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.
D2 Β· Cognitive Complexity Β· _TableHandler._create_table (cognitive 16) Β· Γ—1
  • _TableHandler._create_table (cognitive 16) python/cocoindex/connectors/surrealdb/_target.py:1228 β€” _TableHandler._create_table has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (5 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· _target._row_to_upsert (cognitive 16) Β· Γ—1
  • _target._row_to_upsert (cognitive 16) python/cocoindex/connectors/turbopuffer/_target.py:199 β€” _target._row_to_upsert has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 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.
D2 Β· Cognitive Complexity Β· remark-link-checker.loadHeadingSlugs (cognitive 16) Β· Γ—1
  • remark-link-checker.loadHeadingSlugs (cognitive 16) docs/scripts/remark-link-checker.mjs:75 β€” remark-link-checker.loadHeadingSlugs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), error handling 1, ternaries 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.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D35 Β· Change Coupling Β· Change coupling Β· Γ—1
  • Change coupling: environment.rs ↔ execution.rs rust/core/src/engine/environment.rs:1 β€” `rust/core/src/engine/environment.rs` and `rust/core/src/engine/execution.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β€” a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module β€” a sibling reference still needs an import β€” so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `d7e67568` feat(engine): typed AlreadyDeclaredError for a second declaration in …; `3f310d1a` refactor(state_store): remove ReadTxn from API; standalone reads per …; `44215824` fix(engine): close concurrent preempt race in target-state ownership … β€” run `git show` on any of them.
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D4 Β· Code Duplication Β· Near-duplicate member family (5 members, 18 shared lines) Β· Γ—1
  • Near-duplicate member family (5 members, 18 shared lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:672 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:672-700 | rust/sdk/cocoindex/src/connectors/doris.rs:347-375 | rust/sdk/cocoindex/src/connectors/postgres.rs:106-135 | rust/sdk/cocoindex/src/connectors/snowflake.rs:489-517 | rust/sdk/cocoindex/src/connectors/sqlite.rs:190-218 β€” These 5 members are variants of one another: a block of 18 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, 22 shared lines) Β· Γ—1
  • Near-duplicate member family (4 members, 22 shared lines) rust/code_ast/src/elements/lang/cfamily.rs:75 β€” rust/code_ast/src/elements/lang/cfamily.rs:75-129 | rust/code_ast/src/elements/lang/go.rs:92-145 | rust/code_ast/src/elements/lang/java.rs:102-163 | rust/code_ast/src/elements/lang/rust.rs:38-98 β€” 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 pair (39 shared lines) Β· Γ—1
  • Near-duplicate member pair (39 shared lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:1588 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1588-1644 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1377-1428 β€” These two members are variants of one another: 39 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 (38 corresponding lines) Β· Γ—1
  • Edited copy of a member (38 corresponding lines) python/cocoindex/connectors/falkordb/_target.py:1150 β€” python/cocoindex/connectors/falkordb/_target.py:1150-1189 | python/cocoindex/connectors/neo4j/_target.py:1269-1306 β€” 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 Β· Members sharing a duplicated core (8 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) rust/sdk/cocoindex/src/connectors/bigquery.rs:1397 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1397-1420 | rust/sdk/cocoindex/src/connectors/doris.rs:1194-1218 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1143-1185 | rust/sdk/cocoindex/src/connectors/postgres.rs:904-927 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1222-1245 | rust/sdk/cocoindex/src/connectors/sqlite.rs:866-887 | rust/sdk/cocoindex/src/cypher_graph.rs:1370-1400 | rust/sdk/cocoindex/src/resources/fs.rs:1180-1228 β€” 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.
D4 Β· Code Duplication Β· Members sharing a duplicated core (7 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) python/cocoindex/connectors/doris/_target.py:1426 β€” python/cocoindex/connectors/doris/_target.py:1426-1435 | python/cocoindex/connectors/falkordb/_target.py:1436-1450 | python/cocoindex/connectors/lancedb/_target.py:1378-1392 | python/cocoindex/connectors/neo4j/_target.py:1478-1492 | python/cocoindex/connectors/postgres/_target.py:1557-1575 | python/cocoindex/connectors/sqlite/_target.py:1099-1113 | python/cocoindex/connectors/surrealdb/_target.py:1361-1377 β€” 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.
D4 Β· Code Duplication Β· Edited copy of a member (66 corresponding lines) Β· Γ—1
  • Edited copy of a member (66 corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:1258 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1258-1323 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1085-1150 β€” These two members are one piece of code written twice and then edited apart: 66 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 (60 corresponding lines) Β· Γ—1
  • Edited copy of a member (60 corresponding lines) rust/sdk/cocoindex/src/connectors/qdrant.rs:1251 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1251-1313 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:903-962 β€” These two members are one piece of code written twice and then edited apart: 60 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) rust/ops_text/src/pattern_matcher.rs:27 β€” rust/ops_text/src/pattern_matcher.rs:27-84 | rust/sdk/cocoindex/src/resources/file.rs:521-572 β€” 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 (65 corresponding lines) Β· Γ—1
  • Edited copy of a member (65 corresponding lines) rust/core/src/engine/component.rs:1153 β€” rust/core/src/engine/component.rs:1153-1220 | rust/core/src/engine/component.rs:1225-1289 β€” These two members are one piece of code written twice and then edited apart: 65 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 (39 corresponding lines) Β· Γ—1
  • Edited copy of a member (39 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs:942 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:942-980 | rust/sdk/cocoindex/src/connectors/sqlite.rs:891-929 β€” These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (41 corresponding lines) Β· Γ—1
  • Edited copy of a member (41 corresponding lines) rust/sdk/cocoindex/src/connectors/postgres.rs:816 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:816-863 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1651-1691 β€” These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (45 corresponding lines) Β· Γ—1
  • Edited copy of a member (45 corresponding lines) python/cocoindex/connectors/bigquery/_target.py:693 β€” python/cocoindex/connectors/bigquery/_target.py:693-742 | python/cocoindex/connectors/snowflake/_target.py:593-637 β€” 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 (47 corresponding lines) Β· Γ—1
  • Edited copy of a member (47 corresponding lines) python/cocoindex/connectors/falkordb/_target.py:658 β€” python/cocoindex/connectors/falkordb/_target.py:658-712 | python/cocoindex/connectors/neo4j/_target.py:784-830 β€” These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (37 corresponding lines) Β· Γ—1
  • Edited copy of a member (37 corresponding lines) rust/sdk/cocoindex_macros/src/lib.rs:2113 β€” rust/sdk/cocoindex_macros/src/lib.rs:2113-2149 | rust/sdk/cocoindex_macros/src/lib.rs:2184-2220 β€” These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 52+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 52+ corresponding lines) rust/code_ast/src/elements/lang/cfamily.rs:193 β€” rust/code_ast/src/elements/lang/cfamily.rs:193-244 | rust/code_ast/src/elements/lang/cfamily.rs:247-324 | rust/code_ast/src/elements/lang/rust.rs:102-174 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 52 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (76 corresponding lines) Β· Γ—1
  • Edited copy of a member (76 corresponding lines) python/cocoindex/connectorkits/async_adapters.py:41 β€” python/cocoindex/connectorkits/async_adapters.py:41-117 | python/cocoindex/connectorkits/async_adapters.py:125-200 β€” These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 30+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 30+ corresponding lines) rust/sdk/cocoindex/src/connectors/qdrant.rs:1419 β€” rust/sdk/cocoindex/src/connectors/qdrant.rs:1419-1451 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:1030-1059 | rust/sdk/cocoindex/src/connectors/valkey.rs:997-1034 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 26+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 26+ corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:1067 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1067-1092 | rust/sdk/cocoindex/src/connectors/snowflake.rs:877-902 | rust/sdk/cocoindex/src/connectors/sqlite.rs:570-599 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (40 corresponding lines) Β· Γ—1
  • Edited copy of a member (40 corresponding lines) rust/sdk/cocoindex/src/connectors/doris.rs:1133 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1133-1172 | rust/sdk/cocoindex/src/connectors/sqlite.rs:795-844 β€” 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 copies of one member (7 members, 40+ corresponding lines) Β· Γ—1
  • Edited copies of one member (7 members, 40+ corresponding lines) python/cocoindex/connectors/doris/_target.py:385 β€” python/cocoindex/connectors/doris/_target.py:385-429 | python/cocoindex/connectors/falkordb/_target.py:427-466 | python/cocoindex/connectors/lancedb/_target.py:293-335 | python/cocoindex/connectors/neo4j/_target.py:490-529 | python/cocoindex/connectors/postgres/_target.py:420-463 | python/cocoindex/connectors/sqlite/_target.py:371-416 | python/cocoindex/connectors/surrealdb/_target.py:524-568 β€” These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 39+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 39+ corresponding lines) python/cocoindex/connectors/lancedb/_target.py:1112 β€” python/cocoindex/connectors/lancedb/_target.py:1112-1150 | python/cocoindex/connectors/postgres/_target.py:1210-1249 | python/cocoindex/connectors/snowflake/_target.py:671-714 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (36 corresponding lines) Β· Γ—1
  • Edited copy of a member (36 corresponding lines) python/cocoindex/connectors/falkordb/_cypher.py:120 β€” python/cocoindex/connectors/falkordb/_cypher.py:120-156 | python/cocoindex/connectors/neo4j/_cypher.py:166-201 β€” These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (63 corresponding lines) Β· Γ—1
  • Edited copy of a member (63 corresponding lines) python/cocoindex/_internal/api.py:238 β€” python/cocoindex/_internal/api.py:238-312 | python/cocoindex/_internal/api.py:362-424 β€” 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 copies of one member (3 members, 36+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 36+ corresponding lines) python/cocoindex/connectors/qdrant/_target.py:479 β€” python/cocoindex/connectors/qdrant/_target.py:479-514 | python/cocoindex/connectors/turbopuffer/_target.py:432-468 | python/cocoindex/connectors/valkey/_target.py:571-611 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 22+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 22+ corresponding lines) rust/sdk/cocoindex/src/connectors/doris.rs:1222 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1222-1244 | rust/sdk/cocoindex/src/connectors/lancedb.rs:2009-2030 | rust/sdk/cocoindex/src/connectors/lancedb.rs:2084-2105 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (7 members, 31+ corresponding lines) Β· Γ—1
  • Edited copies of one member (7 members, 31+ corresponding lines) python/cocoindex/connectors/doris/_target.py:296 β€” python/cocoindex/connectors/doris/_target.py:296-326 | python/cocoindex/connectors/falkordb/_target.py:309-340 | python/cocoindex/connectors/lancedb/_target.py:157-205 | python/cocoindex/connectors/neo4j/_target.py:372-403 | python/cocoindex/connectors/postgres/_target.py:285-332 | python/cocoindex/connectors/sqlite/_target.py:231-282 | python/cocoindex/connectors/surrealdb/_target.py:395-438 β€” These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 18+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 18+ corresponding lines) rust/sdk/cocoindex/src/connectors/iggy.rs:324 β€” rust/sdk/cocoindex/src/connectors/iggy.rs:324-342 | rust/sdk/cocoindex/src/connectors/postgres.rs:674-691 | rust/sdk/cocoindex/src/cypher_graph.rs:969-987 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 17+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 17+ corresponding lines) rust/sdk/cocoindex/src/connectors/lancedb.rs:444 β€” rust/sdk/cocoindex/src/connectors/lancedb.rs:444-462 | rust/sdk/cocoindex/src/connectors/qdrant.rs:1018-1034 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:679-696 | rust/sdk/cocoindex/src/connectors/valkey.rs:550-566 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 7+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 7+ corresponding lines) rust/py/src/inspect.rs:129 β€” rust/py/src/inspect.rs:129-138 | rust/py/src/inspect.rs:322-328 | rust/py/src/inspect.rs:418-424 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (5 members, 10+ corresponding lines) Β· Γ—1
  • Edited copies of one member (5 members, 10+ corresponding lines) rust/sdk/cocoindex/src/connectors/bigquery.rs:1798 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1798-1807 | rust/sdk/cocoindex/src/connectors/doris.rs:1878-1888 | rust/sdk/cocoindex/src/connectors/postgres.rs:1864-1873 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1553-1562 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1573-1582 β€” These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 6+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 6+ corresponding lines) rust/sdk/cocoindex/src/connectors/surrealdb.rs:1112 β€” rust/sdk/cocoindex/src/connectors/surrealdb.rs:1112-1117 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1186-1199 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1220-1225 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 12+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 12+ corresponding lines) rust/code_match/src/lang/bash.rs:7 β€” rust/code_match/src/lang/bash.rs:7-18 | rust/code_match/src/lang/go.rs:8-20 | rust/code_match/src/lang/sql.rs:8-20 | rust/code_match/src/lang/yaml.rs:9-20 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 15+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 15+ corresponding lines) rust/core/src/engine/live_component.rs:364 β€” rust/core/src/engine/live_component.rs:364-380 | rust/core/src/engine/live_component.rs:414-428 | rust/core/src/engine/live_component.rs:457-472 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 8+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 8+ corresponding lines) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:154 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:154-161 | rust/sdk/cocoindex/src/connectors/azure_blob.rs:210-217 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:336-344 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (6 members, 8+ corresponding lines) Β· Γ—1
  • Edited copies of one member (6 members, 8+ corresponding lines) rust/code_match/src/lang/cmake.rs:7 β€” rust/code_match/src/lang/cmake.rs:7-14 | rust/code_match/src/lang/csharp.rs:7-15 | rust/code_match/src/lang/elm.rs:6-13 | rust/code_match/src/lang/java.rs:6-13 | rust/code_match/src/lang/kotlin.rs:5-12 | rust/code_match/src/lang/scala.rs:7-14 β€” These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 10+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 10+ corresponding lines) rust/sdk/cocoindex/src/connectors/amazon_s3.rs:432 β€” rust/sdk/cocoindex/src/connectors/amazon_s3.rs:432-442 | rust/sdk/cocoindex/src/connectors/azure_blob.rs:1173-1182 | rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1239-1250 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 6+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 6+ corresponding lines) rust/sdk/cocoindex/src/connectors/doris.rs:994 β€” rust/sdk/cocoindex/src/connectors/doris.rs:994-999 | rust/sdk/cocoindex/src/connectors/qdrant.rs:1205-1210 | rust/sdk/cocoindex/src/connectors/snowflake.rs:790-797 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:857-862 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 3+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 3+ corresponding lines) python/cocoindex/connectors/bigquery/_target.py:897 β€” python/cocoindex/connectors/bigquery/_target.py:897-899 | python/cocoindex/connectors/doris/_target.py:1421-1423 | python/cocoindex/connectors/snowflake/_target.py:801-803 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (1 corresponding lines) Β· Γ—1
  • Edited copy of a member (1 corresponding lines) rust/sdk/cocoindex/src/connectors/falkordb.rs:134 β€” rust/sdk/cocoindex/src/connectors/falkordb.rs:134-134 | rust/sdk/cocoindex/src/connectors/neo4j.rs:224-224 β€” These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 2+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 2+ corresponding lines) python/cocoindex/connectors/bigquery/_target.py:243 β€” python/cocoindex/connectors/bigquery/_target.py:243-244 | python/cocoindex/connectors/snowflake/_target.py:236-237 | python/cocoindex/connectors/zvec/_target.py:90-91 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 4+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 4+ corresponding lines) python/cocoindex/connectors/bigquery/_target.py:490 β€” python/cocoindex/connectors/bigquery/_target.py:490-495 | python/cocoindex/connectors/doris/_target.py:882-885 | python/cocoindex/connectors/snowflake/_target.py:387-392 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (41–44 lines × 2) Β· Γ—1
  • Duplicated block (41–44 lines × 2) rust/ops_text/src/pattern_matcher.rs:28 β€” rust/ops_text/src/pattern_matcher.rs:28-71 | rust/sdk/cocoindex/src/resources/file.rs:522-562 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `rust/ops_text/src/pattern_matcher.rs:28` 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.
D4 Β· Code Duplication Β· Duplicated block (39–41 lines × 2) Β· Γ—1
  • Duplicated block (39–41 lines × 2) rust/code_ast/src/elements/lang/cfamily.rs:195 β€” rust/code_ast/src/elements/lang/cfamily.rs:195-233 | rust/code_ast/src/elements/lang/cfamily.rs:249-289 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
D4 Β· Code Duplication Β· Duplicated block (36 lines × 2) Β· Γ—1
  • Duplicated block (36 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:1259 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1259-1294 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1086-1121 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/snowflake.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 390 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1259` 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.
D4 Β· Code Duplication Β· Duplicated block (30–35 lines × 4) Β· Γ—1
  • Duplicated block (30–35 lines × 4) rust/sdk/cocoindex/src/connectors/bigquery.rs:1151 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1151-1180 | rust/sdk/cocoindex/src/connectors/doris.rs:1039-1071 | rust/sdk/cocoindex/src/connectors/snowflake.rs:961-990 | rust/sdk/cocoindex/src/connectors/sqlite.rs:686-720 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (16–29 lines × 3) Β· Γ—1
  • Duplicated block (16–29 lines × 3) rust/code_ast/src/elements/lang/cfamily.rs:194 β€” rust/code_ast/src/elements/lang/cfamily.rs:194-209 | rust/code_ast/src/elements/lang/cfamily.rs:248-265 | rust/code_ast/src/elements/lang/rust.rs:103-131 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/cfamily.rs` and `rust/code_ast/src/elements/lang/rust.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/cfamily.rs:194` 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.
D4 Β· Code Duplication Β· Duplicated block (19–28 lines × 4) Β· Γ—1
  • Duplicated block (19–28 lines × 4) rust/code_ast/src/elements/lang/csharp.rs:236 β€” rust/code_ast/src/elements/lang/csharp.rs:236-263 | rust/code_ast/src/elements/lang/java.rs:168-192 | rust/code_ast/src/elements/lang/python.rs:172-190 | rust/code_ast/src/elements/lang/swift.rs:148-174 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/csharp.rs` and `rust/code_ast/src/elements/lang/python.rs` as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/csharp.rs:236` 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.
D4 Β· Code Duplication Β· Duplicated block (30 lines × 2) Β· Γ—1
  • Duplicated block (30 lines × 2) rust/sdk/cocoindex/src/connectors/postgres.rs:943 β€” rust/sdk/cocoindex/src/connectors/postgres.rs:943-972 | rust/sdk/cocoindex/src/connectors/sqlite.rs:892-921 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/postgres.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/postgres.rs:943` 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.
D4 Β· Code Duplication Β· Duplicated block (21–25 lines × 2) Β· Γ—1
  • Duplicated block (21–25 lines × 2) rust/sdk/cocoindex/src/connectors/doris.rs:1152 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1152-1172 | rust/sdk/cocoindex/src/connectors/sqlite.rs:820-844 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/sqlite.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/doris.rs:1152` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, 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.
D4 Β· Code Duplication Β· Duplicated block (19–22 lines × 2) Β· Γ—1
  • Duplicated block (19–22 lines × 2) rust/code_ast/src/elements/lang/go.rs:176 β€” rust/code_ast/src/elements/lang/go.rs:176-194 | rust/code_ast/src/elements/lang/kotlin.rs:202-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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/go.rs:176` 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.
D4 Β· Code Duplication Β· Duplicated block (13–17 lines × 2) Β· Γ—1
  • Duplicated block (13–17 lines × 2) rust/sdk/cocoindex/src/ctx.rs:2021 β€” rust/sdk/cocoindex/src/ctx.rs:2021-2037 | rust/sdk/cocoindex/src/live_component.rs:299-311 β€” 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 `rust/sdk/cocoindex/src/ctx.rs:2021` 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.
D4 Β· Code Duplication Β· Duplicated block (16 lines × 3) Β· Γ—1
  • Duplicated block (16 lines × 3) rust/code_ast/src/elements/lang/csharp.rs:156 β€” rust/code_ast/src/elements/lang/csharp.rs:156-171 | rust/code_ast/src/elements/lang/csharp.rs:179-194 | rust/code_ast/src/elements/lang/python.rs:78-93 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/csharp.rs` and `rust/code_ast/src/elements/lang/python.rs` as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/csharp.rs:156` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, 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.
D4 Β· Code Duplication Β· Duplicated block (11–16 lines × 3) Β· Γ—1
  • Duplicated block (11–16 lines × 3) rust/sdk/cocoindex/src/ctx.rs:1382 β€” rust/sdk/cocoindex/src/ctx.rs:1382-1397 | rust/sdk/cocoindex/src/ctx.rs:2022-2035 | rust/sdk/cocoindex/src/live_component.rs:299-309 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/ctx.rs:2022` 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/sdk/cocoindex/src/ctx.rs:1381` calls `clone` and `rust/sdk/cocoindex/src/live_component.rs:298` 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.
D4 Β· Code Duplication Β· Duplicated block (15–16 lines × 2) Β· Γ—1
  • Duplicated block (15–16 lines × 2) rust/sdk/cocoindex/src/ops/code.rs:341 β€” rust/sdk/cocoindex/src/ops/code.rs:341-355 | rust/sdk/cocoindex/src/ops/text.rs:52-67 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (13 lines × 6) Β· Γ—1
  • Duplicated block (13 lines × 6) rust/sdk/cocoindex/src/connectors/bigquery.rs:1732 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1732-1744 | rust/sdk/cocoindex/src/connectors/doris.rs:1803-1815 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1719-1731 | rust/sdk/cocoindex/src/connectors/postgres.rs:1604-1616 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1506-1518 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1371-1383 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 Β· Code Duplication Β· Duplicated block (13 lines × 5) Β· Γ—1
  • Duplicated block (13 lines × 5) rust/sdk/cocoindex/src/connectors/bigquery.rs:1408 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1408-1420 | rust/sdk/cocoindex/src/connectors/doris.rs:1206-1218 | rust/sdk/cocoindex/src/connectors/postgres.rs:915-927 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1233-1245 | rust/sdk/cocoindex/src/connectors/sqlite.rs:875-887 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1408` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, 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.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 6) Β· Γ—1
  • Duplicated block (12 lines × 6) rust/code_ast/src/elements/lang/cfamily.rs:88 β€” rust/code_ast/src/elements/lang/cfamily.rs:88-99 | rust/code_ast/src/elements/lang/go.rs:101-112 | rust/code_ast/src/elements/lang/java.rs:113-124 | rust/code_ast/src/elements/lang/java.rs:132-143 | rust/code_ast/src/elements/lang/rust.rs:68-79 | rust/code_ast/src/elements/lang/swift.rs:108-119 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/cfamily.rs` and `rust/code_ast/src/elements/lang/go.rs` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/cfamily.rs:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (9–12 lines × 6) Β· Γ—1
  • Duplicated block (9–12 lines × 6) rust/sdk/cocoindex/src/connectors/bigquery.rs:1398 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1398-1408 | rust/sdk/cocoindex/src/connectors/doris.rs:1195-1206 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1144-1152 | rust/sdk/cocoindex/src/connectors/postgres.rs:905-915 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1223-1233 | rust/sdk/cocoindex/src/connectors/sqlite.rs:867-875 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1398` 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.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 4) Β· Γ—1
  • Duplicated block (12 lines × 4) rust/code_ast/src/elements/lang/go.rs:134 β€” rust/code_ast/src/elements/lang/go.rs:134-145 | rust/code_ast/src/elements/lang/java.rs:152-163 | rust/code_ast/src/elements/lang/kotlin.rs:167-178 | rust/code_ast/src/elements/lang/swift.rs:122-133 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/go.rs` and `rust/code_ast/src/elements/lang/java.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/go.rs:134` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, 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.
D4 Β· Code Duplication Β· Duplicated block (9–12 lines × 2) Β· Γ—1
  • Duplicated block (9–12 lines × 2) rust/py/src/code.rs:238 β€” rust/py/src/code.rs:238-249 | rust/sdk/cocoindex/src/ops/code.rs:199-207 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `rust/py/src/code.rs:238` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The 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.
D4 Β· Code Duplication Β· Duplicated block (8–11 lines × 7) Β· Γ—1
  • Duplicated block (8–11 lines × 7) rust/sdk/cocoindex/src/connectors/bigquery.rs:1401 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1401-1410 | rust/sdk/cocoindex/src/connectors/doris.rs:1198-1208 | rust/sdk/cocoindex/src/connectors/lancedb.rs:1147-1154 | rust/sdk/cocoindex/src/connectors/postgres.rs:910-917 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1226-1235 | rust/sdk/cocoindex/src/connectors/sqlite.rs:870-877 | rust/sdk/cocoindex/src/resources/fs.rs:1189-1197 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1401` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 Β· Code Duplication Β· Duplicated block (9–10 lines × 2) Β· Γ—1
  • Duplicated block (9–10 lines × 2) rust/sdk/cocoindex/src/connectors/bigquery.rs:604 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:604-612 | rust/sdk/cocoindex/src/connectors/gdrive.rs:504-513 β€” 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 `rust/sdk/cocoindex/src/connectors/bigquery.rs:604` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 9) Β· Γ—1
  • Duplicated block (9 lines × 9) rust/sdk/cocoindex/src/connectors/doris.rs:1002 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1002-1010 | rust/sdk/cocoindex/src/connectors/kafka.rs:486-494 | rust/sdk/cocoindex/src/connectors/lancedb.rs:776-784 | rust/sdk/cocoindex/src/connectors/qdrant.rs:1213-1221 | rust/sdk/cocoindex/src/connectors/sqlite.rs:647-655 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1516-1524 | rust/sdk/cocoindex/src/connectors/turbopuffer.rs:865-873 | rust/sdk/cocoindex/src/connectors/valkey.rs:737-745 | rust/sdk/cocoindex/src/connectors/zvec.rs:1287-1295 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/lancedb.rs` as WHOLE FILES: this scan already matched 8 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/doris.rs:1002` 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.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 4) Β· Γ—1
  • Duplicated block (8 lines × 4) rust/sdk/cocoindex/src/connectors/bigquery.rs:1712 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1712-1719 | rust/sdk/cocoindex/src/connectors/postgres.rs:1594-1601 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1486-1493 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1361-1368 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/postgres.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1712` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (5–8 lines × 4) Β· Γ—1
  • Duplicated block (5–8 lines × 4) rust/sdk/cocoindex/src/connectors/doris.rs:1082 β€” rust/sdk/cocoindex/src/connectors/doris.rs:1082-1086 | rust/sdk/cocoindex/src/connectors/postgres.rs:783-790 | rust/sdk/cocoindex/src/connectors/surrealdb.rs:1621-1628 | rust/sdk/cocoindex/src/connectors/valkey.rs:804-811 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/doris.rs` and `rust/sdk/cocoindex/src/connectors/postgres.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/doris.rs:1082` 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.
D4 Β· Code Duplication Β· Duplicated block (7–8 lines × 2) Β· Γ—1
  • Duplicated block (7–8 lines × 2) rust/core/src/engine/component.rs:1190 β€” rust/core/src/engine/component.rs:1190-1196 | rust/core/src/engine/component.rs:1255-1262 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/core/src/engine/component.rs:1190` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 5) Β· Γ—1
  • Duplicated block (11 lines × 5) rust/sdk/cocoindex/src/connectors/bigquery.rs:1767 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:1767-1777 | rust/sdk/cocoindex/src/connectors/doris.rs:1838-1848 | rust/sdk/cocoindex/src/connectors/postgres.rs:1655-1665 | rust/sdk/cocoindex/src/connectors/snowflake.rs:1541-1551 | rust/sdk/cocoindex/src/connectors/sqlite.rs:1419-1429 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:1767` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, 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.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 7) Β· Γ—1
  • Duplicated block (6 lines × 7) rust/code_ast/src/elements/lang/cfamily.rs:27 β€” rust/code_ast/src/elements/lang/cfamily.rs:27-32 | rust/code_ast/src/elements/lang/go.rs:22-29 | rust/code_ast/src/elements/lang/javascript.rs:22-27 | rust/code_ast/src/elements/lang/python.rs:22-27 | rust/code_ast/src/elements/lang/rust.rs:22-27 | rust/code_ast/src/elements/lang/swift.rs:22-27 | rust/code_ast/src/elements/lang/typescript.rs:28-33 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/cfamily.rs` and `rust/code_ast/src/elements/lang/go.rs` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/cfamily.rs:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 5) Β· Γ—1
  • Duplicated block (5 lines × 5) rust/sdk/cocoindex/src/connectors/bigquery.rs:947 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:947-951 | rust/sdk/cocoindex/src/connectors/doris.rs:836-840 | rust/sdk/cocoindex/src/connectors/lancedb.rs:572-576 | rust/sdk/cocoindex/src/connectors/snowflake.rs:751-755 | rust/sdk/cocoindex/src/connectors/sqlite.rs:499-503 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place.
D4 Β· Code Duplication Β· Duplicated block (13 lines × 4) Β· Γ—1
  • Duplicated block (13 lines × 4) rust/sdk/cocoindex/src/connectors/bigquery.rs:688 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:688-700 | rust/sdk/cocoindex/src/connectors/doris.rs:363-375 | rust/sdk/cocoindex/src/connectors/snowflake.rs:505-517 | rust/sdk/cocoindex/src/connectors/sqlite.rs:206-218 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:688` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, 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.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 5) Β· Γ—1
  • Duplicated block (12 lines × 5) rust/sdk/cocoindex/src/connectors/bigquery.rs:686 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:686-697 | rust/sdk/cocoindex/src/connectors/doris.rs:361-372 | rust/sdk/cocoindex/src/connectors/postgres.rs:120-131 | rust/sdk/cocoindex/src/connectors/snowflake.rs:503-514 | rust/sdk/cocoindex/src/connectors/sqlite.rs:204-215 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:686` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 4) Β· Γ—1
  • Duplicated block (7 lines × 4) rust/sdk/cocoindex/src/connectors/bigquery.rs:679 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:679-685 | rust/sdk/cocoindex/src/connectors/doris.rs:354-360 | rust/sdk/cocoindex/src/connectors/snowflake.rs:496-502 | rust/sdk/cocoindex/src/connectors/sqlite.rs:197-203 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:679` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 9) Β· Γ—1
  • Duplicated block (6 lines × 9) rust/code_ast/src/elements/lang/cfamily.rs:84 β€” rust/code_ast/src/elements/lang/cfamily.rs:84-89 | rust/code_ast/src/elements/lang/go.rs:97-102 | rust/code_ast/src/elements/lang/go.rs:116-121 | rust/code_ast/src/elements/lang/java.rs:109-114 | rust/code_ast/src/elements/lang/java.rs:128-133 | rust/code_ast/src/elements/lang/javascript.rs:98-103 | rust/code_ast/src/elements/lang/python.rs:75-80 | rust/code_ast/src/elements/lang/rust.rs:45-50 | rust/code_ast/src/elements/lang/rust.rs:64-69 β€” before extracting anything, compare `rust/code_ast/src/elements/lang/cfamily.rs` and `rust/code_ast/src/elements/lang/go.rs` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `rust/code_ast/src/elements/lang/cfamily.rs:84` 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.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 5) Β· Γ—1
  • Duplicated block (6 lines × 5) rust/sdk/cocoindex/src/connectors/bigquery.rs:678 β€” rust/sdk/cocoindex/src/connectors/bigquery.rs:678-683 | rust/sdk/cocoindex/src/connectors/doris.rs:353-358 | rust/sdk/cocoindex/src/connectors/postgres.rs:112-117 | rust/sdk/cocoindex/src/connectors/snowflake.rs:495-500 | rust/sdk/cocoindex/src/connectors/sqlite.rs:196-201 β€” before extracting anything, compare `rust/sdk/cocoindex/src/connectors/bigquery.rs` and `rust/sdk/cocoindex/src/connectors/doris.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `rust/sdk/cocoindex/src/connectors/bigquery.rs:678` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (73 lines × 2) Β· Γ—1
  • Duplicated block (73 lines × 2) python/cocoindex/connectors/falkordb/_target.py:844 β€” python/cocoindex/connectors/falkordb/_target.py:844-916 | python/cocoindex/connectors/neo4j/_target.py:963-1035 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. 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.
D4 Β· Code Duplication Β· Duplicated block (32–35 lines × 2) Β· Γ—1
  • Duplicated block (32–35 lines × 2) python/cocoindex/connectors/falkordb/_target.py:1253 β€” python/cocoindex/connectors/falkordb/_target.py:1253-1287 | python/cocoindex/connectors/neo4j/_target.py:1348-1379 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `graph` to `Any` in one and `_GraphHandle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `python/cocoindex/connectors/neo4j/_target.py:1380` calls `index_name`, `query`, `build_relationship_index_drop` and `python/cocoindex/connectors/falkordb/_target.py:1288` 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.
D4 Β· Code Duplication Β· Duplicated block (33 lines × 3) Β· Γ—1
  • Duplicated block (33 lines × 3) python/cocoindex/connectors/falkordb/_target.py:1067 β€” python/cocoindex/connectors/falkordb/_target.py:1067-1099 | python/cocoindex/connectors/neo4j/_target.py:1186-1218 | python/cocoindex/connectors/surrealdb/_target.py:1112-1144 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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.
D4 Β· Code Duplication Β· Duplicated block (32–33 lines × 2) Β· Γ—1
  • Duplicated block (32–33 lines × 2) REDACTED:1078 β€” REDACTED:1078-1110 | REDACTED:1627-1658 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1078` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The 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.
D4 Β· Code Duplication Β· Duplicated block (28–30 lines × 3) Β· Γ—1
  • Duplicated block (28–30 lines × 3) python/cocoindex/connectors/falkordb/_target.py:1150 β€” python/cocoindex/connectors/falkordb/_target.py:1150-1179 | python/cocoindex/connectors/neo4j/_target.py:1269-1296 | python/cocoindex/connectors/surrealdb/_target.py:1180-1207 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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.
D4 Β· Code Duplication Β· Duplicated block (28–29 lines × 5) Β· Γ—1
  • Duplicated block (28–29 lines × 5) python/cocoindex/connectors/bigquery/_target.py:823 β€” python/cocoindex/connectors/bigquery/_target.py:823-850 | python/cocoindex/connectors/lancedb/_target.py:1272-1299 | python/cocoindex/connectors/postgres/_target.py:1407-1435 | python/cocoindex/connectors/snowflake/_target.py:727-754 | python/cocoindex/connectors/sqlite/_target.py:991-1018 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (17–26 lines × 2) Β· Γ—1
  • Duplicated block (17–26 lines × 2) python/cocoindex/ops/code.py:251 β€” python/cocoindex/ops/code.py:251-267 | python/cocoindex/ops/text.py:197-222 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `raw` to `"_core.Chunk"` in one and `_core.Chunk` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 Β· Code Duplication Β· Duplicated block (23–25 lines × 6) Β· Γ—1
  • Duplicated block (23–25 lines × 6) python/cocoindex/connectors/bigquery/_target.py:836 β€” python/cocoindex/connectors/bigquery/_target.py:836-858 | python/cocoindex/connectors/doris/_target.py:1289-1313 | python/cocoindex/connectors/lancedb/_target.py:1285-1309 | python/cocoindex/connectors/postgres/_target.py:1421-1445 | python/cocoindex/connectors/snowflake/_target.py:740-762 | python/cocoindex/connectors/sqlite/_target.py:1004-1028 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (23 lines × 2) Β· Γ—1
  • Duplicated block (23 lines × 2) python/cocoindex/connectors/falkordb/_target.py:569 β€” python/cocoindex/connectors/falkordb/_target.py:569-591 | python/cocoindex/connectors/neo4j/_target.py:692-714 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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.
D4 Β· Code Duplication Β· Duplicated block (18–20 lines × 5) Β· Γ—1
  • Duplicated block (18–20 lines × 5) python/cocoindex/connectors/bigquery/_target.py:547 β€” python/cocoindex/connectors/bigquery/_target.py:547-564 | python/cocoindex/connectors/doris/_target.py:964-981 | python/cocoindex/connectors/postgres/_target.py:1071-1090 | python/cocoindex/connectors/snowflake/_target.py:447-464 | python/cocoindex/connectors/sqlite/_target.py:570-589 β€” 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. 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.
D4 Β· Code Duplication Β· Duplicated block (14–20 lines × 2) Β· Γ—1
  • Duplicated block (14–20 lines × 2) REDACTED:132 β€” REDACTED:132-151 | REDACTED:167-180 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (15–18 lines × 6) Β· Γ—1
  • Duplicated block (15–18 lines × 6) python/cocoindex/connectors/bigquery/_target.py:544 β€” python/cocoindex/connectors/bigquery/_target.py:544-558 | python/cocoindex/connectors/doris/_target.py:961-975 | python/cocoindex/connectors/lancedb/_target.py:757-774 | python/cocoindex/connectors/postgres/_target.py:1067-1084 | python/cocoindex/connectors/snowflake/_target.py:444-458 | python/cocoindex/connectors/sqlite/_target.py:566-583 β€” 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. 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.
D4 Β· Code Duplication Β· Duplicated block (14–16 lines × 2) Β· Γ—1
  • Duplicated block (14–16 lines × 2) python/cocoindex/connectors/postgres/_target.py:1296 β€” python/cocoindex/connectors/postgres/_target.py:1296-1311 | python/cocoindex/connectors/sqlite/_target.py:776-789 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (12–15 lines × 8) Β· Γ—1
  • Duplicated block (12–15 lines × 8) python/cocoindex/connectors/bigquery/_target.py:856 β€” python/cocoindex/connectors/bigquery/_target.py:856-867 | python/cocoindex/connectors/doris/_target.py:1310-1323 | python/cocoindex/connectors/falkordb/_target.py:1119-1133 | python/cocoindex/connectors/neo4j/_target.py:1238-1252 | python/cocoindex/connectors/postgres/_target.py:1442-1455 | python/cocoindex/connectors/snowflake/_target.py:760-771 | python/cocoindex/connectors/sqlite/_target.py:1025-1038 | python/cocoindex/connectors/surrealdb/_target.py:1154-1165 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 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 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/bigquery/_target.py:856` 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.
D4 Β· Code Duplication Β· Duplicated block (13–15 lines × 3) Β· Γ—1
  • Duplicated block (13–15 lines × 3) python/cocoindex/connectors/bigquery/_target.py:694 β€” python/cocoindex/connectors/bigquery/_target.py:694-706 | python/cocoindex/connectors/snowflake/_target.py:594-606 | python/cocoindex/connectors/sqlite/_target.py:806-820 β€” `python/cocoindex/connectors/bigquery/_target.py` and `python/cocoindex/connectors/snowflake/_target.py` 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 19 separate duplicated blocks between them, totalling at least 301 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. 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.
D4 Β· Code Duplication Β· Duplicated block (14–15 lines × 3) Β· Γ—1
  • Duplicated block (14–15 lines × 3) python/cocoindex/connectors/falkordb/_target.py:427 β€” python/cocoindex/connectors/falkordb/_target.py:427-440 | python/cocoindex/connectors/neo4j/_target.py:490-503 | python/cocoindex/connectors/surrealdb/_target.py:525-539 β€” `python/cocoindex/connectors/falkordb/_target.py` and `python/cocoindex/connectors/neo4j/_target.py` 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 39 separate duplicated blocks between them, totalling at least 703 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/falkordb/_target.py:427` 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 first that the copies are not typed on the same thing: the declarations holding them bind `column_overrides` to `dict[str, FalkorType | res_schema.VectorSchemaProvider] | None` in one and `dict[str, Neo4jType | res_schema.VectorSchemaProvider] | None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 Β· Code Duplication Β· Duplicated block (14–15 lines × 2) Β· Γ—1
  • Duplicated block (14–15 lines × 2) python/cocoindex/connectors/sqlite/_target.py:837 β€” python/cocoindex/connectors/sqlite/_target.py:837-851 | python/cocoindex/connectors/sqlite/_target.py:860-873 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (14 lines × 9) Β· Γ—1
  • Duplicated block (14 lines × 9) python/cocoindex/connectors/bigquery/_target.py:841 β€” python/cocoindex/connectors/bigquery/_target.py:841-854 | python/cocoindex/connectors/doris/_target.py:1294-1307 | python/cocoindex/connectors/falkordb/_target.py:1086-1099 | python/cocoindex/connectors/lancedb/_target.py:1290-1303 | python/cocoindex/connectors/neo4j/_target.py:1205-1218 | python/cocoindex/connectors/postgres/_target.py:1426-1439 | python/cocoindex/connectors/snowflake/_target.py:745-758 | python/cocoindex/connectors/sqlite/_target.py:1009-1022 | python/cocoindex/connectors/surrealdb/_target.py:1131-1144 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/bigquery/_target.py:841` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 3) Β· Γ—1
  • Duplicated block (12 lines × 3) python/cocoindex/ops/code.py:255 β€” python/cocoindex/ops/code.py:255-266 | python/cocoindex/ops/code.py:299-310 | python/cocoindex/ops/text.py:210-221 β€” 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `raw` to `"_core.Chunk"` in one and `_core.Chunk` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 Β· Code Duplication Β· Duplicated block (8–9 lines × 7) Β· Γ—1
  • Duplicated block (8–9 lines × 7) python/cocoindex/connectors/doris/_target.py:1426 β€” python/cocoindex/connectors/doris/_target.py:1426-1433 | python/cocoindex/connectors/falkordb/_target.py:1437-1444 | python/cocoindex/connectors/lancedb/_target.py:1382-1390 | python/cocoindex/connectors/neo4j/_target.py:1479-1486 | python/cocoindex/connectors/postgres/_target.py:1561-1569 | python/cocoindex/connectors/sqlite/_target.py:1103-1111 | python/cocoindex/connectors/surrealdb/_target.py:1363-1370 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `python/cocoindex/connectors/lancedb/_target.py:1379` calls `row` and `python/cocoindex/connectors/doris/_target.py:1425` 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.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 4) Β· Γ—1
  • Duplicated block (9 lines × 4) python/cocoindex/connectors/bigquery/_target.py:621 β€” python/cocoindex/connectors/bigquery/_target.py:621-629 | python/cocoindex/connectors/doris/_target.py:1062-1070 | python/cocoindex/connectors/snowflake/_target.py:521-529 | python/cocoindex/connectors/sqlite/_target.py:655-663 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `python/cocoindex/connectors/bigquery/_target.py:621` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 5) Β· Γ—1
  • Duplicated block (15 lines × 5) python/cocoindex/connectors/bigquery/_target.py:140 β€” python/cocoindex/connectors/bigquery/_target.py:140-154 | python/cocoindex/connectors/lancedb/_target.py:269-286 | python/cocoindex/connectors/postgres/_target.py:395-413 | python/cocoindex/connectors/snowflake/_target.py:133-147 | python/cocoindex/connectors/sqlite/_target.py:346-363 β€” 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D4 Β· Code Duplication Β· Edited copy of a member (83 corresponding lines) Β· Γ—1
  • Edited copy of a member (83 corresponding lines) examples/meeting_notes_graph_falkordb/main.py:349 β€” examples/meeting_notes_graph_falkordb/main.py:349-431 | examples/meeting_notes_graph_neo4j/main.py:358-440 β€” These two members are one piece of code written twice and then edited apart: 83 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 (44 corresponding lines) Β· Γ—1
  • Edited copy of a member (44 corresponding lines) examples/docs_to_knowledge_graph/main.py:280 β€” examples/docs_to_knowledge_graph/main.py:280-335 | examples/product_recommendation/main.py:233-276 β€” These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 16+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 16+ corresponding lines) examples/audio_to_text/main.py:65 β€” examples/audio_to_text/main.py:65-91 | examples/manuals_llm_extraction/main.py:165-180 | examples/pdf_embedding/main.py:131-147 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 14+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 14+ corresponding lines) examples/code_embedding_lancedb/main.py:105 β€” examples/code_embedding_lancedb/main.py:105-128 | examples/slides_to_speech/main.py:199-212 | examples/text_embedding_lancedb/main.py:100-114 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (5 members, 4+ corresponding lines) Β· Γ—1
  • Edited copies of one member (5 members, 4+ corresponding lines) examples/code_embedding/main.py:65 β€” examples/code_embedding/main.py:65-68 | examples/entire_session_search/main.py:67-70 | examples/gdrive_text_embedding/main.py:53-56 | examples/oci_object_storage_embedding/main.py:118-122 | examples/text_embedding/main.py:56-59 β€” These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (54 lines × 2) Β· Γ—1
  • Duplicated block (54 lines × 2) examples/meeting_notes_graph_falkordb/main.py:378 β€” examples/meeting_notes_graph_falkordb/main.py:378-431 | examples/meeting_notes_graph_neo4j/main.py:387-440 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/meeting_notes_graph_falkordb/main.py:378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (28 lines × 2) Β· Γ—1
  • Duplicated block (28 lines × 2) examples/meeting_notes_graph_falkordb/main.py:311 β€” examples/meeting_notes_graph_falkordb/main.py:311-338 | examples/meeting_notes_graph_neo4j/main.py:320-347 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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. 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.
D4 Β· Code Duplication Β· Duplicated block (18–22 lines × 9) Β· Γ—1
  • Duplicated block (18–22 lines × 9) examples/amazon_s3_embedding/main.py:148 β€” examples/amazon_s3_embedding/main.py:148-165 | examples/azure_blob_embedding/main.py:154-171 | examples/code_embedding/main.py:159-178 | examples/discord_text_embedding/main.py:199-217 | examples/gdrive_text_embedding/main.py:137-154 | examples/oci_object_storage_embedding/main.py:218-235 | examples/pdf_embedding/main.py:169-186 | examples/postgres_source/main.py:139-160 | examples/text_embedding/main.py:145-162 β€” `examples/amazon_s3_embedding/main.py` and `examples/azure_blob_embedding/main.py` 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 4 separate duplicated blocks between them, totalling at least 49 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/postgres_source/main.py:139` 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.
D4 Β· Code Duplication Β· Duplicated block (19–21 lines × 2) Β· Γ—1
  • Duplicated block (19–21 lines × 2) examples/cocoindex_agents/cocoindex_agents/tools/agents.py:180 β€” examples/cocoindex_agents/cocoindex_agents/tools/agents.py:180-198 | examples/cocoindex_agents/cocoindex_agents/tools/agents.py:251-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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/cocoindex_agents/cocoindex_agents/tools/agents.py:180` 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.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 3) Β· Γ—1
  • Duplicated block (15 lines × 3) examples/meeting_notes_graph_falkordb/main.py:190 β€” examples/meeting_notes_graph_falkordb/main.py:190-204 | examples/meeting_notes_graph_neo4j/main.py:199-213 | examples/meeting_notes_graph_surrealdb/main.py:206-220 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 9) Β· Γ—1
  • Duplicated block (11 lines × 9) examples/amazon_s3_embedding/main.py:172 β€” examples/amazon_s3_embedding/main.py:172-182 | examples/azure_blob_embedding/main.py:178-188 | examples/code_embedding/main.py:185-195 | examples/discord_text_embedding/main.py:226-236 | examples/entire_session_search/main.py:367-377 | examples/gdrive_text_embedding/main.py:161-171 | examples/oci_object_storage_embedding/main.py:242-252 | examples/postgres_source/main.py:168-178 | examples/text_embedding/main.py:169-179 β€” `examples/amazon_s3_embedding/main.py` and `examples/azure_blob_embedding/main.py` 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 4 separate duplicated blocks between them, totalling at least 49 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/amazon_s3_embedding/main.py:186` calls `load_dotenv` and `examples/azure_blob_embedding/main.py:192` 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.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 3) Β· Γ—1
  • Duplicated block (11 lines × 3) examples/meeting_notes_graph_falkordb/main.py:269 β€” examples/meeting_notes_graph_falkordb/main.py:269-279 | examples/meeting_notes_graph_neo4j/main.py:278-288 | examples/meeting_notes_graph_surrealdb/main.py:288-298 β€” `examples/meeting_notes_graph_falkordb/main.py` and `examples/meeting_notes_graph_neo4j/main.py` 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 10 separate duplicated blocks between them, totalling at least 194 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.
S1 Β· Web-Security Posture Β· Third-party script without Subresource Integrity Β· Γ—1
  • Third-party script without Subresource Integrity docs/src/components/PipelinePlayground.astro:10 β€” `https://cocoindex.io/playground/playground.js?v=e678d1e` 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.
Minor β€” 86 finding(s)
X4 Β· Structured logging Β· Interpolated log message defeats structured logging Β· Γ—40
  • Interpolated log message defeats structured logging python/cocoindex/connectors/postgres/_target.py:1383 β€” `warning` at line 1383 is handed an f-string as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging rust/utils/src/batching.rs:277 β€” `error!` at line 277 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`.
  • Interpolated log message defeats structured logging rust/utils/src/error.rs:346 β€” `debug!` at line 346 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`.
  • Interpolated log message defeats structured logging rust/utils/src/error.rs:589 β€” `debug!` at line 589 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`.
  • Interpolated log message defeats structured logging rust/utils/src/retryable.rs:142 β€” `trace!` at line 142 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 rust/utils/src/slow_warn.rs:29 β€” `warn!` at line 29 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 rust/utils/src/slow_warn.rs:31 β€” `warn!` at line 31 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 rust/sdk/cocoindex/src/ctx.rs:1098 β€” `error!` at line 1098 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`.
  • Interpolated log message defeats structured logging rust/sdk/cocoindex/src/deps.rs:235 β€” `warn!` at line 235 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 rust/sdk/cocoindex/src/deps.rs:336 β€” `warn!` at line 336 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 rust/sdk/cocoindex/src/deps.rs:345 β€” `warn!` 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: `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 rust/sdk/cocoindex/src/logic.rs:113 β€” `warn!` at line 113 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 rust/sdk/cocoindex/src/runner.rs:172 β€” `error!` 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: `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`.
  • Interpolated log message defeats structured logging rust/sdk/cocoindex/src/resources/fs.rs:259 β€” `debug!` at line 259 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`.
  • Interpolated log message defeats structured logging rust/sdk/cocoindex/src/resources/fs.rs:358 β€” `warn!` at line 358 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 rust/sdk/cocoindex/src/connectors/doris.rs:1352 β€” `debug!` at line 1352 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`.
  • Interpolated log message defeats structured logging rust/sdk/cocoindex/src/connectors/doris.rs:1482 β€” `warn!` at line 1482 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 rust/sdk/cocoindex/src/connectors/gdrive.rs:346 β€” `debug!` at line 346 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`.
  • Interpolated log message defeats structured logging rust/sdk/cocoindex/src/connectors/gdrive.rs:1858 β€” `warn!` at line 1858 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 rust/sdk/cocoindex/src/connectors/iggy.rs:991 β€” `warn!` at line 991 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 rust/sdk/cocoindex/src/connectors/oci_object_storage.rs:1576 β€” `warn!` at line 1576 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 rust/sdk/cocoindex/src/connectors/snowflake.rs:323 β€” `debug!` at line 323 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`.
  • Interpolated log message defeats structured logging rust/sdk/cocoindex/src/connectors/sqlite.rs:1004 β€” `warn!` at line 1004 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 rust/py_utils/src/future.rs:60 β€” `error!` at line 60 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`.
  • Interpolated log message defeats structured logging rust/py/src/runtime.rs:216 β€” `error!` at line 216 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`.
  • + 15 more in this group β€” see findings.md.
X10 Β· Duplicated predicate Β· Duplicated predicate Β· Γ—31
  • Duplicated predicate docs/src/lib/llms.ts:133 β€” `lang === 'rust' && typeof data.rust_title === 'string'` appears character-identically in 2 files β€” docs/src/lib/llms.ts, docs/src/lib/raw-markdown.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 python/cocoindex/connectors/falkordb/_target.py:570 β€” `action.from_label is not None and action.from_pk_field is not None` appears character-identically in 2 files β€” python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/neo4j/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/lancedb/_target.py:1144 β€” `action.main_action in (None, "upsert") and action.column_actions` appears character-identically in 2 files β€” python/cocoindex/connectors/lancedb/_target.py, python/cocoindex/connectors/surrealdb/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/falkordb/_target.py:571 β€” `action.to_label is not None and action.to_pk_field is not None` appears character-identically in 2 files β€” python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/neo4j/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/falkordb/_target.py:830 β€” `col is not None and col.encoder is not None and v is not None` appears character-identically in 2 files β€” python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/neo4j/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/bigquery/_target.py:649 β€” `col.nullable and col_name not in primary_key` appears character-identically in 2 files β€” python/cocoindex/connectors/bigquery/_target.py, python/cocoindex/connectors/snowflake/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/postgres/_target.py:1300 β€” `col.nullable and col_name not in schema.primary_key` appears character-identically in 2 files β€” python/cocoindex/connectors/postgres/_target.py, python/cocoindex/connectors/sqlite/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/falkordb/_target.py:435 β€” `column_overrides and column_overrides.get(field.name)` appears character-identically in 4 files β€” python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/neo4j/_target.py, python/cocoindex/connectors/postgres/_target.py, python/cocoindex/connectors/surrealdb/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/_internal/logic_propagated_to_callers.py:47 β€” `inspect.iscoroutinefunction(fn) or inspect.iscoroutinefunction( getattr(fn, "__call__", None) )` appears character-identically in 2 files β€” python/cocoindex/_internal/logic_propagated_to_callers.py, python/cocoindex/_internal/target_state.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/_internal/datatype.py:47 β€” `isinstance(t, type) and issubclass(t, tuple) and hasattr(t, "_fields")` appears character-identically in 2 files β€” python/cocoindex/_internal/datatype.py, python/cocoindex/engine_object.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectorkits/_graph_relationship_ids.py:19 β€” `isinstance(value, int) and not isinstance(value, bool)` appears character-identically in 2 files β€” python/cocoindex/connectorkits/_graph_relationship_ids.py, python/cocoindex/connectors/surrealdb/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/falkordb/_target.py:1102 β€” `main_action is None and not column_actions and coco.is_non_existence(desired_state)` appears character-identically in 2 files β€” python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/neo4j/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/bigquery/_target.py:850 β€” `main_action is None or main_action == "upsert"` appears character-identically in 9 files β€” python/cocoindex/connectors/bigquery/_target.py, python/cocoindex/connectors/doris/_target.py, python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/lancedb/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/falkordb/_cypher.py:132 β€” `not from_pk_fields or not to_pk_fields or not rel_pk_fields` appears character-identically in 2 files β€” python/cocoindex/connectors/falkordb/_cypher.py, python/cocoindex/connectors/neo4j/_cypher.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/bigquery/_target.py:243 β€” `not isinstance(name, str) or not _IDENTIFIER_RE.match(name)` appears character-identically in 5 files β€” python/cocoindex/connectors/bigquery/_target.py, python/cocoindex/connectors/postgres/_target.py, python/cocoindex/connectors/snowflake/_target.py, python/cocoindex/connectors/sqlite/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/bigquery/_target.py:546 β€” `not prev_possible_records and not prev_may_be_missing` appears character-identically in 15 files β€” python/cocoindex/connectors/bigquery/_target.py, python/cocoindex/connectors/doris/_target.py, python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/iggy/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/amazon_s3/_source.py:289 β€” `path_matcher or file.MatchAllFilePathMatcher()` appears character-identically in 3 files β€” python/cocoindex/connectors/amazon_s3/_source.py, python/cocoindex/connectors/azure_blob/_source.py, python/cocoindex/connectors/oci_object_storage/_source.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/falkordb/_target.py:1281 β€” `pk_field is None and isinstance(action.spec, _TableSpec)` appears character-identically in 2 files β€” python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/neo4j/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/iggy/_source.py:123 β€” `self._inflight and self._inflight[0] in self._completed` appears character-identically in 2 files β€” python/cocoindex/connectors/iggy/_source.py, python/cocoindex/connectors/kafka/_source.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/falkordb/_target.py:886 β€” `self._replaces_legacy_ids and not prev_possible_records` appears character-identically in 2 files β€” python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/neo4j/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/falkordb/_target.py:1681 β€” `table_schema is not None and table_schema.primary_key != primary_key` appears character-identically in 2 files β€” python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/neo4j/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate python/cocoindex/connectors/doris/_target.py:1432 β€” `value is not None and col.encoder is not None` appears character-identically in 8 files β€” python/cocoindex/connectors/doris/_target.py, python/cocoindex/connectors/falkordb/_target.py, python/cocoindex/connectors/lancedb/_target.py, python/cocoindex/connectors/neo4j/_target.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate rust/sdk/cocoindex/src/connectors/postgres.rs:829 β€” `a.recreate && spec.managed_by.is_system()` appears character-identically in 2 files β€” rust/sdk/cocoindex/src/connectors/postgres.rs, rust/sdk/cocoindex/src/connectors/surrealdb.rs. 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 rust/sdk/cocoindex/src/connectors/bigquery.rs:1411 β€” `desired.is_none() && prev.is_empty() && !prev_may_be_missing` appears character-identically in 9 files β€” rust/sdk/cocoindex/src/connectors/bigquery.rs, rust/sdk/cocoindex/src/connectors/doris.rs, rust/sdk/cocoindex/src/connectors/lancedb.rs, rust/sdk/cocoindex/src/connectors/postgres.rs. 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 rust/sdk/cocoindex/src/connectors/bigquery.rs:1408 β€” `desired.is_some() && prev_same && !prev_may_be_missing` appears character-identically in 9 files β€” rust/sdk/cocoindex/src/connectors/bigquery.rs, rust/sdk/cocoindex/src/connectors/doris.rs, rust/sdk/cocoindex/src/connectors/lancedb.rs, rust/sdk/cocoindex/src/connectors/postgres.rs. 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.
  • + 6 more in this group β€” see findings.md.
X7 Β· Silent fallback defaults Β· Silent fallback default on Err Β· Γ—3
  • Silent fallback default on Err rust/code_match/src/prefilter.rs:327 β€” `regex_required_literals` 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 rust/py/src/target_state.rs:415 β€” `callback_label` turns every `Err` into `"<callback>".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 rust/utils/src/gpu_pool.rs:343 β€” `detect_num_gpus` turns every `Err` into `Ok(1)` β€” 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.
D16 Β· Bus Factor Β· Off-boarding risk Β· Γ—2
  • Off-boarding risk: anonymized user #1 β€” If anonymized user #1 becomes unavailable, 37 significant file(s) lose their only recent owner: rust/code_match/src/matcher.rs, rust/core/src/engine/admission.rs, rust/code_ast/src/view/lang.rs, python/cocoindex/_internal/target_state.py, python/cocoindex/connectors/localfs/_target.py, rust/code_match/src/lexer.rs, python/cocoindex/connectors/kafka/_source.py, rust/code_match/src/config.rs (+29 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 β€” If anonymized user #2 becomes unavailable, 11 significant file(s) lose their only recent owner: rust/sdk/cocoindex/src/connectors/oci_object_storage.rs, rust/sdk/cocoindex/src/connectors/kafka.rs, rust/sdk/cocoindex/src/connectors/iggy.rs, rust/sdk/cocoindex/src/connectors/valkey.rs, rust/sdk/cocoindex/src/resources/file.rs, rust/sdk/cocoindex/src/ops/api.rs, rust/sdk/cocoindex/src/live_component.rs, rust/sdk/cocoindex/src/entity_resolution.rs (+3 more). Pair on, review, or document these before any departure.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—2
  • REDACTED
  • REDACTED
D26 Β· Project Cohesion Β· Projects may be oversized for their cohesion Β· Γ—1
  • Projects may be oversized for their cohesion β€” 2 of 12 project(s) overshoot their size bounds, lowering Project Cohesion to 6.7/10. The most over is `rust/sdk/cocoindex` (52777 LoC, 386 module-visible types across 5 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.
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
P2 Β· Observability Β· Logging is not universal Β· Γ—1
  • Logging is not universal β€” Only 6/9 runnable modules use logging (modules with no entry point or server are excluded β€” they are libraries a runnable module hosts). Silent: `rust/cli`, `rust/ops_text`, `rust/sdk/cocoindex_macros`.
P6 Β· Release Hygiene Β· No changelog Β· Γ—1
  • No changelog β€” No CHANGELOG/HISTORY/RELEASES file β€” what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
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 β€” 0/1 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.
X5 Β· Nullable reference types Β· Null assertions (`!`) override strict null checking Β· Γ—1
  • Null assertions (`!`) override strict null checking β€” ~0.4 `!` null assertions per 1k TypeScript source lines β€” 1 assertion(s) across the 2404 source line(s) of the 21 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: docs/src/scripts/search-hit.ts (1). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
X7 Β· Silent fallback defaults Β· Silent fallback default in catch Β· Γ—1
  • Silent fallback default in catch python/cocoindex/cli.py:237 β€” `_get_persisted_app_names` swallows every exception into `return set()` β€” a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
X7 Β· Silent fallback defaults Β· Silent fallback default on parse failure Β· Γ—1
  • Silent fallback default on parse failure python/cocoindex/connectors/lancedb/_target.py:455 β€” `_metadata_int` returns `0` when `(TypeError, ValueError)` is raised, with no log or raise β€” a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Minor β€” 27 finding(s)
D12 Β· Dependency Hygiene Β· Outdated Β· Γ—27
  • Outdated: aws-config β€” `aws-config` is locked at 1.8.18 but 1.13.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-config` and commit the updated REDACTED.
  • Outdated: aws-sdk-s3 β€” `aws-sdk-s3` is locked at 1.137.0 but 1.159.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-sdk-s3` and commit the updated REDACTED.
  • Outdated: clap β€” `clap` is locked at 4.6.6 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.6"` requirement declared in rust/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: crc32fast β€” `crc32fast` is locked at 1.5.0 but 1.5.5 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p crc32fast` and commit the updated REDACTED.
  • Outdated: encoding_rs β€” `encoding_rs` is locked at 0.8.35 but 0.8.44 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p encoding_rs` and commit the updated REDACTED.
  • Outdated: globset β€” `globset` is locked at 0.4.20 but 0.4.21 is the current stable release on crates.io, and it already satisfies the `"0.4.18"` requirement declared in rust/ops_text/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p globset` and commit the updated REDACTED.
  • Outdated: indexmap β€” `indexmap` is locked at 2.14.0 but 2.14.2 is the current stable release on crates.io, and it already satisfies the `"2.12.1"` requirement declared in rust/core/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p indexmap` and commit the updated REDACTED.
  • Outdated: linkme β€” `linkme` is locked at 0.3.37 but 0.3.38 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p linkme` and commit the updated REDACTED.
  • Outdated: notify β€” `notify` is locked at 8.2.0 but 8.2.2 is the current stable release on crates.io, and it already satisfies the `"8"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p notify` and commit the updated REDACTED.
  • Outdated: qdrant-client β€” `qdrant-client` is locked at 1.19.0 but 1.20.0 is the current stable release on crates.io, and it already satisfies the `"1.18"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p qdrant-client` and commit the updated REDACTED.
  • Outdated: rust_decimal β€” `rust_decimal` is locked at 1.42.1 but 1.43.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p rust_decimal` and commit the updated REDACTED.
  • Outdated: rustls-pki-types β€” `rustls-pki-types` is locked at 1.15.1 but 1.16.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls-pki-types` and commit the updated REDACTED.
  • Outdated: serde_json β€” `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0.145"` requirement declared in rust/cli/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: serde_with β€” `serde_with` is locked at 3.22.0 but 3.24.0 is the current stable release on crates.io, and it already satisfies the `"3.16.0"` requirement declared in rust/core/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_with` and commit the updated REDACTED.
  • Outdated: thiserror β€” `thiserror` is locked at 2.0.20 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in rust/sdk/cocoindex/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
  • Outdated: tokio β€” `tokio` is locked at 1.53.1 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1.48.0"` requirement declared in rust/cli/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: tokio-util β€” `tokio-util` is locked at 0.7.19 but 0.7.20 is the current stable release on crates.io, and it already satisfies the `"0.7.17"` requirement declared in rust/core/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio-util` and commit the updated REDACTED.
  • Outdated: tree-sitter-cmake β€” `tree-sitter-cmake` is locked at 0.7.4 but 0.7.6 is the current stable release on crates.io, and it already satisfies the `"0.7.1"` requirement declared in rust/code_ast/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p tree-sitter-cmake` and commit the updated REDACTED.
  • Outdated: tree-sitter-language β€” `tree-sitter-language` is locked at 0.1.7 but 0.1.9 is the current stable release on crates.io, and it already satisfies the `"0.1.7"` requirement declared in rust/code_ast/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p tree-sitter-language` and commit the updated REDACTED.
  • Outdated: tree-sitter-md β€” `tree-sitter-md` is locked at 0.5.3 but 0.5.4 is the current stable release on crates.io, and it already satisfies the `"0.5.3"` requirement declared in rust/code_ast/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p tree-sitter-md` and commit the updated REDACTED.
  • Outdated: tree-sitter-sequel β€” `tree-sitter-sequel` is locked at 0.3.11 but 0.3.13 is the current stable release on crates.io, and it already satisfies the `"0.3.11"` requirement declared in rust/code_ast/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p tree-sitter-sequel` and commit the updated REDACTED.
  • Outdated: tree-sitter-swift β€” `tree-sitter-swift` is locked at 0.7.3 but 0.7.4 is the current stable release on crates.io, and it already satisfies the `"0.7.1"` requirement declared in rust/code_ast/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p tree-sitter-swift` and commit the updated REDACTED.
  • Outdated: unicase β€” `unicase` is locked at 2.9.0 but 2.10.0 is the current stable release on crates.io, and it already satisfies the `"2.8.1"` requirement declared in rust/code_ast/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p unicase` and commit the updated REDACTED.
  • Outdated: unicode-width β€” `unicode-width` is locked at 0.2.2 but 0.2.3 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in rust/core/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p unicode-width` and commit the updated REDACTED.
  • Outdated: uuid β€” `uuid` is locked at 1.24.0 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1.18.1"` requirement declared in rust/core/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
  • + 2 more in this group β€” see findings.md.

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.

DimensionToolVersionCommandFindingsRaw output
D28 Β· Secrets (history)gitleaksβ€”gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-f49204d6c5474a3fb3631d13f7b005ca/history.json --exit-code 0 --source .2artifacts/raw/gitleaks-history.json
D28 Β· Secrets (history)gitleaksβ€”gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-f49204d6c5474a3fb3631d13f7b005ca/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 Β· Static Analysis (SAST)semgrepβ€”semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .98artifacts/raw/semgrep.json
D30 Β· Dependency Vulnerabilitiestrivyβ€”trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .389artifacts/raw/trivy-fs.json
D31 Β· IaC & Container Securitytrivyβ€”trivy config --format json --quiet .0artifacts/raw/trivy-config.json
D32 Β· Data Compliance (PII/GDPR)semgrepβ€”semgrep: not applicable β€” No personal data was found crossing a boundary the PII/GDPR ruleset checks β€” nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) β€” `docs/astro.config.mjs` β€” so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0β€”
D40 Β· Network Egress Confinementruntime-hardeningβ€”runtime-hardening: not applicable β€” No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0β€”
D41 Β· Kernel & Syscall Confinementruntime-hardeningβ€”runtime-hardening: not applicable β€” No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0β€”
D42 Β· Runtime Threat Enforcementruntime-hardeningβ€”runtime-hardening: not applicable β€” No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0β€”
D43 Β· Malicious Dependenciestrivyβ€”trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1dad3-745e-748f-92bb-21ace0112cd6 Β· every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md