Public report — helix-db, published 29 Sep 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this survey Filed cd_153d2bb64d09490a8cb02bccce804bb4 Filed 29 September 2026, 21:57 UTC Public

HelixDB/helix-Db

Measured 29 September 2026, 21:44 UTC

56% Adequate
CriticalWeakAdequateStrongExemplary

Large · 344,338 LoC · 16 projects · rebuild ~4.7 person-years · weakest lens: Security (46%)

Findings by grade

155 critical 1191 serious 25 minor 44 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
29 September 2026, 21:44 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

50/54dimensions tool-verifieddeterministic · confidence 1.0 · 4 LLM-assisted, advisory
1348findings with an exact file:lineof 1371 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
54/138dimensions across the health lenses344338 LoC · 16 projects — wide & deep
Chapters

Executive summary

The system holds an adequate standing with a health score of 56%, reflecting a large, complex asset that is functional but carries significant operational risk. With nearly 345,000 lines of production code and a rebuild cost estimated at €680,000, this is a substantial business investment. While the underlying architecture is robust and the domain logic is well-modeled, the current security posture is fragile, exposing the organization to potential data breaches and compliance failures that could stall delivery and damage trust.

The most critical vulnerability lies in the handling of sensitive credentials. Seven secret findings were identified in historical files, including contract hashes and test logs. This is not merely a technical oversight but a direct security exposure that could lead to unauthorized access or data leakage. Resolving these issues is the highest-leverage action available, offering immediate protection with minimal effort compared to broader architectural changes. Ignoring this risk leaves the business vulnerable to incidents that could halt operations and incur severe reputational and financial penalties.

Beyond security, the system’s readiness for production is compromised by a lack of resilience. Many client interactions lack request timeouts, meaning a single slow dependency can hang threads indefinitely, leading to service outages and degraded user experience. Additionally, the absence of tests for key modules means that changes are risky, increasing the likelihood of defects in production. This fragility slows down future development, as engineers must proceed with caution, knowing that untested areas may break unexpectedly.

On the positive side, the codebase is clean, with no boilerplate or straight-line logic, indicating a mature and maintainable structure. The architecture is sound, with a high score of 93%, suggesting that changes can be made without widespread ripple effects. To move forward, leadership should prioritize the immediate remediation of the seven secret findings. This action provides the greatest return on investment by securing the asset’s most vulnerable point. Once this is addressed, the team can focus on adding timeouts and expanding test coverage to improve stability and delivery speed.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Security 46% · 46% weightReadiness 57% · 25% weightCode Health 62% · 14% weightMaturity 67% · 8% weightPerformance 85% · 4% weightArchitecture 93% · 2% weightDomain Modelling 100% · 1% weight

Raise Security 46 → 70 (the Healthy floor) ⇒ headline 56 → ~63.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

241 finding(s) are new versus the previous scan (2026-09-13) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · VectorIndex::search_layer0_with_simhash (cyclomatic 100) crates/db/src/search/vector/hnsw/search.rs
  • D1 · Cursor::next (cyclomatic 92) crates/db/src/execution/interpreter/pull/poll.rs
  • D1 · VectorRows::validate_simhash_directory (cyclomatic 49) crates/db/src/search/vector/storage/mod.rs
  • D1 · VectorIndex::restricted_filter_aware_search (cyclomatic 41) crates/db/src/search/vector/hnsw/restricted.rs
  • D1 · VectorRows::validate_legacy_physical (cyclomatic 34) crates/db/src/search/vector/storage/mod.rs
  • D1 · Source::open (cyclomatic 33) crates/db/src/execution/interpreter/pull/source.rs
  • D1 · db::search::vector::cache::hydration::hydrate_active_generations (cyclomatic 32) crates/db/src/search/vector/cache/hydration.rs
  • D1 · VectorIndex::load_uncached_items_for_layer (cyclomatic 26) crates/db/src/search/vector/hnsw/index.rs
  • D1 · VectorRows::backfill_missing_simhash_directory (cyclomatic 22) crates/db/src/search/vector/storage/mod.rs
  • D1 · Branch::next (cyclomatic 21) crates/db/src/execution/interpreter/pull/branch.rs
  • D1 · Source::next (cyclomatic 21) crates/db/src/execution/interpreter/pull/source.rs
  • D1 · helix_cli::commands::cloud::database::run (cyclomatic 18) crates/cli/src/commands/cloud/database.rs
  • D1 · Repeat::next (cyclomatic 18) crates/db/src/execution/interpreter/pull/repeat.rs
  • D1 · VectorMemoryStore::load_from_read_inner (cyclomatic 17) crates/db/src/search/vector/cache/store.rs
  • D1 · VectorIndex::relink_neighbor (cyclomatic 17) crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D1 · ExecPullCapability::of (cyclomatic 17) crates/planner/src/exec/pull/mod.rs
  • D1 · ExecProgram::derive (cyclomatic 17) crates/planner/src/exec/pull/mod.rs
  • D1 · OrderedRangeCursor::next (cyclomatic 16) crates/db/src/index_lifecycle/secondary/exact/ordered.rs
  • D1 · ExecutableDagBuilder::push_selected_stream_pipeline_op (cyclomatic 16) crates/planner/src/exec/selected/lowering/access/pipeline.rs
  • D2 · VectorIndex::search_layer0_with_simhash (cognitive 241) crates/db/src/search/vector/hnsw/search.rs
  • D2 · Cursor::next (cognitive 207) crates/db/src/execution/interpreter/pull/poll.rs
  • D2 · VectorRows::validate_simhash_directory (cognitive 110) crates/db/src/search/vector/storage/mod.rs
  • D2 · VectorIndex::restricted_filter_aware_search (cognitive 97) crates/db/src/search/vector/hnsw/restricted.rs
  • D2 · VectorRows::validate_legacy_physical (cognitive 67) crates/db/src/search/vector/storage/mod.rs
  • D2 · db::search::vector::cache::hydration::hydrate_active_generations (cognitive 67) crates/db/src/search/vector/cache/hydration.rs
  • D2 · VectorIndex::load_uncached_items_for_layer (cognitive 54) crates/db/src/search/vector/hnsw/index.rs
  • D2 · Source::next (cognitive 39) crates/db/src/execution/interpreter/pull/source.rs
  • D2 · Branch::next (cognitive 38) crates/db/src/execution/interpreter/pull/branch.rs
  • D2 · Repeat::next (cognitive 38) crates/db/src/execution/interpreter/pull/repeat.rs
  • D2 · VectorRows::backfill_missing_simhash_directory (cognitive 37) crates/db/src/search/vector/storage/mod.rs
  • D2 · OrderedRangeCursor::next (cognitive 33) crates/db/src/index_lifecycle/secondary/exact/ordered.rs
  • D2 · VectorMemoryStore::load_from_read_inner (cognitive 32) crates/db/src/search/vector/cache/store.rs
  • D2 · VectorIndex::relink_neighbor (cognitive 32) crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D2 · ExecProgram::derive (cognitive 32) crates/planner/src/exec/pull/mod.rs
  • D2 · ExecutionContext::execute_steps (cognitive 30) crates/db/src/execution/interpreter/scheduler.rs
  • D2 · VectorIndex::search_layer_beam (cognitive 30) crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D2 · ExecutionContext::expansion_ids (cognitive 24) crates/db/src/execution/interpreter/access/expand.rs
  • D2 · helix_cli::commands::cloud::service_credential::run (cognitive 20) crates/cli/src/commands/cloud/service_credential.rs
  • D2 · HelixDB::run_configured_startup_cache_warm (cognitive 20) crates/db/src/lib.rs
  • D2 · VectorIndex::stage_delete_with_metadata (cognitive 18) crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D2 · VectorIndex::search_layer_greedy (cognitive 18) crates/db/src/search/vector/hnsw/search.rs
  • D2 · SimHasherRegistry::get (cognitive 18) crates/db/src/search/vector/simhash/registry.rs
  • D2 · ExecPullCapability::of (cognitive 18) crates/planner/src/exec/pull/mod.rs
  • D2 · helix_cli::commands::cloud::database::run (cognitive 17) crates/cli/src/commands/cloud/database.rs
  • D2 · FtsCache::cleanup_disk (cognitive 17) crates/db/src/search/text/cache.rs
  • D2 · VectorIndex::insert_hnsw (cognitive 17) crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D2 · VectorIndex::add_bidirectional_link (cognitive 17) crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D2 · db::index_lifecycle::outbox::execute_claimed_step_with_evidence (cognitive 17) crates/db/src/index_lifecycle/outbox.rs
  • D2 · db::search::vector::cache::reader_refresh::run_reader_refreshes (cognitive 17) crates/db/src/search/vector/cache/reader_refresh.rs
  • D2 · helix_cli::commands::status::run (cognitive 16) crates/cli/src/commands/status.rs
  • D2 · VectorIndex::insert_with_mutation_cache (cognitive 16) crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D3 · MethodTooLong: VectorIndex.search_layer0_with_simhash crates/db/src/search/vector/hnsw/search.rs
  • D3 · FileTooLong: mutation/mod.rs crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D3 · MethodTooLong: Cursor.next crates/db/src/execution/interpreter/pull/poll.rs
  • D3 · TooManyMethods: VectorIndex crates/db/src/search/vector/hnsw/index.rs
  • D3 · FileTooLong: storage/mod.rs crates/db/src/search/vector/storage/mod.rs
  • D3 · ClassTooLong: VectorRows crates/db/src/search/vector/storage/mod.rs
  • D3 · MethodTooLong: VectorIndex.restricted_filter_aware_search crates/db/src/search/vector/hnsw/restricted.rs
  • D3 · MethodTooLong: VectorRows.validate_simhash_directory crates/db/src/search/vector/storage/mod.rs
  • D3 · ClassTooLong: VectorIndex crates/db/src/search/vector/hnsw/index.rs
  • D3 · MethodTooLong: Source.open crates/db/src/execution/interpreter/pull/source.rs
  • D3 · FileTooLong: hnsw/restricted.rs crates/db/src/search/vector/hnsw/restricted.rs
  • D3 · FileTooLong: hnsw/index.rs crates/db/src/search/vector/hnsw/index.rs
  • D3 · FileTooLong: hnsw/search.rs crates/db/src/search/vector/hnsw/search.rs
  • D3 · FunctionTooLong: db::search::vector::cache::hydration::hydrate_active_generations crates/db/src/search/vector/cache/hydration.rs
  • D3 · MethodTooLong: VectorRows.validate_legacy_physical crates/db/src/search/vector/storage/mod.rs
  • D3 · FunctionTooLong: helix_cli::commands::cloud::service_credential::run crates/cli/src/commands/cloud/service_credential.rs
  • D3 · FileTooLong: mutation/active.rs crates/db/src/search/vector/hnsw/mutation/active.rs
  • D3 · FunctionTooLong: helix_cli::commands::cloud::database::run crates/cli/src/commands/cloud/database.rs
  • D3 · FileTooLong: cache/registry.rs crates/db/src/search/vector/cache/registry.rs
  • D3 · MethodTooLong: VectorRows.backfill_missing_simhash_directory crates/db/src/search/vector/storage/mod.rs
  • D3 · TooManyMethods: MutationOpCache crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D3 · ClassTooLong: MutationOpCache crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D3 · FileTooLong: cache/store.rs crates/db/src/search/vector/cache/store.rs
  • D3 · TooManyMethods: StorageCostProfile crates/planner/src/cost/profile.rs
  • D3 · MethodTooLong: VectorIndex.relink_neighbor crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D3 · FunctionTooLong: helix_cli::commands::cloud::project::run crates/cli/src/commands/cloud/project.rs
  • D3 · MethodTooLong: ExecutionContext.node_secondary_ids crates/db/src/execution/interpreter/access/secondary_set.rs
  • D3 · FileTooLong: scripts/check-docs.mjs docs/scripts/check-docs.mjs
  • D3 · MethodTooLong: SearchSession.run crates/db/src/search/vector/hnsw/search.rs
  • D3 · FileTooLong: cloud/resolve.rs crates/cli/src/cloud/resolve.rs
  • D3 · MethodTooLong: Program.new crates/db/src/execution/interpreter/pull/count.rs
  • D3 · MethodTooLong: VectorIndex.insert_with_mutation_cache crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D3 · FunctionTooLong: helix_cli::commands::add::run crates/cli/src/commands/add.rs
  • D3 · FunctionTooLong: helix_cli::main crates/cli/src/main.rs
  • D3 · MethodTooLong: SimHasherRegistry.get crates/db/src/search/vector/simhash/registry.rs
  • D4 · Near-duplicate member family (6 members, 24 shared lines) crates/db/src/migrations/vector_properties.rs
  • D4 · Near-duplicate member family (4 members, 32 shared lines) crates/db/src/migrations/vector_retirement.rs
  • D4 · Near-duplicate member pair (54 shared lines) crates/db/src/index_lifecycle/text/validation.rs
  • D4 · Near-duplicate member pair (50 shared lines) crates/db/src/execution/interpreter/access/indexes.rs
  • D4 · Members sharing a duplicated core (7 members, 50+ identical tokens) crates/db/src/migrations/mod.rs
  • D4 · Members sharing a duplicated core (7 members, 50+ identical tokens) crates/planner/src/exec/lowering/contracts/access/cardinality.rs
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/db/src/execution/interpreter/stream/filter.rs
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/db/src/index_lifecycle/text/driver.rs
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/db/src/search/mod.rs
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) sdks/python/scripts/run_embedded_parity.py
  • D4 · Duplicated block (30 lines × 2) crates/db/src/search/vector/hnsw/mutation/mod.rs
  • D4 · Duplicated block (28–29 lines × 2) crates/cli/src/local_runtime.rs
  • D4 · Duplicated block (24 lines × 2) crates/db/src/execution/interpreter/access/indexes.rs
  • D4 · Duplicated block (23 lines × 2) crates/db/src/search/vector/hnsw/mutation/mod.rs

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €230,000–€1,100,000
Cost to rebuild€230,000–€1,100,000 (2.2–7.1 person-years (3,756–11,917 h), ~2–9 engineers)
Domain complexityHigh — harder problems cost more per line
Quality factor0.8× (at 56% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~4.7 person-years of build effort (about ~€680,000 to rebuild). Its weakest lens is Security at 46% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain High (×1.4) — CQRS, domain model × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 7 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED.
+4.0 pts · Low effort · Secrets (history)
2
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life.
+2.6 pts · Low effort · Platform End-of-Life
3
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
+3.9 pts · Medium effort · Outbound HTTP resilience

Diagnosis — what's actually going on

Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~4.7 person-years to rebuild), and its weakest lens is Security at 46%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~4.7 person-years rebuild (344,338 LoC) · weakest lens: Security 46%
→ Direct remediation budget at Security first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 7 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 7 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch @helix-db/helix-db helix-db db db helix-ast helix-ast db->helix-ast helix-metrics helix-metrics db->helix-metrics helix-planner helix-planner db->helix-planner helix-value-semantics helix-value-semantics db->helix-value-semantics github.com/helixdb/helix-db/sdks/go go helix-cli helix-cli helix-cli->helix-metrics helix-db helix-db helix-db-embedded helix-db-embedded helix-db-testkit helix-db-testkit helix-db-testkit->db helix-db-testkit->helix-ast helix-db-testkit->helix-planner helix-dsl-macros helix-dsl-macros helix-graph-algorithms helix-graph-algorithms helix-planner->helix-ast helix-planner->helix-value-semantics helixdb-uniffi helixdb-uniffi helixdb-uniffi->db helixdb-uniffi->helix-ast helixdb-uniffi->helix-graph-algorithms helixdb-uniffi-bindgen helixdb-uniffi-bindgen server server server->db server->helix-ast server->helix-metrics

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

947 modules, 2807 dependencies. 8 dependency cycles across 185 modules, marked above the diagonal.

Showing the 40 most-connected modules; 907 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 db.encoding.v2.keys.scope2 db.error3 helix_ast.expr4 helix_ast.index5 helix_db_testkit.action6 helix_planner.cost.vector7 helix_planner.ir.contracts.at_least8 helix_planner.ir.contracts.non_empty_string9 helix_planner.logical.access.pipeline.op10 helix_planner.logical.core.expr11 helix_planner.properties.positive12 db.execution.interpreter.types13 db.index_lifecycle.model14 helix_ast.value15 helix_graph_algorithms.model16 helix_planner.catalog.property17 helix_planner.cost.profile18 helix_planner.ir.access.edge19 helix_planner.ir.access.node20 helix_planner.logical.access.path21 helix_planner.properties.delivered22 db.encoding.v2.keys.managed_index23 db.index_lifecycle.work24 db.search.vector.hnsw.index25 helix_ast.traversal26 helix_planner.catalog.snapshot27 helix_planner.exec.lowering28 helix_planner.rules.contracts.metadata29 db.config.indexes30 db.index_lifecycle.secondary31 db.index_lifecycle.vector.driver32 helix_planner.context.planner33 helix_planner.optimizer.rule34 db35 db.search.text36 helix_planner.diagnostics.analyze37 helix_planner.rules.cardinality38 db.execution.interpreter.runtime_context39 helix_planner.rules.registry40 helix_planner.planning.selected.session
1 db.encoding.v2.keys.scope
2 db.error
3 helix_ast.expr
4 helix_ast.index
5 helix_db_testkit.action
6 helix_planner.cost.vector
7 helix_planner.ir.contracts.at_least
8 helix_planner.ir.contracts.non_empty_string
9 helix_planner.logical.access.pipeline.op
10 helix_planner.logical.core.expr
11 helix_planner.properties.positive
12 db.execution.interpreter.types1
13 db.index_lifecycle.model37
14 helix_ast.value1
15 helix_graph_algorithms.model1
16 helix_planner.catalog.property12
17 helix_planner.cost.profile111
18 helix_planner.ir.access.edge1
19 helix_planner.ir.access.node1
20 helix_planner.logical.access.path13
21 helix_planner.properties.delivered2
22 db.encoding.v2.keys.managed_index18
23 db.index_lifecycle.work34
24 db.search.vector.hnsw.index111
25 helix_ast.traversal322
26 helix_planner.catalog.snapshot2
27 helix_planner.exec.lowering2111111112
28 helix_planner.rules.contracts.metadata2
29 db.config.indexes311
30 db.index_lifecycle.secondary519121
31 db.index_lifecycle.vector.driver3117221
32 helix_planner.context.planner11
33 helix_planner.optimizer.rule1111
34 db321232
35 db.search.text11124
36 helix_planner.diagnostics.analyze2341
37 helix_planner.rules.cardinality1111111114
38 db.execution.interpreter.runtime_context12114212241
39 helix_planner.rules.registry1
40 helix_planner.planning.selected.session111
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…ncoding.v2.keys.scopedb.errorhelix_ast.exprhelix_ast.index…lix_db_testkit.action…x_planner.cost.vector…ir.contracts.at_least…acts.non_empty_string…al.access.pipeline.op…ner.logical.core.expr…r.properties.positive…ion.interpreter.types…index_lifecycle.modelhelix_ast.value…raph_algorithms.model…nner.catalog.property…_planner.cost.profile…lanner.ir.access.edge…lanner.ir.access.node…r.logical.access.path….properties.delivered…v2.keys.managed_index….index_lifecycle.work…rch.vector.hnsw.indexhelix_ast.traversal…nner.catalog.snapshot…planner.exec.lowering…es.contracts.metadatadb.config.indexes…x_lifecycle.secondary…fecycle.vector.driver…anner.context.planner…lanner.optimizer.ruledbdb.search.text…r.diagnostics.analyze…ner.rules.cardinality…reter.runtime_context…lanner.rules.registry…ning.selected.session…ncoding.v2.keys.scope1db.error2helix_ast.expr3helix_ast.index4…lix_db_testkit.action5…x_planner.cost.vector6…ir.contracts.at_least7…acts.non_empty_string8…al.access.pipeline.op9…ner.logical.core.expr10…r.properties.positive11…ion.interpreter.types12…index_lifecycle.model13helix_ast.value14…raph_algorithms.model15…nner.catalog.property16…_planner.cost.profile17…lanner.ir.access.edge18…lanner.ir.access.node19…r.logical.access.path20….properties.delivered21…v2.keys.managed_index22….index_lifecycle.work23…rch.vector.hnsw.index24helix_ast.traversal25…nner.catalog.snapshot26…planner.exec.lowering27…es.contracts.metadata28db.config.indexes29…x_lifecycle.secondary30…fecycle.vector.driver31…anner.context.planner32…lanner.optimizer.rule33db34db.search.text35…r.diagnostics.analyze36…ner.rules.cardinality37…reter.runtime_context38…lanner.rules.registry39…ning.selected.session40137111211111132183411132222111111112231151912131172211111113212321112423411111111114121142122411111+907 more modules (most-connected shown)

At a glance — Code Health · 62% · Adequate · gated by R3 ·

At a glance — Architecture · 93% · Exemplary ·

At a glance — Maturity · 67% · Adequate · gated by M2 ·

At a glance — Readiness · 57% · Adequate · gated by R4, P7 ·

At a glance — Security · 46% · Weak · gated by D28, D29, D30, D36 ·

At a glance — Domain Modelling · 100% · Exemplary ·

At a glance — Performance · 85% · Strong ·

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:2021 — Injection172High / Critical
A06:2021 — Vulnerable & Outdated Components28High / Critical
A02:2021 — Cryptographic Failures8High / Critical
A05:2021 — Security Misconfiguration3Medium

Roadmap

Begin by resolving the seven secret findings in version history, prioritizing REDACTED and REDACTED. Next, harden outbound HTTP resilience by enforcing request timeouts on all clients and adding retry logic with back-off for failing dependencies. Simultaneously, expand test coverage to import and verify unreached production modules, and extend structured logging across all remaining runnable modules to ensure full production diagnosability. Finally, enable automated dependency scanning and review gates to maintain ongoing security and performance standards.

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

Do thisHelpsEffortDimension
Resolve the 7 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED.+4.0 ptsLowSecrets (history)
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life.+2.6 ptsLowPlatform End-of-Life
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.+3.9 ptsMediumOutbound HTTP resilience
Add tests that import the unreached modules (directly or through their public entry).+3.9 ptsMediumTest Coverage
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+3.9 ptsMediumObservability
Enable Dependabot/Renovate or a dependency-review gate.+3.8 ptsMediumSecurity & performance tooling
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.9 ptsLowADR Quality
Resolve the 8 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (8).+1.4 ptsLowDependency Vulnerabilities

File quality

Per-file score 0–10 — a quality signature. Of 271 files carrying findings, judged against the Production bar: 1% slop · 61% mixed · 38% near-clean.

FileScoreBandWorst signal
REDACTED0.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.9SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedSecrets (history): REDACTED: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedDependency Vulnerabilities: Medium advisory (unmaintained): REDACTED
crates/db/src/search/vector/mod.rs5.9MixedCognitive Complexity: db::search::vector::select_diverse (cognitive 22)
crates/db/src/config/indexes.rs5.9MixedGod Classes: FileTooLong: config/indexes.rs

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 — 155

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 — 1191

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 — 25

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

Could not be resolved — 44

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 50 of 54 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 54 dimensions across the health lenses
D1D2D3D4D5D6D9D13D15D16D17D19D20D21D26D28D29D30D31D34D35D36D43D44AX10AX3AX5AX9DM4DM5M1M2M3M4P1P10P2P3P4P6P7PF1PF2PF3R1R10R2R3R4R5R6R7R8R9

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, 1348 of 1371 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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
Watchdog 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
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0ef20-0d96-73bc-82d7-78b50b3da3af.

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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`cargo llvm-cov`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.rs, .py, .ts), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or `coverage run -m pytest` then `coverage xml`, or lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or `coverage run -m pytest` then `coverage xml`, or lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs, .py, .ts) and this repository declares a Cargo test suite (repository root, 724 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Dependency Hygiene couldn't be assessed within its 5-minute budget on a solution this large — not included in this run.
  • D22 Internal API Consistency — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `REDACTED`, `sdks/typescript/src/dsl.ts` 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and no container it models, or knows cannot hold a captive, was found in this repository's source, 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.
  • AX2 Stateful singletons — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection singletons in C# and Spring/JSR-330/CDI singletons in Java and Kotlin only, and this repository's product is written in Go and Python, which was left unread, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security 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 web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. X7 measured the part of this repository it reads (C#, Python and TypeScript/JavaScript), and its Go, Rust source is outside the check's reach, so the card covers only part of the product. That is a gap in this analyzer's language reach — not a finding that the unread source is free of silent defaults.

Repo exclusion declarations: 6 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • 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 REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, 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.
  • 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.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (4): D19, D21, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.0 / 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.0 / 10 · rule-coverage 100% · ceiling Prevented

127 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was VectorIndex::search_layer0_with_simhash at 100. A further 51 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 Step.toAst at 86 — they are counted neither in the figure above nor in this dimension's score. 32 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/ast/src/error_code.rs (QueryErrorCode::as_str at 84), crates/planner/src/planning/envelope/root_kind.rs (helix_planner::planning::envelope::root_kind::ast_root_kind at 83), crates/ast/src/traversal.rs (Operation::apply at 65), crates/planner/src/rules/contracts/known/names.rs (KnownRuleId::from_name at 49), crates/db/src/error.rs (HelixDbError::error_code at 48), and 27 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

db::migrations::preflight_legacy_vector_reservations (cyclomatic 57) · ×48crates/db/src/migrations/mod.rs:1856
ExecutionContext::count_cursor_leaf (cyclomatic 36) · ×8crates/db/src/execution/interpreter/count.rs:1274
helix_planner::analysis::scalar::truth::static_predicate_value (cyclomatic 27) · ×6crates/planner/src/analysis/scalar/truth.rs:13
VectorIndex::search_layer0_with_simhash (cyclomatic 100) · ×4crates/db/src/search/vector/hnsw/search.rs:267
VectorRows::validate_simhash_directory (cyclomatic 49) · ×3crates/db/src/search/vector/storage/mod.rs:1173

+ 51 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 48 db finding(s) in Cyclomatic Complexity — start with driver.rs (9), mod.rs (5), secondary.rs (5). — One of this dimension's main actionable groups (48 warning-level).
  2. Resolve the 8 ExecutionContext finding(s) in Cyclomatic Complexity — start with count.rs (2), predicate.rs, storage.rs. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 6 helix_planner finding(s) in Cyclomatic Complexity — start with pipeline.rs (2), truth.rs, cardinality.rs. — One of this dimension's main actionable groups (6 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity5.1 / 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.1 / 10 · rule-coverage 100% · ceiling Prevented

190 method(s) exceeded the cognitive complexity threshold of 15; the worst was VectorIndex::search_layer0_with_simhash at 241.

db::migrations::preflight_legacy_vector_reservations (cognitive 87) · ×81crates/db/src/migrations/mod.rs:1856
VectorIndex::search_layer0_with_simhash (cognitive 241) · ×10crates/db/src/search/vector/hnsw/search.rs:267
helix_planner::rules::cardinality::fold_cursor (cognitive 29) · ×8crates/planner/src/rules/cardinality.rs:273
ExecutionContext::execute_shortest_path (cognitive 31) · ×6crates/db/src/execution/interpreter/shortest_path.rs:17
helix_cli::commands::chef::launch_claude_streaming (cognitive 37) · ×4crates/cli/src/commands/chef.rs:1942

+ 72 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 81 db finding(s) in Cognitive Complexity — start with driver.rs (14), secondary.rs (11), mod.rs (9). — One of this dimension's main actionable groups (81 warning-level).
  2. Resolve the 10 VectorIndex finding(s) in Cognitive Complexity — start with mod.rs (6), search.rs (2), restricted.rs. — One of this dimension's main actionable groups (10 warning-level).
  3. Resolve the 8 helix_planner finding(s) in Cognitive Complexity — start with cardinality.rs, exploration.rs, contracts.rs. — One of this dimension's main actionable groups (8 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

206 god class(es) detected.

FunctionTooLong: db::index_lifecycle_testing::contracts::run_secondary_mutation_interleaving · ×80crates/db/src/index_lifecycle_testing/contracts.rs:1510
FileTooLong: migrations/mod.rs · ×60crates/db/src/migrations/mod.rs
MethodTooLong: VectorIndex.search_layer0_with_simhash · ×32crates/db/src/search/vector/hnsw/search.rs:267
TooManyMethods: ExecutionContext · ×18crates/db/src/execution/interpreter/runtime_context.rs:270
ClassTooLong: VectorRows · ×11crates/db/src/search/vector/storage/mod.rs:242

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 80 FunctionTooLong finding(s) in God Classes — start with driver.rs (15), mod.rs (14), contracts.rs (10). — One of this dimension's main actionable groups (80 warning-level).
  2. Resolve the 60 FileTooLong finding(s) in God Classes — start with mod.rs (6), count.rs (2), driver.rs (2). — One of this dimension's main actionable groups (60 warning-level).
  3. Resolve the 32 MethodTooLong finding(s) in God Classes — start with mod.rs (6), count.rs (5), search.rs (2). — One of this dimension's main actionable groups (32 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.3 / 10Stronggated by 487 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Verified

465 duplicated block group(s) detected. A further 22 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 3 of the 487 are in trees this repository does not ship — vendored, example/demo, 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.

Duplicated block (11 lines × 2) · ×34crates/db/src/config/definition_differences.rs:183
Duplicated block (12 lines × 2) · ×32crates/db/src/encoding/v2/keys/indexes/range/edge.rs:422
Duplicated block (6 lines × 2) · ×32crates/db/src/encoding/v2/values/property/property_value.rs:330
Duplicated block (10 lines × 2) · ×27crates/db/src/encoding/v2/keys/data.rs:376
Duplicated block (8 lines × 2) · ×27crates/db/src/encoding/v2/values/property/property_value.rs:347

+ 121 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 34 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with mod.rs (5), edge.rs (4), secondary.rs (2). — One of this dimension's main actionable groups (34 warning-level).
  2. Resolve the 32 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with mod.rs (6), contracts.rs (3), count.rs (2). — One of this dimension's main actionable groups (32 warning-level).
  3. Resolve the 32 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with secondary.rs (3), edge.rs (3), property_value.rs (2). — One of this dimension's main actionable groups (32 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling8.0 / 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 8.0 / 10 · rule-coverage 100% · ceiling Prevented

16 production modules (Cargo+npm+Go+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 4 module(s) off the main sequence, with abstractness counted on 13 of the 16 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).

Off the main sequence: helix-graph-algorithms · ×4

What to do

  1. Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 5 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.8 / 10 · rule-coverage 100% · ceiling Verified

5 of 374 classes have LCOM4 above 3.

Low cohesion: DbConfig (LCOM4 13) · ×5crates/db/src/config/db.rs:176

What to do

  1. Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with db.rs, json.rs, indexes.rs. — One of this dimension's main actionable groups (5 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

4431 test methods: 4048 unit, 366 integration, 0 BDD, 17 e2e. The Rust suite contributes 4291 `#[test]` function(s) across 724 file(s) declaring at least one; its unit/integration split is Cargo's own — 44 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 100 test function(s) across 11 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only. The Go suite contributes 40 test case(s) across 5 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 1 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D13 · REDACTED 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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 63 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: crates/db/src/index_lifecycle/secondary.rs (44×28=1232); crates/db/src/index_lifecycle/repository.rs (24×36=864); sdks/typescript/src/dsl.ts (7×86=602) Repeated repair below the complexity floor: crates/cli/src/local_runtime.rs (30 of 39 changes were fixes); crates/db/src/search/text/cache.rs (11 of 15 changes were fixes); crates/server/src/config.rs (10 of 18 changes were fixes)

Hotspot: crates/db/src/index_lifecycle/secondary.rs · ×51crates/db/src/index_lifecycle/secondary.rs:1004
Repeated repair: crates/cli/src/local_runtime.rs · ×12crates/cli/src/local_runtime.rs:378

What to do

  1. Resolve the 51 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (4), count.rs (3), pipeline.rs (3). — One of this dimension's main actionable groups (51 warning-level).
  2. Resolve the 12 Repeated repair finding(s) in Churn × Complexity Hotspots — start with cache.rs (2), local_runtime.rs, config.rs. — One of this dimension's main actionable groups (12 warning-level).

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

D16 · Bus Factor7.6 / 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 7.6 / 10 · rule-coverage 100% · ceiling Documented

176 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/db/src/migrations/mod.rs. Counted over 743 of the 1259 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 · ×4
Further sole-owners (lower concentration)

What to do

  1. Resolve the 4 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (4 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

0 deducted task-comment markers across 344338 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

The repository's root README and the docs/ directory are clear and complete for a documentation set. The root README gives an overview of HelixDB as an open-source graph database with vector search and BM25 full-text search built in Rust on object storage, plus installation (curl install), getting started (mkdir my-helix-app, helix init local, helix start dev), and the outline's Getting started; Or let an agent build it; Query from your app; [query]; [query]; [tokio::main]; Helix Cloud; Docs and community; License sections. The docs/ README is a canonical source for public documentation with a page-contract table, site structure (HelixDB + Cloud tabs), style conventions, and the outline's Learn pages plus local checks; it also documents the Docker image directory, crates/cli, crates/db, crates/metrics, crates/server, sdks/go, and sdks/python directories. The crate doc comments are excellent for an AI agent. The repository's READMEs and architecture/Docs markdown files are clear, complete, and well-structured: each document is a distinct directory README (e.g. sdks/typescript/, crates/db-testkit/fuzz/) that documents its own tier rather than the root repo, with an overview, installation/run examples, usage, test-suite guidance, and license; architecture/Docs files cover design decisions, API references, and validation contracts. The repository's documentation is clear and complete for its readers: 17 READMEs cover the vector-magnitude validation, workspace CI validation, shared-membership write contracts, and related topics, while 11 architecture/Docs markdown files provide design rationale (e.g. why checked staging validates existing values before batching). Each document states what it covers so no section is flagged as missing; the visible content is strong.

Documentation: no contributor guidanceREADME.md

✓ On the Gold path — maintain.

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

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

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

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D26 · Project Cohesion5.9 / 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, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 5.9 / 10 · rule-coverage 100% · ceiling Documented

3 of 13 build units (Cargo) flagged as possibly oversized/incoherent.

Split crates/db
Split crates/planner

What to do

  1. Resolve the 1 Split crates/db finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Split crates/planner 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)3.0 / 10Weak✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 3.0 / 10 · rule-coverage 100% · ceiling Documented

7 finding(s): 0 critical, 7 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 7 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)1.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 1.1 / 10 · rule-coverage 100% · ceiling Documented

172 finding(s): 0 critical, 143 high, 28 medium, 1 low. 139 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 4 file(s) — `crates/db/fuzz/corpus/current_search_records/text-live-state.json`, `crates/db/fuzz/corpus/current_search_records/text-manifest.json`, `REDACTED` (line 199), `sdks/typescript/src/dsl.ts` (line 2764) — 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 4 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

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. 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).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 139 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (139 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities2.6 / 10Weak✓ 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.

Maturity: Documented → Verified → Prevented · effective 2.6 / 10 · rule-coverage 100% · ceiling Documented

28 finding(s): 0 critical, 5 high, 23 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 11 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (11). — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 8 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).

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

D31 · IaC & Container Security9.8 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 0 high, 2 medium, 1 low.

REDACTED
REDACTED

What to do

  1. Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ 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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 743 of the 1259 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

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 warning-level).
  3. 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.

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. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

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

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-Life6.0 / 10Adequate✓ 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 6.0 / 10 · rule-coverage 100% · ceiling Documented

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 1 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.

End-of-life runtime: Rust 1.97

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life. — One of this dimension's main actionable groups (1 warning-level).

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

Frontend & cross-cutting dimensions

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

AX10 · Code composition9.1 / 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.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

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.

DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 7 of 20 project(s) that lack one — worth up to 0.7 pts.
M2 · Architecture documentation2.0 / 10Critical✓ 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.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

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 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 · Observability5.7 / 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 2/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `bindings/uniffi`, `bindings/uniffi-bindgen`, `crates/cli`, `crates/metrics` and 2 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) so requests are traceable across the system, not just health-probable.
P3 · Security & performance tooling6.0 / 10Adequate✓ 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

  • Enable Dependabot/Renovate or a dependency-review gate.
  • 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 Hygiene10.0 / 10Exemplary✓ 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.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `reqwest::Client::builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. 3 of the 9 files that make outbound calls are unbounded; the first 3 are listed. — crates/cli/src/cloud/client.rs:177
  • `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/cli/src/commands/query.rs:136
  • `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:258

What to do

  • Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
PF1 · Benchmark discipline9.5 / 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.

PF2 · Allocation hygiene7.0 / 10Strong✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 8 use(s) across 4,065 production line(s) (~2.0/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Go: on hot paths, reuse buffers and objects through sync.Pool, preallocate slices and maps with make([]T, 0, n) / make(map[K]V, n), size builders with Grow, append with strconv.Append*, and reslice with buf[:0] instead of allocating anew.
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 the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety8.1 / 10Strong✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.1 / 10Strong✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • sdks/typescript/src/dsl.ts:2586 · sdks/typescript/src/dsl.ts:2655 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2586
  • sdks/typescript/scripts/parity/compare-json.ts:33 · sdks/typescript/scripts/parity/run-helix.ts:251 — the two spans are one implementation copied and then locally edited — 414 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — sdks/typescript/scripts/parity/compare-json.ts:33
  • sdks/typescript/scripts/parity/run-embedded-client.ts:85 · sdks/typescript/scripts/parity/run-helix.ts:172 — the two spans are one implementation copied and then locally edited — 456 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — sdks/typescript/scripts/parity/run-embedded-client.ts:85
  • sdks/typescript/src/dsl.ts:2084 · sdks/typescript/src/dsl.ts:2122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — sdks/typescript/src/dsl.ts:2084
  • sdks/typescript/src/dsl.ts:483 · sdks/typescript/src/dsl.ts:514 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:483
  • sdks/typescript/src/dsl.ts:1985 · sdks/typescript/src/dsl.ts:2013 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — sdks/typescript/src/dsl.ts:1985
  • sdks/typescript/src/dsl.ts:2564 · sdks/typescript/src/dsl.ts:2631 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2564
  • sdks/typescript/src/index.ts:271 · sdks/typescript/src/index.ts:287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — sdks/typescript/src/index.ts:271
  • sdks/typescript/src/dsl.ts:2047 · sdks/typescript/src/dsl.ts:2157 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — sdks/typescript/src/dsl.ts:2047
  • sdks/typescript/src/dsl.ts:1091 · sdks/typescript/src/dsl.ts:1106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — sdks/typescript/src/dsl.ts:1091
  • sdks/typescript/src/dsl.ts:2908 · sdks/typescript/src/dsl.ts:2973 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2908
  • bindings/uniffi/smoke-node.mjs:154 · bindings/uniffi/smoke-node.mjs:174 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/uniffi/smoke-node.mjs:154
  • sdks/typescript/scripts/parity/run-embedded-parity.ts:299 · sdks/typescript/scripts/parity/run-helix.ts:303 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/scripts/parity/run-embedded-parity.ts:299
  • sdks/typescript/src/dsl.ts:509 · sdks/typescript/src/dsl.ts:539 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:509
  • sdks/typescript/src/dsl.ts:1071 · sdks/typescript/src/dsl.ts:1083 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:1071
  • sdks/typescript/scripts/edge-drop-regression.ts:23 · sdks/typescript/scripts/edge-drop-regression.ts:38 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/scripts/edge-drop-regression.ts:23
  • sdks/typescript/src/dsl.ts:702 · sdks/typescript/src/dsl.ts:709 · sdks/typescript/src/dsl.ts:719 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:702
  • sdks/typescript/scripts/parity/generate-fixtures.ts:654 · sdks/typescript/scripts/parity/generate-fixtures.ts:676 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — sdks/typescript/scripts/parity/generate-fixtures.ts:654
  • sdks/typescript/scripts/parity/run-embedded-parity.ts:292 · sdks/typescript/scripts/parity/run-helix.ts:298 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/scripts/parity/run-embedded-parity.ts:292
  • sdks/typescript/src/dsl.ts:2177 · sdks/typescript/src/dsl.ts:2184 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2177
  • sdks/typescript/src/dsl.ts:2225 · sdks/typescript/src/dsl.ts:2231 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2225
  • sdks/typescript/src/dsl.ts:2246 · sdks/typescript/src/dsl.ts:2252 · sdks/typescript/src/dsl.ts:2258 · sdks/typescript/src/dsl.ts:2267 · +6 more site(s) not listed — all 10 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2246
  • sdks/typescript/src/dsl.ts:2255 · sdks/typescript/src/dsl.ts:2357 · sdks/typescript/src/dsl.ts:2363 · sdks/typescript/src/dsl.ts:2375 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2255
  • sdks/typescript/src/dsl.ts:2297 · sdks/typescript/src/dsl.ts:2303 · sdks/typescript/src/dsl.ts:2321 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2297
  • sdks/typescript/src/dsl.ts:2354 · sdks/typescript/src/dsl.ts:2360 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/src/dsl.ts:2354
  • sdks/typescript/scripts/parity/generate-fixtures.ts:743 · sdks/typescript/scripts/parity/generate-fixtures.ts:763 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sdks/typescript/scripts/parity/generate-fixtures.ts:743

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity8.5 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • toAst has cyclomatic complexity 86 and cognitive complexity 4; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:1703
  • remote has cyclomatic complexity 25 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/index.ts:72
  • convertParamValue has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:2902
  • normalizeTypedQueryValue has cyclomatic complexity 22 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:2966
  • from has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:405
  • quoteUnsafeIntegerTokens has cyclomatic complexity 16 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:97
  • stringifyEncoded has cyclomatic complexity 16 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:160
  • parseIndexOperationStatus has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:1302
  • queryValueFromPropertyValue has cyclomatic complexity 16 and cognitive complexity 3; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:3000
  • constructor has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/graph.ts:46
  • encode has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/src/dsl.ts:10
  • (top-level) has cyclomatic complexity 11 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sdks/typescript/scripts/package-smoke.mjs:2

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files1.4 / 10Critical✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • 3 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: sdks/typescript/src/dsl.ts (3097), sdks/typescript/scripts/parity/generate-fixtures.ts (1271), sdks/typescript/src/index.ts (438).

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage2.5 / 10Weak✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×9) — sdks/typescript/scripts/parity/generate-fixtures.ts, sdks/typescript/scripts/parity/run-helix.ts, sdks/typescript/scripts/parity/run-embedded-parity.ts, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.9 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code9.1 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 15 application, 4 tooling and 10 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (15 application, 4 tooling, 10 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — sdks/typescript/scripts/parity/run-embedded-client.ts, sdks/typescript/scripts/edge-drop-regression.ts
  • Nothing imports this binding — it is safe to review for removal. — sdks/typescript/scripts/parity/paths.ts:14

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

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 Health62%Adequate — gated by R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture93%ExemplarySolid.
Maturity67%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness57%Adequate — gated by R4, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security46%Weak — gated by D28, D29, D30, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Performance85%StrongSolid.
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 — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 3 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 — 78 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.

  • AC1 Text alternatives — Frontend below the scale floor (3 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (3 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (3 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (3 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (3 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (3 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC7 A11y enforcement — Frontend below the scale floor (3 DOM element(s) < 25) — too little surface to assess accessibility.
  • 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 — 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
  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — 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.
  • D10 Test Quality — ~151468 lines of test source are present (.rs, .py, .ts) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
  • D12 Dependency Hygiene — Dependency Hygiene not included (time budget)
  • D14 License Compliance — Not scored — this repository's 560 shipped crate(s) were read from its REDACTED, but crates.io could not be asked for the licence of 49 of them (HTTP 429 Unknown Error), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
  • 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.
  • D22 Internal API Consistency — LLM evaluation failed
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Aggregate boundaries — this Rust crate declares no domain aggregate (a struct with private state and its own command methods), so DM1's aggregate-boundary read has no population to be taken over
  • DM2 Strongly-typed ids — the crate defines newtype typed-ids but declares no domain aggregate that could carry an id — so DM2's adoption ratio has no population to be taken over
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM6 Domain ↔ infrastructure boundary — this Rust crate maps no type to a persistence framework (diesel/sea-orm/sqlx), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • 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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • 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# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — Not assessed: these web-security 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 web-security 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.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — 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
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — 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
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — 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
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X7 Silent fallback defaults — 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 — 155 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
  • + 114 more in this group — see findings.md.
D28 · Secrets (history) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 1191 finding(s)
D2 · Cognitive Complexity · db · ×81
  • db::migrations::preflight_legacy_vector_reservations (cognitive 87) crates/db/src/migrations/mod.rs:1856 — db::migrations::preflight_legacy_vector_reservations has cognitive complexity 87 (threshold 15). Drivers by points: if/else 24 (54 pts), match/switch 6 (13 pts), boolean chains 10, loops 9 (10 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::search::vector::cache::hydration::hydrate_active_generations (cognitive 67) crates/db/src/search/vector/cache/hydration.rs:141 — db::search::vector::cache::hydration::hydrate_active_generations has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (37 pts), match/switch 11 (24 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::text::driver::scan_partition_documents (cognitive 55) crates/db/src/index_lifecycle/text/driver.rs:2547 — db::index_lifecycle::text::driver::scan_partition_documents has cognitive complexity 55 (threshold 15). Drivers by points: if/else 22 (43 pts), match/switch 4 (10 pts), boolean chains 1, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::secondary::scan_source (cognitive 54) crates/db/src/index_lifecycle/secondary.rs:1004 — db::index_lifecycle::secondary::scan_source has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 8 (17 pts), loops 5 (10 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::vector::driver::step_cleanup (cognitive 54) crates/db/src/index_lifecycle/vector/driver.rs:643 — db::index_lifecycle::vector::driver::step_cleanup has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (36 pts), match/switch 6 (16 pts), boolean chains 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::secondary::secondary_range_scan_bounds (cognitive 46) crates/db/src/index_lifecycle/secondary.rs:3239 — db::index_lifecycle::secondary::secondary_range_scan_bounds has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 4 (7 pts), boolean chains 3 (nesting depth added 21). 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.
  • db::index_lifecycle::text::driver::scan_source (cognitive 45) crates/db/src/index_lifecycle/text/driver.rs:2969 — db::index_lifecycle::text::driver::scan_source has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 3 (5 pts), boolean chains 2, loops 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::outbox::reconcile_legacy_reader_coordination_operations (cognitive 45) crates/db/src/index_lifecycle/outbox.rs:746 — db::index_lifecycle::outbox::reconcile_legacy_reader_coordination_operations has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (33 pts), loops 4 (8 pts), match/switch 1 (4 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::text::validation::select_page (cognitive 44) crates/db/src/index_lifecycle/text/validation.rs:242 — db::index_lifecycle::text::validation::select_page has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 3 (5 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::worker::dispatch_worker_cycle (cognitive 40) crates/db/src/index_lifecycle/worker.rs:588 — db::index_lifecycle::worker::dispatch_worker_cycle has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 3 (7 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::migration_parity::scan_v2_state (cognitive 40) crates/db/src/migration_parity.rs:1018 — db::migration_parity::scan_v2_state has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (26 pts), match/switch 3 (7 pts), boolean chains 4, loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::text::driver::build_text_catch_up_plan (cognitive 39) crates/db/src/index_lifecycle/text/driver.rs:2242 — db::index_lifecycle::text::driver::build_text_catch_up_plan has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 9 (16 pts), boolean chains 4, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::secondary::delete_generation_rows (cognitive 39) crates/db/src/index_lifecycle/secondary.rs:1862 — db::index_lifecycle::secondary::delete_generation_rows has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 3 (8 pts), boolean chains 4, loops 2 (3 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.
  • db::index_lifecycle_testing::contracts::family_shapes (cognitive 38) crates/db/src/index_lifecycle_testing/contracts.rs:4076 — db::index_lifecycle_testing::contracts::family_shapes has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 7 (16 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::migrations::vector_retirement::release_reservations_batch (cognitive 37) crates/db/src/migrations/vector_retirement.rs:778 — db::migrations::vector_retirement::release_reservations_batch has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::secondary::catch_up_exact (cognitive 37) crates/db/src/index_lifecycle/secondary.rs:1408 — db::index_lifecycle::secondary::catch_up_exact has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 4 (10 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::text::manifest::select_page (cognitive 36) crates/db/src/index_lifecycle/text/manifest.rs:150 — db::index_lifecycle::text::manifest::select_page has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (28 pts), match/switch 5 (6 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::secondary::exact::run_production_contracts (cognitive 35) crates/db/src/index_lifecycle/secondary/exact.rs:502 — db::index_lifecycle::secondary::exact::run_production_contracts has cognitive complexity 35 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 8 (13 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 18). Of this number, 25 points are the body's own statements and 10 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • db::migrations::vector_retirement::delete_core_batch (cognitive 34) crates/db/src/migrations/vector_retirement.rs:533 — db::migrations::vector_retirement::delete_core_batch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::secondary::exact::ordered::scan_active_range_generation_ordered (cognitive 33) crates/db/src/index_lifecycle/secondary/exact/ordered.rs:173 — db::index_lifecycle::secondary::exact::ordered::scan_active_range_generation_ordered has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 4 (5 pts), boolean chains 2, 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.
  • db::index_lifecycle::repository::operation_record_cursors_are_valid (cognitive 32) crates/db/src/index_lifecycle/repository.rs:662 — db::index_lifecycle::repository::operation_record_cursors_are_valid has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 9 (19 pts), if/else 2 (8 pts), boolean chains 5 (nesting depth added 16). 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.
  • db::index_lifecycle::text::validation::select_entity_state (cognitive 32) crates/db/src/index_lifecycle/text/validation.rs:696 — db::index_lifecycle::text::validation::select_entity_state has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 5, match/switch 2 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::migrations::vector_properties::materialize_batch (cognitive 32) crates/db/src/migrations/vector_properties.rs:137 — db::migrations::vector_properties::materialize_batch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 4 (6 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.
  • db::migrations::vector_retirement::fence_sources_batch (cognitive 30) crates/db/src/migrations/vector_retirement.rs:246 — db::migrations::vector_retirement::fence_sources_batch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (27 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • db::index_lifecycle::vector::driver::catch_up (cognitive 30) crates/db/src/index_lifecycle/vector/driver.rs:2279 — db::index_lifecycle::vector::driver::catch_up has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 3 (8 pts), boolean chains 2, 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.
  • + 56 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×80
  • FunctionTooLong: db::index_lifecycle_testing::contracts::run_secondary_mutation_interleaving crates/db/src/index_lifecycle_testing/contracts.rs:1510 — FunctionTooLong — db::index_lifecycle_testing::contracts::run_secondary_mutation_interleaving runs 416 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 316 over it, 4.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: db::migrations::vector_scale::run_inner crates/db/src/migrations/vector_scale.rs:274 — FunctionTooLong — db::migrations::vector_scale::run_inner runs 371 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 271 over it, 3.71× 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: db::index_lifecycle::secondary::exact::run_production_contracts crates/db/src/index_lifecycle/secondary/exact.rs:502 — FunctionTooLong — db::index_lifecycle::secondary::exact::run_production_contracts runs 360 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 260 over it, 3.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: db::migrations::production_contracts::run_vector_adoption_contract crates/db/src/migrations/mod.rs:6167 — FunctionTooLong — db::migrations::production_contracts::run_vector_adoption_contract runs 281 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 181 over it, 2.81× 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: db::index_lifecycle::text::manifest::select_page crates/db/src/index_lifecycle/text/manifest.rs:150 — FunctionTooLong — db::index_lifecycle::text::manifest::select_page runs 277 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 177 over it, 2.77× 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: db::index_lifecycle::text::driver::scan_source crates/db/src/index_lifecycle/text/driver.rs:2969 — FunctionTooLong — db::index_lifecycle::text::driver::scan_source runs 272 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 172 over it, 2.72× 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: db::migrations::preflight_legacy_vector_reservations crates/db/src/migrations/mod.rs:1856 — FunctionTooLong — db::migrations::preflight_legacy_vector_reservations runs 270 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 170 over it, 2.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: db::index_lifecycle::text::active_batch::prepare_destination crates/db/src/index_lifecycle/text/active_batch.rs:560 — FunctionTooLong — db::index_lifecycle::text::active_batch::prepare_destination runs 265 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 165 over it, 2.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: db::index_lifecycle::text::driver::scan_partition_documents crates/db/src/index_lifecycle/text/driver.rs:2547 — FunctionTooLong — db::index_lifecycle::text::driver::scan_partition_documents runs 263 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 163 over it, 2.63× 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: db::migration_parity::scan_v2_state crates/db/src/migration_parity.rs:1018 — FunctionTooLong — db::migration_parity::scan_v2_state runs 243 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 143 over it, 2.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: db::index_lifecycle::text::driver::build_text_catch_up_plan crates/db/src/index_lifecycle/text/driver.rs:2242 — FunctionTooLong — db::index_lifecycle::text::driver::build_text_catch_up_plan runs 230 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 130 over it, 2.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: db::index_lifecycle::vector::driver::step_build crates/db/src/index_lifecycle/vector/driver.rs:1402 — FunctionTooLong — db::index_lifecycle::vector::driver::step_build runs 220 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 120 over it, 2.20× 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: db::index_lifecycle::text::driver::prepare_compaction_step crates/db/src/index_lifecycle/text/driver.rs:1177 — FunctionTooLong — db::index_lifecycle::text::driver::prepare_compaction_step runs 219 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 119 over it, 2.19× 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: db::index_lifecycle::vector::driver::step_cleanup crates/db/src/index_lifecycle/vector/driver.rs:643 — FunctionTooLong — db::index_lifecycle::vector::driver::step_cleanup runs 218 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 118 over it, 2.18× 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: db::index_lifecycle::secondary::scan_source crates/db/src/index_lifecycle/secondary.rs:1004 — FunctionTooLong — db::index_lifecycle::secondary::scan_source runs 216 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 116 over it, 2.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: db::migrations::production_contracts::run_vector_ineligible_contracts crates/db/src/migrations/mod.rs:6865 — FunctionTooLong — db::migrations::production_contracts::run_vector_ineligible_contracts runs 212 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: db::index_lifecycle_testing::contracts::all_index_validation::run_case crates/db/src/index_lifecycle_testing/contracts/all_index_validation.rs:188 — FunctionTooLong — db::index_lifecycle_testing::contracts::all_index_validation::run_case runs 211 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 111 over it, 2.11× 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: db::index_lifecycle::outbox::execute_claimed_step_with_evidence crates/db/src/index_lifecycle/outbox.rs:1019 — FunctionTooLong — db::index_lifecycle::outbox::execute_claimed_step_with_evidence runs 202 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 102 over it, 2.02× 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: db::migrations::production_contracts::prepare_vector_recovery crates/db/src/migrations/mod.rs:8099 — FunctionTooLong — db::migrations::production_contracts::prepare_vector_recovery runs 202 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 102 over it, 2.02× 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: db::index_lifecycle::text::validation::select_page crates/db/src/index_lifecycle/text/validation.rs:242 — FunctionTooLong — db::index_lifecycle::text::validation::select_page runs 200 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 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: db::index_lifecycle::secondary::catch_up_exact crates/db/src/index_lifecycle/secondary.rs:1408 — FunctionTooLong — db::index_lifecycle::secondary::catch_up_exact runs 195 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 95 over it, 1.95× 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: db::index_lifecycle::text::active_compaction::compact_once crates/db/src/index_lifecycle/text/active_compaction.rs:31 — FunctionTooLong — db::index_lifecycle::text::active_compaction::compact_once runs 193 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 93 over it, 1.93× 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: db::index_lifecycle::text::validation::select_entity_state crates/db/src/index_lifecycle/text/validation.rs:696 — FunctionTooLong — db::index_lifecycle::text::validation::select_entity_state runs 191 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 91 over it, 1.91× 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: db::migrations::production_contracts::run_vector_adoption_failpoint_recovery_contracts crates/db/src/migrations/mod.rs:6502 — FunctionTooLong — db::migrations::production_contracts::run_vector_adoption_failpoint_recovery_contracts runs 182 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 82 over it, 1.82× 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: db::migrations::production_contracts::run_migration_contracts crates/db/src/migrations/mod.rs:7337 — FunctionTooLong — db::migrations::production_contracts::run_migration_contracts runs 182 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 82 over it, 1.82× 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.
  • + 55 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×60
  • FileTooLong: migrations/mod.rs crates/db/src/migrations/mod.rs — FileTooLong — 5838 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 5338 over it, 11.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: index_lifecycle_testing/contracts.rs crates/db/src/index_lifecycle_testing/contracts.rs — FileTooLong — 3790 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 80 free functions. The bar is 500 significant lines; this is 3290 over it, 7.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: interpreter/count.rs crates/db/src/execution/interpreter/count.rs — FileTooLong — 3554 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 3054 over it, 7.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: helixdb/dsl.py sdks/python/src/helixdb/dsl.py — FileTooLong — 3250 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2750 over it, 6.50× 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: vector/driver.rs crates/db/src/index_lifecycle/vector/driver.rs — FileTooLong — 2844 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 43 free functions. The bar is 500 significant lines; this is 2344 over it, 5.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: index_lifecycle/secondary.rs crates/db/src/index_lifecycle/secondary.rs — FileTooLong — 2779 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 49 free functions. The bar is 500 significant lines; this is 2279 over it, 5.56× 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: mutation/mod.rs crates/db/src/search/vector/hnsw/mutation/mod.rs — FileTooLong — 2557 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 2057 over it, 5.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: text/driver.rs crates/db/src/index_lifecycle/text/driver.rs — FileTooLong — 2488 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 1988 over it, 4.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/dsl.ts sdks/typescript/src/dsl.ts — FileTooLong — 2413 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1913 over it, 4.83× 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: REDACTED REDACTED — FileTooLong — 2261 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1761 over it, 4.52× 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 crates/db/src/lib.rs — FileTooLong — 2115 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 1615 over it, 4.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: search/mod.rs crates/db/src/search/mod.rs — FileTooLong — 2047 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 142 free functions. The bar is 500 significant lines; this is 1547 over it, 4.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: storage/mod.rs crates/db/src/search/vector/storage/mod.rs — FileTooLong — 1653 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: VectorRows (3 blocks, 242-2228). The bar is 500 significant lines; this is 1153 over it, 3.31× 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: text/mod.rs crates/db/src/search/text/mod.rs — FileTooLong — 1603 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 74 free functions. The bar is 500 significant lines; this is 1103 over it, 3.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/chef.rs crates/cli/src/commands/chef.rs — FileTooLong — 1512 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 1012 over it, 3.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/traversal.rs crates/ast/src/traversal.rs — FileTooLong — 1493 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 993 over it, 2.99× 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: rules/cardinality.rs crates/planner/src/rules/cardinality.rs — FileTooLong — 1383 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 49 free functions. The bar is 500 significant lines; this is 883 over it, 2.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: index_lifecycle/outbox.rs crates/db/src/index_lifecycle/outbox.rs — FileTooLong — 1371 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 871 over it, 2.74× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/index_lifecycle_testing.rs crates/db/src/index_lifecycle_testing.rs — FileTooLong — 1360 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 860 over it, 2.72× 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/migration_parity.rs crates/db/src/migration_parity.rs — FileTooLong — 1222 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 722 over it, 2.44× 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: diagnostics/analyze.rs crates/planner/src/diagnostics/analyze.rs — FileTooLong — 1113 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 613 over it, 2.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: migrations/vector_simhash_directory.rs crates/db/src/migrations/vector_simhash_directory.rs — FileTooLong — 1048 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 548 over it, 2.10× 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/local_runtime.rs crates/cli/src/local_runtime.rs — FileTooLong — 1012 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 35 free functions. The bar is 500 significant lines; this is 512 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: contracts/all_index_validation.rs crates/db/src/index_lifecycle_testing/contracts/all_index_validation.rs — FileTooLong — 1003 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 503 over it, 2.01× 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: hnsw/restricted.rs crates/db/src/search/vector/hnsw/restricted.rs — FileTooLong — 1000 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 500 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.
  • + 35 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×51
  • Hotspot: crates/db/src/index_lifecycle/secondary.rs crates/db/src/index_lifecycle/secondary.rs:1004 — crates/db/src/index_lifecycle/secondary.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in db::index_lifecycle::secondary::scan_source at line 1004. 8 of those changes were fix/bug commits, and the other 36 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/index_lifecycle/secondary.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/index_lifecycle/repository.rs crates/db/src/index_lifecycle/repository.rs:452 — crates/db/src/index_lifecycle/repository.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in db::index_lifecycle::repository::scoped_cursor_is_valid at line 452. 7 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/index_lifecycle/repository.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: sdks/typescript/src/dsl.ts sdks/typescript/src/dsl.ts:1703 — sdks/typescript/src/dsl.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 86 in Step.toAst at line 1703. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- sdks/typescript/src/dsl.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: sdks/python/src/helixdb/dsl.py sdks/python/src/helixdb/dsl.py:2312 — sdks/python/src/helixdb/dsl.py changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in Step.to_ast at line 2312. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- sdks/python/src/helixdb/dsl.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/execution/interpreter/pull/poll.rs crates/db/src/execution/interpreter/pull/poll.rs:5 — crates/db/src/execution/interpreter/pull/poll.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 92 in Cursor::next at line 5. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/execution/interpreter/pull/poll.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/search/vector/hnsw/restricted.rs crates/db/src/search/vector/hnsw/restricted.rs:1106 — crates/db/src/search/vector/hnsw/restricted.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in VectorIndex::restricted_filter_aware_search at line 1106. 5 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/search/vector/hnsw/restricted.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/execution/interpreter/count.rs crates/db/src/execution/interpreter/count.rs:1274 — crates/db/src/execution/interpreter/count.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ExecutionContext::count_cursor_leaf at line 1274. 2 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/execution/interpreter/count.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/migration_parity.rs crates/db/src/migration_parity.rs:1018 — crates/db/src/migration_parity.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in db::migration_parity::scan_v2_state at line 1018. 1 of those changes was a fix/bug commit, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/migration_parity.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/error.rs crates/db/src/error.rs:490 — crates/db/src/error.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in HelixDbError::error_code at line 490. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/error.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1445 — REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in Step.ToAST at line 1445. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01: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: crates/db/src/execution/interpreter/dispatch.rs crates/db/src/execution/interpreter/dispatch.rs:52 — crates/db/src/execution/interpreter/dispatch.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in ExecutionContext::execute_op at line 52. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/execution/interpreter/dispatch.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/cli/src/main.rs crates/cli/src/main.rs:543 — crates/cli/src/main.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in helix_cli::main at line 543. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/cli/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/search/vector/cache/hydration.rs crates/db/src/search/vector/cache/hydration.rs:141 — crates/db/src/search/vector/cache/hydration.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in db::search::vector::cache::hydration::hydrate_active_generations at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/search/vector/cache/hydration.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/index_lifecycle/vector/driver.rs crates/db/src/index_lifecycle/vector/driver.rs:1402 — crates/db/src/index_lifecycle/vector/driver.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in db::index_lifecycle::vector::driver::step_build at line 1402. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/index_lifecycle/vector/driver.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: scripts/validate-cargo-target-references.py scripts/validate-cargo-target-references.py:491 — scripts/validate-cargo-target-references.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in validate-cargo-target-references.validate_codec_architecture at line 491. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- scripts/validate-cargo-target-references.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/index_lifecycle/outbox.rs crates/db/src/index_lifecycle/outbox.rs:1019 — crates/db/src/index_lifecycle/outbox.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in db::index_lifecycle::outbox::execute_claimed_step_with_evidence at line 1019. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/index_lifecycle/outbox.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/index_lifecycle/text/driver.rs crates/db/src/index_lifecycle/text/driver.rs:2242 — crates/db/src/index_lifecycle/text/driver.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in db::index_lifecycle::text::driver::build_text_catch_up_plan at line 2242. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/index_lifecycle/text/driver.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/index_lifecycle/text/validation.rs crates/db/src/index_lifecycle/text/validation.rs:242 — crates/db/src/index_lifecycle/text/validation.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in db::index_lifecycle::text::validation::select_page at line 242. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/index_lifecycle/text/validation.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: sdks/typescript/src/index.ts sdks/typescript/src/index.ts:72 — sdks/typescript/src/index.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in HelixError.remote at line 72. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- sdks/typescript/src/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/cli/src/config.rs crates/cli/src/config.rs:551 — crates/cli/src/config.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in HelixConfig::validate at line 551. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/cli/src/config.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/planner/src/rules/cardinality.rs crates/planner/src/rules/cardinality.rs:273 — crates/planner/src/rules/cardinality.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in helix_planner::rules::cardinality::fold_cursor at line 273. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/planner/src/rules/cardinality.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/planner/src/diagnostics/analyze.rs crates/planner/src/diagnostics/analyze.rs:304 — crates/planner/src/diagnostics/analyze.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in Analyzer::analyze_access_leaf at line 304. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/planner/src/diagnostics/analyze.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/planner/src/rules/contracts/applicability/known.rs crates/planner/src/rules/contracts/applicability/known.rs:6 — crates/planner/src/rules/contracts/applicability/known.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in helix_planner::rules::contracts::applicability::known::for_known_rule at line 6. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/planner/src/rules/contracts/applicability/known.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/index_lifecycle/secondary/exact.rs crates/db/src/index_lifecycle/secondary/exact.rs:502 — crates/db/src/index_lifecycle/secondary/exact.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in db::index_lifecycle::secondary::exact::run_production_contracts at line 502. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/index_lifecycle/secondary/exact.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/db/src/execution/interpreter/access/secondary_set.rs crates/db/src/execution/interpreter/access/secondary_set.rs:122 — crates/db/src/execution/interpreter/access/secondary_set.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ExecutionContext::node_secondary_ids at line 122. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/execution/interpreter/access/secondary_set.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.
  • + 26 more in this group — see findings.md.
D1 · Cyclomatic Complexity · db · ×48
  • db::migrations::preflight_legacy_vector_reservations (cyclomatic 57) crates/db/src/migrations/mod.rs:1856 — db::migrations::preflight_legacy_vector_reservations has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • db::index_lifecycle::repository::scoped_cursor_is_valid (cyclomatic 36) crates/db/src/index_lifecycle/repository.rs:452 — db::index_lifecycle::repository::scoped_cursor_is_valid has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • db::index_lifecycle::repository::operation_record_cursors_are_valid (cyclomatic 34) crates/db/src/index_lifecycle/repository.rs:662 — db::index_lifecycle::repository::operation_record_cursors_are_valid has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • db::search::vector::cache::hydration::hydrate_active_generations (cyclomatic 32) crates/db/src/search/vector/cache/hydration.rs:141 — db::search::vector::cache::hydration::hydrate_active_generations 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.
  • db::index_lifecycle::text::driver::scan_partition_documents (cyclomatic 29) crates/db/src/index_lifecycle/text/driver.rs:2547 — db::index_lifecycle::text::driver::scan_partition_documents has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • db::index_lifecycle::text::driver::build_text_catch_up_plan (cyclomatic 28) crates/db/src/index_lifecycle/text/driver.rs:2242 — db::index_lifecycle::text::driver::build_text_catch_up_plan has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • db::index_lifecycle::secondary::scan_source (cyclomatic 28) crates/db/src/index_lifecycle/secondary.rs:1004 — db::index_lifecycle::secondary::scan_source 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.
  • db::encoding::v2::values::lifecycle::operation_record::take_operation_progress (cyclomatic 27) crates/db/src/encoding/v2/values/lifecycle/operation_record.rs:280 — db::encoding::v2::values::lifecycle::operation_record::take_operation_progress has cyclomatic complexity 27 (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.
  • db::index_lifecycle::vector::driver::step_cleanup (cyclomatic 27) crates/db/src/index_lifecycle/vector/driver.rs:643 — db::index_lifecycle::vector::driver::step_cleanup 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.
  • db::index_lifecycle::text::driver::scan_source (cyclomatic 26) crates/db/src/index_lifecycle/text/driver.rs:2969 — db::index_lifecycle::text::driver::scan_source 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.
  • db::index_lifecycle::text::manifest::select_page (cyclomatic 26) crates/db/src/index_lifecycle/text/manifest.rs:150 — db::index_lifecycle::text::manifest::select_page 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.
  • db::migration_parity::scan_v2_state (cyclomatic 26) crates/db/src/migration_parity.rs:1018 — db::migration_parity::scan_v2_state 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.
  • db::index_lifecycle::text::validation::select_page (cyclomatic 25) crates/db/src/index_lifecycle/text/validation.rs:242 — db::index_lifecycle::text::validation::select_page 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.
  • db::index_lifecycle::text::driver::plan_next_catch_up (cyclomatic 24) crates/db/src/index_lifecycle/text/driver.rs:2012 — db::index_lifecycle::text::driver::plan_next_catch_up has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • db::encoding::v2::values::property::equality_index_value::project_equality_value (cyclomatic 24) crates/db/src/encoding/v2/values/property/equality_index_value.rs:92 — db::encoding::v2::values::property::equality_index_value::project_equality_value 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.
  • db::encoding::v2::values::lifecycle::operation_record::put_operation_progress (cyclomatic 23) crates/db/src/encoding/v2/values/lifecycle/operation_record.rs:118 — db::encoding::v2::values::lifecycle::operation_record::put_operation_progress has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • db::index_lifecycle::text::validation::select_entity_state (cyclomatic 23) crates/db/src/index_lifecycle/text/validation.rs:696 — db::index_lifecycle::text::validation::select_entity_state 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.
  • db::index_lifecycle::text::active_compaction::compact_once (cyclomatic 23) crates/db/src/index_lifecycle/text/active_compaction.rs:31 — db::index_lifecycle::text::active_compaction::compact_once 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.
  • db::index_lifecycle::secondary::catch_up_exact (cyclomatic 22) crates/db/src/index_lifecycle/secondary.rs:1408 — db::index_lifecycle::secondary::catch_up_exact 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.
  • db::migrations::process_loaded_job (cyclomatic 22) crates/db/src/migrations/mod.rs:3166 — db::migrations::process_loaded_job has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MigrationFailpoint::as_str (cyclomatic 42) 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.
  • db::index_lifecycle::worker::dispatch_worker_cycle (cyclomatic 21) crates/db/src/index_lifecycle/worker.rs:588 — db::index_lifecycle::worker::dispatch_worker_cycle 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.
  • db::index_lifecycle::secondary::delete_generation_rows (cyclomatic 21) crates/db/src/index_lifecycle/secondary.rs:1862 — db::index_lifecycle::secondary::delete_generation_rows 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.
  • db::index_lifecycle::secondary::exact::ordered::scan_active_range_generation_ordered (cyclomatic 20) crates/db/src/index_lifecycle/secondary/exact/ordered.rs:173 — db::index_lifecycle::secondary::exact::ordered::scan_active_range_generation_ordered 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.
  • db::index_lifecycle::text::active_batch::prepare_destination (cyclomatic 19) crates/db/src/index_lifecycle/text/active_batch.rs:560 — db::index_lifecycle::text::active_batch::prepare_destination 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.
  • db::index_lifecycle::secondary::secondary_range_scan_bounds (cyclomatic 19) crates/db/src/index_lifecycle/secondary.rs:3239 — db::index_lifecycle::secondary::secondary_range_scan_bounds 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.
  • + 23 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×34
  • Duplicated block (11 lines × 2) crates/db/src/config/definition_differences.rs:183 — crates/db/src/config/definition_differences.rs:183-193 | crates/db/src/config/definition_differences.rs:234-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:260 — crates/db/src/encoding/v2/keys/indexes/range/edge.rs:260-270 | crates/db/src/encoding/v2/keys/indexes/range/edge.rs:427-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/encoding/v2/keys/managed_index.rs:639 — crates/db/src/encoding/v2/keys/managed_index.rs:639-649 | crates/db/src/encoding/v2/values/codec.rs:145-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) crates/db/src/index_lifecycle/secondary.rs:412 — crates/db/src/index_lifecycle/secondary.rs:412-422 | crates/db/src/index_lifecycle/secondary.rs:1192-1202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/index_lifecycle/secondary.rs:1673 — crates/db/src/index_lifecycle/secondary.rs:1673-1683 | crates/db/src/index_lifecycle/vector/driver.rs:2882-2892 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/db/src/index_lifecycle/text/active_compaction.rs:434 — crates/db/src/index_lifecycle/text/active_compaction.rs:434-444 | crates/db/src/index_lifecycle/text/compaction.rs:343-353 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) crates/db/src/index_lifecycle/text/statistics.rs:296 — crates/db/src/index_lifecycle/text/statistics.rs:296-306 | crates/db/src/index_lifecycle/text/statistics.rs:326-336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/index_lifecycle/text/statistics.rs:417 — crates/db/src/index_lifecycle/text/statistics.rs:417-427 | crates/db/src/index_lifecycle/text/statistics.rs:488-498 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/index_lifecycle/vector/driver.rs:1013 — crates/db/src/index_lifecycle/vector/driver.rs:1013-1023 | crates/db/src/index_lifecycle/vector/driver.rs:1118-1128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/index_lifecycle/work.rs:418 — crates/db/src/index_lifecycle/work.rs:418-428 | crates/db/src/index_lifecycle/work.rs:455-465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/lib.rs:1168 — crates/db/src/lib.rs:1168-1178 | crates/db/src/lib.rs:1400-1410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/execution/interpreter/stream/bounds/eval.rs:60 — crates/db/src/execution/interpreter/stream/bounds/eval.rs:60-70 | crates/planner/src/rules/cardinality.rs:379-389 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) crates/planner/src/ir/index/range/value.rs:210 — crates/planner/src/ir/index/range/value.rs:210-220 | crates/planner/src/ir/index/range/value.rs:222-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/planner/src/planning/envelope/write_contract.rs:72 — crates/planner/src/planning/envelope/write_contract.rs:72-82 | crates/planner/src/planning/selected/native/context_usage.rs:328-338 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/planner/src/rules/access/order/satisfaction.rs:75 — crates/planner/src/rules/access/order/satisfaction.rs:75-85 | crates/planner/src/rules/access/order/satisfaction.rs:115-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/planner/src/rules/cardinality.rs:1204 — crates/planner/src/rules/cardinality.rs:1204-1214 | crates/planner/src/rules/cardinality.rs:1281-1291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs:142 — crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs:142-152 | crates/planner/src/rules/access/sets/equality_range/intersection/node.rs:142-152 — before extracting anything, compare `crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs` and `crates/planner/src/rules/access/sets/equality_range/intersection/node.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/planner/src/rules/physical_contracts/support/pipeline.rs:163 — crates/planner/src/rules/physical_contracts/support/pipeline.rs:163-173 | crates/planner/src/rules/physical_contracts/support/pipeline.rs:203-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/planner/src/rules/access/sets/equality_range/range_union/edge.rs:55 — crates/planner/src/rules/access/sets/equality_range/range_union/edge.rs:55-65 | crates/planner/src/rules/access/sets/equality_range/range_union/node.rs:55-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) crates/planner/src/exec/selected/lowering/access/leaf.rs:71 — crates/planner/src/exec/selected/lowering/access/leaf.rs:71-81 | crates/planner/src/exec/selected/lowering/access/leaf.rs:159-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/planner/src/exec/lowering/secondary_set.rs:191 — crates/planner/src/exec/lowering/secondary_set.rs:191-201 | crates/planner/src/exec/lowering/secondary_set.rs:246-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/search/vector/storage/mod.rs:1431 — crates/db/src/search/vector/storage/mod.rs:1431-1441 | crates/db/src/search/vector/storage/mod.rs:1485-1496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/encoding/v2/keys/graph.rs:191 — crates/db/src/encoding/v2/keys/graph.rs:191-202 | crates/db/src/encoding/v2/legacy/edge_property_pair.rs:43-53 — before extracting anything, compare `crates/db/src/encoding/v2/keys/graph.rs` and `crates/db/src/encoding/v2/legacy/edge_property_pair.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:3636 — crates/db/src/index_lifecycle_testing/contracts.rs:3636-3646 | crates/db/src/index_lifecycle_testing/contracts.rs:3669-3679 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/db/src/search/vector/storage/mod.rs:542 — crates/db/src/search/vector/storage/mod.rs:542-552 | crates/db/src/search/vector/storage/mod.rs:578-588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 9 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×32
  • MethodTooLong: VectorIndex.search_layer0_with_simhash crates/db/src/search/vector/hnsw/search.rs:267 — MethodTooLong — search_layer0_with_simhash runs 616 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 516 over it, 6.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Cursor.next crates/db/src/execution/interpreter/pull/poll.rs:5 — MethodTooLong — next runs 389 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 289 over it, 3.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ExecutionContext.execute_count crates/db/src/execution/interpreter/count.rs:140 — MethodTooLong — execute_count runs 254 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 154 over it, 2.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ExecutionContext.count_cursor_leaf crates/db/src/execution/interpreter/count.rs:1274 — MethodTooLong — count_cursor_leaf runs 249 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 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VectorIndex.restricted_filter_aware_search crates/db/src/search/vector/hnsw/restricted.rs:1106 — MethodTooLong — restricted_filter_aware_search runs 249 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 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VectorRows.validate_simhash_directory crates/db/src/search/vector/storage/mod.rs:1173 — MethodTooLong — validate_simhash_directory runs 241 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 141 over it, 2.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.
  • MethodTooLong: ExecutionContext.count_cursor_cardinality crates/db/src/execution/interpreter/count.rs:849 — MethodTooLong — count_cursor_cardinality runs 223 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Source.open crates/db/src/execution/interpreter/pull/source.rs:120 — MethodTooLong — open runs 217 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 117 over it, 2.17× 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: VectorRows.validate_legacy_physical crates/db/src/search/vector/storage/mod.rs:921 — MethodTooLong — validate_legacy_physical runs 176 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 76 over it, 1.76× 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: ExecutableDagBuilder.push_selected_stream_pipeline_op crates/planner/src/exec/selected/lowering/access/pipeline.rs:4 — MethodTooLong — push_selected_stream_pipeline_op runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Operation.apply crates/ast/src/traversal.rs:908 — MethodTooLong — apply runs 157 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 57 over it, 1.57× 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: Step.ToAST REDACTED:1445 — MethodTooLong — ToAST runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× 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: Step.toAst sdks/typescript/src/dsl.ts:1703 — MethodTooLong — toAst runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LifecycleTestController.install_donor_split_for_search_race crates/db/src/index_lifecycle_testing.rs:1335 — MethodTooLong — install_donor_split_for_search_race runs 147 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 47 over it, 1.47× 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: OracleState.read_indexed crates/db-testkit/src/model.rs:653 — MethodTooLong — read_indexed runs 140 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 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ExecutionContext.eval_predicate_with_resolver crates/db/src/execution/interpreter/stream/eval/predicate.rs:18 — MethodTooLong — eval_predicate_with_resolver runs 136 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 36 over it, 1.36× 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: VectorRows.backfill_missing_simhash_directory crates/db/src/search/vector/storage/mod.rs:1517 — MethodTooLong — backfill_missing_simhash_directory 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.
  • MethodTooLong: RuleSchedule.rules_for_expr crates/planner/src/optimizer/driver/schedule/routing.rs:14 — MethodTooLong — rules_for_expr 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.
  • MethodTooLong: ExecutionContext.count_cursor crates/db/src/execution/interpreter/count.rs:1113 — MethodTooLong — count_cursor runs 126 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 26 over it, 1.26× 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: PreparedTextOperationStep.stage crates/db/src/index_lifecycle/text/driver.rs:508 — MethodTooLong — stage runs 122 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 22 over it, 1.22× 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: Analyzer.analyze_access_leaf crates/planner/src/diagnostics/analyze.rs:304 — MethodTooLong — analyze_access_leaf runs 121 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 21 over it, 1.21× 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: VectorIndexDriver.step crates/db/src/index_lifecycle/vector/driver.rs:440 — MethodTooLong — step runs 116 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 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VectorIndex.relink_neighbor crates/db/src/search/vector/hnsw/mutation/mod.rs:1933 — MethodTooLong — relink_neighbor 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.
  • MethodTooLong: ExecutionContext.node_secondary_ids crates/db/src/execution/interpreter/access/secondary_set.rs:122 — MethodTooLong — node_secondary_ids 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.
  • MethodTooLong: HelixDB.advance_lifecycle_operation crates/db/src/index_lifecycle_testing.rs:1686 — MethodTooLong — advance_lifecycle_operation 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.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×32
  • Duplicated block (12 lines × 2) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:422 — crates/db/src/encoding/v2/keys/indexes/range/edge.rs:422-433 | crates/db/src/encoding/v2/keys/indexes/range/node.rs:216-227 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/range/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/range/node.rs` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (12 lines × 2) crates/db/src/encoding/v2/values/adjacency.rs:363 — crates/db/src/encoding/v2/values/adjacency.rs:363-374 | crates/db/src/encoding/v2/values/adjacency.rs:397-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/execution/interpreter/count.rs:277 — crates/db/src/execution/interpreter/count.rs:277-288 | crates/db/src/execution/interpreter/count.rs:297-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/execution/interpreter/count.rs:317 — crates/db/src/execution/interpreter/count.rs:317-328 | crates/db/src/execution/interpreter/count.rs:337-348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/index_lifecycle/repository.rs:184 — crates/db/src/index_lifecycle/repository.rs:184-195 | crates/db/src/migrations/startup/bootstrap.rs:257-268 — before extracting anything, compare `crates/db/src/index_lifecycle/repository.rs` and `crates/db/src/migrations/startup/bootstrap.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/db/src/index_lifecycle/secondary.rs:443 — crates/db/src/index_lifecycle/secondary.rs:443-454 | crates/db/src/index_lifecycle/secondary.rs:457-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/index_lifecycle/text/active_batch.rs:975 — crates/db/src/index_lifecycle/text/active_batch.rs:975-986 | crates/db/src/index_lifecycle/text/active_batch.rs:1053-1064 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/index_lifecycle/text/compaction.rs:87 — crates/db/src/index_lifecycle/text/compaction.rs:87-98 | crates/db/src/index_lifecycle/text/manifest.rs:158-169 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) crates/db/src/index_lifecycle/text/statistics.rs:564 — crates/db/src/index_lifecycle/text/statistics.rs:564-575 | crates/db/src/index_lifecycle/text/statistics.rs:861-872 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/index_lifecycle/vector/driver.rs:1129 — crates/db/src/index_lifecycle/vector/driver.rs:1129-1140 | crates/db/src/index_lifecycle/vector/driver.rs:1156-1167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/index_lifecycle_testing.rs:1257 — crates/db/src/index_lifecycle_testing.rs:1257-1268 | crates/db/src/index_lifecycle_testing.rs:1441-1452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/migration_parity.rs:302 — crates/db/src/migration_parity.rs:302-313 | crates/db/src/migration_parity.rs:331-342 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/migrations/vector_retirement.rs:387 — crates/db/src/migrations/vector_retirement.rs:387-398 | crates/db/src/migrations/vector_retirement.rs:757-768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/migrations/vector_scale.rs:419 — crates/db/src/migrations/vector_scale.rs:419-430 | crates/db/src/migrations/vector_scale.rs:574-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/search/mod.rs:1591 — crates/db/src/search/mod.rs:1591-1602 | crates/db/src/search/mod.rs:1662-1673 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/search/mod.rs:1605 — crates/db/src/search/mod.rs:1605-1616 | crates/db/src/search/mod.rs:1676-1687 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/search/mod.rs:1726 — crates/db/src/search/mod.rs:1726-1737 | crates/db/src/search/mod.rs:1762-1773 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/search/vector/storage/mod.rs:964 — crates/db/src/search/vector/storage/mod.rs:964-975 | crates/db/src/search/vector/storage/mod.rs:1205-1216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db-testkit/src/lifecycle_workload.rs:538 — crates/db-testkit/src/lifecycle_workload.rs:538-549 | crates/db-testkit/src/lifecycle_workload.rs:555-566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db-testkit/src/model.rs:736 — crates/db-testkit/src/model.rs:736-747 | crates/db-testkit/src/model.rs:1159-1170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/planner/src/exec/lowering/contracts/stream/delivered.rs:8 — crates/planner/src/exec/lowering/contracts/stream/delivered.rs:8-19 | crates/planner/src/rules/physical_contracts/support/delivered.rs:96-107 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) crates/server/src/lib.rs:327 — crates/server/src/lib.rs:327-338 | crates/server/src/lib.rs:344-355 — both copies are in the same file, so extract the block into 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) sdks/rust/helix-dsl-macros/src/lib.rs:103 — sdks/rust/helix-dsl-macros/src/lib.rs:103-114 | sdks/rust/helix-dsl-macros/src/lib.rs:131-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/migrations/mod.rs:5824 — crates/db/src/migrations/mod.rs:5824-5835 | crates/db/src/migrations/mod.rs:7027-7039 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/db/src/search/text/split.rs:381 — crates/db/src/search/text/split.rs:381-393 | crates/db/src/search/text/split.rs:517-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×32
  • Duplicated block (6 lines × 2) crates/db/src/encoding/v2/values/property/property_value.rs:330 — crates/db/src/encoding/v2/values/property/property_value.rs:330-335 | crates/planner/src/analysis/scalar/values.rs:110-115 — before extracting anything, compare `crates/db/src/encoding/v2/values/property/property_value.rs` and `crates/planner/src/analysis/scalar/values.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/db/src/encoding/v2/values/property/property_value.rs:339 — crates/db/src/encoding/v2/values/property/property_value.rs:339-344 | crates/planner/src/analysis/scalar/values.rs:118-123 — before extracting anything, compare `crates/db/src/encoding/v2/values/property/property_value.rs` and `crates/planner/src/analysis/scalar/values.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/db/src/execution/interpreter/access/expand.rs:132 — crates/db/src/execution/interpreter/access/expand.rs:132-137 | crates/db/src/execution/interpreter/access/expand.rs:158-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db/src/index_lifecycle/secondary.rs:3127 — crates/db/src/index_lifecycle/secondary.rs:3127-3132 | crates/db/src/index_lifecycle/secondary/exact.rs:216-221 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/db/src/index_lifecycle/secondary.rs:1685 — crates/db/src/index_lifecycle/secondary.rs:1685-1690 | crates/db/src/index_lifecycle/vector/driver.rs:2128-2133 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/db/src/index_lifecycle/secondary.rs:2021 — crates/db/src/index_lifecycle/secondary.rs:2021-2026 | crates/db/src/index_lifecycle/vector/driver.rs:1236-1241 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/db/src/index_lifecycle/text/active_batch.rs:847 — crates/db/src/index_lifecycle/text/active_batch.rs:847-853 | crates/db/src/index_lifecycle/text/driver.rs:3104-3109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/db/src/lib.rs:1788 — crates/db/src/lib.rs:1788-1793 | crates/db/src/lib.rs:1835-1840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db/src/migrations/tenant/envelope.rs:75 — crates/db/src/migrations/tenant/envelope.rs:75-80 | crates/db/src/migrations/tenant/envelope.rs:159-164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db/src/search/vector/storage/transaction.rs:342 — crates/db/src/search/vector/storage/transaction.rs:342-347 | crates/db/src/search/vector/storage/transaction.rs:356-361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db/src/search/vector/storage/transaction.rs:390 — crates/db/src/search/vector/storage/transaction.rs:390-395 | crates/db/src/search/vector/storage/transaction.rs:409-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db/src/execution/interpreter/access/rows.rs:55 — crates/db/src/execution/interpreter/access/rows.rs:55-60 | crates/db/src/execution/interpreter/access/rows.rs:114-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db/src/execution/interpreter/access/rows.rs:81 — crates/db/src/execution/interpreter/access/rows.rs:81-86 | crates/db/src/execution/interpreter/access/rows.rs:147-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db/src/search/vector/spaces/simple_sse.rs:30 — crates/db/src/search/vector/spaces/simple_sse.rs:30-35 | crates/db/src/search/vector/spaces/simple_sse.rs:82-88 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db-testkit/src/model.rs:968 — crates/db-testkit/src/model.rs:968-973 | crates/value-semantics/src/lib.rs:89-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/planner/src/ir/bounds/search.rs:191 — crates/planner/src/ir/bounds/search.rs:191-196 | crates/planner/src/ir/bounds/stream/bound.rs:206-211 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/planner/src/ir/index/range/bounds/bound.rs:102 — crates/planner/src/ir/index/range/bounds/bound.rs:102-107 | crates/planner/src/ir/index/range/bounds/bound.rs:119-124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/planner/src/rules/root/control_flow/implementation.rs:31 — crates/planner/src/rules/root/control_flow/implementation.rs:31-36 | crates/planner/src/rules/root/control_flow/implementation.rs:68-73 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/db/src/config/indexes.rs:705 — crates/db/src/config/indexes.rs:705-710 | crates/db/src/index_lifecycle/model.rs:433-438 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:295 — crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:295-300 | crates/db/src/encoding/v2/keys/indexes/equality/node.rs:109-114 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/equality/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/equality/node.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/planner/src/logical/access/unary/candidates/order.rs:86 — crates/planner/src/logical/access/unary/candidates/order.rs:86-91 | crates/planner/src/rules/access/order/direction/contracts.rs:69-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/planner/src/exec/lowering/contracts/access/cardinality.rs:99 — crates/planner/src/exec/lowering/contracts/access/cardinality.rs:99-104 | crates/planner/src/rules/physical_contracts/access/estimates.rs:37-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs:75 — crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs:75-80 | crates/db/src/encoding/v2/legacy/vector/transaction_guard.rs:73-78 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs` and `crates/db/src/encoding/v2/legacy/vector/transaction_guard.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/db/src/search/vector/dimension.rs:26 — crates/db/src/search/vector/dimension.rs:26-31 | crates/db/src/search/vector/hnsw/neighbor_set.rs:21-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/planner/src/rules/access/sets/contradiction/edge.rs:94 — crates/planner/src/rules/access/sets/contradiction/edge.rs:94-99 | crates/planner/src/rules/access/sets/contradiction/node.rs:94-99 — before extracting anything, compare `crates/planner/src/rules/access/sets/contradiction/edge.rs` and `crates/planner/src/rules/access/sets/contradiction/node.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×27
  • Duplicated block (10 lines × 2) crates/db/src/encoding/v2/keys/data.rs:376 — crates/db/src/encoding/v2/keys/data.rs:376-385 | crates/db/src/encoding/v2/keys/managed_index.rs:113-122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:268 — crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:268-277 | crates/db/src/encoding/v2/keys/indexes/label.rs:58-67 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/equality/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/label.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/db/src/encoding/v2/values/adjacency.rs:397 — crates/db/src/encoding/v2/values/adjacency.rs:397-406 | crates/db/src/encoding/v2/values/adjacency.rs:428-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/index_lifecycle/outbox.rs:1484 — crates/db/src/index_lifecycle/outbox.rs:1484-1493 | crates/db/src/index_lifecycle/outbox.rs:1717-1726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/index_lifecycle/text/validation.rs:674 — crates/db/src/index_lifecycle/text/validation.rs:674-683 | crates/db/src/index_lifecycle/text/validation.rs:922-932 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/index_lifecycle/vector/driver.rs:1044 — crates/db/src/index_lifecycle/vector/driver.rs:1044-1053 | crates/db/src/index_lifecycle/vector/driver.rs:1169-1178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/index_lifecycle/vector/driver.rs:1720 — crates/db/src/index_lifecycle/vector/driver.rs:1720-1729 | crates/db/src/index_lifecycle/vector/driver.rs:1948-1957 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/migrations/mod.rs:5592 — crates/db/src/migrations/mod.rs:5592-5602 | crates/db/src/migrations/mod.rs:8518-8527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/search/mod.rs:541 — crates/db/src/search/mod.rs:541-550 | crates/db/src/search/mod.rs:574-583 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/search/mod.rs:1434 — crates/db/src/search/mod.rs:1434-1443 | crates/db/src/search/mod.rs:1474-1483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/search/mod.rs:1619 — crates/db/src/search/mod.rs:1619-1628 | crates/db/src/search/mod.rs:1690-1699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/search/mod.rs:1986 — crates/db/src/search/mod.rs:1986-1995 | crates/db/src/search/mod.rs:2007-2016 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/search/vector/storage/mod.rs:949 — crates/db/src/search/vector/storage/mod.rs:949-958 | crates/db/src/search/vector/storage/mod.rs:1546-1555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/search/vector/storage/mod.rs:1738 — crates/db/src/search/vector/storage/mod.rs:1738-1747 | crates/db/src/search/vector/storage/mod.rs:1762-1771 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/planner/src/rules/access/sets/contradiction/edge.rs:68 — crates/planner/src/rules/access/sets/contradiction/edge.rs:68-77 | crates/planner/src/rules/access/sets/contradiction/node.rs:68-77 — before extracting anything, compare `crates/planner/src/rules/access/sets/contradiction/edge.rs` and `crates/planner/src/rules/access/sets/contradiction/node.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/db/src/merge_operator.rs:188 — crates/db/src/merge_operator.rs:188-197 | crates/db/src/needed_in_future/merge_operator.rs:41-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) crates/planner/src/ir/bounds/search.rs:89 — crates/planner/src/ir/bounds/search.rs:89-98 | crates/planner/src/ir/bounds/stream/bound.rs:82-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) crates/planner/src/rules/access/sets/contradiction/edge.rs:81 — crates/planner/src/rules/access/sets/contradiction/edge.rs:81-90 | crates/planner/src/rules/access/sets/contradiction/node.rs:81-90 — before extracting anything, compare `crates/planner/src/rules/access/sets/contradiction/edge.rs` and `crates/planner/src/rules/access/sets/contradiction/node.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/db/src/migrations/vector_retirement.rs:115 — crates/db/src/migrations/vector_retirement.rs:115-126 | crates/db/src/migrations/vector_retirement.rs:702-711 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:548 — crates/db/src/index_lifecycle/text/driver.rs:548-557 | crates/db/src/index_lifecycle/text/driver.rs:607-616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/cli/src/local_runtime.rs:654 — crates/cli/src/local_runtime.rs:654-663 | crates/cli/src/local_runtime.rs:678-687 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) docker-image/image_archive.py:243 — docker-image/image_archive.py:243-252 | docker-image/image_archive.py:351-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sdks/python/scripts/run_embedded_parity.py:251 — sdks/python/scripts/run_embedded_parity.py:251-262 | sdks/python/scripts/run_server_parity.py:347-356 — 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 `sdks/python/scripts/run_embedded_parity.py:251` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) sdks/python/scripts/run_embedded_parity.py:367 — sdks/python/scripts/run_embedded_parity.py:367-376 | sdks/python/scripts/run_server_parity.py:491-500 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) sdks/go/client.go:297 — sdks/go/client.go:297-306 | sdks/go/client.go:351-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sdks/go/client.go:297` 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.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×27
  • Duplicated block (8 lines × 2) crates/db/src/encoding/v2/values/property/property_value.rs:347 — crates/db/src/encoding/v2/values/property/property_value.rs:347-354 | crates/db/src/encoding/v2/values/property/property_value.rs:357-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/db/src/execution/interpreter/stream/filter.rs:335 — crates/db/src/execution/interpreter/stream/filter.rs:335-342 | crates/planner/src/cost/profile/residual.rs:83-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/db/src/index_lifecycle/vector/driver.rs:2619 — crates/db/src/index_lifecycle/vector/driver.rs:2619-2626 | crates/db/src/index_lifecycle/vector/driver.rs:2636-2643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/db/src/migrations/mod.rs:6706 — crates/db/src/migrations/mod.rs:6706-6714 | crates/db/src/migrations/mod.rs:6969-6976 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/db/src/search/vector/storage/mod.rs:1728 — crates/db/src/search/vector/storage/mod.rs:1728-1735 | crates/db/src/search/vector/storage/mod.rs:1753-1760 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/planner/src/analysis/index_atoms/range.rs:108 — crates/planner/src/analysis/index_atoms/range.rs:108-115 | crates/planner/src/analysis/index_atoms/range.rs:121-128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/planner/src/exec/access/edge.rs:256 — crates/planner/src/exec/access/edge.rs:256-263 | crates/planner/src/exec/access/node.rs:316-323 — before extracting anything, compare `crates/planner/src/exec/access/edge.rs` and `crates/planner/src/exec/access/node.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/planner/src/exec/access/edge.rs:265 — crates/planner/src/exec/access/edge.rs:265-272 | crates/planner/src/exec/access/node.rs:325-332 — before extracting anything, compare `crates/planner/src/exec/access/edge.rs` and `crates/planner/src/exec/access/node.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/planner/src/rules/access/pipeline/membership.rs:230 — crates/planner/src/rules/access/pipeline/membership.rs:230-237 | crates/planner/src/rules/access/pipeline/support/empty.rs:29-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/planner/src/rules/access/sets/subsumption/mod.rs:35 — crates/planner/src/rules/access/sets/subsumption/mod.rs:35-42 | crates/planner/src/rules/access/sets/subsumption/mod.rs:52-59 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/planner/src/rules/cardinality.rs:182 — crates/planner/src/rules/cardinality.rs:182-189 | crates/planner/src/rules/physical_contracts/root_stream/contract.rs:157-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/planner/src/rules/cardinality.rs:1244 — crates/planner/src/rules/cardinality.rs:1244-1251 | crates/planner/src/rules/cardinality.rs:1321-1328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/planner/src/rules/cardinality.rs:1447 — crates/planner/src/rules/cardinality.rs:1447-1454 | crates/planner/src/rules/cardinality.rs:1495-1502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/planner/src/exec/lowering/costing.rs:242 — crates/planner/src/exec/lowering/costing.rs:242-249 | crates/planner/src/exec/lowering/costing.rs:253-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/planner/src/ir/access/edge/source.rs:36 — crates/planner/src/ir/access/edge/source.rs:36-43 | crates/planner/src/ir/access/node/source.rs:39-46 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/planner/src/ir/input/property.rs:40 — crates/planner/src/ir/input/property.rs:40-47 | crates/planner/src/ir/input/search/expr.rs:40-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/planner/src/rules/access/filter/index/edge.rs:90 — crates/planner/src/rules/access/filter/index/edge.rs:90-97 | crates/planner/src/rules/access/filter/index/node.rs:90-97 — 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) crates/planner/src/ir/access/edge/analysis.rs:32 — crates/planner/src/ir/access/edge/analysis.rs:32-39 | crates/planner/src/ir/access/node/analysis.rs:37-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/db/src/migrations/mod.rs:5710 — crates/db/src/migrations/mod.rs:5710-5721 | crates/db/src/migrations/mod.rs:7355-7362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/db/src/index_lifecycle/failpoints.rs:200 — crates/db/src/index_lifecycle/failpoints.rs:200-207 | crates/db/src/migrations/indexes/equality_bitmap.rs:143-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/db/src/search/text/split.rs:401 — crates/db/src/search/text/split.rs:401-408 | crates/db/src/search/text/split.rs:417-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/db/src/index_lifecycle/secondary.rs:1305 — crates/db/src/index_lifecycle/secondary.rs:1305-1312 | crates/db/src/index_lifecycle/vector/driver.rs:2310-2317 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:955 — crates/db/src/index_lifecycle/text/driver.rs:955-962 | crates/db/src/index_lifecycle/text/driver.rs:1189-1196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/db/src/search/text/split.rs:373 — crates/db/src/search/text/split.rs:373-380 | crates/db/src/search/text/split.rs:509-516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/db/src/encoding/v2/values/adjacency.rs:186 — crates/db/src/encoding/v2/values/adjacency.rs:186-193 | crates/db/src/encoding/v2/values/adjacency.rs:194-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×26
  • Duplicated block (9 lines × 2) crates/cli/src/local_runtime.rs:900 — crates/cli/src/local_runtime.rs:900-908 | crates/cli/src/local_runtime.rs:925-933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/encoding/v2/values/codec.rs:381 — crates/db/src/encoding/v2/values/codec.rs:381-389 | crates/db/src/encoding/v2/values/codec.rs:403-411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/encoding/v2/values/indexes/equality.rs:209 — crates/db/src/encoding/v2/values/indexes/equality.rs:209-217 | crates/db/src/encoding/v2/values/indexes/range.rs:49-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) crates/db/src/execution/interpreter/access/search/storage.rs:373 — crates/db/src/execution/interpreter/access/search/storage.rs:373-381 | crates/db/src/migration_parity.rs:644-652 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/db/src/index_lifecycle/secondary.rs:322 — crates/db/src/index_lifecycle/secondary.rs:322-330 | crates/db/src/index_lifecycle/vector.rs:386-394 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:1056 — crates/db/src/index_lifecycle/text/driver.rs:1056-1064 | crates/db/src/index_lifecycle/text/driver.rs:1357-1365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:2938 — crates/db/src/index_lifecycle_testing/contracts.rs:2938-2946 | crates/db/src/index_lifecycle_testing/contracts.rs:2970-2978 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/migrations/startup/bootstrap.rs:78 — crates/db/src/migrations/startup/bootstrap.rs:78-86 | crates/db/src/migrations/startup/bootstrap.rs:161-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/search/mod.rs:777 — crates/db/src/search/mod.rs:777-785 | crates/db/src/search/mod.rs:2335-2343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/search/mod.rs:1134 — crates/db/src/search/mod.rs:1134-1142 | crates/db/src/search/mod.rs:1144-1152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/planner/src/analysis/index_atoms/equality.rs:109 — crates/planner/src/analysis/index_atoms/equality.rs:109-117 | crates/planner/src/analysis/index_atoms/value.rs:26-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.
  • Duplicated block (9 lines × 2) crates/planner/src/rules/cardinality.rs:1233 — crates/planner/src/rules/cardinality.rs:1233-1241 | crates/planner/src/rules/cardinality.rs:1310-1318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/planner/src/rules/access/pipeline/support/empty.rs:62 — crates/planner/src/rules/access/pipeline/support/empty.rs:62-70 | crates/planner/src/rules/root/control_flow/contracts.rs:50-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/planner/src/rules/access/sets/contradiction/edge.rs:8 — crates/planner/src/rules/access/sets/contradiction/edge.rs:8-16 | crates/planner/src/rules/access/sets/contradiction/node.rs:8-16 — before extracting anything, compare `crates/planner/src/rules/access/sets/contradiction/edge.rs` and `crates/planner/src/rules/access/sets/contradiction/node.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/planner/src/rules/access/sets/range/edge.rs:20 — crates/planner/src/rules/access/sets/range/edge.rs:20-28 | crates/planner/src/rules/access/sets/range/node.rs:20-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) crates/planner/src/rules/access/sets/contradiction/edge.rs:54 — crates/planner/src/rules/access/sets/contradiction/edge.rs:54-62 | crates/planner/src/rules/access/sets/contradiction/node.rs:54-62 — before extracting anything, compare `crates/planner/src/rules/access/sets/contradiction/edge.rs` and `crates/planner/src/rules/access/sets/contradiction/node.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/planner/src/ir/batch.rs:82 — crates/planner/src/ir/batch.rs:82-90 | crates/planner/src/ir/projection/property.rs:52-60 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/planner/src/rules/access/sets/equality_range/range_union/edge.rs:22 — crates/planner/src/rules/access/sets/equality_range/range_union/edge.rs:22-30 | crates/planner/src/rules/access/sets/equality_range/range_union/node.rs:22-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:3246 — crates/db/src/index_lifecycle_testing/contracts.rs:3246-3254 | crates/db/src/index_lifecycle_testing/contracts.rs:3334-3348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/search/vector/storage/mod.rs:972 — crates/db/src/search/vector/storage/mod.rs:972-980 | crates/db/src/search/vector/storage/mod.rs:1047-1056 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/execution/interpreter/access/params.rs:76 — crates/db/src/execution/interpreter/access/params.rs:76-84 | crates/db/src/execution/interpreter/access/params.rs:93-101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs:76 — crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs:76-84 | crates/planner/src/rules/access/sets/equality_range/intersection/node.rs:76-84 — before extracting anything, compare `crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs` and `crates/planner/src/rules/access/sets/equality_range/intersection/node.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/db/src/index_lifecycle_testing.rs:1607 — crates/db/src/index_lifecycle_testing.rs:1607-1615 | crates/db/src/index_lifecycle_testing.rs:1632-1640 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/db/src/execution/interpreter/access/restricted_text.rs:87 — crates/db/src/execution/interpreter/access/restricted_text.rs:87-95 | crates/db/src/execution/interpreter/access/restricted_vector.rs:73-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) REDACTED:270 — REDACTED:270-278 | REDACTED:280-288 — both copies are in the same file, so extract the 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.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×26
  • Duplicated block (7 lines × 2) crates/db/src/encoding/v2/values/codec.rs:451 — crates/db/src/encoding/v2/values/codec.rs:451-457 | crates/db/src/encoding/v2/values/codec.rs:484-490 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/db/src/execution/interpreter/stream/filter.rs:334 — crates/db/src/execution/interpreter/stream/filter.rs:334-340 | crates/planner/src/ir/expr/validation.rs:35-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/db/src/index_lifecycle/secondary.rs:2995 — crates/db/src/index_lifecycle/secondary.rs:2995-3001 | crates/db/src/index_lifecycle/secondary/exact.rs:209-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/db/src/search/text/mod.rs:370 — crates/db/src/search/text/mod.rs:370-376 | crates/db/src/search/text/mod.rs:390-396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/db/src/search/vector/hnsw/mutation/mod.rs:1470 — crates/db/src/search/vector/hnsw/mutation/mod.rs:1470-1476 | crates/db/src/search/vector/hnsw/mutation/mod.rs:3680-3686 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/db/src/search/vector/spaces/simple_neon.rs:38 — crates/db/src/search/vector/spaces/simple_neon.rs:38-44 | crates/db/src/search/vector/spaces/simple_neon.rs:76-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/db/src/encoding/v2/values/lifecycle/entity_state.rs:39 — crates/db/src/encoding/v2/values/lifecycle/entity_state.rs:39-45 | crates/db/src/encoding/v2/values/lifecycle/entity_state.rs:99-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/db/src/search/vector/spaces/simple_avx.rs:28 — crates/db/src/search/vector/spaces/simple_avx.rs:28-34 | crates/db/src/search/vector/spaces/simple_avx.rs:141-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/planner/src/diagnostics/analyze.rs:726 — crates/planner/src/diagnostics/analyze.rs:726-732 | crates/planner/src/diagnostics/analyze.rs:889-895 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/planner/src/diagnostics/analyze.rs:736 — crates/planner/src/diagnostics/analyze.rs:736-742 | crates/planner/src/diagnostics/analyze.rs:946-952 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/planner/src/ir/input/search/text.rs:106 — crates/planner/src/ir/input/search/text.rs:106-112 | crates/planner/src/ir/input/search/vector.rs:209-215 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/planner/src/ir/access.rs:68 — crates/planner/src/ir/access.rs:68-74 | crates/planner/src/ir/access.rs:81-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/planner/src/exec/lowering/contracts/access/cardinality.rs:7 — crates/planner/src/exec/lowering/contracts/access/cardinality.rs:7-13 | crates/planner/src/exec/lowering/contracts/access/cardinality.rs:60-66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/server/src/lib.rs:318 — crates/server/src/lib.rs:318-324 | crates/server/src/lib.rs:336-342 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/db/src/encoding/v2/keys/indexes/direction.rs:13 — crates/db/src/encoding/v2/keys/indexes/direction.rs:13-19 | crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:23-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/db-testkit/src/lifecycle.rs:117 — crates/db-testkit/src/lifecycle.rs:117-123 | crates/db/src/index_lifecycle/catalog.rs:157-163 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/db/src/index_lifecycle/outbox.rs:489 — crates/db/src/index_lifecycle/outbox.rs:489-495 | crates/db/src/index_lifecycle/vector/driver.rs:432-438 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/db/src/search/text/caching_directory.rs:169 — crates/db/src/search/text/caching_directory.rs:169-175 | crates/db/src/search/text/debug_proxy_directory.rs:124-130 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/planner/src/rules/physical_contracts/root_stream/delivered.rs:97 — crates/planner/src/rules/physical_contracts/root_stream/delivered.rs:97-103 | crates/planner/src/rules/root/control_flow/contracts.rs:6-12 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/items.rs:143 — crates/db/src/encoding/v2/keys/indexes/vector/items.rs:143-149 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:141-147 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/items.rs` and `crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) crates/db/src/index_lifecycle/text/cleanup.rs:321 — crates/db/src/index_lifecycle/text/cleanup.rs:321-327 | crates/db/src/index_lifecycle/vector/driver.rs:1290-1296 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/db/src/index_lifecycle/secondary.rs:1017 — crates/db/src/index_lifecycle/secondary.rs:1017-1023 | crates/db/src/index_lifecycle/vector/driver.rs:2100-2106 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/db/src/index_lifecycle/secondary.rs:1017 — crates/db/src/index_lifecycle/secondary.rs:1017-1023 | crates/db/src/index_lifecycle/text/driver.rs:2993-2999 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/text/driver.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:3415 — crates/db/src/index_lifecycle/text/driver.rs:3415-3421 | crates/db/src/index_lifecycle/vector/driver.rs:3535-3541 — `crates/db/src/index_lifecycle/text/driver.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 51 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) crates/planner/src/rules/access/sets/equality_range/intersection/node.rs:35 — crates/planner/src/rules/access/sets/equality_range/intersection/node.rs:35-41 | crates/planner/src/rules/access/sets/equality_range/range_union/node.rs:36-42 — 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.
  • + 1 more in this group — see findings.md.
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
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×20
  • Duplicated block (13 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:29 — crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:29-41 | crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:95-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/index_lifecycle/operation.rs:1030 — crates/db/src/index_lifecycle/operation.rs:1030-1042 | crates/db/src/index_lifecycle/operation.rs:1487-1499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/migrations/mod.rs:5982 — crates/db/src/migrations/mod.rs:5982-5994 | crates/db/src/migrations/mod.rs:6087-6099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/search/mod.rs:2504 — crates/db/src/search/mod.rs:2504-2516 | crates/db/src/search/mod.rs:2518-2530 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/search/vector/generation.rs:399 — crates/db/src/search/vector/generation.rs:399-411 | crates/db/src/search/vector/generation.rs:513-525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/search/vector/hnsw/restricted.rs:772 — crates/db/src/search/vector/hnsw/restricted.rs:772-784 | crates/db/src/search/vector/hnsw/search.rs:1115-1127 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) crates/db/src/search/vector/storage/mod.rs:1850 — crates/db/src/search/vector/storage/mod.rs:1850-1862 | crates/db/src/search/vector/storage/mod.rs:1881-1893 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/execution/interpreter/access/indexes.rs:139 — crates/db/src/execution/interpreter/access/indexes.rs:139-151 | crates/db/src/execution/interpreter/access/indexes.rs:213-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/execution/interpreter/access/indexes.rs:153 — crates/db/src/execution/interpreter/access/indexes.rs:153-165 | crates/db/src/execution/interpreter/access/indexes.rs:227-239 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/planner/src/rules/access/filter/rules.rs:64 — crates/planner/src/rules/access/filter/rules.rs:64-76 | crates/planner/src/rules/access/pipeline/filter.rs:39-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) crates/planner/src/ir/access/node/analysis.rs:83 — crates/planner/src/ir/access/node/analysis.rs:83-95 | crates/planner/src/ir/access/node/analysis.rs:106-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/planner/src/ir/access/edge/analysis.rs:78 — crates/planner/src/ir/access/edge/analysis.rs:78-90 | crates/planner/src/ir/access/edge/analysis.rs:101-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/planner/src/planning/search/access/edge.rs:24 — crates/planner/src/planning/search/access/edge.rs:24-36 | crates/planner/src/planning/search/access/node.rs:24-36 — before extracting anything, compare `crates/planner/src/planning/search/access/edge.rs` and `crates/planner/src/planning/search/access/node.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/planner/src/planning/search/access/edge.rs:52 — crates/planner/src/planning/search/access/edge.rs:52-64 | crates/planner/src/planning/search/access/node.rs:52-64 — before extracting anything, compare `crates/planner/src/planning/search/access/edge.rs` and `crates/planner/src/planning/search/access/node.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/db/src/search/vector/hnsw/search.rs:692 — crates/db/src/search/vector/hnsw/search.rs:692-704 | crates/db/src/search/vector/hnsw/search.rs:852-865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:3234 — crates/db/src/index_lifecycle_testing/contracts.rs:3234-3246 | crates/db/src/index_lifecycle_testing/contracts.rs:3526-3538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:1267 — crates/db/src/index_lifecycle_testing/contracts.rs:1267-1279 | crates/db/src/index_lifecycle_testing/contracts.rs:2366-2378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/planner/src/rules/physical_contracts/support/pipeline.rs:180 — crates/planner/src/rules/physical_contracts/support/pipeline.rs:180-192 | crates/planner/src/rules/physical_contracts/support/pipeline.rs:220-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:1215 — crates/db/src/index_lifecycle_testing/contracts.rs:1215-1227 | crates/db/src/index_lifecycle_testing/contracts.rs:1675-1687 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/db/src/migrations/mod.rs:3566 — crates/db/src/migrations/mod.rs:3566-3578 | crates/db/src/migrations/mod.rs:3639-3651 — both copies are in the same file, so extract the 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 (5 lines × 2) · ×19
  • Duplicated block (5 lines × 2) crates/db/src/encoding/v2/values/property/property_value.rs:223 — crates/db/src/encoding/v2/values/property/property_value.rs:223-227 | crates/planner/src/analysis/scalar/values.rs:125-129 — before extracting anything, compare `crates/db/src/encoding/v2/values/property/property_value.rs` and `crates/planner/src/analysis/scalar/values.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/db/src/index_lifecycle/repository.rs:134 — crates/db/src/index_lifecycle/repository.rs:134-138 | crates/db/src/migrations/startup/bootstrap.rs:135-139 — before extracting anything, compare `crates/db/src/index_lifecycle/repository.rs` and `crates/db/src/migrations/startup/bootstrap.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/db/src/migrations/startup/bootstrap.rs:64 — crates/db/src/migrations/startup/bootstrap.rs:64-68 | crates/db/src/migrations/startup/bootstrap.rs:127-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/db/src/search/vector/cache/store.rs:246 — crates/db/src/search/vector/cache/store.rs:246-251 | crates/db/src/search/vector/cache/store.rs:398-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/db/src/search/vector/hnsw/mutation/mod.rs:387 — crates/db/src/search/vector/hnsw/mutation/mod.rs:387-391 | crates/db/src/search/vector/hnsw/search.rs:238-242 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/db-testkit/src/model.rs:991 — crates/db-testkit/src/model.rs:991-995 | crates/value-semantics/src/lib.rs:113-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/planner/src/exec/count.rs:1239 — crates/planner/src/exec/count.rs:1239-1243 | crates/planner/src/exec/count.rs:1307-1311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/db/src/index_lifecycle/secondary.rs:3640 — crates/db/src/index_lifecycle/secondary.rs:3640-3644 | crates/db/src/index_lifecycle/vector/driver.rs:3479-3483 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/db/src/index_lifecycle_testing.rs:726 — crates/db/src/index_lifecycle_testing.rs:726-730 | crates/db/src/search/text/cache.rs:1253-1257 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/planner/src/rules/access/filter/index/edge.rs:118 — crates/planner/src/rules/access/filter/index/edge.rs:118-122 | crates/planner/src/rules/access/filter/index/node.rs:118-122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) sdks/rust/src/lib.rs:393 — sdks/rust/src/lib.rs:393-398 | sdks/rust/src/lib.rs:401-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/cli/src/commands/cloud/database.rs:248 — crates/cli/src/commands/cloud/database.rs:248-252 | crates/cli/src/commands/cloud/service_credential.rs:48-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:1149 — crates/db/src/index_lifecycle/text/driver.rs:1149-1153 | crates/db/src/index_lifecycle/text/driver.rs:1439-1443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/db/src/encoding/v2/values/property/property_value.rs:128 — crates/db/src/encoding/v2/values/property/property_value.rs:128-132 | crates/db/src/encoding/v2/values/property/property_value.rs:206-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/db/src/index_lifecycle/secondary.rs:1046 — crates/db/src/index_lifecycle/secondary.rs:1046-1050 | crates/db/src/index_lifecycle/text/driver.rs:3026-3030 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/text/driver.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/db-testkit/src/model.rs:843 — crates/db-testkit/src/model.rs:843-847 | crates/planner/src/analysis/scalar/values.rs:95-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/planner/src/exec/selected/lowering/contracts/delivered/pipeline.rs:38 — crates/planner/src/exec/selected/lowering/contracts/delivered/pipeline.rs:38-42 | crates/planner/src/rules/physical_contracts/support/pipeline.rs:153-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 (5 lines × 2) crates/planner/src/exec/selected/lowering/contracts/delivered/pipeline.rs:48 — crates/planner/src/exec/selected/lowering/contracts/delivered/pipeline.rs:48-52 | crates/planner/src/rules/physical_contracts/support/pipeline.rs:193-197 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) sdks/python/src/helixdb/dsl.py:974 — sdks/python/src/helixdb/dsl.py:974-981 | sdks/python/src/helixdb/dsl.py:992-996 — both copies are in the same file, so extract the 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 `sdks/python/src/helixdb/dsl.py:974` 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. 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.
D3 · God Classes · TooManyMethods · ×18
  • TooManyMethods: ExecutionContext crates/db/src/execution/interpreter/runtime_context.rs:270 — TooManyMethods — 258 methods, declared across 63 files: interpreter/count.rs (18), access/rows.rs (14), access/indexes.rs (11), mutation/tx.rs (10), +59 more file(s). The bar is 30 methods; this is 228 over it, 8.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: VectorIndex crates/db/src/search/vector/hnsw/index.rs:110 — TooManyMethods — 114 methods, declared across 4 files: hnsw/index.rs (59), mutation/mod.rs (40), hnsw/restricted.rs (9), hnsw/search.rs (6). The bar is 30 methods; this is 84 over it, 3.80× 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: Traversal REDACTED:1634 — TooManyMethods — 106 methods. The bar is 30 methods; this is 76 over it, 3.53× 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: Traversal crates/ast/src/traversal.rs:1344 — TooManyMethods — 102 methods. The bar is 30 methods; this is 72 over it, 3.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Traversal sdks/typescript/src/dsl.ts:1886 — TooManyMethods — 100 methods. The bar is 30 methods; this is 70 over it, 3.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HelixDB crates/db/src/lib.rs:779 — TooManyMethods — 98 methods, declared across 3 files: src/lib.rs (82), src/index_lifecycle_testing.rs (9), src/migration_parity.rs (7). The bar is 30 methods; this is 68 over it, 3.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Step sdks/typescript/src/dsl.ts:1336 — TooManyMethods — 90 methods. The bar is 30 methods; this is 60 over it, 3.00× 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: Graph crates/graph-algorithms/src/model.rs:400 — TooManyMethods — 60 methods, declared across 8 files: src/model.rs (20), algorithms/traversal.rs (19), src/transform.rs (7), algorithms/centrality.rs (6), +4 more file(s). The bar is 30 methods; this is 30 over it, 2.00× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExecutableDagBuilder crates/planner/src/exec/lowering.rs:39 — TooManyMethods — 49 methods, declared across 30 files: exec/lowering.rs (5), access/leaf.rs (4), lowering/batch.rs (4), mutation/emit.rs (3), +26 more file(s). The bar is 30 methods; this is 19 over it, 1.63× 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: NativeGraph bindings/uniffi/src/graph.rs:400 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MutationOpCache crates/db/src/search/vector/hnsw/mutation/mod.rs:2284 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LocalRuntime crates/cli/src/local_runtime.rs:58 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StorageCostProfile crates/planner/src/cost/profile.rs:31 — TooManyMethods — 34 methods, declared across 3 files: profile/formulas.rs (30), profile/overrides.rs (2), profile/residual.rs (2). The bar is 30 methods; this is 4 over it, 1.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NativeGraph sdks/go/graph.go:366 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DbConfig crates/db/src/config/db.rs:176 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SubTraversal sdks/typescript/src/dsl.ts:2411 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NativeGraph sdks/python/src/helixdb/graph.py:471 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SubTraversal crates/ast/src/traversal.rs:1085 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×15
  • Duplicated block (14 lines × 2) crates/cli/src/commands/add.rs:150 — crates/cli/src/commands/add.rs:150-163 | crates/cli/src/commands/start.rs:99-112 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) crates/db/src/execution/interpreter/mutation/node.rs:308 — crates/db/src/execution/interpreter/mutation/node.rs:308-321 | crates/db/src/execution/interpreter/mutation/node.rs:340-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:1041 — crates/db/src/index_lifecycle/text/driver.rs:1041-1054 | crates/db/src/index_lifecycle/text/driver.rs:1102-1115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/db/src/migrations/mod.rs:2535 — crates/db/src/migrations/mod.rs:2535-2548 | crates/db/src/migrations/mod.rs:2564-2577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/db/src/search/vector/storage/mod.rs:2438 — crates/db/src/search/vector/storage/mod.rs:2438-2451 | crates/db/src/search/vector/storage/mod.rs:2461-2474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/graph-algorithms/src/algorithms/centrality.rs:391 — crates/graph-algorithms/src/algorithms/centrality.rs:391-404 | crates/graph-algorithms/src/algorithms/centrality.rs:415-428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/planner/src/rules/cardinality.rs:1157 — crates/planner/src/rules/cardinality.rs:1157-1170 | crates/planner/src/rules/cardinality.rs:1181-1194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/planner/src/exec/lowering/costing.rs:283 — crates/planner/src/exec/lowering/costing.rs:283-296 | crates/planner/src/exec/lowering/costing.rs:380-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/planner/src/exec/selected/control_flow/branch.rs:56 — crates/planner/src/exec/selected/control_flow/branch.rs:56-69 | crates/planner/src/exec/selected/control_flow/repeat.rs:44-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) crates/db/src/migrations/vector_simhash_directory.rs:549 — crates/db/src/migrations/vector_simhash_directory.rs:549-562 | crates/db/src/migrations/vector_simhash_directory.rs:754-767 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/db/src/index_lifecycle/operation.rs:1259 — crates/db/src/index_lifecycle/operation.rs:1259-1272 | crates/db/src/index_lifecycle/operation.rs:1284-1297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/db/src/lib.rs:487 — crates/db/src/lib.rs:487-500 | crates/db/src/lib.rs:904-917 — both copies are in the same file, so extract the block into 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) sdks/python/scripts/run_embedded_parity.py:295 — sdks/python/scripts/run_embedded_parity.py:295-308 | sdks/python/scripts/run_embedded_parity.py:328-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sdks/python/scripts/run_embedded_parity.py:295` 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) sdks/python/src/helixdb/dsl.py:1362 — sdks/python/src/helixdb/dsl.py:1362-1375 | sdks/python/src/helixdb/dsl.py:1399-1412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) REDACTED:2333 — REDACTED:2333-2346 | REDACTED:2786-2799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D15 · Churn × Complexity Hotspots · Repeated repair · ×12
  • Repeated repair: crates/cli/src/local_runtime.rs crates/cli/src/local_runtime.rs:378 — crates/cli/src/local_runtime.rs changed 39 times in last 90 days and 30 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is LocalRuntime::run_foreground at line 378), 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(cli): harden Cloud resolution and the --json contract after review”; “fix(cli): name init projects after the real directory and shorten image digests”; “fix(cli): name the command that removes only the legacy MinIO volume”; “fix(cli): bound the SeaweedFS readiness wait by elapsed time”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/cli/src/local_runtime.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/db/src/search/text/cache.rs crates/db/src/search/text/cache.rs:913 — crates/db/src/search/text/cache.rs changed 15 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is FtsCache::cleanup_disk at line 913), 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(db): keep FTS disk cleanup inside the cache's close”; “fix(db): leave no hydration staging file behind on any error or cancel”; “fix(db): always hash a downloaded split in full before publishing it”; “fix(db): let a trim carry on past a split another trim evicted”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/search/text/cache.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/server/src/config.rs crates/server/src/config.rs:255 — crates/server/src/config.rs changed 18 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is StorageConfig::from_lookup at line 255), 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(server): report a cache lock failure as a lock error”; “fix(server): let full-text splits leave the disk tier one second after use”; “fix(server): warn when the disk cache budget exceeds free space”; “fix(server): lock the disk cache directory to one server”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/server/src/config.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/server/src/lib.rs crates/server/src/lib.rs:300 — crates/server/src/lib.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is server::supervise_transports_and_close at line 300), 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(server): warn when the disk cache budget exceeds free space”; “fix(server): lock the disk cache directory to one server”; “fix(server): print error causes and raise the fd limit to the hard limit”; “fix(server): harden disk cache config, fd limit and startup errors”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/server/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/cli/src/commands/query.rs crates/cli/src/commands/query.rs:124 — crates/cli/src/commands/query.rs 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 9 (its worst body is helix_cli::commands::query::execute at line 124), 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(cli): harden Cloud resolution and the --json contract after review”; “fix(cli): print query results under --quiet and document RFC 3339 log times”; “fix(cli): protect query credentials”; “fix(cli): format query auth headers”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/cli/src/commands/query.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/planner/src/optimizer/driver/exploration.rs crates/planner/src/optimizer/driver/exploration.rs:11 — crates/planner/src/optimizer/driver/exploration.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is helix_planner::optimizer::driver::exploration::optimize_many at line 11), 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(planner): replace the wall-clock exploration budget with a rule-fire budget”; “fix(planner): keep every implementation-deferred rewrite after the time budget”; “fix(planner): keep the required empty-input rewrite after the time budget”; “fix(planner): keep implementing queued expressions after the time budget expires”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/planner/src/optimizer/driver/exploration.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/cli/src/commands/metrics.rs crates/cli/src/commands/metrics.rs:16 — crates/cli/src/commands/metrics.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 7 (its worst body is helix_cli::commands::metrics::run at line 16), 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(cli): harden Cloud resolution and the --json contract after review”; “fix(cli): apply rustfmt to metrics email test”; “fix(cli): handle EOF and invalid email input in metrics full”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/cli/src/commands/metrics.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/db/src/config/cache.rs crates/db/src/config/cache.rs:998 — crates/db/src/config/cache.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 5 (its worst body is CacheConfig::fts_memory_bytes at line 998), 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(server): cache only SSTs read back when data lives in HELIX_DATA_DIR”; “fix(server): print error causes and raise the fd limit to the hard limit”; “fix(db): remove Foyer partitions a smaller or re-blocked hybrid cache no longer owns”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/db/src/config/cache.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/cli/src/ts_query.rs crates/cli/src/ts_query.rs:117 — crates/cli/src/ts_query.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is helix_cli::ts_query::ensure_sdk_in at line 117), 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 Cloud CLI command flows”; “fix(cli): sync TypeScript SDK release pin”; “fix(sdk): restore embedded package releases”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/cli/src/ts_query.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/planner/src/rules/access/filter/index/membership.rs crates/planner/src/rules/access/filter/index/membership.rs:29 — crates/planner/src/rules/access/filter/index/membership.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is helix_planner::rules::access::filter::index::membership::index_membership_filter at line 29), 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(planner): price membership row by row with the residual formula”; “fix(planner): bind unscoped membership to one label and price its misses”; “fix(planner,db): keep range scans out of index membership”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/planner/src/rules/access/filter/index/membership.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/planner/src/rules/contracts/applicability.rs crates/planner/src/rules/contracts/applicability.rs:252 — crates/planner/src/rules/contracts/applicability.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is RuleApplicability::is_required_rewrite at line 252), 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(planner): replace the wall-clock exploration budget with a rule-fire budget”; “fix(planner): keep every implementation-deferred rewrite after the time budget”; “fix(planner): keep the required empty-input rewrite after the time budget”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/planner/src/rules/contracts/applicability.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/cli/src/commands/cloud/project.rs crates/cli/src/commands/cloud/project.rs:9 — crates/cli/src/commands/cloud/project.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is helix_cli::commands::cloud::project::run at line 9), 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(cli): address review of Cloud resolution and --json”; “fix(cli): harden Cloud resolution and the --json contract after review”; “fix(cli): align linked markers and colour states in Cloud tables”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 14:43:17 +01:00' --until='2026-09-29 14:43:17 +01:00' --full-history --no-merges -- crates/cli/src/commands/cloud/project.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.
D3 · God Classes · ClassTooLong · ×11
  • ClassTooLong: VectorRows crates/db/src/search/vector/storage/mod.rs:242 — ClassTooLong — 1005 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 25 methods, 3 blocks, lines 242-2228. The bar is 400 significant lines; this is 605 over it, 2.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VectorIndex crates/db/src/search/vector/hnsw/index.rs:110 — ClassTooLong — 935 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 114 methods, 2 blocks, lines 110-1650. The bar is 400 significant lines; this is 535 over it, 2.34× 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: Traversal crates/ast/src/traversal.rs:1344 — ClassTooLong — 666 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 102 methods, 6 blocks, lines 1344-2485. The bar is 400 significant lines; this is 266 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Runner crates/db-testkit/src/lifecycle_workload.rs:196 — ClassTooLong — 636 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 27 methods, 2 blocks, lines 196-1026. The bar is 400 significant lines; this is 236 over it, 1.59× 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: Analyzer crates/planner/src/diagnostics/analyze.rs:12 — ClassTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 2 blocks, lines 12-710. The bar is 400 significant lines; this is 149 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LocalRuntime crates/cli/src/local_runtime.rs:58 — ClassTooLong — 531 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 2 blocks, lines 58-862. The bar is 400 significant lines; this is 131 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LifecycleTestController crates/db/src/index_lifecycle_testing.rs:871 — ClassTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods. The bar is 400 significant lines; this is 108 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FtsCache crates/db/src/search/text/cache.rs:342 — ClassTooLong — 499 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods. The bar is 400 significant lines; this is 99 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MutationOpCache crates/db/src/search/vector/hnsw/mutation/mod.rs:2284 — ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 37 methods, 3 blocks, lines 2284-2975. The bar is 400 significant lines; this is 91 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NativeGraph bindings/uniffi/src/graph.rs:400 — ClassTooLong — 451 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 43 methods, 4 blocks, lines 400-1066. The bar is 400 significant lines; this is 51 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Step sdks/typescript/src/dsl.ts:1336 — ClassTooLong — 423 significant lines (blank, comment-only and punctuation-only lines excluded), 90 methods. The bar is 400 significant lines; this is 23 over it, 1.06× 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D2 · Cognitive Complexity · VectorIndex · ×10
  • VectorIndex::search_layer0_with_simhash (cognitive 241) crates/db/src/search/vector/hnsw/search.rs:267 — VectorIndex::search_layer0_with_simhash has cognitive complexity 241 (threshold 15). Drivers by points: if/else 85 (206 pts), loops 8 (19 pts), boolean chains 12, match/switch 2 (4 pts) (nesting depth added 134). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • VectorIndex::restricted_filter_aware_search (cognitive 97) crates/db/src/search/vector/hnsw/restricted.rs:1106 — VectorIndex::restricted_filter_aware_search has cognitive complexity 97 (threshold 15). Drivers by points: if/else 24 (62 pts), loops 10 (27 pts), boolean chains 8 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorIndex::load_uncached_items_for_layer (cognitive 54) crates/db/src/search/vector/hnsw/index.rs:1084 — VectorIndex::load_uncached_items_for_layer has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 8 (18 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorIndex::relink_neighbor (cognitive 32) crates/db/src/search/vector/hnsw/mutation/mod.rs:1933 — VectorIndex::relink_neighbor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 5 (8 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorIndex::search_layer_beam (cognitive 30) crates/db/src/search/vector/hnsw/mutation/mod.rs:936 — VectorIndex::search_layer_beam has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorIndex::stage_delete_with_metadata (cognitive 18) crates/db/src/search/vector/hnsw/mutation/mod.rs:1675 — VectorIndex::stage_delete_with_metadata has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 5 (6 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorIndex::search_layer_greedy (cognitive 18) crates/db/src/search/vector/hnsw/search.rs:169 — VectorIndex::search_layer_greedy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorIndex::insert_hnsw (cognitive 17) crates/db/src/search/vector/hnsw/mutation/mod.rs:819 — VectorIndex::insert_hnsw has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (7 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorIndex::add_bidirectional_link (cognitive 17) crates/db/src/search/vector/hnsw/mutation/mod.rs:1528 — VectorIndex::add_bidirectional_link has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorIndex::insert_with_mutation_cache (cognitive 16) crates/db/src/search/vector/hnsw/mutation/mod.rs:674 — VectorIndex::insert_with_mutation_cache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 1 (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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×9
  • Duplicated block (15 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:83 — crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:83-97 | crates/db/src/encoding/v2/keys/indexes/vector/upper_layers.rs:23-37 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs` and `crates/db/src/encoding/v2/keys/indexes/vector/upper_layers.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/storage_prefixes.rs:181 — crates/db/src/encoding/v2/keys/indexes/vector/storage_prefixes.rs:181-195 | crates/db/src/encoding/v2/keys/indexes/vector/storage_prefixes.rs:234-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:3876 — crates/db/src/index_lifecycle_testing/contracts.rs:3876-3890 | crates/db/src/index_lifecycle_testing/contracts.rs:3959-3973 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/db/src/merge_operator.rs:97 — crates/db/src/merge_operator.rs:97-111 | crates/db/src/merge_operator.rs:123-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/db/src/search/text/mod.rs:1054 — crates/db/src/search/text/mod.rs:1054-1068 | crates/db/src/search/text/mod.rs:1076-1090 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/db/src/search/vector/hnsw/restricted.rs:1088 — crates/db/src/search/vector/hnsw/restricted.rs:1088-1102 | crates/db/src/search/vector/hnsw/restricted.rs:1401-1415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/planner/src/rules/cardinality.rs:1217 — crates/planner/src/rules/cardinality.rs:1217-1231 | crates/planner/src/rules/cardinality.rs:1294-1308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/planner/src/exec/lowering/secondary_set.rs:295 — crates/planner/src/exec/lowering/secondary_set.rs:295-309 | crates/planner/src/exec/lowering/secondary_set.rs:357-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/db/src/migrations/mod.rs:6334 — crates/db/src/migrations/mod.rs:6334-6348 | crates/db/src/migrations/mod.rs:7515-7529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R4 · Test Coverage · No test reaches this file · ×9
  • No test reaches this file sdks/typescript/scripts/parity/generate-fixtures.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sdks/typescript/scripts/parity/run-helix.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sdks/typescript/scripts/parity/run-embedded-parity.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sdks/typescript/scripts/parity/run-embedded-client.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sdks/typescript/scripts/parity/compare-json.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file bindings/uniffi/scripts/finalize-node-package.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sdks/typescript/scripts/edge-drop-regression.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sdks/typescript/scripts/parity/paths.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sdks/typescript/scripts/parity/run-python-generator.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D1 · Cyclomatic Complexity · ExecutionContext · ×8
  • ExecutionContext::count_cursor_leaf (cyclomatic 36) crates/db/src/execution/interpreter/count.rs:1274 — ExecutionContext::count_cursor_leaf has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ExecutionContext::execute_count (cyclomatic 35) crates/db/src/execution/interpreter/count.rs:140 — ExecutionContext::execute_count has cyclomatic complexity 35 (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.
  • ExecutionContext::eval_predicate_with_resolver (cyclomatic 24) crates/db/src/execution/interpreter/stream/eval/predicate.rs:18 — ExecutionContext::eval_predicate_with_resolver has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ExecutionContext::search_vector_index_with_candidates (cyclomatic 18) crates/db/src/execution/interpreter/access/search/storage.rs:69 — ExecutionContext::search_vector_index_with_candidates has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ExecutionContext::eval_expr_with_resolver (cyclomatic 18) crates/db/src/execution/interpreter/stream/eval/expr.rs:15 — ExecutionContext::eval_expr_with_resolver has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ExecutionContext::node_secondary_ids (cyclomatic 17) crates/db/src/execution/interpreter/access/secondary_set.rs:122 — ExecutionContext::node_secondary_ids has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ExecutionContext::execute_branch_with_context (cyclomatic 16) crates/db/src/execution/interpreter/control/branch.rs:41 — ExecutionContext::execute_branch_with_context 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.
  • ExecutionContext::execute_shortest_path (cyclomatic 16) crates/db/src/execution/interpreter/shortest_path.rs:17 — ExecutionContext::execute_shortest_path 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 · helix_planner · ×8
  • helix_planner::rules::cardinality::fold_cursor (cognitive 29) crates/planner/src/rules/cardinality.rs:273 — helix_planner::rules::cardinality::fold_cursor has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (26 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • helix_planner::optimizer::driver::exploration::optimize_many (cognitive 24) crates/planner/src/optimizer/driver/exploration.rs:11 — helix_planner::optimizer::driver::exploration::optimize_many has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • helix_planner::exec::validation::contracts::validate_step_contracts (cognitive 23) crates/planner/src/exec/validation/contracts.rs:7 — helix_planner::exec::validation::contracts::validate_step_contracts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • helix_planner::exec::validation::order::execution_order (cognitive 20) crates/planner/src/exec/validation/order.rs:13 — helix_planner::exec::validation::order::execution_order has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • helix_planner::rules::physical_contracts::support::pipeline::stream_pipeline_op_contract (cognitive 17) crates/planner/src/rules/physical_contracts/support/pipeline.rs:51 — helix_planner::rules::physical_contracts::support::pipeline::stream_pipeline_op_contract has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 10 (17 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.
  • helix_planner::analysis::prune::prune_statically_impossible_branches_inner (cognitive 17) crates/planner/src/analysis/prune.rs:24 — helix_planner::analysis::prune::prune_statically_impossible_branches_inner has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 3 (4 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • helix_planner::rules::access::filter::atoms::collect::access_filter_index_atom (cognitive 16) crates/planner/src/rules/access/filter/atoms/collect.rs:46 — helix_planner::rules::access::filter::atoms::collect::access_filter_index_atom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • helix_planner::rules::stream::window::compose::compose_static_stream_windows (cognitive 16) crates/planner/src/rules/stream/window/compose.rs:6 — helix_planner::rules::stream::window::compose::compose_static_stream_windows has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 4 (6 pts), loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×8
  • Duplicated block (23 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/reverse_edges.rs:33 — crates/db/src/encoding/v2/keys/indexes/vector/reverse_edges.rs:33-55 | crates/db/src/encoding/v2/keys/indexes/vector/reverse_edges.rs:119-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) crates/db/src/index_lifecycle_testing/contracts/all_index_validation.rs:299 — crates/db/src/index_lifecycle_testing/contracts/all_index_validation.rs:299-321 | crates/db/src/index_lifecycle_testing/contracts/all_index_validation.rs:325-347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) crates/db/src/index_lifecycle_testing.rs:1216 — crates/db/src/index_lifecycle_testing.rs:1216-1238 | crates/db/src/index_lifecycle_testing.rs:1342-1364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) crates/db/src/migrations/vector_retirement.rs:495 — crates/db/src/migrations/vector_retirement.rs:495-517 | crates/db/src/migrations/vector_retirement.rs:897-919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) crates/db/src/search/vector/hnsw/mutation/mod.rs:1976 — crates/db/src/search/vector/hnsw/mutation/mod.rs:1976-1998 | crates/db/src/search/vector/hnsw/mutation/mod.rs:2034-2056 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) crates/db/src/search/vector/hnsw/restricted.rs:1043 — crates/db/src/search/vector/hnsw/restricted.rs:1043-1065 | crates/db/src/search/vector/hnsw/restricted.rs:1069-1091 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) crates/planner/src/exec/count.rs:1251 — crates/planner/src/exec/count.rs:1251-1273 | crates/planner/src/exec/count.rs:1314-1336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs:85 — crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs:85-107 | crates/planner/src/rules/access/sets/equality_range/intersection/node.rs:85-107 — before extracting anything, compare `crates/planner/src/rules/access/sets/equality_range/intersection/edge.rs` and `crates/planner/src/rules/access/sets/equality_range/intersection/node.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×7
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/db/src/execution/interpreter/mutation/edge.rs:221 — crates/db/src/execution/interpreter/mutation/edge.rs:221-271 | crates/db/src/execution/interpreter/mutation/edge.rs:298-344 | crates/db/src/execution/interpreter/mutation/node.rs:133-217 | crates/db/src/execution/interpreter/mutation/node.rs:253-301 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/db/src/execution/interpreter/stream/filter.rs:333 — crates/db/src/execution/interpreter/stream/filter.rs:333-371 | crates/planner/src/cost/profile/residual.rs:71-119 | crates/planner/src/diagnostics/analyze.rs:1259-1304 | crates/planner/src/ir/expr/validation.rs:34-84 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/db/src/index_lifecycle/text/driver.rs:950 — crates/db/src/index_lifecycle/text/driver.rs:950-1015 | crates/db/src/index_lifecycle/text/driver.rs:1184-1457 | crates/db/src/index_lifecycle/text/driver.rs:1585-1662 | crates/db/src/index_lifecycle/text/driver.rs:1864-1921 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/db/src/search/mod.rs:1260 — crates/db/src/search/mod.rs:1260-1272 | crates/db/src/search/mod.rs:1288-1301 | crates/db/src/search/mod.rs:1333-1343 | crates/db/src/search/mod.rs:1397-1408 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/planner/src/exec/returns.rs:94 — crates/planner/src/exec/returns.rs:94-207 | crates/planner/src/planning/envelope/write_contract.rs:22-142 | crates/planner/src/planning/selected/native/context_usage.rs:21-152 | crates/planner/src/planning/selected/native/context_usage.rs:214-370 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/planner/src/rules/access/sets/equality_range/intersection/mod.rs:12 — crates/planner/src/rules/access/sets/equality_range/intersection/mod.rs:12-21 | crates/planner/src/rules/access/sets/equality_range/range_union/mod.rs:12-21 | crates/planner/src/rules/access/sets/range/mod.rs:11-20 | crates/planner/src/rules/access/sets/subsumption/mod.rs:16-25 — 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) sdks/python/scripts/run_embedded_parity.py:291 — sdks/python/scripts/run_embedded_parity.py:291-311 | sdks/python/scripts/run_embedded_parity.py:322-344 | sdks/python/scripts/run_server_parity.py:399-413 | sdks/python/scripts/run_server_parity.py:417-431 — 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 · Duplicated block (17 lines × 2) · ×7
  • Duplicated block (17 lines × 2) crates/db/src/index_lifecycle/outbox.rs:1094 — crates/db/src/index_lifecycle/outbox.rs:1094-1110 | crates/db/src/index_lifecycle/outbox.rs:1121-1137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/db/src/index_lifecycle/text/active_batch.rs:668 — crates/db/src/index_lifecycle/text/active_batch.rs:668-684 | crates/db/src/index_lifecycle/text/active_batch.rs:693-709 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:2372 — crates/db/src/index_lifecycle/text/driver.rs:2372-2388 | crates/db/src/index_lifecycle/text/driver.rs:2405-2421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/db/src/index_lifecycle/text/serving.rs:192 — crates/db/src/index_lifecycle/text/serving.rs:192-208 | crates/db/src/index_lifecycle/text/serving.rs:278-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/db-testkit/src/model.rs:972 — crates/db-testkit/src/model.rs:972-988 | crates/db-testkit/src/model.rs:995-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.
  • Duplicated block (17 lines × 2) crates/planner/src/exec/access/edge.rs:275 — crates/planner/src/exec/access/edge.rs:275-291 | crates/planner/src/exec/access/node.rs:335-351 — before extracting anything, compare `crates/planner/src/exec/access/edge.rs` and `crates/planner/src/exec/access/node.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/value-semantics/src/lib.rs:93 — crates/value-semantics/src/lib.rs:93-109 | crates/value-semantics/src/lib.rs:117-133 — both copies are in the same file, so extract the 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 (8 lines × 3) · ×7
  • Duplicated block (8 lines × 3) crates/db/src/execution/interpreter/access/membership.rs:110 — crates/db/src/execution/interpreter/access/membership.rs:110-117 | crates/db/src/index_lifecycle/vector.rs:881-888 | crates/planner/src/analysis/index_atoms/equality.rs:153-160 — 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) crates/db/src/execution/interpreter/pull/mod.rs:214 — crates/db/src/execution/interpreter/pull/mod.rs:214-221 | crates/planner/src/diagnostics/analyze.rs:911-918 | crates/planner/src/diagnostics/analyze.rs:941-948 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 3) crates/db/src/index_lifecycle/text/driver.rs:2380 — crates/db/src/index_lifecycle/text/driver.rs:2380-2387 | crates/db/src/index_lifecycle/text/driver.rs:2414-2421 | crates/db/src/index_lifecycle/text/driver.rs:2479-2486 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/db/src/migrations/mod.rs:6191 — crates/db/src/migrations/mod.rs:6191-6198 | crates/db/src/migrations/mod.rs:6539-6546 | crates/db/src/migrations/mod.rs:6889-6896 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/db/src/execution/interpreter/stream/eval/predicate.rs:122 — crates/db/src/execution/interpreter/stream/eval/predicate.rs:122-129 | crates/db/src/execution/interpreter/stream/eval/predicate.rs:133-140 | crates/db/src/execution/interpreter/stream/eval/predicate.rs:144-151 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/planner/src/exec/returns.rs:136 — crates/planner/src/exec/returns.rs:136-143 | crates/planner/src/planning/envelope/write_contract.rs:60-67 | crates/planner/src/planning/selected/native/context_usage.rs:60-67 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) crates/db/src/index_lifecycle_testing/contracts.rs:3124 — crates/db/src/index_lifecycle_testing/contracts.rs:3124-3131 | crates/db/src/index_lifecycle_testing/contracts.rs:3149-3163 | crates/db/src/index_lifecycle_testing/contracts.rs:3611-3619 — 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.
D1 · Cyclomatic Complexity · helix_planner · ×6
  • helix_planner::analysis::scalar::truth::static_predicate_value (cyclomatic 27) crates/planner/src/analysis/scalar/truth.rs:13 — helix_planner::analysis::scalar::truth::static_predicate_value has cyclomatic complexity 27 (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.
  • helix_planner::rules::cardinality::fold_cursor (cyclomatic 21) crates/planner/src/rules/cardinality.rs:273 — helix_planner::rules::cardinality::fold_cursor 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. This is NOT this file's highest cyclomatic complexity: helix_planner::rules::cardinality::count_plan_cursor (cyclomatic 29) 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.
  • helix_planner::rules::physical_contracts::support::pipeline::stream_pipeline_op_contract (cyclomatic 20) crates/planner/src/rules/physical_contracts/support/pipeline.rs:51 — helix_planner::rules::physical_contracts::support::pipeline::stream_pipeline_op_contract 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.
  • helix_planner::exec::returns::semantic_multiplicity (cyclomatic 19) crates/planner/src/exec/returns.rs:94 — helix_planner::exec::returns::semantic_multiplicity has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • helix_planner::rules::physical_contracts::pipeline::delivered::delivered_after_pipeline_op (cyclomatic 16) crates/planner/src/rules/physical_contracts/pipeline/delivered.rs:7 — helix_planner::rules::physical_contracts::pipeline::delivered::delivered_after_pipeline_op has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • helix_planner::exec::selected::lowering::contracts::delivered::pipeline::selected_stream_pipeline_delivered_properties (cyclomatic 16) crates/planner/src/exec/selected/lowering/contracts/delivered/pipeline.rs:6 — helix_planner::exec::selected::lowering::contracts::delivered::pipeline::selected_stream_pipeline_delivered_properties has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · ExecutionContext · ×6
  • ExecutionContext::execute_shortest_path (cognitive 31) crates/db/src/execution/interpreter/shortest_path.rs:17 — ExecutionContext::execute_shortest_path has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 4 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ExecutionContext::execute_steps (cognitive 30) crates/db/src/execution/interpreter/scheduler.rs:17 — ExecutionContext::execute_steps has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 3 (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.
  • ExecutionContext::execute_branch_with_context (cognitive 29) crates/db/src/execution/interpreter/control/branch.rs:41 — ExecutionContext::execute_branch_with_context has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (12 pts), boolean chains 1, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ExecutionContext::expansion_ids (cognitive 24) crates/db/src/execution/interpreter/access/expand.rs:43 — ExecutionContext::expansion_ids has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 7 (19 pts), if/else 2 (5 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.
  • ExecutionContext::count_cursor_leaf (cognitive 24) crates/db/src/execution/interpreter/count.rs:1274 — ExecutionContext::count_cursor_leaf has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 2 (6 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ExecutionContext::search_vector_index_with_candidates (cognitive 22) crates/db/src/execution/interpreter/access/search/storage.rs:69 — ExecutionContext::search_vector_index_with_candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, match/switch 8 (11 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×6
  • Duplicated block (24 lines × 2) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:204 — crates/db/src/encoding/v2/keys/indexes/range/edge.rs:204-227 | crates/db/src/encoding/v2/keys/indexes/range/node.rs:29-52 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/range/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/range/node.rs` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (24 lines × 2) crates/db/src/execution/interpreter/mutation/edge.rs:308 — crates/db/src/execution/interpreter/mutation/edge.rs:308-331 | crates/db/src/execution/interpreter/mutation/node.rs:265-288 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (24 lines × 2) crates/db/src/execution/interpreter/access/indexes.rs:167 — crates/db/src/execution/interpreter/access/indexes.rs:167-190 | crates/db/src/execution/interpreter/access/indexes.rs:241-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24 lines × 2) crates/planner/src/diagnostics/analyze.rs:1262 — crates/planner/src/diagnostics/analyze.rs:1262-1285 | crates/planner/src/ir/expr/validation.rs:35-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (24 lines × 2) crates/planner/src/planning/envelope/write_contract.rs:50 — crates/planner/src/planning/envelope/write_contract.rs:50-73 | crates/planner/src/planning/selected/native/context_usage.rs:50-73 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) crates/planner/src/rules/access/sets/contradiction/edge.rs:29 — crates/planner/src/rules/access/sets/contradiction/edge.rs:29-52 | crates/planner/src/rules/access/sets/contradiction/node.rs:29-52 — before extracting anything, compare `crates/planner/src/rules/access/sets/contradiction/edge.rs` and `crates/planner/src/rules/access/sets/contradiction/node.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (9 lines × 3) · ×6
  • Duplicated block (9 lines × 3) crates/db/src/config/definition_differences.rs:157 — crates/db/src/config/definition_differences.rs:157-165 | crates/db/src/config/definition_differences.rs:182-190 | crates/db/src/config/definition_differences.rs:233-241 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/db/src/index_lifecycle/text/validation.rs:444 — crates/db/src/index_lifecycle/text/validation.rs:444-452 | crates/db/src/index_lifecycle/text/validation.rs:649-657 | crates/db/src/index_lifecycle/text/validation.rs:893-901 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/db/src/search/vector/spaces/simple.rs:190 — crates/db/src/search/vector/spaces/simple.rs:190-198 | crates/db/src/search/vector/spaces/simple.rs:206-214 | crates/db/src/search/vector/spaces/simple.rs:222-230 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/db/src/search/vector/storage/mod.rs:836 — crates/db/src/search/vector/storage/mod.rs:836-844 | crates/db/src/search/vector/storage/mod.rs:858-866 | crates/db/src/search/vector/storage/mod.rs:887-895 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/db/src/index_lifecycle_testing.rs:1240 — crates/db/src/index_lifecycle_testing.rs:1240-1248 | crates/db/src/index_lifecycle_testing.rs:1366-1374 | crates/db/src/index_lifecycle_testing.rs:1407-1417 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/cli/src/local_runtime.rs:753 — crates/cli/src/local_runtime.rs:753-761 | crates/cli/src/local_runtime.rs:771-779 | crates/cli/src/local_runtime.rs:797-805 — 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:150 — crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:150-165 | crates/db/src/encoding/v2/keys/indexes/range/edge.rs:169-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (16 lines × 2) crates/db/src/index_lifecycle_testing.rs:1270 — crates/db/src/index_lifecycle_testing.rs:1270-1285 | crates/db/src/index_lifecycle_testing.rs:1454-1469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) crates/db/src/migrations/mod.rs:6182 — crates/db/src/migrations/mod.rs:6182-6197 | crates/db/src/migrations/mod.rs:6530-6545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) crates/planner/src/rules/access/order/direction/edge.rs:11 — crates/planner/src/rules/access/order/direction/edge.rs:11-26 | crates/planner/src/rules/access/order/direction/node.rs:11-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) crates/db/src/index_lifecycle/vector/driver.rs:1702 — crates/db/src/index_lifecycle/vector/driver.rs:1702-1717 | crates/db/src/index_lifecycle/vector/driver.rs:1930-1945 — both copies are in the same file, so extract the 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 (10 lines × 3) · ×5
  • Duplicated block (10 lines × 3) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:259 — crates/db/src/encoding/v2/keys/indexes/range/edge.rs:259-268 | crates/db/src/encoding/v2/keys/indexes/range/edge.rs:426-435 | crates/db/src/encoding/v2/keys/indexes/range/node.rs:220-229 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/range/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/range/node.rs` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (10 lines × 3) crates/db/src/encoding/v2/values/property/canonical_number.rs:16 — crates/db/src/encoding/v2/values/property/canonical_number.rs:16-25 | crates/db/src/encoding/v2/values/property/property_value.rs:262-271 | crates/planner/src/analysis/scalar/values.rs:156-165 — before extracting anything, compare `crates/db/src/encoding/v2/values/property/property_value.rs` and `crates/planner/src/analysis/scalar/values.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) crates/db/src/execution/interpreter/mod.rs:263 — crates/db/src/execution/interpreter/mod.rs:263-272 | crates/db/src/execution/interpreter/pull/mod.rs:205-214 | crates/planner/src/diagnostics/analyze.rs:932-941 — 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 (10 lines × 3) crates/planner/src/planning/envelope/write_contract.rs:68 — crates/planner/src/planning/envelope/write_contract.rs:68-77 | crates/planner/src/planning/selected/native/context_usage.rs:68-77 | crates/planner/src/planning/selected/native/context_usage.rs:324-333 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) crates/planner/src/planning/envelope/write_contract.rs:103 — crates/planner/src/planning/envelope/write_contract.rs:103-112 | crates/planner/src/planning/selected/native/context_usage.rs:104-113 | crates/planner/src/planning/selected/native/context_usage.rs:352-361 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×5
  • Duplicated block (9–10 lines × 2) crates/db/src/execution/interpreter/access/search/input.rs:113 — crates/db/src/execution/interpreter/access/search/input.rs:113-121 | crates/db/src/execution/interpreter/reserved/sack.rs:106-115 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9–10 lines × 2) crates/db/src/index_lifecycle/secondary.rs:3554 — crates/db/src/index_lifecycle/secondary.rs:3554-3562 | crates/db/src/index_lifecycle/vector/driver.rs:3360-3369 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9–10 lines × 2) crates/db/src/index_lifecycle/secondary.rs:3577 — crates/db/src/index_lifecycle/secondary.rs:3577-3585 | crates/db/src/index_lifecycle/vector/driver.rs:3386-3395 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/vector/driver.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9–10 lines × 2) crates/planner/src/analysis/index_atoms/equality.rs:143 — crates/planner/src/analysis/index_atoms/equality.rs:143-151 | crates/planner/src/analysis/scalar/values.rs:44-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9–10 lines × 2) crates/planner/src/rules/access/pipeline/membership.rs:233 — crates/planner/src/rules/access/pipeline/membership.rs:233-242 | crates/planner/src/rules/physical_contracts/support/cardinality.rs:66-74 — 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 (6 lines × 3) · ×5
  • Duplicated block (6 lines × 3) crates/db/src/migrations/startup/bootstrap.rs:58 — crates/db/src/migrations/startup/bootstrap.rs:58-63 | crates/db/src/migrations/startup/bootstrap.rs:121-126 | crates/db/src/migrations/startup/bootstrap.rs:191-196 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/db/src/execution/interpreter/mutation/contracts.rs:29 — crates/db/src/execution/interpreter/mutation/contracts.rs:29-34 | crates/db/src/index_lifecycle/mutation_catalog.rs:297-302 | crates/db/src/migrations/mod.rs:4118-4123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (6 lines × 3) crates/planner/src/rules/access/sets/equality_range/intersection/mod.rs:25 — crates/planner/src/rules/access/sets/equality_range/intersection/mod.rs:25-30 | crates/planner/src/rules/access/sets/equality_range/range_union/mod.rs:25-30 | crates/planner/src/rules/access/sets/range/mod.rs:24-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (6 lines × 3) crates/planner/src/planning/index_ddl/shared.rs:8 — crates/planner/src/planning/index_ddl/shared.rs:8-13 | crates/planner/src/planning/search/access/edge.rs:69-74 | crates/planner/src/planning/search/access/node.rs:69-74 — before extracting anything, compare `crates/planner/src/planning/search/access/edge.rs` and `crates/planner/src/planning/search/access/node.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/db-testkit/src/model.rs:851 — crates/db-testkit/src/model.rs:851-856 | crates/db/src/encoding/v2/values/property/property_value.rs:211-216 | crates/planner/src/analysis/scalar/values.rs:103-108 — before extracting anything, compare `crates/db/src/encoding/v2/values/property/property_value.rs` and `crates/planner/src/analysis/scalar/values.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D6 · Cohesion (LCOM4) · Low cohesion · ×5
  • Low cohesion: DbConfig (LCOM4 13) crates/db/src/config/db.rs:176 — DbConfig's methods fall into 13 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 13 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: Highlight (LCOM4 7) crates/cli/src/output/json.rs:45 — Highlight's methods fall into 7 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 7 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: VectorIndexDefinition (LCOM4 6) crates/db/src/config/indexes.rs:243 — VectorIndexDefinition's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SearchParams (LCOM4 5) crates/db/src/search/vector/mod.rs:404 — SearchParams'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: StorageCostProfile (LCOM4 4) crates/planner/src/cost/profile.rs:31 — StorageCostProfile'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.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×5
  • Duplicated block (6 lines × 2 locations) sdks/typescript/scripts/parity/generate-fixtures.ts:654 — sdks/typescript/scripts/parity/generate-fixtures.ts:654 · sdks/typescript/scripts/parity/generate-fixtures.ts:676 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
  • Duplicated block (6 lines × 2 locations) sdks/typescript/scripts/parity/run-embedded-parity.ts:292 — sdks/typescript/scripts/parity/run-embedded-parity.ts:292 · sdks/typescript/scripts/parity/run-helix.ts:298 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) sdks/typescript/src/dsl.ts:2177 — sdks/typescript/src/dsl.ts:2177 · sdks/typescript/src/dsl.ts:2184 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) sdks/typescript/src/dsl.ts:2225 — sdks/typescript/src/dsl.ts:2225 · sdks/typescript/src/dsl.ts:2231 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) sdks/typescript/src/dsl.ts:2354 — sdks/typescript/src/dsl.ts:2354 · sdks/typescript/src/dsl.ts:2360 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D1 · Cyclomatic Complexity · VectorIndex · ×4
  • VectorIndex::search_layer0_with_simhash (cyclomatic 100) crates/db/src/search/vector/hnsw/search.rs:267 — VectorIndex::search_layer0_with_simhash has cyclomatic complexity 100 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • VectorIndex::restricted_filter_aware_search (cyclomatic 41) crates/db/src/search/vector/hnsw/restricted.rs:1106 — VectorIndex::restricted_filter_aware_search has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • VectorIndex::load_uncached_items_for_layer (cyclomatic 26) crates/db/src/search/vector/hnsw/index.rs:1084 — VectorIndex::load_uncached_items_for_layer 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.
  • VectorIndex::relink_neighbor (cyclomatic 17) crates/db/src/search/vector/hnsw/mutation/mod.rs:1933 — VectorIndex::relink_neighbor 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.
D2 · Cognitive Complexity · helix_cli · ×4
  • helix_cli::commands::chef::launch_claude_streaming (cognitive 37) crates/cli/src/commands/chef.rs:1942 — helix_cli::commands::chef::launch_claude_streaming has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 4 (11 pts), loops 2 (3 pts), boolean chains 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.
  • helix_cli::commands::cloud::service_credential::run (cognitive 20) crates/cli/src/commands/cloud/service_credential.rs:10 — helix_cli::commands::cloud::service_credential::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (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.
  • helix_cli::commands::cloud::database::run (cognitive 17) crates/cli/src/commands/cloud/database.rs:10 — helix_cli::commands::cloud::database::run has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 3 (6 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • helix_cli::commands::status::run (cognitive 16) crates/cli/src/commands/status.rs:46 — helix_cli::commands::status::run has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (11 pts), loops 3, if/else 1 (2 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 · Graph · ×4
  • Graph::spring_layout (cognitive 29) crates/graph-algorithms/src/algorithms/layout.rs:53 — Graph::spring_layout has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 7 (12 pts), boolean chains 1, match/switch 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.
  • Graph::with_attributes (cognitive 26) crates/graph-algorithms/src/model.rs:438 — Graph::with_attributes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Graph::enumerate_cycles_from (cognitive 25) crates/graph-algorithms/src/algorithms/cycles.rs:93 — Graph::enumerate_cycles_from has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (4 pts), boolean chains 2, 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.
  • Graph::compose (cognitive 16) crates/graph-algorithms/src/transform.rs:169 — Graph::compose has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×4
  • Duplicated block (20 lines × 2) crates/db/src/encoding/v2/keys/indexes/label.rs:46 — crates/db/src/encoding/v2/keys/indexes/label.rs:46-65 | crates/db/src/encoding/v2/keys/indexes/label.rs:153-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/db/src/execution/interpreter/access/indexes.rs:664 — crates/db/src/execution/interpreter/access/indexes.rs:664-683 | crates/db/src/execution/interpreter/access/range.rs:340-359 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (20 lines × 2) crates/db/src/execution/interpreter/count.rs:575 — crates/db/src/execution/interpreter/count.rs:575-594 | crates/db/src/execution/interpreter/count.rs:622-641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/db/src/migrations/mod.rs:3480 — crates/db/src/migrations/mod.rs:3480-3499 | crates/db/src/migrations/mod.rs:3590-3609 — both copies are in the same file, so extract the 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 (18–19 lines × 2) · ×4
  • Duplicated block (18–19 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/items.rs:81 — crates/db/src/encoding/v2/keys/indexes/vector/items.rs:81-99 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:81-98 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/items.rs` and `crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18–19 lines × 2) crates/db/src/index_lifecycle/secondary/exact.rs:379 — crates/db/src/index_lifecycle/secondary/exact.rs:379-397 | crates/db/src/index_lifecycle/secondary/exact/ordered.rs:183-200 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (18–19 lines × 2) crates/db/src/merge_operator.rs:281 — crates/db/src/merge_operator.rs:281-298 | crates/db/src/merge_operator.rs:310-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) crates/db/src/search/vector/hnsw/search.rs:479 — crates/db/src/search/vector/hnsw/search.rs:479-497 | crates/db/src/search/vector/hnsw/search.rs:1039-1056 — both copies are in the same file, so extract the 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 (11 lines × 3) · ×4
  • Duplicated block (11 lines × 3) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:207 — crates/db/src/encoding/v2/keys/indexes/range/edge.rs:207-217 | crates/db/src/encoding/v2/keys/indexes/range/edge.rs:389-399 | crates/db/src/encoding/v2/keys/indexes/range/node.rs:32-42 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/range/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/range/node.rs` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (11 lines × 3) crates/cli/src/commands/cloud/database.rs:160 — crates/cli/src/commands/cloud/database.rs:160-171 | crates/cli/src/commands/cloud/project.rs:107-117 | crates/cli/src/commands/cloud/service_credential.rs:174-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (11 lines × 3) crates/db/src/index_lifecycle/text/validation.rs:291 — crates/db/src/index_lifecycle/text/validation.rs:291-301 | crates/db/src/index_lifecycle/text/validation.rs:540-550 | crates/db/src/index_lifecycle/text/validation.rs:731-741 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) crates/db/src/index_lifecycle_testing.rs:1220 — crates/db/src/index_lifecycle_testing.rs:1220-1230 | crates/db/src/index_lifecycle_testing.rs:1346-1356 | crates/db/src/index_lifecycle_testing.rs:1386-1396 — 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×4
  • Duplicated block (10–11 lines × 2) crates/db/src/index_lifecycle/text/manifest.rs:55 — crates/db/src/index_lifecycle/text/manifest.rs:55-65 | crates/db/src/index_lifecycle/text/validation.rs:182-191 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10–11 lines × 2) crates/db/src/migrations/vector_properties.rs:167 — crates/db/src/migrations/vector_properties.rs:167-177 | crates/db/src/migrations/vector_retirement.rs:430-439 — before extracting anything, compare `crates/db/src/migrations/vector_properties.rs` and `crates/db/src/migrations/vector_retirement.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10–11 lines × 2) crates/db/src/search/text/mod.rs:1217 — crates/db/src/search/text/mod.rs:1217-1227 | crates/planner/src/ir/index/equality.rs:125-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10–11 lines × 2) crates/db/src/search/vector/hnsw/restricted.rs:1311 — crates/db/src/search/vector/hnsw/restricted.rs:1311-1321 | crates/db/src/search/vector/hnsw/restricted.rs:1350-1359 — both copies are in the same file, so extract the 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 (7 lines × 3) · ×4
  • Duplicated block (7 lines × 3) crates/db/src/index_lifecycle/secondary.rs:3622 — crates/db/src/index_lifecycle/secondary.rs:3622-3628 | crates/db/src/index_lifecycle/text/driver.rs:3347-3353 | crates/db/src/index_lifecycle/vector/driver.rs:3461-3467 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/text/driver.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/db/src/migrations/tenant/envelope.rs:58 — crates/db/src/migrations/tenant/envelope.rs:58-64 | crates/db/src/migrations/tenant/envelope.rs:106-112 | crates/db/src/migrations/tenant/envelope.rs:142-148 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/planner/src/rules/access/pipeline/membership.rs:232 — crates/planner/src/rules/access/pipeline/membership.rs:232-238 | crates/planner/src/rules/access/pipeline/support/empty.rs:31-37 | crates/planner/src/rules/physical_contracts/support/cardinality.rs:65-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) crates/db/src/index_lifecycle/secondary.rs:3646 — crates/db/src/index_lifecycle/secondary.rs:3646-3652 | crates/db/src/index_lifecycle/text/driver.rs:3375-3381 | crates/db/src/index_lifecycle/vector/driver.rs:3485-3491 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/text/driver.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×4
  • Duplicated block (6–7 lines × 2) crates/planner/src/diagnostics/analyze.rs:201 — crates/planner/src/diagnostics/analyze.rs:201-207 | crates/planner/src/diagnostics/analyze.rs:733-738 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6–7 lines × 2) crates/planner/src/diagnostics/analyze.rs:983 — crates/planner/src/diagnostics/analyze.rs:983-989 | crates/planner/src/diagnostics/analyze.rs:1034-1039 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6–7 lines × 2) crates/planner/src/exec/lowering/contracts/access/cardinality.rs:70 — crates/planner/src/exec/lowering/contracts/access/cardinality.rs:70-76 | crates/planner/src/exec/selected/lowering/contracts/matching/access/source/node.rs:77-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6–7 lines × 2) crates/planner/src/exec/lowering/contracts/access/cardinality.rs:88 — crates/planner/src/exec/lowering/contracts/access/cardinality.rs:88-94 | crates/planner/src/exec/selected/lowering/contracts/matching/access/source/edge.rs:77-82 — 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.
D5 · Coupling · Off the main sequence · ×4
  • Off the main sequence: helix-graph-algorithms — helix-graph-algorithms: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: helix-metrics — helix-metrics: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: helix-value-semantics — helix-value-semantics: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: helix-ast — helix-ast: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×4
  • Duplicated block (9 lines × 2 locations) bindings/uniffi/smoke-node.mjs:154 — bindings/uniffi/smoke-node.mjs:154 · bindings/uniffi/smoke-node.mjs:174 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (9 lines × 2 locations) sdks/typescript/scripts/parity/run-embedded-parity.ts:299 — sdks/typescript/scripts/parity/run-embedded-parity.ts:299 · sdks/typescript/scripts/parity/run-helix.ts:303 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (9 lines × 2 locations) sdks/typescript/src/dsl.ts:509 — sdks/typescript/src/dsl.ts:509 · sdks/typescript/src/dsl.ts:539 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (9 lines × 2 locations) sdks/typescript/src/dsl.ts:1071 — sdks/typescript/src/dsl.ts:1071 · sdks/typescript/src/dsl.ts:1083 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D1 · Cyclomatic Complexity · VectorRows · ×3
  • VectorRows::validate_simhash_directory (cyclomatic 49) crates/db/src/search/vector/storage/mod.rs:1173 — VectorRows::validate_simhash_directory has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • VectorRows::validate_legacy_physical (cyclomatic 34) crates/db/src/search/vector/storage/mod.rs:921 — VectorRows::validate_legacy_physical has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • VectorRows::backfill_missing_simhash_directory (cyclomatic 22) crates/db/src/search/vector/storage/mod.rs:1517 — VectorRows::backfill_missing_simhash_directory 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.
D2 · Cognitive Complexity · VectorRows · ×3
  • VectorRows::validate_simhash_directory (cognitive 110) crates/db/src/search/vector/storage/mod.rs:1173 — VectorRows::validate_simhash_directory has cognitive complexity 110 (threshold 15). Drivers by points: if/else 37 (91 pts), match/switch 8 (17 pts), boolean chains 1, loops 1 (nesting depth added 63). 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.
  • VectorRows::validate_legacy_physical (cognitive 67) crates/db/src/search/vector/storage/mod.rs:921 — VectorRows::validate_legacy_physical has cognitive complexity 67 (threshold 15). Drivers by points: if/else 19 (45 pts), match/switch 9 (18 pts), boolean chains 3, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorRows::backfill_missing_simhash_directory (cognitive 37) crates/db/src/search/vector/storage/mod.rs:1517 — VectorRows::backfill_missing_simhash_directory has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (28 pts), match/switch 4 (6 pts), boolean chains 2, 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 · HelixDB · ×3
  • HelixDB::run_configured_vector_memory_warm (cognitive 21) crates/db/src/lib.rs:2690 — HelixDB::run_configured_vector_memory_warm has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 5 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • HelixDB::run_configured_startup_cache_warm (cognitive 20) crates/db/src/lib.rs:2790 — HelixDB::run_configured_startup_cache_warm has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (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.
  • HelixDB::close (cognitive 18) crates/db/src/lib.rs:2196 — HelixDB::close has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 2 (3 pts), loops 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D3 · God Classes · TooManyFields · ×3
  • TooManyFields: SeedRuleSet crates/planner/src/rules/registry.rs:15 — TooManyFields — 48 stored fields beside 2 methods. The bar is 30 stored fields; this is 18 over it, 1.60× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: LegacyVectorIndexConfig crates/db/src/encoding/v2/legacy/vector/metadata.rs:14 — TooManyFields — 35 stored fields. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: SearchStats crates/db/src/search/vector/mod.rs:622 — TooManyFields — 35 stored fields. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×3
  • Duplicated block (21 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:4525 — crates/db/src/index_lifecycle_testing/contracts.rs:4525-4545 | crates/db/src/index_lifecycle_testing/contracts/all_index_validation.rs:1182-1202 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (21 lines × 2) crates/db/src/migrations/indexes/equality_bitmap.rs:404 — crates/db/src/migrations/indexes/equality_bitmap.rs:404-424 | crates/db/src/migrations/indexes/equality_bitmap.rs:453-473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) crates/db/src/search/mod.rs:2698 — crates/db/src/search/mod.rs:2698-2718 | crates/db/src/search/mod.rs:2720-2740 — both copies are in the same file, so extract the 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 (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) crates/db/src/encoding/v2/keys/indexes/property.rs:210 — crates/db/src/encoding/v2/keys/indexes/property.rs:210-228 | crates/db/src/encoding/v2/keys/indexes/property.rs:275-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/items.rs:107 — crates/db/src/encoding/v2/keys/indexes/vector/items.rs:107-125 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:105-123 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/items.rs` and `crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) crates/db/src/search/vector/spaces/simple_avx.rs:49 — crates/db/src/search/vector/spaces/simple_avx.rs:49-67 | crates/db/src/search/vector/spaces/simple_avx.rs:162-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.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×3
  • Duplicated block (14–16 lines × 2) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:219 — crates/db/src/encoding/v2/keys/indexes/range/edge.rs:219-234 | crates/db/src/encoding/v2/keys/indexes/range/edge.rs:401-414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–16 lines × 2) crates/db/src/index_lifecycle/secondary.rs:1244 — crates/db/src/index_lifecycle/secondary.rs:1244-1259 | crates/db/src/index_lifecycle/secondary.rs:1616-1629 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–16 lines × 2) crates/db/src/needed_in_future/merge_operator.rs:196 — crates/db/src/needed_in_future/merge_operator.rs:196-211 | crates/db/src/needed_in_future/merge_operator.rs:236-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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×3
  • Duplicated block (14–15 lines × 2) crates/db/src/migration_parity.rs:914 — crates/db/src/migration_parity.rs:914-927 | crates/db/src/migration_parity.rs:963-977 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–15 lines × 2) crates/planner/src/planning/envelope/write_contract.rs:34 — crates/planner/src/planning/envelope/write_contract.rs:34-47 | crates/planner/src/planning/selected/native/context_usage.rs:25-39 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14–15 lines × 2) crates/planner/src/analysis.rs:48 — crates/planner/src/analysis.rs:48-61 | crates/planner/src/rules/access/filter/atoms/mod.rs:30-44 — 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 (13 lines × 4) · ×3
  • Duplicated block (13 lines × 4) crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:195 — crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:195-207 | crates/db/src/encoding/v2/keys/indexes/vector/layer0.rs:44-56 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:189-201 | crates/db/src/encoding/v2/keys/indexes/vector/upper_layers.rs:133-145 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs` and `crates/db/src/encoding/v2/keys/indexes/vector/layer0.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 4) crates/planner/src/exec/lowering/costing.rs:289 — crates/planner/src/exec/lowering/costing.rs:289-301 | crates/planner/src/exec/lowering/costing.rs:307-319 | crates/planner/src/exec/lowering/costing.rs:386-398 | crates/planner/src/exec/lowering/costing.rs:404-416 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 4) crates/db/src/migrations/vector_retirement.rs:367 — crates/db/src/migrations/vector_retirement.rs:367-379 | crates/db/src/migrations/vector_retirement.rs:494-506 | crates/db/src/migrations/vector_retirement.rs:624-636 | crates/db/src/migrations/vector_retirement.rs:896-908 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×3
  • Duplicated block (13 lines × 3) crates/db/src/index_lifecycle/secondary.rs:1749 — crates/db/src/index_lifecycle/secondary.rs:1749-1761 | crates/db/src/index_lifecycle/secondary.rs:1980-1992 | crates/db/src/index_lifecycle/secondary.rs:2053-2065 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) crates/db/src/migrations/vector_retirement.rs:495 — crates/db/src/migrations/vector_retirement.rs:495-507 | crates/db/src/migrations/vector_retirement.rs:625-637 | crates/db/src/migrations/vector_retirement.rs:897-909 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) crates/db/src/index_lifecycle/text/driver.rs:2332 — crates/db/src/index_lifecycle/text/driver.rs:2332-2344 | crates/db/src/index_lifecycle/text/driver.rs:2394-2406 | crates/db/src/index_lifecycle/text/driver.rs:2426-2440 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×3
  • Duplicated block (12 lines × 3) crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs:40 — crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs:40-52 | crates/db/src/encoding/v2/keys/indexes/vector/storage_prefixes.rs:133-145 | crates/db/src/encoding/v2/legacy/vector/transaction_guard.rs:40-51 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs` and `crates/db/src/encoding/v2/legacy/vector/transaction_guard.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/db/src/index_lifecycle/secondary.rs:3659 — crates/db/src/index_lifecycle/secondary.rs:3659-3670 | crates/db/src/index_lifecycle/text/driver.rs:3389-3400 | crates/db/src/index_lifecycle/vector/driver.rs:3498-3509 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/text/driver.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/planner/src/planning/envelope/write_contract.rs:89 — crates/planner/src/planning/envelope/write_contract.rs:89-100 | crates/planner/src/planning/selected/native/context_usage.rs:90-101 | crates/planner/src/planning/selected/native/context_usage.rs:340-351 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×3
  • Duplicated block (7 lines × 5) crates/db/src/encoding/v2/values/property/canonical_number.rs:16 — crates/db/src/encoding/v2/values/property/canonical_number.rs:16-22 | crates/db/src/encoding/v2/values/property/property_value.rs:262-268 | crates/db/src/encoding/v2/values/property/property_value.rs:317-323 | crates/db/src/search/text/mod.rs:1222-1228 | crates/planner/src/analysis/scalar/values.rs:156-162 — before extracting anything, compare `crates/db/src/encoding/v2/values/property/property_value.rs` and `crates/planner/src/analysis/scalar/values.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 5) crates/db/src/migrations/mod.rs:6545 — crates/db/src/migrations/mod.rs:6545-6553 | crates/db/src/migrations/mod.rs:6766-6774 | crates/db/src/migrations/mod.rs:6895-6903 | crates/db/src/migrations/mod.rs:7161-7167 | crates/db/src/migrations/mod.rs:8498-8504 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 5) crates/db-testkit/src/lifecycle.rs:108 — crates/db-testkit/src/lifecycle.rs:108-114 | crates/db/src/index_lifecycle/catalog.rs:115-121 | crates/db/src/index_lifecycle/catalog.rs:124-130 | crates/db/src/index_lifecycle/catalog.rs:133-139 | crates/db/src/index_lifecycle/catalog.rs:142-154 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×3
  • Outbound HTTP without resilience crates/cli/src/cloud/client.rs:177 — `reqwest::Client::builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. 3 of the 9 files that make outbound calls are unbounded; the first 3 are listed.
  • Outbound HTTP without resilience crates/cli/src/commands/query.rs:136 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:258 — `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D1 · Cyclomatic Complexity · helix_cli · ×2
  • helix_cli::main (cyclomatic 34) crates/cli/src/main.rs:543 — helix_cli::main has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • helix_cli::commands::cloud::database::run (cyclomatic 18) crates/cli/src/commands/cloud/database.rs:10 — helix_cli::commands::cloud::database::run has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Source · ×2
  • Source::open (cyclomatic 33) crates/db/src/execution/interpreter/pull/source.rs:120 — Source::open has cyclomatic complexity 33 (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.
  • Source::next (cyclomatic 21) crates/db/src/execution/interpreter/pull/source.rs:452 — Source::next 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 · RuleSchedule · ×2
  • RuleSchedule::rules_for_expr (cyclomatic 30) crates/planner/src/optimizer/driver/schedule/routing.rs:14 — RuleSchedule::rules_for_expr has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • RuleSchedule::compile_applicability (cyclomatic 29) crates/planner/src/optimizer/driver/schedule/compile.rs:13 — RuleSchedule::compile_applicability has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Runner · ×2
  • Runner::random_step (cyclomatic 22) crates/db-testkit/src/lifecycle_workload.rs:376 — Runner::random_step has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • Runner::validate_invariants (cyclomatic 19) crates/db-testkit/src/lifecycle_workload.rs:905 — Runner::validate_invariants 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 · IndexOperationProgress · ×2
  • IndexOperationProgress::cursors_are_valid (cyclomatic 21) crates/db/src/index_lifecycle/operation.rs:587 — IndexOperationProgress::cursors_are_valid has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • IndexOperationProgress::try_map_cursors (cyclomatic 20) crates/db/src/index_lifecycle/operation.rs:667 — IndexOperationProgress::try_map_cursors has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 · Graph · ×2
  • Graph::with_attributes (cyclomatic 18) crates/graph-algorithms/src/model.rs:438 — Graph::with_attributes 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.
  • Graph::spring_layout (cyclomatic 16) crates/graph-algorithms/src/algorithms/layout.rs:53 — Graph::spring_layout 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 · ExecutableDagBuilder · ×2
  • ExecutableDagBuilder::push_selected_stream_pipeline_op (cyclomatic 16) crates/planner/src/exec/selected/lowering/access/pipeline.rs:4 — ExecutableDagBuilder::push_selected_stream_pipeline_op has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ExecutableDagBuilder::push_selected_range_pipeline (cyclomatic 16) crates/planner/src/exec/selected/lowering/access/stream/pipeline.rs:121 — ExecutableDagBuilder::push_selected_range_pipeline 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 · RuleSchedule · ×2
  • RuleSchedule::rules_for_expr (cognitive 58) crates/planner/src/optimizer/driver/schedule/routing.rs:14 — RuleSchedule::rules_for_expr has cognitive complexity 58 (threshold 15). Drivers by points: if/else 38 (57 pts), match/switch 1 (nesting depth added 19). 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.
  • RuleSchedule::compile_applicability (cognitive 18) crates/planner/src/optimizer/driver/schedule/compile.rs:13 — RuleSchedule::compile_applicability has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (16 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · IndexOperationProgress · ×2
  • IndexOperationProgress::cursors_are_valid (cognitive 18) crates/db/src/index_lifecycle/operation.rs:587 — IndexOperationProgress::cursors_are_valid has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 8 (16 pts), boolean chains 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • IndexOperationProgress::try_map_cursors (cognitive 17) crates/db/src/index_lifecycle/operation.rs:667 — IndexOperationProgress::try_map_cursors has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 8 (16 pts), if/else 1 (nesting depth added 8). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
D3 · God Classes · TooManyFunctions · ×2
  • TooManyFunctions: db::migrations crates/db/src/migrations/mod.rs:76 — TooManyFunctions — 74 free functions. The bar is 30 free functions; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: db::migrations::production_contracts crates/db/src/migrations/mod.rs:5292 — TooManyFunctions — 49 free functions. The bar is 30 free functions; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D31 · IaC & Container Security · Medium IaC · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/db/src/migrations/mod.rs:6167 — crates/db/src/migrations/mod.rs:6167-6498 | crates/db/src/migrations/mod.rs:6502-6722 | crates/db/src/migrations/mod.rs:6726-6861 | crates/db/src/migrations/mod.rs:6865-7117 | crates/db/src/migrations/mod.rs:7121-7333 | crates/db/src/migrations/mod.rs:8101-8337 | crates/db/src/migrations/mod.rs:8469-8649 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/planner/src/exec/lowering/contracts/access/cardinality.rs:58 — crates/planner/src/exec/lowering/contracts/access/cardinality.rs:58-79 | crates/planner/src/exec/selected/lowering/contracts/matching/access/source/node.rs:17-89 | crates/planner/src/rules/access/sets/canonical/node.rs:8-26 | crates/planner/src/rules/access/sets/canonical/node.rs:59-75 | crates/planner/src/rules/access/sets/canonical/node.rs:79-95 | crates/planner/src/rules/cardinality.rs:1025-1059 | crates/planner/src/rules/physical_contracts/access/source/node.rs:12-37 — 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:168 — crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:168-207 | crates/db/src/encoding/v2/keys/indexes/vector/layer0.rs:17-56 | crates/db/src/encoding/v2/keys/indexes/vector/reverse_edges.rs:20-59 | crates/db/src/encoding/v2/keys/indexes/vector/reverse_edges.rs:106-157 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:162-201 | crates/db/src/encoding/v2/keys/indexes/vector/upper_layers.rs:106-145 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/planner/src/exec/lowering/contracts/access/cardinality.rs:81 — crates/planner/src/exec/lowering/contracts/access/cardinality.rs:81-97 | crates/planner/src/exec/selected/lowering/contracts/matching/access/source/edge.rs:17-89 | crates/planner/src/rules/access/sets/canonical/edge.rs:8-26 | crates/planner/src/rules/access/sets/canonical/edge.rs:59-75 | crates/planner/src/rules/access/sets/canonical/edge.rs:79-95 | crates/planner/src/rules/physical_contracts/access/source/edge.rs:12-37 — 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 · Duplicated block (24–25 lines × 2) · ×2
  • Duplicated block (24–25 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs:28 — crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs:28-52 | crates/db/src/encoding/v2/legacy/vector/transaction_guard.rs:28-51 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/metadata.rs` and `crates/db/src/encoding/v2/legacy/vector/transaction_guard.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (24–25 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:2657 — crates/db/src/index_lifecycle/text/driver.rs:2657-2681 | crates/db/src/index_lifecycle/text/driver.rs:2799-2822 — both copies are in the same file, so extract the 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 (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) crates/db/src/search/vector/spaces/simple_avx.rs:103 — crates/db/src/search/vector/spaces/simple_avx.rs:103-124 | crates/db/src/search/vector/spaces/simple_avx.rs:217-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) sdks/python/scripts/run_embedded_parity.py:51 — sdks/python/scripts/run_embedded_parity.py:51-72 | sdks/python/scripts/run_embedded_parity.py:163-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sdks/python/scripts/run_embedded_parity.py:51` 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 (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) crates/db/src/encoding/v2/values/indexes/equality.rs:226 — crates/db/src/encoding/v2/values/indexes/equality.rs:226-243 | crates/db/src/encoding/v2/values/indexes/range.rs:66-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (18 lines × 2) crates/db/src/search/vector/hnsw/mutation/mod.rs:251 — crates/db/src/search/vector/hnsw/mutation/mod.rs:251-268 | crates/db/src/search/vector/hnsw/search.rs:54-71 — 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 (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:29 — crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:29-44 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:93-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16–17 lines × 2) crates/db/src/lib.rs:2016 — crates/db/src/lib.rs:2016-2032 | crates/db/src/lib.rs:3113-3128 — both copies are in the same file, so extract the 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 (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:3217 — crates/db/src/index_lifecycle_testing/contracts.rs:3217-3232 | crates/db/src/index_lifecycle_testing/contracts.rs:3298-3312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15–16 lines × 2) crates/db/src/migrations/mod.rs:1875 — crates/db/src/migrations/mod.rs:1875-1890 | crates/db/src/migrations/mod.rs:2114-2128 — both copies are in the same file, so extract the 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 (13–15 lines × 2) · ×2
  • Duplicated block (13–15 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:2391 — crates/db/src/index_lifecycle/text/driver.rs:2391-2403 | crates/db/src/index_lifecycle/text/driver.rs:2423-2437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–15 lines × 2) crates/db/src/search/vector/spaces/simple_sse.rs:48 — crates/db/src/search/vector/spaces/simple_sse.rs:48-60 | crates/db/src/search/vector/spaces/simple_sse.rs:104-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×2
  • Duplicated block (12–14 lines × 2) crates/db/src/index_lifecycle_testing.rs:896 — crates/db/src/index_lifecycle_testing.rs:896-907 | crates/db/src/index_lifecycle_testing.rs:1026-1039 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–14 lines × 2) crates/db/src/config/runtime_catalog.rs:15 — crates/db/src/config/runtime_catalog.rs:15-26 | crates/db/src/config/runtime_catalog.rs:240-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×2
  • Duplicated block (12–13 lines × 4) crates/db/src/index_lifecycle/text/driver.rs:748 — crates/db/src/index_lifecycle/text/driver.rs:748-759 | crates/db/src/index_lifecycle/text/driver.rs:790-801 | crates/db/src/index_lifecycle/text/driver.rs:807-819 | crates/db/src/index_lifecycle/text/driver.rs:824-835 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12–13 lines × 4) crates/db/src/migrations/vector_properties.rs:281 — crates/db/src/migrations/vector_properties.rs:281-293 | crates/db/src/migrations/vector_retirement.rs:514-525 | crates/db/src/migrations/vector_retirement.rs:648-659 | crates/db/src/migrations/vector_retirement.rs:916-927 — before extracting anything, compare `crates/db/src/migrations/vector_properties.rs` and `crates/db/src/migrations/vector_retirement.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:371 — crates/db/src/encoding/v2/keys/indexes/range/edge.rs:371-382 | crates/db/src/encoding/v2/keys/indexes/range/node.rs:185-197 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/range/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/range/node.rs` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (12–13 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:2614 — crates/db/src/index_lifecycle/text/driver.rs:2614-2625 | crates/db/src/index_lifecycle/text/driver.rs:2644-2656 — both copies are in the same file, so extract the 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 (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) crates/db/src/search/mod.rs:1045 — crates/db/src/search/mod.rs:1045-1055 | crates/db/src/search/mod.rs:2389-2400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) crates/planner/src/exec/returns.rs:74 — crates/planner/src/exec/returns.rs:74-85 | crates/planner/src/exec/returns.rs:194-204 — both copies are in the same file, so extract the 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 (10–11 lines × 3) · ×2
  • Duplicated block (10–11 lines × 3) crates/db/src/index_lifecycle/text/validation.rs:454 — crates/db/src/index_lifecycle/text/validation.rs:454-464 | crates/db/src/index_lifecycle/text/validation.rs:659-668 | crates/db/src/index_lifecycle/text/validation.rs:903-912 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10–11 lines × 3) crates/planner/src/analysis/index_atoms/range.rs:64 — crates/planner/src/analysis/index_atoms/range.rs:64-74 | crates/planner/src/analysis/labels.rs:135-145 | crates/planner/src/analysis/prune.rs:67-76 — 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 (10 lines × 4) · ×2
  • Duplicated block (10 lines × 4) crates/db/src/migrations/vector_retirement.rs:261 — crates/db/src/migrations/vector_retirement.rs:261-270 | crates/db/src/migrations/vector_retirement.rs:547-556 | crates/db/src/migrations/vector_retirement.rs:682-691 | crates/db/src/migrations/vector_retirement.rs:793-802 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 4) crates/db/src/search/vector/storage/mod.rs:1282 — crates/db/src/search/vector/storage/mod.rs:1282-1293 | crates/db/src/search/vector/storage/mod.rs:1343-1352 | crates/db/src/search/vector/storage/mod.rs:1417-1426 | crates/db/src/search/vector/storage/mod.rs:1468-1478 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) crates/db/src/encoding/v2/keys/indexes/prefix.rs:94 — crates/db/src/encoding/v2/keys/indexes/prefix.rs:94-102 | crates/db/src/encoding/v2/keys/indexes/prefix.rs:106-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) crates/db/src/search/text/mod.rs:1164 — crates/db/src/search/text/mod.rs:1164-1172 | crates/planner/src/rules/access/filter/index/label_domain.rs:272-279 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) crates/db/src/search/vector/storage/mod.rs:1273 — crates/db/src/search/vector/storage/mod.rs:1273-1280 | crates/db/src/search/vector/storage/mod.rs:1334-1341 | crates/db/src/search/vector/storage/mod.rs:1408-1415 | crates/db/src/search/vector/storage/mod.rs:1459-1466 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 4) crates/db/src/config/indexes.rs:677 — crates/db/src/config/indexes.rs:677-684 | crates/db/src/config/indexes.rs:687-694 | crates/db/src/index_lifecycle/model.rs:408-415 | crates/db/src/index_lifecycle/model.rs:418-425 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:2429 — crates/db/src/index_lifecycle_testing/contracts.rs:2429-2436 | crates/db/src/index_lifecycle_testing/contracts.rs:2573-2579 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) sdks/python/scripts/run_embedded_parity.py:264 — sdks/python/scripts/run_embedded_parity.py:264-271 | sdks/python/scripts/run_server_parity.py:358-364 — 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 `sdks/python/scripts/run_embedded_parity.py:264` 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 × 6) · ×2
  • Duplicated block (6 lines × 6) crates/db/src/migrations/vector_properties.rs:166 — crates/db/src/migrations/vector_properties.rs:166-171 | crates/db/src/migrations/vector_retirement.rs:260-265 | crates/db/src/migrations/vector_retirement.rs:429-434 | crates/db/src/migrations/vector_retirement.rs:546-551 | crates/db/src/migrations/vector_retirement.rs:681-686 | crates/db/src/migrations/vector_retirement.rs:792-797 — before extracting anything, compare `crates/db/src/migrations/vector_properties.rs` and `crates/db/src/migrations/vector_retirement.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 6) crates/planner/src/rules/access/sets/rules/canonical.rs:26 — crates/planner/src/rules/access/sets/rules/canonical.rs:26-31 | crates/planner/src/rules/access/sets/rules/contradiction.rs:26-31 | crates/planner/src/rules/access/sets/rules/equality_range.rs:26-31 | crates/planner/src/rules/access/sets/rules/equality_range.rs:55-60 | crates/planner/src/rules/access/sets/rules/range.rs:27-32 | crates/planner/src/rules/access/sets/rules/subsumption.rs:26-31 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) crates/db/src/search/vector/spaces/simple_avx.rs:28 — crates/db/src/search/vector/spaces/simple_avx.rs:28-33 | crates/db/src/search/vector/spaces/simple_avx.rs:83-88 | crates/db/src/search/vector/spaces/simple_avx.rs:141-146 | crates/db/src/search/vector/spaces/simple_avx.rs:197-202 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) crates/db/src/index_lifecycle/text/driver.rs:957 — crates/db/src/index_lifecycle/text/driver.rs:957-962 | crates/db/src/index_lifecycle/text/driver.rs:1191-1196 | crates/db/src/index_lifecycle/text/driver.rs:1587-1593 | crates/db/src/index_lifecycle/text/driver.rs:1866-1871 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×2
  • Duplicated block (10 lines × 5) crates/db/src/migrations/mod.rs:6181 — crates/db/src/migrations/mod.rs:6181-6190 | crates/db/src/migrations/mod.rs:6529-6538 | crates/db/src/migrations/mod.rs:6751-6760 | crates/db/src/migrations/mod.rs:7151-7160 | crates/db/src/migrations/mod.rs:8483-8492 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 5) crates/db/src/migrations/vector_retirement.rs:363 — crates/db/src/migrations/vector_retirement.rs:363-372 | crates/db/src/migrations/vector_retirement.rs:490-499 | crates/db/src/migrations/vector_retirement.rs:620-629 | crates/db/src/migrations/vector_retirement.rs:735-744 | crates/db/src/migrations/vector_retirement.rs:892-901 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
R10 · Code Duplication · Duplicated block with local edits (42 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (42 matched lines × 2 locations) sdks/typescript/scripts/parity/compare-json.ts:33 — sdks/typescript/scripts/parity/compare-json.ts:33 · sdks/typescript/scripts/parity/run-helix.ts:251 — the two spans are one implementation copied and then locally edited — 414 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (42 matched lines × 2 locations) sdks/typescript/scripts/parity/run-embedded-client.ts:85 — sdks/typescript/scripts/parity/run-embedded-client.ts:85 · sdks/typescript/scripts/parity/run-helix.ts:172 — the two spans are one implementation copied and then locally edited — 456 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
D1 · Cyclomatic Complexity · Cursor · ×1
  • Cursor::next (cyclomatic 92) crates/db/src/execution/interpreter/pull/poll.rs:5 — Cursor::next has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent 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 · Step.ToAST (cyclomatic 64) · ×1
  • Step.ToAST (cyclomatic 64) REDACTED:1445 — Step.ToAST has cyclomatic complexity 64 (threshold 15). Of this number, 63 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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 · Step.to_ast (cyclomatic 54) · ×1
  • Step.to_ast (cyclomatic 54) sdks/python/src/helixdb/dsl.py:2312 — Step.to_ast has cyclomatic complexity 54 (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 · validate-cargo-target-references.validate_codec_architecture (cyclomatic 48) · ×1
  • validate-cargo-target-references.validate_codec_architecture (cyclomatic 48) scripts/validate-cargo-target-references.py:491 — validate-cargo-target-references.validate_codec_architecture has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent 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 · RuleApplicability · ×1
  • RuleApplicability::matches (cyclomatic 45) crates/planner/src/rules/contracts/applicability/matching.rs:12 — RuleApplicability::matches has cyclomatic complexity 45 (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 · helix.PropertyValueOf (cyclomatic 44) · ×1
  • helix.PropertyValueOf (cyclomatic 44) REDACTED:215 — helix.PropertyValueOf has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function taking that case's concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases — they stay explicit and reviewable.
D1 · Cyclomatic Complexity · image_archive.inspect_archive (cyclomatic 40) · ×1
  • image_archive.inspect_archive (cyclomatic 40) docker-image/image_archive.py:162 — image_archive.inspect_archive has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent 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 · PreparedTextOperationStep · ×1
  • PreparedTextOperationStep::stage (cyclomatic 34) crates/db/src/index_lifecycle/text/driver.rs:508 — PreparedTextOperationStep::stage has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VectorKey · ×1
  • VectorKey::parse_from_slice (cyclomatic 31) crates/db/src/encoding/v2/keys/indexes/vector/mod.rs:232 — VectorKey::parse_from_slice has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · StorageCostProfileOverrides · ×1
  • StorageCostProfileOverrides::apply_to (cyclomatic 30) crates/planner/src/cost/profile/overrides.rs:66 — StorageCostProfileOverrides::apply_to has cyclomatic complexity 30 (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 · graph._decode_tagged_identity (cyclomatic 28) · ×1
  • graph._decode_tagged_identity (cyclomatic 28) sdks/python/src/helixdb/graph.py:1009 — graph._decode_tagged_identity has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Client.Exec (cyclomatic 28) · ×1
  • Client.Exec (cyclomatic 28) sdks/go/client.go:273 — Client.Exec has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · helix.normalizeTypedQueryValue (cyclomatic 27) · ×1
  • helix.normalizeTypedQueryValue (cyclomatic 27) REDACTED:2994 — helix.normalizeTypedQueryValue 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 · GraphSelection.request (cyclomatic 25) · ×1
  • GraphSelection.request (cyclomatic 25) sdks/go/graph.go:49 — GraphSelection.request has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to one function literal 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 · Analyzer · ×1
  • Analyzer::analyze_access_leaf (cyclomatic 23) crates/planner/src/diagnostics/analyze.rs:304 — Analyzer::analyze_access_leaf has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HelixError.remote (cyclomatic 23) · ×1
  • HelixError.remote (cyclomatic 23) sdks/typescript/src/index.ts:72 — HelixError.remote 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.
D1 · Cyclomatic Complexity · OracleState · ×1
  • OracleState::read_indexed (cyclomatic 22) crates/db-testkit/src/model.rs:653 — OracleState::read_indexed 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 · dsl.convertParamValue (cyclomatic 22) · ×1
  • dsl.convertParamValue (cyclomatic 22) sdks/typescript/src/dsl.ts:2902 — dsl.convertParamValue 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. This is NOT this file's highest cyclomatic complexity: Step.toAst (cyclomatic 86) 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 method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · dsl.normalizeTypedQueryValue (cyclomatic 22) · ×1
  • dsl.normalizeTypedQueryValue (cyclomatic 22) sdks/typescript/src/dsl.ts:2966 — dsl.normalizeTypedQueryValue 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. This is NOT this file's highest cyclomatic complexity: Step.toAst (cyclomatic 86) 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 method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Branch · ×1
  • Branch::next (cyclomatic 21) crates/db/src/execution/interpreter/pull/branch.rs:30 — Branch::next 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 · PropertyValue.from_value (cyclomatic 21) · ×1
  • PropertyValue.from_value (cyclomatic 21) sdks/python/src/helixdb/dsl.py:375 — PropertyValue.from_value has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dsl._convert_param_value (cyclomatic 21) · ×1
  • dsl._convert_param_value (cyclomatic 21) sdks/python/src/helixdb/dsl.py:3698 — dsl._convert_param_value has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · helix.UnmarshalIndexOperationStatus (cyclomatic 21) · ×1
  • helix.UnmarshalIndexOperationStatus (cyclomatic 21) REDACTED:1252 — helix.UnmarshalIndexOperationStatus has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ExternalId · ×1
  • ExternalId::from_tagged_value (cyclomatic 20) crates/graph-algorithms/src/identity.rs:91 — ExternalId::from_tagged_value 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 · helix.UnmarshalIndexDdlReceipt (cyclomatic 20) · ×1
  • helix.UnmarshalIndexDdlReceipt (cyclomatic 20) REDACTED:1147 — helix.UnmarshalIndexDdlReceipt has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function literal 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 · PropertyValue.from (cyclomatic 20) · ×1
  • PropertyValue.from (cyclomatic 20) sdks/typescript/src/dsl.ts:405 — PropertyValue.from 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. This is NOT this file's highest cyclomatic complexity: Step.toAst (cyclomatic 86) 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 method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · run_embedded_parity.main (cyclomatic 19) · ×1
  • run_embedded_parity.main (cyclomatic 19) sdks/python/scripts/run_embedded_parity.py:50 — run_embedded_parity.main 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 · Predicate.to_json (cyclomatic 19) · ×1
  • Predicate.to_json (cyclomatic 19) sdks/python/src/helixdb/dsl.py:931 — Predicate.to_json has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Repeat · ×1
  • Repeat::next (cyclomatic 18) crates/db/src/execution/interpreter/pull/repeat.rs:50 — Repeat::next 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 · image_archive.scan_archive_for_secrets (cyclomatic 18) · ×1
  • image_archive.scan_archive_for_secrets (cyclomatic 18) docker-image/image_archive.py:323 — image_archive.scan_archive_for_secrets 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 · dsl._normalize_typed_query_value (cyclomatic 18) · ×1
  • dsl._normalize_typed_query_value (cyclomatic 18) sdks/python/src/helixdb/dsl.py:3837 — dsl._normalize_typed_query_value 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 · IndexPrefix · ×1
  • IndexPrefix::from_slice (cyclomatic 17) crates/db/src/encoding/v2/keys/indexes/prefix.rs:69 — IndexPrefix::from_slice has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HelixDB · ×1
  • HelixDB::close (cyclomatic 17) crates/db/src/lib.rs:2196 — HelixDB::close 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 · VectorMemoryStore · ×1
  • VectorMemoryStore::load_from_read_inner (cyclomatic 17) crates/db/src/search/vector/cache/store.rs:764 — VectorMemoryStore::load_from_read_inner 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 · ExecPullCapability · ×1
  • ExecPullCapability::of (cyclomatic 17) crates/planner/src/exec/pull/mod.rs:22 — ExecPullCapability::of has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ExecProgram · ×1
  • ExecProgram::derive (cyclomatic 17) crates/planner/src/exec/pull/mod.rs:153 — ExecProgram::derive 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 · HelixConfig · ×1
  • HelixConfig::validate (cyclomatic 16) crates/cli/src/config.rs:551 — HelixConfig::validate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OrderedRangeCursor · ×1
  • OrderedRangeCursor::next (cyclomatic 16) crates/db/src/index_lifecycle/secondary/exact/ordered.rs:417 — OrderedRangeCursor::next 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 · run_embedded_parity.async_main (cyclomatic 16) · ×1
  • run_embedded_parity.async_main (cyclomatic 16) sdks/python/scripts/run_embedded_parity.py:160 — run_embedded_parity.async_main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dsl.parse_index_operation_status (cyclomatic 16) · ×1
  • dsl.parse_index_operation_status (cyclomatic 16) sdks/python/src/helixdb/dsl.py:1673 — dsl.parse_index_operation_status has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GraphSelection.__post_init__ (cyclomatic 16) · ×1
  • GraphSelection.__post_init__ (cyclomatic 16) sdks/python/src/helixdb/graph.py:138 — GraphSelection.__post_init__ has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BatchCondition.UnmarshalJSON (cyclomatic 16) · ×1
  • BatchCondition.UnmarshalJSON (cyclomatic 16) REDACTED:2120 — BatchCondition.UnmarshalJSON 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. This is NOT this file's highest cyclomatic complexity: Predicate.ast (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.
D1 · Cyclomatic Complexity · dsl.stringifyEncoded (cyclomatic 16) · ×1
  • dsl.stringifyEncoded (cyclomatic 16) sdks/typescript/src/dsl.ts:160 — dsl.stringifyEncoded has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Step.toAst (cyclomatic 86) 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 method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · dsl.parseIndexOperationStatus (cyclomatic 16) · ×1
  • dsl.parseIndexOperationStatus (cyclomatic 16) sdks/typescript/src/dsl.ts:1302 — dsl.parseIndexOperationStatus has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Step.toAst (cyclomatic 86) 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 method is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · Cursor · ×1
  • Cursor::next (cognitive 207) crates/db/src/execution/interpreter/pull/poll.rs:5 — Cursor::next has cognitive complexity 207 (threshold 15). Drivers by points: if/else 49 (156 pts), match/switch 11 (30 pts), loops 6 (19 pts), boolean chains 2 (nesting depth added 139). To reduce it, split the body into named stages: move each independent 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 · validate-cargo-target-references.validate_codec_architecture (cognitive 77) · ×1
  • validate-cargo-target-references.validate_codec_architecture (cognitive 77) scripts/validate-cargo-target-references.py:491 — validate-cargo-target-references.validate_codec_architecture has cognitive complexity 77 (threshold 15). Drivers by points: if/else 19 (42 pts), loops 20 (27 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · PreparedTextOperationStep · ×1
  • PreparedTextOperationStep::stage (cognitive 58) crates/db/src/index_lifecycle/text/driver.rs:508 — PreparedTextOperationStep::stage has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 6 (12 pts), match/switch 5 (8 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · Step.to_ast (cognitive 56) · ×1
  • Step.to_ast (cognitive 56) sdks/python/src/helixdb/dsl.py:2312 — Step.to_ast has cognitive complexity 56 (threshold 15). Drivers by points: if/else 50, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · image_archive.inspect_archive (cognitive 52) · ×1
  • image_archive.inspect_archive (cognitive 52) docker-image/image_archive.py:162 — image_archive.inspect_archive has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26 (37 pts), boolean chains 7, loops 5 (6 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 · Source · ×1
  • Source::next (cognitive 39) crates/db/src/execution/interpreter/pull/source.rs:452 — Source::next has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (28 pts), match/switch 4 (10 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 · Branch · ×1
  • Branch::next (cognitive 38) crates/db/src/execution/interpreter/pull/branch.rs:30 — Branch::next has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (5 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Repeat · ×1
  • Repeat::next (cognitive 38) crates/db/src/execution/interpreter/pull/repeat.rs:50 — Repeat::next has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 2 (5 pts), match/switch 1 (2 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 · image_archive.scan_archive_for_secrets (cognitive 38) · ×1
  • image_archive.scan_archive_for_secrets (cognitive 38) docker-image/image_archive.py:323 — image_archive.scan_archive_for_secrets has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 6 (11 pts), error handling 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 · generate-llms.build (cognitive 35) · ×1
  • generate-llms.build (cognitive 35) docs/scripts/generate-llms.mjs:116 — generate-llms.build has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 6 (10 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_embedded_parity.main (cognitive 34) · ×1
  • run_embedded_parity.main (cognitive 34) sdks/python/scripts/run_embedded_parity.py:50 — run_embedded_parity.main has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (8 pts), error handling 2 (5 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · helix.PropertyValueOf (cognitive 34) · ×1
  • helix.PropertyValueOf (cognitive 34) REDACTED:215 — helix.PropertyValueOf has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 6 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 19). 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 · OrderedRangeCursor · ×1
  • OrderedRangeCursor::next (cognitive 33) crates/db/src/index_lifecycle/secondary/exact/ordered.rs:417 — OrderedRangeCursor::next has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuleApplicability · ×1
  • RuleApplicability::matches (cognitive 33) crates/planner/src/rules/contracts/applicability/matching.rs:12 — RuleApplicability::matches has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 22 (33 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Client.Exec (cognitive 33) · ×1
  • Client.Exec (cognitive 33) sdks/go/client.go:273 — Client.Exec has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VectorMemoryStore · ×1
  • VectorMemoryStore::load_from_read_inner (cognitive 32) crates/db/src/search/vector/cache/store.rs:764 — VectorMemoryStore::load_from_read_inner has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 5 (14 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleState · ×1
  • OracleState::read_indexed (cognitive 32) crates/db-testkit/src/model.rs:653 — OracleState::read_indexed has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 3 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExecProgram · ×1
  • ExecProgram::derive (cognitive 32) crates/planner/src/exec/pull/mod.rs:153 — ExecProgram::derive has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graph._decode_tagged_identity (cognitive 31) · ×1
  • graph._decode_tagged_identity (cognitive 31) sdks/python/src/helixdb/graph.py:1009 — graph._decode_tagged_identity has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 10, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · StorageCostProfileOverrides · ×1
  • StorageCostProfileOverrides::apply_to (cognitive 29) crates/planner/src/cost/profile/overrides.rs:66 — StorageCostProfileOverrides::apply_to has cognitive complexity 29 (threshold 15). Drivers by points: if/else 29. 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 · helix.normalizeTypedQueryValue (cognitive 29) · ×1
  • helix.normalizeTypedQueryValue (cognitive 29) REDACTED:2994 — helix.normalizeTypedQueryValue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · BatchCondition.UnmarshalJSON (cognitive 29) · ×1
  • BatchCondition.UnmarshalJSON (cognitive 29) REDACTED:2120 — BatchCondition.UnmarshalJSON has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (26 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dsl.quoteUnsafeIntegerTokens (cognitive 28) · ×1
  • dsl.quoteUnsafeIntegerTokens (cognitive 28) sdks/typescript/src/dsl.ts:97 — dsl.quoteUnsafeIntegerTokens has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HelixError.remote (cognitive 28) · ×1
  • HelixError.remote (cognitive 28) sdks/typescript/src/index.ts:72 — HelixError.remote has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, ternaries 4 (8 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExecutableDagBuilder · ×1
  • ExecutableDagBuilder::push_selected_range_pipeline (cognitive 27) crates/planner/src/exec/selected/lowering/access/stream/pipeline.rs:121 — ExecutableDagBuilder::push_selected_range_pipeline has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (5 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphSelection.request (cognitive 27) · ×1
  • GraphSelection.request (cognitive 27) sdks/go/graph.go:49 — GraphSelection.request has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, loops 3, match/switch 1 (nesting depth added 4). Of this number, 23 points are the body's own statements and 4 belong to one function literal 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.
D2 · Cognitive Complexity · LegacyVectorRetirementCatalog · ×1
  • LegacyVectorRetirementCatalog::load (cognitive 26) crates/db/src/migrations/vector_retirement.rs:67 — LegacyVectorRetirementCatalog::load has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2, 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 · helix.UnmarshalIndexDdlReceipt (cognitive 26) · ×1
  • helix.UnmarshalIndexDdlReceipt (cognitive 26) REDACTED:1147 — helix.UnmarshalIndexDdlReceipt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (25 pts), match/switch 1 (nesting depth added 9). Of this number, 22 points are the body's own statements and 4 belong to one function literal 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.
D2 · Cognitive Complexity · Step.ToAST (cognitive 26) · ×1
  • Step.ToAST (cognitive 26) REDACTED:1445 — Step.ToAST has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (nesting depth added 12). Of this number, 25 points are the body's own statements and 1 belongs to one function literal 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.
D2 · Cognitive Complexity · RangeScan · ×1
  • RangeScan::resolve_group (cognitive 25) crates/db/src/index_lifecycle/secondary/exact/ordered.rs:116 — RangeScan::resolve_group has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · helix_graph_algorithms · ×1
  • helix_graph_algorithms::algorithms::leiden::refine_connected (cognitive 25) crates/graph-algorithms/src/algorithms/leiden.rs:164 — helix_graph_algorithms::algorithms::leiden::refine_connected has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_embedded_parity.async_main (cognitive 25) · ×1
  • run_embedded_parity.async_main (cognitive 25) sdks/python/scripts/run_embedded_parity.py:160 — run_embedded_parity.async_main has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dsl._convert_param_value (cognitive 25) · ×1
  • dsl._convert_param_value (cognitive 25) sdks/python/src/helixdb/dsl.py:3698 — dsl._convert_param_value has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RowValueResolver · ×1
  • RowValueResolver::row_property (cognitive 24) crates/db/src/execution/interpreter/stream/eval/property.rs:30 — RowValueResolver::row_property has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), 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.
D2 · Cognitive Complexity · SecondaryMutationRuntime · ×1
  • SecondaryMutationRuntime::flush (cognitive 24) crates/db/src/index_lifecycle/secondary.rs:370 — SecondaryMutationRuntime::flush has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate-llms-full.build (cognitive 24) · ×1
  • generate-llms-full.build (cognitive 24) docs/scripts/generate-llms-full.mjs:94 — generate-llms-full.build has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (9 pts), ternaries 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VectorKey · ×1
  • VectorKey::parse_from_slice (cognitive 23) crates/db/src/encoding/v2/keys/indexes/vector/mod.rs:232 — VectorKey::parse_from_slice has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 5 (10 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 · Runner · ×1
  • Runner::validate_invariants (cognitive 23) crates/db-testkit/src/lifecycle_workload.rs:905 — Runner::validate_invariants has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 3, 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.
D2 · Cognitive Complexity · PropertyValue.from_value (cognitive 23) · ×1
  • PropertyValue.from_value (cognitive 23) sdks/python/src/helixdb/dsl.py:375 — PropertyValue.from_value has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dsl._normalize_typed_query_value (cognitive 23) · ×1
  • dsl._normalize_typed_query_value (cognitive 23) sdks/python/src/helixdb/dsl.py:3837 — dsl._normalize_typed_query_value has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PropertyValue.from (cognitive 23) · ×1
  • PropertyValue.from (cognitive 23) sdks/typescript/src/dsl.ts:405 — PropertyValue.from has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 1 (2 pts), boolean chains 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 · GraphModel · ×1
  • GraphModel::apply_inner (cognitive 22) crates/db-testkit/src/model.rs:179 — GraphModel::apply_inner has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ReplayTrace · ×1
  • ReplayTrace::validate (cognitive 22) crates/db-testkit/src/trace.rs:213 — ReplayTrace::validate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (2 pts), boolean chains 1, 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 · LevelGraph · ×1
  • LevelGraph::local_move_observed (cognitive 22) crates/graph-algorithms/src/algorithms/louvain.rs:158 — LevelGraph::local_move_observed has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-cargo-target-references.validate_references (cognitive 22) · ×1
  • validate-cargo-target-references.validate_references (cognitive 22) scripts/validate-cargo-target-references.py:303 — validate-cargo-target-references.validate_references has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NormalizedPlannerCase · ×1
  • NormalizedPlannerCase::complete (cognitive 21) crates/db-testkit/src/planner_domain.rs:400 — NormalizedPlannerCase::complete has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · helix_metrics · ×1
  • helix_metrics::cli::spool::cleanup_obsolete (cognitive 21) crates/metrics/src/cli/spool.rs:95 — helix_metrics::cli::spool::cleanup_obsolete has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-cargo-target-references.referenced_test_filters (cognitive 21) · ×1
  • validate-cargo-target-references.referenced_test_filters (cognitive 21) scripts/validate-cargo-target-references.py:383 — validate-cargo-target-references.referenced_test_filters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dsl.convertParamValue (cognitive 21) · ×1
  • dsl.convertParamValue (cognitive 21) sdks/typescript/src/dsl.ts:2902 — dsl.convertParamValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (5 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PropertyIndexKey · ×1
  • PropertyIndexKey::encoded_len (cognitive 19) crates/db/src/encoding/v2/keys/indexes/property.rs:204 — PropertyIndexKey::encoded_len has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (7 pts) (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.
D2 · Cognitive Complexity · GraphSelection.__post_init__ (cognitive 19) · ×1
  • GraphSelection.__post_init__ (cognitive 19) sdks/python/src/helixdb/graph.py:138 — GraphSelection.__post_init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 2, 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 · dsl.stringifyEncoded (cognitive 19) · ×1
  • dsl.stringifyEncoded (cognitive 19) sdks/typescript/src/dsl.ts:160 — dsl.stringifyEncoded has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 4 (5 pts) (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 · dsl.normalizeTypedQueryValue (cognitive 19) · ×1
  • dsl.normalizeTypedQueryValue (cognitive 19) sdks/typescript/src/dsl.ts:2966 — dsl.normalizeTypedQueryValue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · SimHasherRegistry · ×1
  • SimHasherRegistry::get (cognitive 18) crates/db/src/search/vector/simhash/registry.rs:159 — SimHasherRegistry::get has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExecPullCapability · ×1
  • ExecPullCapability::of (cognitive 18) crates/planner/src/exec/pull/mod.rs:22 — ExecPullCapability::of has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 4 (6 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Predicate.to_json (cognitive 18) · ×1
  • Predicate.to_json (cognitive 18) sdks/python/src/helixdb/dsl.py:931 — Predicate.to_json has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. 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 · HelixConfig · ×1
  • HelixConfig::validate (cognitive 17) crates/cli/src/config.rs:551 — HelixConfig::validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2, match/switch 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 · MutationRouteCatalog · ×1
  • MutationRouteCatalog::targets_for (cognitive 17) crates/db/src/index_lifecycle/mutation_catalog.rs:182 — MutationRouteCatalog::targets_for has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), loops 1 (2 pts) (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.
D2 · Cognitive Complexity · EdgeMergeOperator · ×1
  • EdgeMergeOperator::merge_batch (cognitive 17) crates/db/src/needed_in_future/merge_operator.rs:229 — EdgeMergeOperator::merge_batch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FtsCache · ×1
  • FtsCache::cleanup_disk (cognitive 17) crates/db/src/search/text/cache.rs:913 — FtsCache::cleanup_disk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Memo · ×1
  • Memo::from_groups (cognitive 17) crates/planner/src/memo/store/serialization.rs:12 — Memo::from_groups has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dsl.parse_index_operation_status (cognitive 17) · ×1
  • dsl.parse_index_operation_status (cognitive 17) sdks/python/src/helixdb/dsl.py:1673 — dsl.parse_index_operation_status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · QueryExecutionRequest.execute (cognitive 17) · ×1
  • QueryExecutionRequest.execute (cognitive 17) sdks/typescript/src/index.ts:394 — QueryExecutionRequest.execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), error handling 4 (5 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EdgeRangeIndexKey · ×1
  • EdgeRangeIndexKey::parse_from_slice (cognitive 16) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:128 — EdgeRangeIndexKey::parse_from_slice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), 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. This shape REPEATS in the file: one other method here (GlobalEdgeRangeIndexKey::parse_from_slice) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · GlobalEdgeRangeIndexKey · ×1
  • GlobalEdgeRangeIndexKey::parse_from_slice (cognitive 16) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:341 — GlobalEdgeRangeIndexKey::parse_from_slice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), 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. This shape REPEATS in the file: one other method here (EdgeRangeIndexKey::parse_from_slice) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · MutationIndexCatalog · ×1
  • MutationIndexCatalog::load (cognitive 16) crates/db/src/index_lifecycle/mutation_catalog.rs:310 — MutationIndexCatalog::load has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Catalog.add_metadata (cognitive 16) · ×1
  • Catalog.add_metadata (cognitive 16) scripts/validate-cargo-target-references.py:169 — Catalog.add_metadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 1 (4 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium CVE · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (6 members, 24 shared lines) · ×1
  • Near-duplicate member family (6 members, 24 shared lines) crates/db/src/migrations/vector_properties.rs:144 — crates/db/src/migrations/vector_properties.rs:144-300 | crates/db/src/migrations/vector_retirement.rs:252-403 | crates/db/src/migrations/vector_retirement.rs:412-530 | crates/db/src/migrations/vector_retirement.rs:538-664 | crates/db/src/migrations/vector_retirement.rs:673-775 | crates/db/src/migrations/vector_retirement.rs:784-934 — These 6 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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 · Near-duplicate member family (4 members, 32 shared lines) · ×1
  • Near-duplicate member family (4 members, 32 shared lines) crates/db/src/migrations/vector_retirement.rs:252 — crates/db/src/migrations/vector_retirement.rs:252-403 | crates/db/src/migrations/vector_retirement.rs:412-530 | crates/db/src/migrations/vector_retirement.rs:538-664 | crates/db/src/migrations/vector_retirement.rs:784-934 — These 4 members are variants of one another: a block of 32 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 (60 shared lines) · ×1
  • Near-duplicate member pair (60 shared lines) crates/db/src/index_lifecycle_testing.rs:1215 — crates/db/src/index_lifecycle_testing.rs:1215-1327 | crates/db/src/index_lifecycle_testing.rs:1341-1512 — These two members are variants of one another: 60 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 · Near-duplicate member pair (54 shared lines) · ×1
  • Near-duplicate member pair (54 shared lines) crates/db/src/index_lifecycle/text/validation.rs:248 — crates/db/src/index_lifecycle/text/validation.rs:248-498 | crates/db/src/index_lifecycle/text/validation.rs:702-942 — These two members are variants of one another: 54 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 · Near-duplicate member pair (50 shared lines) · ×1
  • Near-duplicate member pair (50 shared lines) crates/db/src/execution/interpreter/access/indexes.rs:138 — crates/db/src/execution/interpreter/access/indexes.rs:138-203 | crates/db/src/execution/interpreter/access/indexes.rs:212-277 — These two members are variants of one another: 50 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (43 shared lines) · ×1
  • Near-duplicate member pair (43 shared lines) crates/planner/src/rules/cardinality.rs:1200 — crates/planner/src/rules/cardinality.rs:1200-1271 | crates/planner/src/rules/cardinality.rs:1277-1348 — These two members are variants of one another: 43 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 · Near-duplicate member pair (34 shared lines) · ×1
  • Near-duplicate member pair (34 shared lines) crates/db/src/search/mod.rs:1590 — crates/db/src/search/mod.rs:1590-1630 | crates/db/src/search/mod.rs:1661-1701 — These two members are variants of one another: 34 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 · Near-duplicate member pair (33 shared lines) · ×1
  • Near-duplicate member pair (33 shared lines) crates/planner/src/exec/access/edge.rs:242 — crates/planner/src/exec/access/edge.rs:242-291 | crates/planner/src/exec/access/node.rs:295-351 — These two members are variants of one another: 33 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) crates/db/src/index_lifecycle/text/statistics.rs:311 — crates/db/src/index_lifecycle/text/statistics.rs:311-336 | crates/db/src/index_lifecycle/text/statistics.rs:281-306 — 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 · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (11 members, 50+ identical tokens) crates/db/src/encoding/v2/keys/graph.rs:30 — crates/db/src/encoding/v2/keys/graph.rs:30-57 | crates/db/src/encoding/v2/keys/graph.rs:101-128 | crates/db/src/encoding/v2/keys/graph.rs:172-202 | crates/db/src/encoding/v2/keys/graph.rs:252-279 | crates/db/src/encoding/v2/keys/graph.rs:322-349 | crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:103-182 | crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:249-293 | crates/db/src/encoding/v2/keys/indexes/equality/node.rs:58-107 | crates/db/src/encoding/v2/keys/indexes/label.rs:39-79 | crates/db/src/encoding/v2/keys/indexes/label.rs:142-195 | crates/db/src/encoding/v2/legacy/edge_property_pair.rs:25-53 — These 11 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 11 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 11 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) crates/db/src/search/vector/spaces/simple_avx.rs:15 — crates/db/src/search/vector/spaces/simple_avx.rs:15-67 | crates/db/src/search/vector/spaces/simple_avx.rs:70-124 | crates/db/src/search/vector/spaces/simple_avx.rs:128-180 | crates/db/src/search/vector/spaces/simple_avx.rs:184-238 | crates/db/src/search/vector/spaces/simple_neon.rs:10-52 | crates/db/src/search/vector/spaces/simple_neon.rs:56-89 | crates/db/src/search/vector/spaces/simple_sse.rs:17-66 | crates/db/src/search/vector/spaces/simple_sse.rs:69-123 — 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 · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) crates/planner/src/planning/envelope/write_contract.rs:78 — crates/planner/src/planning/envelope/write_contract.rs:78-109 | crates/planner/src/planning/selected/native/context_usage.rs:79-110 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) crates/db/src/search/vector/hnsw/mutation/mod.rs:558 — crates/db/src/search/vector/hnsw/mutation/mod.rs:558-587 | crates/db/src/search/vector/hnsw/mutation/mod.rs:618-647 — both copies are in the same file, so extract the 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 (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) crates/cli/src/local_runtime.rs:329 — crates/cli/src/local_runtime.rs:329-357 | crates/cli/src/local_runtime.rs:379-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) crates/db/src/index_lifecycle/repository.rs:200 — crates/db/src/index_lifecycle/repository.rs:200-228 | crates/db/src/migrations/startup/bootstrap.rs:273-301 — before extracting anything, compare `crates/db/src/index_lifecycle/repository.rs` and `crates/db/src/migrations/startup/bootstrap.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) crates/db/src/migrations/vector_scale.rs:436 — crates/db/src/migrations/vector_scale.rs:436-463 | crates/db/src/migrations/vector_scale.rs:583-610 — both copies are in the same file, so extract the 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 (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) crates/db/src/index_lifecycle/text/driver.rs:1078 — crates/db/src/index_lifecycle/text/driver.rs:1078-1104 | crates/db/src/index_lifecycle/text/driver.rs:1379-1405 — both copies are in the same file, so extract the 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 (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) crates/db/src/search/text/mod.rs:1096 — crates/db/src/search/text/mod.rs:1096-1120 | crates/db/src/search/text/mod.rs:1126-1150 — both copies are in the same file, so extract the 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 (22–24 lines × 2) · ×1
  • Duplicated block (22–24 lines × 2) crates/db/src/index_lifecycle_testing.rs:289 — crates/db/src/index_lifecycle_testing.rs:289-310 | crates/db/src/index_lifecycle_testing.rs:834-857 — both copies are in the same file, so extract the 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 (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) crates/db/src/search/vector/hnsw/search.rs:394 — crates/db/src/search/vector/hnsw/search.rs:394-413 | crates/db/src/search/vector/hnsw/search.rs:437-459 — both copies are in the same file, so extract the 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 (21 lines × 4) · ×1
  • Duplicated block (21 lines × 4) crates/db/src/execution/interpreter/mutation/edge.rs:244 — crates/db/src/execution/interpreter/mutation/edge.rs:244-264 | crates/db/src/execution/interpreter/mutation/edge.rs:317-337 | crates/db/src/execution/interpreter/mutation/node.rs:190-210 | crates/db/src/execution/interpreter/mutation/node.rs:274-294 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (17–21 lines × 3) · ×1
  • Duplicated block (17–21 lines × 3) crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:108 — crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:108-128 | crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:251-267 | crates/db/src/encoding/v2/keys/indexes/equality/node.rs:60-78 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/equality/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/equality/node.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) crates/planner/src/planning/index_ddl/create.rs:18 — crates/planner/src/planning/index_ddl/create.rs:18-37 | crates/planner/src/planning/index_ddl/drop.rs:16-33 — 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.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) crates/db/src/migrations/mod.rs:6171 — crates/db/src/migrations/mod.rs:6171-6189 | crates/db/src/migrations/mod.rs:6741-6759 | crates/db/src/migrations/mod.rs:6869-6887 | crates/db/src/migrations/mod.rs:7141-7159 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:17 — crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:17-35 | crates/db/src/encoding/v2/keys/indexes/vector/items.rs:17-34 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:17-34 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs` and `crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×1
  • Duplicated block (16–19 lines × 2) crates/db/src/encoding/v2/keys/indexes/vector/items.rs:29 — crates/db/src/encoding/v2/keys/indexes/vector/items.rs:29-44 | crates/db/src/encoding/v2/keys/indexes/vector/items.rs:93-111 — both copies are in the same file, so extract the 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 (12–18 lines × 2) · ×1
  • Duplicated block (12–18 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:3125 — crates/db/src/index_lifecycle_testing/contracts.rs:3125-3136 | crates/db/src/index_lifecycle_testing/contracts.rs:3151-3168 — both copies are in the same file, so extract the 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 (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:279 — crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:279-293 | crates/db/src/encoding/v2/keys/indexes/equality/node.rs:91-107 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/equality/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/equality/node.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 5) · ×1
  • Duplicated block (15–16 lines × 5) crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:109 — crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:109-124 | crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:251-265 | crates/db/src/encoding/v2/keys/indexes/equality/node.rs:60-74 | crates/db/src/encoding/v2/keys/indexes/label.rs:41-55 | crates/db/src/encoding/v2/keys/indexes/label.rs:147-162 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/equality/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/equality/node.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–16 lines × 4) · ×1
  • Duplicated block (13–16 lines × 4) crates/db/src/search/vector/spaces/simple_avx.rs:49 — crates/db/src/search/vector/spaces/simple_avx.rs:49-61 | crates/db/src/search/vector/spaces/simple_avx.rs:104-119 | crates/db/src/search/vector/spaces/simple_avx.rs:162-174 | crates/db/src/search/vector/spaces/simple_avx.rs:218-233 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) crates/db/src/search/vector/hnsw/index.rs:1397 — crates/db/src/search/vector/hnsw/index.rs:1397-1409 | crates/db/src/search/vector/hnsw/index.rs:1464-1479 — both copies are in the same file, so extract the 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 (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:169 — crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:169-183 | crates/db/src/encoding/v2/keys/indexes/vector/layer0.rs:18-32 | crates/db/src/encoding/v2/keys/indexes/vector/reverse_edges.rs:21-35 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:163-177 | crates/db/src/encoding/v2/keys/indexes/vector/upper_layers.rs:107-121 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs` and `crates/db/src/encoding/v2/keys/indexes/vector/layer0.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) crates/db/src/encoding/v2/keys/graph.rs:33 — crates/db/src/encoding/v2/keys/graph.rs:33-46 | crates/db/src/encoding/v2/keys/graph.rs:104-117 | crates/db/src/encoding/v2/keys/graph.rs:175-188 | crates/db/src/encoding/v2/keys/graph.rs:255-268 | crates/db/src/encoding/v2/keys/graph.rs:325-338 | crates/db/src/encoding/v2/legacy/edge_property_pair.rs:28-41 — before extracting anything, compare `crates/db/src/encoding/v2/keys/graph.rs` and `crates/db/src/encoding/v2/legacy/edge_property_pair.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) crates/db/src/migrations/mod.rs:6540 — crates/db/src/migrations/mod.rs:6540-6553 | crates/db/src/migrations/mod.rs:6761-6774 | crates/db/src/migrations/mod.rs:6890-6903 | crates/db/src/migrations/mod.rs:8284-8297 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) crates/db/src/search/vector/hnsw/index.rs:1108 — crates/db/src/search/vector/hnsw/index.rs:1108-1120 | crates/db/src/search/vector/hnsw/index.rs:1182-1195 — both copies are in the same file, so extract the 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 (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) crates/db/src/search/vector/storage/mod.rs:1417 — crates/db/src/search/vector/storage/mod.rs:1417-1426 | crates/db/src/search/vector/storage/mod.rs:1468-1480 — both copies are in the same file, so extract the 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 (11–12 lines × 5) · ×1
  • Duplicated block (11–12 lines × 5) crates/planner/src/analysis/index_atoms/equality.rs:37 — crates/planner/src/analysis/index_atoms/equality.rs:37-48 | crates/planner/src/analysis/labels.rs:98-109 | crates/planner/src/analysis/labels.rs:129-140 | crates/planner/src/analysis/prune.rs:62-72 | crates/planner/src/rules/access/filter/index/label_domain.rs:221-232 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) crates/db/src/index_lifecycle/secondary.rs:1031 — crates/db/src/index_lifecycle/secondary.rs:1031-1041 | crates/db/src/index_lifecycle/text/driver.rs:3004-3015 | crates/db/src/index_lifecycle/vector/driver.rs:2114-2124 — before extracting anything, compare `crates/db/src/index_lifecycle/secondary.rs` and `crates/db/src/index_lifecycle/text/driver.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–11 lines × 5) · ×1
  • Duplicated block (10–11 lines × 5) crates/planner/src/rules/access/sets/canonical/node.rs:12 — crates/planner/src/rules/access/sets/canonical/node.rs:12-21 | crates/planner/src/rules/access/sets/canonical/node.rs:62-72 | crates/planner/src/rules/access/sets/canonical/node.rs:82-92 | crates/planner/src/rules/cardinality.rs:1047-1056 | crates/planner/src/rules/physical_contracts/access/source/node.rs:19-28 — 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.
D4 · Code Duplication · Duplicated block (9–11 lines × 4) · ×1
  • Duplicated block (9–11 lines × 4) crates/db/src/search/mod.rs:1262 — crates/db/src/search/mod.rs:1262-1272 | crates/db/src/search/mod.rs:1291-1301 | crates/db/src/search/mod.rs:1335-1343 | crates/db/src/search/mod.rs:1400-1408 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) crates/planner/src/rules/access/sets/canonical/edge.rs:12 — crates/planner/src/rules/access/sets/canonical/edge.rs:12-21 | crates/planner/src/rules/access/sets/canonical/edge.rs:62-72 | crates/planner/src/rules/access/sets/canonical/edge.rs:82-92 | crates/planner/src/rules/physical_contracts/access/source/edge.rs:19-28 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) crates/db/src/encoding/v2/keys/indexes/range/edge.rs:342 — crates/db/src/encoding/v2/keys/indexes/range/edge.rs:342-350 | crates/db/src/encoding/v2/keys/indexes/range/node.rs:153-163 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/range/edge.rs` and `crates/db/src/encoding/v2/keys/indexes/range/node.rs` as WHOLE FILES: this scan already matched 6 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 6) · ×1
  • Duplicated block (9–10 lines × 6) crates/db/src/migrations/vector_properties.rs:286 — crates/db/src/migrations/vector_properties.rs:286-295 | crates/db/src/migrations/vector_retirement.rs:391-399 | crates/db/src/migrations/vector_retirement.rs:518-526 | crates/db/src/migrations/vector_retirement.rs:652-660 | crates/db/src/migrations/vector_retirement.rs:761-770 | crates/db/src/migrations/vector_retirement.rs:920-929 — before extracting anything, compare `crates/db/src/migrations/vector_properties.rs` and `crates/db/src/migrations/vector_retirement.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) crates/db/src/migration_parity.rs:894 — crates/db/src/migration_parity.rs:894-902 | crates/db/src/migration_parity.rs:911-920 | crates/db/src/migration_parity.rs:960-969 — 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.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) crates/db/src/migrations/mod.rs:6896 — crates/db/src/migrations/mod.rs:6896-6905 | crates/db/src/migrations/mod.rs:7161-7167 — both copies are in the same file, so extract the 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 (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) crates/graph-algorithms/src/algorithms/centrality.rs:158 — crates/graph-algorithms/src/algorithms/centrality.rs:158-165 | crates/graph-algorithms/src/algorithms/centrality.rs:202-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 11) · ×1
  • Duplicated block (9 lines × 11) crates/db/src/encoding/v2/keys/graph.rs:32 — crates/db/src/encoding/v2/keys/graph.rs:32-40 | crates/db/src/encoding/v2/keys/graph.rs:103-111 | crates/db/src/encoding/v2/keys/graph.rs:174-182 | crates/db/src/encoding/v2/keys/graph.rs:254-262 | crates/db/src/encoding/v2/keys/graph.rs:324-332 | crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:110-118 | crates/db/src/encoding/v2/keys/indexes/equality/edge.rs:251-259 | crates/db/src/encoding/v2/keys/indexes/equality/node.rs:60-68 | crates/db/src/encoding/v2/keys/indexes/label.rs:41-49 | crates/db/src/encoding/v2/keys/indexes/label.rs:148-156 | crates/db/src/encoding/v2/legacy/edge_property_pair.rs:27-35 — before extracting anything, compare `crates/db/src/encoding/v2/keys/graph.rs` and `crates/db/src/encoding/v2/legacy/edge_property_pair.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 6) · ×1
  • Duplicated block (8–9 lines × 6) crates/db-testkit/src/model.rs:1018 — crates/db-testkit/src/model.rs:1018-1026 | crates/db/src/encoding/v2/values/property/canonical_number.rs:13-21 | crates/db/src/encoding/v2/values/property/property_value.rs:259-267 | crates/db/src/encoding/v2/values/property/property_value.rs:314-322 | crates/db/src/index_lifecycle/vector.rs:902-909 | crates/planner/src/analysis/scalar/values.rs:153-161 — before extracting anything, compare `crates/db/src/encoding/v2/values/property/property_value.rs` and `crates/planner/src/analysis/scalar/values.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) crates/planner/src/rules/access/sets/equality_range/intersection/mod.rs:13 — crates/planner/src/rules/access/sets/equality_range/intersection/mod.rs:13-21 | crates/planner/src/rules/access/sets/equality_range/range_union/mod.rs:13-21 | crates/planner/src/rules/access/sets/range/mod.rs:12-20 | crates/planner/src/rules/access/sets/subsumption/mod.rs:17-25 — 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.
D4 · Code Duplication · Duplicated block (7–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) crates/planner/src/exec/returns.rs:117 — crates/planner/src/exec/returns.rs:117-125 | crates/planner/src/planning/selected/native/family.rs:96-102 | crates/planner/src/planning/selected/native/pipeline/ops.rs:43-50 — 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 (5–9 lines × 2) · ×1
  • Duplicated block (5–9 lines × 2) crates/db/src/index_lifecycle_testing/contracts.rs:1484 — crates/db/src/index_lifecycle_testing/contracts.rs:1484-1488 | crates/db/src/index_lifecycle_testing/contracts.rs:1898-1906 — both copies are in the same file, so extract the 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 (7–8 lines × 6) · ×1
  • Duplicated block (7–8 lines × 6) crates/planner/src/exec/lowering/contracts/access/cardinality.rs:67 — crates/planner/src/exec/lowering/contracts/access/cardinality.rs:67-74 | crates/planner/src/rules/access/sets/canonical/node.rs:15-21 | crates/planner/src/rules/access/sets/canonical/node.rs:65-71 | crates/planner/src/rules/access/sets/canonical/node.rs:85-91 | crates/planner/src/rules/cardinality.rs:1050-1056 | crates/planner/src/rules/physical_contracts/access/source/node.rs:22-28 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7–8 lines × 5) · ×1
  • Duplicated block (7–8 lines × 5) crates/planner/src/exec/lowering/contracts/access/cardinality.rs:85 — crates/planner/src/exec/lowering/contracts/access/cardinality.rs:85-92 | crates/planner/src/rules/access/sets/canonical/edge.rs:15-21 | crates/planner/src/rules/access/sets/canonical/edge.rs:65-71 | crates/planner/src/rules/access/sets/canonical/edge.rs:85-91 | crates/planner/src/rules/physical_contracts/access/source/edge.rs:22-28 — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) crates/planner/src/planning/envelope/write_contract.rs:42 — crates/planner/src/planning/envelope/write_contract.rs:42-48 | crates/planner/src/planning/selected/native/context_usage.rs:34-40 | crates/planner/src/planning/selected/native/context_usage.rs:225-232 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (3–8 lines × 8) · ×1
  • Duplicated block (3–8 lines × 8) crates/db/src/search/vector/spaces/simple_avx.rs:25 — crates/db/src/search/vector/spaces/simple_avx.rs:25-27 | crates/db/src/search/vector/spaces/simple_avx.rs:80-82 | crates/db/src/search/vector/spaces/simple_avx.rs:138-140 | crates/db/src/search/vector/spaces/simple_avx.rs:194-196 | crates/db/src/search/vector/spaces/simple_neon.rs:18-25 | crates/db/src/search/vector/spaces/simple_neon.rs:64-71 | crates/db/src/search/vector/spaces/simple_sse.rs:27-29 | crates/db/src/search/vector/spaces/simple_sse.rs:79-81 — there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) crates/db/src/execution/interpreter/mod.rs:267 — crates/db/src/execution/interpreter/mod.rs:267-273 | crates/db/src/execution/interpreter/mutation/visibility.rs:123-129 | crates/db/src/execution/interpreter/pull/mod.rs:209-215 | crates/db/src/execution/interpreter/scheduler.rs:371-377 | crates/planner/src/diagnostics/analyze.rs:728-734 | crates/planner/src/diagnostics/analyze.rs:936-942 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×1
  • Duplicated block (6–7 lines × 4) crates/planner/src/exec/returns.rs:135 — crates/planner/src/exec/returns.rs:135-141 | crates/planner/src/planning/envelope/write_contract.rs:60-65 | crates/planner/src/planning/selected/native/context_usage.rs:60-65 | crates/planner/src/planning/selected/native/context_usage.rs:317-323 — before extracting anything, compare `crates/planner/src/planning/envelope/write_contract.rs` and `crates/planner/src/planning/selected/native/context_usage.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) crates/db/src/index_lifecycle/outbox.rs:980 — crates/db/src/index_lifecycle/outbox.rs:980-985 | crates/db/src/index_lifecycle/outbox.rs:1094-1100 | crates/db/src/index_lifecycle/outbox.rs:1121-1127 — 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.
D4 · Code Duplication · Duplicated block (4–7 lines × 3) · ×1
  • Duplicated block (4–7 lines × 3) crates/db/src/index_lifecycle/scope_gate.rs:105 — crates/db/src/index_lifecycle/scope_gate.rs:105-111 | crates/db/src/index_lifecycle/scope_gate.rs:119-125 | crates/db/src/index_lifecycle/scope_gate.rs:130-133 — 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.
D4 · Code Duplication · Duplicated block (3–7 lines × 3) · ×1
  • Duplicated block (3–7 lines × 3) crates/db/src/migrations/vector_simhash_directory.rs:540 — crates/db/src/migrations/vector_simhash_directory.rs:540-546 | crates/db/src/migrations/vector_simhash_directory.rs:627-629 | crates/db/src/migrations/vector_simhash_directory.rs:745-751 — 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.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) crates/planner/src/exec/lowering/access_leaf/edge.rs:45 — crates/planner/src/exec/lowering/access_leaf/edge.rs:45-97 | crates/planner/src/exec/lowering/access_leaf/node.rs:45-97 — 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.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×1
  • Duplicated block (51 lines × 2) crates/planner/src/exec/lowering/access_leaf/edge.rs:100 — crates/planner/src/exec/lowering/access_leaf/edge.rs:100-150 | crates/planner/src/exec/lowering/access_leaf/node.rs:100-150 — 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.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) crates/planner/src/ir/access/edge/analysis.rs:115 — crates/planner/src/ir/access/edge/analysis.rs:115-171 | crates/planner/src/ir/access/node/analysis.rs:120-176 — 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 (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) crates/planner/src/exec/selected/index_ddl.rs:31 — crates/planner/src/exec/selected/index_ddl.rs:31-65 | crates/planner/src/exec/selected/mutation/root.rs:26-60 — 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 (5 lines × 10) · ×1
  • Duplicated block (5 lines × 10) crates/db/src/encoding/v2/keys/indexes/equality/scans.rs:28 — crates/db/src/encoding/v2/keys/indexes/equality/scans.rs:28-32 | crates/db/src/encoding/v2/keys/indexes/equality/scans.rs:89-93 | crates/db/src/encoding/v2/keys/indexes/equality/scans.rs:178-182 | crates/db/src/encoding/v2/keys/indexes/label.rs:363-367 | crates/db/src/encoding/v2/keys/indexes/label.rs:407-411 | crates/db/src/encoding/v2/keys/indexes/range/scans.rs:29-33 | crates/db/src/encoding/v2/keys/indexes/range/scans.rs:142-146 | crates/db/src/encoding/v2/keys/indexes/range/scans.rs:259-263 | crates/db/src/encoding/v2/keys/indexes/vector/mod.rs:226-230 | crates/db/src/encoding/v2/keys/metadata.rs:65-69 — there are 10 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:222 — crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs:222-227 | crates/db/src/encoding/v2/keys/indexes/vector/layer0.rs:71-76 | crates/db/src/encoding/v2/keys/indexes/vector/reverse_edges.rs:74-79 | crates/db/src/encoding/v2/keys/indexes/vector/simhash.rs:215-220 | crates/db/src/encoding/v2/keys/indexes/vector/upper_layers.rs:159-164 — before extracting anything, compare `crates/db/src/encoding/v2/keys/indexes/vector/entry_candidates.rs` and `crates/db/src/encoding/v2/keys/indexes/vector/layer0.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) crates/db/src/search/vector/storage/mod.rs:809 — crates/db/src/search/vector/storage/mod.rs:809-819 | crates/db/src/search/vector/storage/mod.rs:842-852 | crates/db/src/search/vector/storage/mod.rs:864-874 | crates/db/src/search/vector/storage/mod.rs:893-903 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) crates/db/src/encoding/v2/keys/graph.rs:119 — crates/db/src/encoding/v2/keys/graph.rs:119-125 | crates/db/src/encoding/v2/keys/graph.rs:190-198 | crates/db/src/encoding/v2/keys/graph.rs:270-276 | crates/db/src/encoding/v2/legacy/edge_property_pair.rs:42-49 — before extracting anything, compare `crates/db/src/encoding/v2/keys/graph.rs` and `crates/db/src/encoding/v2/legacy/edge_property_pair.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) crates/db/src/migrations/vector_properties.rs:258 — crates/db/src/migrations/vector_properties.rs:258-266 | crates/db/src/migrations/vector_retirement.rs:363-371 | crates/db/src/migrations/vector_retirement.rs:490-498 | crates/db/src/migrations/vector_retirement.rs:620-628 | crates/db/src/migrations/vector_retirement.rs:735-743 | crates/db/src/migrations/vector_retirement.rs:892-900 — before extracting anything, compare `crates/db/src/migrations/vector_properties.rs` and `crates/db/src/migrations/vector_retirement.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 4) · ×1
  • Duplicated block (5 lines × 4) crates/db/src/migration_parity.rs:1332 — crates/db/src/migration_parity.rs:1332-1336 | crates/db/src/migration_parity.rs:1364-1368 | crates/db/src/migration_parity.rs:1442-1446 | crates/db/src/migration_parity.rs:1479-1483 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–12 lines × 4) · ×1
  • Duplicated block (10–12 lines × 4) sdks/python/scripts/run_embedded_parity.py:299 — sdks/python/scripts/run_embedded_parity.py:299-310 | sdks/python/scripts/run_embedded_parity.py:332-343 | sdks/python/scripts/run_server_parity.py:403-412 | sdks/python/scripts/run_server_parity.py:421-430 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `sdks/python/scripts/run_embedded_parity.py:299` 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.
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: Rust 1.97 — rust-toolchain.toml declares Rust 1.97 as this project's toolchain file, and Rust 1.97, superseded by 1.98 on 2026-08-20 (the Rust project patches only the current stable). An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-08-20 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
R10 · Code Duplication · Duplicated block (49 lines × 2 locations) · ×1
  • Duplicated block (49 lines × 2 locations) sdks/typescript/src/dsl.ts:2586 — sdks/typescript/src/dsl.ts:2586 · sdks/typescript/src/dsl.ts:2655 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×1
  • Duplicated block (26 lines × 2 locations) sdks/typescript/src/dsl.ts:2084 — sdks/typescript/src/dsl.ts:2084 · sdks/typescript/src/dsl.ts:2122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) sdks/typescript/src/dsl.ts:483 — sdks/typescript/src/dsl.ts:483 · sdks/typescript/src/dsl.ts:514 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×1
  • Duplicated block (19 lines × 2 locations) sdks/typescript/src/dsl.ts:1985 — sdks/typescript/src/dsl.ts:1985 · sdks/typescript/src/dsl.ts:2013 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×1
  • Duplicated block (16 lines × 2 locations) sdks/typescript/src/dsl.ts:2564 — sdks/typescript/src/dsl.ts:2564 · sdks/typescript/src/dsl.ts:2631 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×1
  • Duplicated block (15 lines × 2 locations) sdks/typescript/src/index.ts:271 — sdks/typescript/src/index.ts:271 · sdks/typescript/src/index.ts:287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×1
  • Duplicated block (14 lines × 2 locations) sdks/typescript/src/dsl.ts:2047 — sdks/typescript/src/dsl.ts:2047 · sdks/typescript/src/dsl.ts:2157 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×1
  • Duplicated block (12 lines × 2 locations) sdks/typescript/src/dsl.ts:1091 — sdks/typescript/src/dsl.ts:1091 · sdks/typescript/src/dsl.ts:1106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) sdks/typescript/src/dsl.ts:2908 — sdks/typescript/src/dsl.ts:2908 · sdks/typescript/src/dsl.ts:2973 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (7 lines × 2 locations) · ×1
  • Duplicated block (7 lines × 2 locations) sdks/typescript/scripts/edge-drop-regression.ts:23 — sdks/typescript/scripts/edge-drop-regression.ts:23 · sdks/typescript/scripts/edge-drop-regression.ts:38 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (7 lines × 3 locations) · ×1
  • Duplicated block (7 lines × 3 locations) sdks/typescript/src/dsl.ts:702 — sdks/typescript/src/dsl.ts:702 · sdks/typescript/src/dsl.ts:709 · sdks/typescript/src/dsl.ts:719 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 10 locations) · ×1
  • Duplicated block (6 lines × 10 locations) sdks/typescript/src/dsl.ts:2246 — sdks/typescript/src/dsl.ts:2246 · sdks/typescript/src/dsl.ts:2252 · sdks/typescript/src/dsl.ts:2258 · sdks/typescript/src/dsl.ts:2267 · +6 more site(s) not listed — all 10 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 4 locations) · ×1
  • Duplicated block (6 lines × 4 locations) sdks/typescript/src/dsl.ts:2255 — sdks/typescript/src/dsl.ts:2255 · sdks/typescript/src/dsl.ts:2357 · sdks/typescript/src/dsl.ts:2363 · sdks/typescript/src/dsl.ts:2375 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 3 locations) · ×1
  • Duplicated block (6 lines × 3 locations) sdks/typescript/src/dsl.ts:2297 — sdks/typescript/src/dsl.ts:2297 · sdks/typescript/src/dsl.ts:2303 · sdks/typescript/src/dsl.ts:2321 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×1
  • Duplicated block (5 lines × 2 locations) sdks/typescript/scripts/parity/generate-fixtures.ts:743 — sdks/typescript/scripts/parity/generate-fixtures.ts:743 · sdks/typescript/scripts/parity/generate-fixtures.ts:763 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function toAst (cyclomatic 86, cognitive 4) · ×1
  • Complex function toAst (cyclomatic 86, cognitive 4) sdks/typescript/src/dsl.ts:1703 — toAst has cyclomatic complexity 86 and cognitive complexity 4; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function remote (cyclomatic 25, cognitive 31) · ×1
  • Complex function remote (cyclomatic 25, cognitive 31) sdks/typescript/src/index.ts:72 — remote has cyclomatic complexity 25 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function convertParamValue (cyclomatic 23, cognitive 22) · ×1
  • Complex function convertParamValue (cyclomatic 23, cognitive 22) sdks/typescript/src/dsl.ts:2902 — convertParamValue has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function normalizeTypedQueryValue (cyclomatic 22, cognitive 20) · ×1
  • Complex function normalizeTypedQueryValue (cyclomatic 22, cognitive 20) sdks/typescript/src/dsl.ts:2966 — normalizeTypedQueryValue has cyclomatic complexity 22 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function from (cyclomatic 19, cognitive 22) · ×1
  • Complex function from (cyclomatic 19, cognitive 22) sdks/typescript/src/dsl.ts:405 — from has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function quoteUnsafeIntegerTokens (cyclomatic 16, cognitive 29) · ×1
  • Complex function quoteUnsafeIntegerTokens (cyclomatic 16, cognitive 29) sdks/typescript/src/dsl.ts:97 — quoteUnsafeIntegerTokens has cyclomatic complexity 16 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function stringifyEncoded (cyclomatic 16, cognitive 19) · ×1
  • Complex function stringifyEncoded (cyclomatic 16, cognitive 19) sdks/typescript/src/dsl.ts:160 — stringifyEncoded has cyclomatic complexity 16 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseIndexOperationStatus (cyclomatic 16, cognitive 16) · ×1
  • Complex function parseIndexOperationStatus (cyclomatic 16, cognitive 16) sdks/typescript/src/dsl.ts:1302 — parseIndexOperationStatus has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function queryValueFromPropertyValue (cyclomatic 16, cognitive 3) · ×1
  • Complex function queryValueFromPropertyValue (cyclomatic 16, cognitive 3) sdks/typescript/src/dsl.ts:3000 — queryValueFromPropertyValue has cyclomatic complexity 16 and cognitive complexity 3; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function constructor (cyclomatic 14, cognitive 16) · ×1
  • Complex function constructor (cyclomatic 14, cognitive 16) sdks/typescript/src/graph.ts:46 — constructor has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function encode (cyclomatic 12, cognitive 14) · ×1
  • Complex function encode (cyclomatic 12, cognitive 14) sdks/typescript/src/dsl.ts:10 — encode has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (top-level) (cyclomatic 11, cognitive 16) · ×1
  • Complex function (top-level) (cyclomatic 11, cognitive 16) sdks/typescript/scripts/package-smoke.mjs:2 — (top-level) has cyclomatic complexity 11 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · Large Files · ×1
  • Large Files — 3 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: sdks/typescript/src/dsl.ts (3097), sdks/typescript/scripts/parity/generate-fixtures.ts (1271), sdks/typescript/src/index.ts (438).
R7 · Dead Code · Dead file (~137 LoC) · ×1
  • Dead file (~137 LoC) sdks/typescript/scripts/parity/run-embedded-client.ts — no import path from any entry point (15 application, 4 tooling, 10 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~53 LoC) · ×1
  • Dead file (~53 LoC) sdks/typescript/scripts/edge-drop-regression.ts — no import path from any entry point (15 application, 4 tooling, 10 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Minor — 25 finding(s)
D16 · Bus Factor · Off-boarding risk · ×4
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 136 significant file(s) lose their only recent owner: crates/db/src/migrations/mod.rs, crates/db/src/index_lifecycle/vector/driver.rs, crates/db/src/search/vector/hnsw/mutation/mod.rs, crates/db/src/search/mod.rs, crates/db/src/search/vector/hnsw/index.rs, crates/db/src/index_lifecycle/outbox.rs, crates/db/src/search/text/mod.rs, crates/db/src/search/vector/cache/registry.rs (+128 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 27 significant file(s) lose their only recent owner: crates/planner/src/exec/count.rs, bindings/uniffi/src/graph.rs, crates/db/src/id_allocator.rs, crates/planner/src/error/mod.rs, crates/planner/src/rules/access/filter/diagnostics.rs, crates/planner/src/exec/selected/lowering/contracts/matching/access/source/tests.rs, crates/planner/src/rules/access/filter/atoms/mod.rs, scripts/compare-v2-planner-bench.py (+19 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 5 significant file(s) lose their only recent owner: crates/db/src/execution/interpreter/stream/aggregate.rs, crates/planner/src/ir/index_ddl.rs, crates/planner/src/analysis/scalar/values.rs, crates/planner/src/analysis/scalar/constraints/property.rs, crates/planner/src/analysis/scalar/truth.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 5 significant file(s) lose their only recent owner: crates/graph-algorithms/src/algorithms/louvain.rs, crates/graph-algorithms/src/algorithms/cycles.rs, crates/db/src/search/vector/spaces/simple_avx.rs, crates/db/src/search/vector/spaces/simple_sse.rs, crates/db/src/search/vector/spaces/mod.rs. Pair on, review, or document these before any departure.
X10 · Duplicated predicate · Duplicated predicate · ×3
  • Duplicated predicate sdks/typescript/scripts/parity/compare-json.ts:81 — `entry.isFile() && entry.name.endsWith(".json")` appears character-identically in 3 files — sdks/typescript/scripts/parity/compare-json.ts, sdks/typescript/scripts/parity/run-embedded-parity.ts, sdks/typescript/scripts/parity/run-helix.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 sdks/typescript/scripts/parity/run-embedded-client.ts:135 — `value === null || typeof value !== "object" || !(field in value)` appears character-identically in 2 files — sdks/typescript/scripts/parity/run-embedded-client.ts, sdks/typescript/scripts/parity/run-helix.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 crates/db/src/index_lifecycle/secondary.rs:2727 — `property.name == "$label" && property.value.as_str() == Some(definition.label().as_str())` appears character-identically in 3 files — crates/db/src/index_lifecycle/secondary.rs, crates/db/src/index_lifecycle/text/projection.rs, crates/db/src/index_lifecycle/vector.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.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×3
  • Hand-rolled JSON/XML parsing via regex docs/scripts/check-docs.mjs:75 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex docs/scripts/check-docs.mjs:76 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex docs/scripts/check-docs.mjs:77 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (176 single-owned of 743 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 743 of the 1259 production source files in this repository met that bar). They are anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: no contributor guidance README.md — No contribution guidance for contributors appears in the visible text. Add a short CONTRIBUTING.md entry covering pull request process, CI/CD, and how to run tests.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Split crates/db · ×1
  • Split crates/db — A huge data-access project whose namespaces are all sub-branches of a single table family (search/vector/encoding/migrations/index_lifecycle) and whose public types sit overwhelmingly in one namespace. Suggested:
D26 · Project Cohesion · Split crates/planner · ×1
  • Split crates/planner — A massive planner whose namespaces are all sub-branches of a single planning engine (exec/ir/catalog/experiments/logical/physical) and whose public types sit overwhelmingly in one namespace. Suggested:
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `bindings/uniffi`, `bindings/uniffi-bindgen`, `crates/cli`, `crates/metrics` and 2 more.
R7 · Dead Code · Unused export 'workspacesRoot' · ×1
  • Unused export 'workspacesRoot' sdks/typescript/scripts/parity/paths.ts:14 — Nothing imports this binding — it is safe to review for removal.

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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-adb66d3987a74c1db887383642fc8bd5/history.json --exit-code 0 --source .13artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-adb66d3987a74c1db887383642fc8bd5/tree.json --exit-code 0 --source .0artifacts/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/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .172artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update28artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .3artifacts/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 2 file(s) — `REDACTED`, `sdks/typescript/src/dsl.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.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/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a0ef20-0d96-73bc-82d7-78b50b3da3af · 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